{"version":3,"file":"index.mjs","names":["exports","EventEmitter","Buffer","Buffer","#limit","#signal","#snapshot","#ended","#count","#startWork","#endWork","#destroy","#working","#closingPromise","#pendingClose","#privateClose","#keys","#values","#db","#privateOperations","#publicOperations","#publicOperations","#addMode","#prewriteData","#prewriteBatch","#prewriteRun","#length","#assertStatus","#status","#prepareClose","#closePromise","#privateClose","#encoded","#isAsync","#runner","#functions","#operations","#signals","#handleAbort","#iterator","#unfix","#parent","#localPath","#globalPath","#globalPrefix","#globalUpperBound","#localPrefix","#unfix","Buffer","#prefixRange","#resources","#queue","#options","#eventMonitor","#transcoder","#keyEncoding","#valueEncoding","#defaultOptions","#deferOpen","#status","#assertUnlocked","#statusChange","#closeResources","#statusLocked","#assertOpen","#arrayBatch","#owner","#open","#referenceCount","#pendingClose","#closePromise","path","#sharedBuffer","#createSharedBuffer","#tree","#clearKey","crypto"],"sources":["../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js","../node_modules/.pnpm/lazy@1.0.11/node_modules/lazy/lazy.js","../node_modules/.pnpm/level-supports@6.2.0/node_modules/level-supports/index.js","../node_modules/.pnpm/module-error@1.0.2/node_modules/module-error/index.js","../node_modules/.pnpm/level-transcoder@1.0.1/node_modules/level-transcoder/lib/text-endec.js","../node_modules/.pnpm/level-transcoder@1.0.1/node_modules/level-transcoder/lib/encoding.js","../node_modules/.pnpm/level-transcoder@1.0.1/node_modules/level-transcoder/lib/formats.js","../node_modules/.pnpm/level-transcoder@1.0.1/node_modules/level-transcoder/lib/encodings.js","../node_modules/.pnpm/level-transcoder@1.0.1/node_modules/level-transcoder/index.js","../node_modules/.pnpm/maybe-combine-errors@1.0.0/node_modules/maybe-combine-errors/index.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/common.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/errors.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/abstract-iterator.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/default-kv-iterator.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/deferred-iterator.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/prefixes.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/prewrite-batch.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/abstract-chained-batch.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/default-chained-batch.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/hooks.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/event-monitor.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/deferred-queue.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/range-options.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/abstract-sublevel-iterator.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/lib/abstract-sublevel.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/abstract-level.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/abstract-snapshot.js","../node_modules/.pnpm/abstract-level@3.1.1/node_modules/abstract-level/index.js","../node_modules/.pnpm/tsdown@0.21.8_typescript@6.0.2/node_modules/tsdown/esm-shims.js","../node_modules/.pnpm/node-gyp-build@4.8.4/node_modules/node-gyp-build/node-gyp-build.js","../node_modules/.pnpm/node-gyp-build@4.8.4/node_modules/node-gyp-build/index.js","../node_modules/.pnpm/classic-level@3.0.0/node_modules/classic-level/binding.js","../node_modules/.pnpm/classic-level@3.0.0/node_modules/classic-level/chained-batch.js","../node_modules/.pnpm/classic-level@3.0.0/node_modules/classic-level/iterator.js","../node_modules/.pnpm/classic-level@3.0.0/node_modules/classic-level/index.js","../node_modules/.pnpm/level@10.0.0/node_modules/level/index.js","../node_modules/.pnpm/functional-red-black-tree@1.0.1/node_modules/functional-red-black-tree/rbtree.js","../node_modules/.pnpm/memory-level@3.1.0/node_modules/memory-level/lib/compare.js","../node_modules/.pnpm/memory-level@3.1.0/node_modules/memory-level/lib/breathe.js","../node_modules/.pnpm/memory-level@3.1.0/node_modules/memory-level/lib/iterator.js","../node_modules/.pnpm/memory-level@3.1.0/node_modules/memory-level/lib/is-range-option.js","../node_modules/.pnpm/memory-level@3.1.0/node_modules/memory-level/index.js","../node_modules/.pnpm/lock@1.1.0/node_modules/lock/index.js","../node_modules/.pnpm/big.js@6.2.2/node_modules/big.js/big.js","../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js","../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/db/lifecycle.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/db/index.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/db/conditionParser.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/db/projectionParser.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/db/updateParser.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/index.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/getItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/batchGetItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/putItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/deleteItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/batchWriteItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/createTable.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/deleteTable.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/describeTable.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/describeTimeToLive.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/listTables.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/listTagsOfResource.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/query.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/scan.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/tagResource.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/untagResource.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/updateItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/actions/updateTable.js","../src/actions.ts","../src/auth.ts","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/batchGetItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/batchWriteItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/createTable.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/deleteItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/deleteTable.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/describeTable.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/describeTimeToLive.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/getItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/listTables.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/listTagsOfResource.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/putItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/query.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/scan.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/tagResource.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/untagResource.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/updateItem.js","../node_modules/.pnpm/dynalite@4.0.0/node_modules/dynalite/validations/updateTable.js","../src/validations.ts","../src/index.ts"],"sourcesContent":["(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n    typeof define === 'function' && define.amd ? define(['exports'], factory) :\n    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.async = {}));\n})(this, (function (exports) { 'use strict';\n\n    /**\n     * Creates a continuation function with some arguments already applied.\n     *\n     * Useful as a shorthand when combined with other control flow functions. Any\n     * arguments passed to the returned function are added to the arguments\n     * originally passed to apply.\n     *\n     * @name apply\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {Function} fn - The function you want to eventually apply all\n     * arguments to. Invokes with (arguments...).\n     * @param {...*} arguments... - Any number of arguments to automatically apply\n     * when the continuation is called.\n     * @returns {Function} the partially-applied function\n     * @example\n     *\n     * // using apply\n     * async.parallel([\n     *     async.apply(fs.writeFile, 'testfile1', 'test1'),\n     *     async.apply(fs.writeFile, 'testfile2', 'test2')\n     * ]);\n     *\n     *\n     * // the same process without using apply\n     * async.parallel([\n     *     function(callback) {\n     *         fs.writeFile('testfile1', 'test1', callback);\n     *     },\n     *     function(callback) {\n     *         fs.writeFile('testfile2', 'test2', callback);\n     *     }\n     * ]);\n     *\n     * // It's possible to pass any number of additional arguments when calling the\n     * // continuation:\n     *\n     * node> var fn = async.apply(sys.puts, 'one');\n     * node> fn('two', 'three');\n     * one\n     * two\n     * three\n     */\n    function apply(fn, ...args) {\n        return (...callArgs) => fn(...args,...callArgs);\n    }\n\n    function initialParams (fn) {\n        return function (...args/*, callback*/) {\n            var callback = args.pop();\n            return fn.call(this, args, callback);\n        };\n    }\n\n    /* istanbul ignore file */\n\n    var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask;\n    var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;\n    var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';\n\n    function fallback(fn) {\n        setTimeout(fn, 0);\n    }\n\n    function wrap(defer) {\n        return (fn, ...args) => defer(() => fn(...args));\n    }\n\n    var _defer$1;\n\n    if (hasQueueMicrotask) {\n        _defer$1 = queueMicrotask;\n    } else if (hasSetImmediate) {\n        _defer$1 = setImmediate;\n    } else if (hasNextTick) {\n        _defer$1 = process.nextTick;\n    } else {\n        _defer$1 = fallback;\n    }\n\n    var setImmediate$1 = wrap(_defer$1);\n\n    /**\n     * Take a sync function and make it async, passing its return value to a\n     * callback. This is useful for plugging sync functions into a waterfall,\n     * series, or other async functions. Any arguments passed to the generated\n     * function will be passed to the wrapped function (except for the final\n     * callback argument). Errors thrown will be passed to the callback.\n     *\n     * If the function passed to `asyncify` returns a Promise, that promises's\n     * resolved/rejected state will be used to call the callback, rather than simply\n     * the synchronous return value.\n     *\n     * This also means you can asyncify ES2017 `async` functions.\n     *\n     * @name asyncify\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @alias wrapSync\n     * @category Util\n     * @param {Function} func - The synchronous function, or Promise-returning\n     * function to convert to an {@link AsyncFunction}.\n     * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be\n     * invoked with `(args..., callback)`.\n     * @example\n     *\n     * // passing a regular synchronous function\n     * async.waterfall([\n     *     async.apply(fs.readFile, filename, \"utf8\"),\n     *     async.asyncify(JSON.parse),\n     *     function (data, next) {\n     *         // data is the result of parsing the text.\n     *         // If there was a parsing error, it would have been caught.\n     *     }\n     * ], callback);\n     *\n     * // passing a function returning a promise\n     * async.waterfall([\n     *     async.apply(fs.readFile, filename, \"utf8\"),\n     *     async.asyncify(function (contents) {\n     *         return db.model.create(contents);\n     *     }),\n     *     function (model, next) {\n     *         // `model` is the instantiated model object.\n     *         // If there was an error, this function would be skipped.\n     *     }\n     * ], callback);\n     *\n     * // es2017 example, though `asyncify` is not needed if your JS environment\n     * // supports async functions out of the box\n     * var q = async.queue(async.asyncify(async function(file) {\n     *     var intermediateStep = await processFile(file);\n     *     return await somePromise(intermediateStep)\n     * }));\n     *\n     * q.push(files);\n     */\n    function asyncify(func) {\n        if (isAsync(func)) {\n            return function (...args/*, callback*/) {\n                const callback = args.pop();\n                const promise = func.apply(this, args);\n                return handlePromise(promise, callback)\n            }\n        }\n\n        return initialParams(function (args, callback) {\n            var result;\n            try {\n                result = func.apply(this, args);\n            } catch (e) {\n                return callback(e);\n            }\n            // if result is Promise object\n            if (result && typeof result.then === 'function') {\n                return handlePromise(result, callback)\n            } else {\n                callback(null, result);\n            }\n        });\n    }\n\n    function handlePromise(promise, callback) {\n        return promise.then(value => {\n            invokeCallback(callback, null, value);\n        }, err => {\n            invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err));\n        });\n    }\n\n    function invokeCallback(callback, error, value) {\n        try {\n            callback(error, value);\n        } catch (err) {\n            setImmediate$1(e => { throw e }, err);\n        }\n    }\n\n    function isAsync(fn) {\n        return fn[Symbol.toStringTag] === 'AsyncFunction';\n    }\n\n    function isAsyncGenerator(fn) {\n        return fn[Symbol.toStringTag] === 'AsyncGenerator';\n    }\n\n    function isAsyncIterable(obj) {\n        return typeof obj[Symbol.asyncIterator] === 'function';\n    }\n\n    function wrapAsync(asyncFn) {\n        if (typeof asyncFn !== 'function') throw new Error('expected a function')\n        return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;\n    }\n\n    // conditionally promisify a function.\n    // only return a promise if a callback is omitted\n    function awaitify (asyncFn, arity) {\n        if (!arity) arity = asyncFn.length;\n        if (!arity) throw new Error('arity is undefined')\n        function awaitable (...args) {\n            if (typeof args[arity - 1] === 'function') {\n                return asyncFn.apply(this, args)\n            }\n\n            return new Promise((resolve, reject) => {\n                args[arity - 1] = (err, ...cbArgs) => {\n                    if (err) return reject(err)\n                    resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]);\n                };\n                asyncFn.apply(this, args);\n            })\n        }\n\n        return awaitable\n    }\n\n    function applyEach$1 (eachfn) {\n        return function applyEach(fns, ...callArgs) {\n            const go = awaitify(function (callback) {\n                var that = this;\n                return eachfn(fns, (fn, cb) => {\n                    wrapAsync(fn).apply(that, callArgs.concat(cb));\n                }, callback);\n            });\n            return go;\n        };\n    }\n\n    function _asyncMap(eachfn, arr, iteratee, callback) {\n        arr = arr || [];\n        var results = [];\n        var counter = 0;\n        var _iteratee = wrapAsync(iteratee);\n\n        return eachfn(arr, (value, _, iterCb) => {\n            var index = counter++;\n            _iteratee(value, (err, v) => {\n                results[index] = v;\n                iterCb(err);\n            });\n        }, err => {\n            callback(err, results);\n        });\n    }\n\n    function isArrayLike(value) {\n        return value &&\n            typeof value.length === 'number' &&\n            value.length >= 0 &&\n            value.length % 1 === 0;\n    }\n\n    // A temporary value used to identify if the loop should be broken.\n    // See #1064, #1293\n    const breakLoop = {};\n\n    function once(fn) {\n        function wrapper (...args) {\n            if (fn === null) return;\n            var callFn = fn;\n            fn = null;\n            callFn.apply(this, args);\n        }\n        Object.assign(wrapper, fn);\n        return wrapper\n    }\n\n    function getIterator (coll) {\n        return coll[Symbol.iterator] && coll[Symbol.iterator]();\n    }\n\n    function createArrayIterator(coll) {\n        var i = -1;\n        var len = coll.length;\n        return function next() {\n            return ++i < len ? {value: coll[i], key: i} : null;\n        }\n    }\n\n    function createES2015Iterator(iterator) {\n        var i = -1;\n        return function next() {\n            var item = iterator.next();\n            if (item.done)\n                return null;\n            i++;\n            return {value: item.value, key: i};\n        }\n    }\n\n    function createObjectIterator(obj) {\n        var okeys = obj ? Object.keys(obj) : [];\n        var i = -1;\n        var len = okeys.length;\n        return function next() {\n            var key = okeys[++i];\n            if (key === '__proto__') {\n                return next();\n            }\n            return i < len ? {value: obj[key], key} : null;\n        };\n    }\n\n    function createIterator(coll) {\n        if (isArrayLike(coll)) {\n            return createArrayIterator(coll);\n        }\n\n        var iterator = getIterator(coll);\n        return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);\n    }\n\n    function onlyOnce(fn) {\n        return function (...args) {\n            if (fn === null) throw new Error(\"Callback was already called.\");\n            var callFn = fn;\n            fn = null;\n            callFn.apply(this, args);\n        };\n    }\n\n    // for async generators\n    function asyncEachOfLimit(generator, limit, iteratee, callback) {\n        let done = false;\n        let canceled = false;\n        let awaiting = false;\n        let running = 0;\n        let idx = 0;\n\n        function replenish() {\n            //console.log('replenish')\n            if (running >= limit || awaiting || done) return\n            //console.log('replenish awaiting')\n            awaiting = true;\n            generator.next().then(({value, done: iterDone}) => {\n                //console.log('got value', value)\n                if (canceled || done) return\n                awaiting = false;\n                if (iterDone) {\n                    done = true;\n                    if (running <= 0) {\n                        //console.log('done nextCb')\n                        callback(null);\n                    }\n                    return;\n                }\n                running++;\n                iteratee(value, idx, iterateeCallback);\n                idx++;\n                replenish();\n            }).catch(handleError);\n        }\n\n        function iterateeCallback(err, result) {\n            //console.log('iterateeCallback')\n            running -= 1;\n            if (canceled) return\n            if (err) return handleError(err)\n\n            if (err === false) {\n                done = true;\n                canceled = true;\n                return\n            }\n\n            if (result === breakLoop || (done && running <= 0)) {\n                done = true;\n                //console.log('done iterCb')\n                return callback(null);\n            }\n            replenish();\n        }\n\n        function handleError(err) {\n            if (canceled) return\n            awaiting = false;\n            done = true;\n            callback(err);\n        }\n\n        replenish();\n    }\n\n    var eachOfLimit$2 = (limit) => {\n        return (obj, iteratee, callback) => {\n            callback = once(callback);\n            if (limit <= 0) {\n                throw new RangeError('concurrency limit cannot be less than 1')\n            }\n            if (!obj) {\n                return callback(null);\n            }\n            if (isAsyncGenerator(obj)) {\n                return asyncEachOfLimit(obj, limit, iteratee, callback)\n            }\n            if (isAsyncIterable(obj)) {\n                return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback)\n            }\n            var nextElem = createIterator(obj);\n            var done = false;\n            var canceled = false;\n            var running = 0;\n            var looping = false;\n\n            function iterateeCallback(err, value) {\n                if (canceled) return\n                running -= 1;\n                if (err) {\n                    done = true;\n                    callback(err);\n                }\n                else if (err === false) {\n                    done = true;\n                    canceled = true;\n                }\n                else if (value === breakLoop || (done && running <= 0)) {\n                    done = true;\n                    return callback(null);\n                }\n                else if (!looping) {\n                    replenish();\n                }\n            }\n\n            function replenish () {\n                looping = true;\n                while (running < limit && !done) {\n                    var elem = nextElem();\n                    if (elem === null) {\n                        done = true;\n                        if (running <= 0) {\n                            callback(null);\n                        }\n                        return;\n                    }\n                    running += 1;\n                    iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));\n                }\n                looping = false;\n            }\n\n            replenish();\n        };\n    };\n\n    /**\n     * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a\n     * time.\n     *\n     * @name eachOfLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.eachOf]{@link module:Collections.eachOf}\n     * @alias forEachOfLimit\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - An async function to apply to each\n     * item in `coll`. The `key` is the item's key, or index in the case of an\n     * array.\n     * Invoked with (item, key, callback).\n     * @param {Function} [callback] - A callback which is called when all\n     * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n     * @returns {Promise} a promise, if a callback is omitted\n     */\n    function eachOfLimit(coll, limit, iteratee, callback) {\n        return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback);\n    }\n\n    var eachOfLimit$1 = awaitify(eachOfLimit, 4);\n\n    // eachOf implementation optimized for array-likes\n    function eachOfArrayLike(coll, iteratee, callback) {\n        callback = once(callback);\n        var index = 0,\n            completed = 0,\n            {length} = coll,\n            canceled = false;\n        if (length === 0) {\n            callback(null);\n        }\n\n        function iteratorCallback(err, value) {\n            if (err === false) {\n                canceled = true;\n            }\n            if (canceled === true) return\n            if (err) {\n                callback(err);\n            } else if ((++completed === length) || value === breakLoop) {\n                callback(null);\n            }\n        }\n\n        for (; index < length; index++) {\n            iteratee(coll[index], index, onlyOnce(iteratorCallback));\n        }\n    }\n\n    // a generic version of eachOf which can handle array, object, and iterator cases.\n    function eachOfGeneric (coll, iteratee, callback) {\n        return eachOfLimit$1(coll, Infinity, iteratee, callback);\n    }\n\n    /**\n     * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument\n     * to the iteratee.\n     *\n     * @name eachOf\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @alias forEachOf\n     * @category Collection\n     * @see [async.each]{@link module:Collections.each}\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - A function to apply to each\n     * item in `coll`.\n     * The `key` is the item's key, or index in the case of an array.\n     * Invoked with (item, key, callback).\n     * @param {Function} [callback] - A callback which is called when all\n     * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n     * @returns {Promise} a promise, if a callback is omitted\n     * @example\n     *\n     * // dev.json is a file containing a valid json object config for dev environment\n     * // dev.json is a file containing a valid json object config for test environment\n     * // prod.json is a file containing a valid json object config for prod environment\n     * // invalid.json is a file with a malformed json object\n     *\n     * let configs = {}; //global variable\n     * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};\n     * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};\n     *\n     * // asynchronous function that reads a json file and parses the contents as json object\n     * function parseFile(file, key, callback) {\n     *     fs.readFile(file, \"utf8\", function(err, data) {\n     *         if (err) return calback(err);\n     *         try {\n     *             configs[key] = JSON.parse(data);\n     *         } catch (e) {\n     *             return callback(e);\n     *         }\n     *         callback();\n     *     });\n     * }\n     *\n     * // Using callbacks\n     * async.forEachOf(validConfigFileMap, parseFile, function (err) {\n     *     if (err) {\n     *         console.error(err);\n     *     } else {\n     *         console.log(configs);\n     *         // configs is now a map of JSON data, e.g.\n     *         // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}\n     *     }\n     * });\n     *\n     * //Error handing\n     * async.forEachOf(invalidConfigFileMap, parseFile, function (err) {\n     *     if (err) {\n     *         console.error(err);\n     *         // JSON parse error exception\n     *     } else {\n     *         console.log(configs);\n     *     }\n     * });\n     *\n     * // Using Promises\n     * async.forEachOf(validConfigFileMap, parseFile)\n     * .then( () => {\n     *     console.log(configs);\n     *     // configs is now a map of JSON data, e.g.\n     *     // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}\n     * }).catch( err => {\n     *     console.error(err);\n     * });\n     *\n     * //Error handing\n     * async.forEachOf(invalidConfigFileMap, parseFile)\n     * .then( () => {\n     *     console.log(configs);\n     * }).catch( err => {\n     *     console.error(err);\n     *     // JSON parse error exception\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.forEachOf(validConfigFileMap, parseFile);\n     *         console.log(configs);\n     *         // configs is now a map of JSON data, e.g.\n     *         // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * //Error handing\n     * async () => {\n     *     try {\n     *         let result = await async.forEachOf(invalidConfigFileMap, parseFile);\n     *         console.log(configs);\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *         // JSON parse error exception\n     *     }\n     * }\n     *\n     */\n    function eachOf(coll, iteratee, callback) {\n        var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;\n        return eachOfImplementation(coll, wrapAsync(iteratee), callback);\n    }\n\n    var eachOf$1 = awaitify(eachOf, 3);\n\n    /**\n     * Produces a new collection of values by mapping each value in `coll` through\n     * the `iteratee` function. The `iteratee` is called with an item from `coll`\n     * and a callback for when it has finished processing. Each of these callbacks\n     * takes 2 arguments: an `error`, and the transformed item from `coll`. If\n     * `iteratee` passes an error to its callback, the main `callback` (for the\n     * `map` function) is immediately called with the error.\n     *\n     * Note, that since this function applies the `iteratee` to each item in\n     * parallel, there is no guarantee that the `iteratee` functions will complete\n     * in order. However, the results array will be in the same order as the\n     * original `coll`.\n     *\n     * If `map` is passed an Object, the results will be an Array.  The results\n     * will roughly be in the order of the original Objects' keys (but this can\n     * vary across JavaScript engines).\n     *\n     * @name map\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The iteratee should complete with the transformed item.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. Results is an Array of the\n     * transformed items from the `coll`. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * // file1.txt is a file that is 1000 bytes in size\n     * // file2.txt is a file that is 2000 bytes in size\n     * // file3.txt is a file that is 3000 bytes in size\n     * // file4.txt does not exist\n     *\n     * const fileList = ['file1.txt','file2.txt','file3.txt'];\n     * const withMissingFileList = ['file1.txt','file2.txt','file4.txt'];\n     *\n     * // asynchronous function that returns the file size in bytes\n     * function getFileSizeInBytes(file, callback) {\n     *     fs.stat(file, function(err, stat) {\n     *         if (err) {\n     *             return callback(err);\n     *         }\n     *         callback(null, stat.size);\n     *     });\n     * }\n     *\n     * // Using callbacks\n     * async.map(fileList, getFileSizeInBytes, function(err, results) {\n     *     if (err) {\n     *         console.log(err);\n     *     } else {\n     *         console.log(results);\n     *         // results is now an array of the file size in bytes for each file, e.g.\n     *         // [ 1000, 2000, 3000]\n     *     }\n     * });\n     *\n     * // Error Handling\n     * async.map(withMissingFileList, getFileSizeInBytes, function(err, results) {\n     *     if (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *     } else {\n     *         console.log(results);\n     *     }\n     * });\n     *\n     * // Using Promises\n     * async.map(fileList, getFileSizeInBytes)\n     * .then( results => {\n     *     console.log(results);\n     *     // results is now an array of the file size in bytes for each file, e.g.\n     *     // [ 1000, 2000, 3000]\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Error Handling\n     * async.map(withMissingFileList, getFileSizeInBytes)\n     * .then( results => {\n     *     console.log(results);\n     * }).catch( err => {\n     *     console.log(err);\n     *     // [ Error: ENOENT: no such file or directory ]\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let results = await async.map(fileList, getFileSizeInBytes);\n     *         console.log(results);\n     *         // results is now an array of the file size in bytes for each file, e.g.\n     *         // [ 1000, 2000, 3000]\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * // Error Handling\n     * async () => {\n     *     try {\n     *         let results = await async.map(withMissingFileList, getFileSizeInBytes);\n     *         console.log(results);\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *     }\n     * }\n     *\n     */\n    function map (coll, iteratee, callback) {\n        return _asyncMap(eachOf$1, coll, iteratee, callback)\n    }\n    var map$1 = awaitify(map, 3);\n\n    /**\n     * Applies the provided arguments to each function in the array, calling\n     * `callback` after all functions have completed. If you only provide the first\n     * argument, `fns`, then it will return a function which lets you pass in the\n     * arguments as if it were a single function call. If more arguments are\n     * provided, `callback` is required while `args` is still optional. The results\n     * for each of the applied async functions are passed to the final callback\n     * as an array.\n     *\n     * @name applyEach\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s\n     * to all call with the same arguments\n     * @param {...*} [args] - any number of separate arguments to pass to the\n     * function.\n     * @param {Function} [callback] - the final argument should be the callback,\n     * called when all functions have completed processing.\n     * @returns {AsyncFunction} - Returns a function that takes no args other than\n     * an optional callback, that is the result of applying the `args` to each\n     * of the functions.\n     * @example\n     *\n     * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket')\n     *\n     * appliedFn((err, results) => {\n     *     // results[0] is the results for `enableSearch`\n     *     // results[1] is the results for `updateSchema`\n     * });\n     *\n     * // partial application example:\n     * async.each(\n     *     buckets,\n     *     async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(),\n     *     callback\n     * );\n     */\n    var applyEach = applyEach$1(map$1);\n\n    /**\n     * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.\n     *\n     * @name eachOfSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.eachOf]{@link module:Collections.eachOf}\n     * @alias forEachOfSeries\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * Invoked with (item, key, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. Invoked with (err).\n     * @returns {Promise} a promise, if a callback is omitted\n     */\n    function eachOfSeries(coll, iteratee, callback) {\n        return eachOfLimit$1(coll, 1, iteratee, callback)\n    }\n    var eachOfSeries$1 = awaitify(eachOfSeries, 3);\n\n    /**\n     * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.\n     *\n     * @name mapSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.map]{@link module:Collections.map}\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The iteratee should complete with the transformed item.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. Results is an array of the\n     * transformed items from the `coll`. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function mapSeries (coll, iteratee, callback) {\n        return _asyncMap(eachOfSeries$1, coll, iteratee, callback)\n    }\n    var mapSeries$1 = awaitify(mapSeries, 3);\n\n    /**\n     * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.\n     *\n     * @name applyEachSeries\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.applyEach]{@link module:ControlFlow.applyEach}\n     * @category Control Flow\n     * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all\n     * call with the same arguments\n     * @param {...*} [args] - any number of separate arguments to pass to the\n     * function.\n     * @param {Function} [callback] - the final argument should be the callback,\n     * called when all functions have completed processing.\n     * @returns {AsyncFunction} - A function, that when called, is the result of\n     * appling the `args` to the list of functions.  It takes no args, other than\n     * a callback.\n     */\n    var applyEachSeries = applyEach$1(mapSeries$1);\n\n    const PROMISE_SYMBOL = Symbol('promiseCallback');\n\n    function promiseCallback () {\n        let resolve, reject;\n        function callback (err, ...args) {\n            if (err) return reject(err)\n            resolve(args.length > 1 ? args : args[0]);\n        }\n\n        callback[PROMISE_SYMBOL] = new Promise((res, rej) => {\n            resolve = res,\n            reject = rej;\n        });\n\n        return callback\n    }\n\n    /**\n     * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on\n     * their requirements. Each function can optionally depend on other functions\n     * being completed first, and each function is run as soon as its requirements\n     * are satisfied.\n     *\n     * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence\n     * will stop. Further tasks will not execute (so any other functions depending\n     * on it will not run), and the main `callback` is immediately called with the\n     * error.\n     *\n     * {@link AsyncFunction}s also receive an object containing the results of functions which\n     * have completed so far as the first argument, if they have dependencies. If a\n     * task function has no dependencies, it will only be passed a callback.\n     *\n     * @name auto\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {Object} tasks - An object. Each of its properties is either a\n     * function or an array of requirements, with the {@link AsyncFunction} itself the last item\n     * in the array. The object's key of a property serves as the name of the task\n     * defined by that property, i.e. can be used when specifying requirements for\n     * other tasks. The function receives one or two arguments:\n     * * a `results` object, containing the results of the previously executed\n     *   functions, only passed if the task has any dependencies,\n     * * a `callback(err, result)` function, which must be called when finished,\n     *   passing an `error` (which can be `null`) and the result of the function's\n     *   execution.\n     * @param {number} [concurrency=Infinity] - An optional `integer` for\n     * determining the maximum number of tasks that can be run in parallel. By\n     * default, as many as possible.\n     * @param {Function} [callback] - An optional callback which is called when all\n     * the tasks have been completed. It receives the `err` argument if any `tasks`\n     * pass an error to their callback. Results are always returned; however, if an\n     * error occurs, no further `tasks` will be performed, and the results object\n     * will only contain partial results. Invoked with (err, results).\n     * @returns {Promise} a promise, if a callback is not passed\n     * @example\n     *\n     * //Using Callbacks\n     * async.auto({\n     *     get_data: function(callback) {\n     *         // async code to get some data\n     *         callback(null, 'data', 'converted to array');\n     *     },\n     *     make_folder: function(callback) {\n     *         // async code to create a directory to store a file in\n     *         // this is run at the same time as getting the data\n     *         callback(null, 'folder');\n     *     },\n     *     write_file: ['get_data', 'make_folder', function(results, callback) {\n     *         // once there is some data and the directory exists,\n     *         // write the data to a file in the directory\n     *         callback(null, 'filename');\n     *     }],\n     *     email_link: ['write_file', function(results, callback) {\n     *         // once the file is written let's email a link to it...\n     *         callback(null, {'file':results.write_file, 'email':'user@example.com'});\n     *     }]\n     * }, function(err, results) {\n     *     if (err) {\n     *         console.log('err = ', err);\n     *     }\n     *     console.log('results = ', results);\n     *     // results = {\n     *     //     get_data: ['data', 'converted to array']\n     *     //     make_folder; 'folder',\n     *     //     write_file: 'filename'\n     *     //     email_link: { file: 'filename', email: 'user@example.com' }\n     *     // }\n     * });\n     *\n     * //Using Promises\n     * async.auto({\n     *     get_data: function(callback) {\n     *         console.log('in get_data');\n     *         // async code to get some data\n     *         callback(null, 'data', 'converted to array');\n     *     },\n     *     make_folder: function(callback) {\n     *         console.log('in make_folder');\n     *         // async code to create a directory to store a file in\n     *         // this is run at the same time as getting the data\n     *         callback(null, 'folder');\n     *     },\n     *     write_file: ['get_data', 'make_folder', function(results, callback) {\n     *         // once there is some data and the directory exists,\n     *         // write the data to a file in the directory\n     *         callback(null, 'filename');\n     *     }],\n     *     email_link: ['write_file', function(results, callback) {\n     *         // once the file is written let's email a link to it...\n     *         callback(null, {'file':results.write_file, 'email':'user@example.com'});\n     *     }]\n     * }).then(results => {\n     *     console.log('results = ', results);\n     *     // results = {\n     *     //     get_data: ['data', 'converted to array']\n     *     //     make_folder; 'folder',\n     *     //     write_file: 'filename'\n     *     //     email_link: { file: 'filename', email: 'user@example.com' }\n     *     // }\n     * }).catch(err => {\n     *     console.log('err = ', err);\n     * });\n     *\n     * //Using async/await\n     * async () => {\n     *     try {\n     *         let results = await async.auto({\n     *             get_data: function(callback) {\n     *                 // async code to get some data\n     *                 callback(null, 'data', 'converted to array');\n     *             },\n     *             make_folder: function(callback) {\n     *                 // async code to create a directory to store a file in\n     *                 // this is run at the same time as getting the data\n     *                 callback(null, 'folder');\n     *             },\n     *             write_file: ['get_data', 'make_folder', function(results, callback) {\n     *                 // once there is some data and the directory exists,\n     *                 // write the data to a file in the directory\n     *                 callback(null, 'filename');\n     *             }],\n     *             email_link: ['write_file', function(results, callback) {\n     *                 // once the file is written let's email a link to it...\n     *                 callback(null, {'file':results.write_file, 'email':'user@example.com'});\n     *             }]\n     *         });\n     *         console.log('results = ', results);\n     *         // results = {\n     *         //     get_data: ['data', 'converted to array']\n     *         //     make_folder; 'folder',\n     *         //     write_file: 'filename'\n     *         //     email_link: { file: 'filename', email: 'user@example.com' }\n     *         // }\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function auto(tasks, concurrency, callback) {\n        if (typeof concurrency !== 'number') {\n            // concurrency is optional, shift the args.\n            callback = concurrency;\n            concurrency = null;\n        }\n        callback = once(callback || promiseCallback());\n        var numTasks = Object.keys(tasks).length;\n        if (!numTasks) {\n            return callback(null);\n        }\n        if (!concurrency) {\n            concurrency = numTasks;\n        }\n\n        var results = {};\n        var runningTasks = 0;\n        var canceled = false;\n        var hasError = false;\n\n        var listeners = Object.create(null);\n\n        var readyTasks = [];\n\n        // for cycle detection:\n        var readyToCheck = []; // tasks that have been identified as reachable\n        // without the possibility of returning to an ancestor task\n        var uncheckedDependencies = {};\n\n        Object.keys(tasks).forEach(key => {\n            var task = tasks[key];\n            if (!Array.isArray(task)) {\n                // no dependencies\n                enqueueTask(key, [task]);\n                readyToCheck.push(key);\n                return;\n            }\n\n            var dependencies = task.slice(0, task.length - 1);\n            var remainingDependencies = dependencies.length;\n            if (remainingDependencies === 0) {\n                enqueueTask(key, task);\n                readyToCheck.push(key);\n                return;\n            }\n            uncheckedDependencies[key] = remainingDependencies;\n\n            dependencies.forEach(dependencyName => {\n                if (!tasks[dependencyName]) {\n                    throw new Error('async.auto task `' + key +\n                        '` has a non-existent dependency `' +\n                        dependencyName + '` in ' +\n                        dependencies.join(', '));\n                }\n                addListener(dependencyName, () => {\n                    remainingDependencies--;\n                    if (remainingDependencies === 0) {\n                        enqueueTask(key, task);\n                    }\n                });\n            });\n        });\n\n        checkForDeadlocks();\n        processQueue();\n\n        function enqueueTask(key, task) {\n            readyTasks.push(() => runTask(key, task));\n        }\n\n        function processQueue() {\n            if (canceled) return\n            if (readyTasks.length === 0 && runningTasks === 0) {\n                return callback(null, results);\n            }\n            while(readyTasks.length && runningTasks < concurrency) {\n                var run = readyTasks.shift();\n                run();\n            }\n\n        }\n\n        function addListener(taskName, fn) {\n            var taskListeners = listeners[taskName];\n            if (!taskListeners) {\n                taskListeners = listeners[taskName] = [];\n            }\n\n            taskListeners.push(fn);\n        }\n\n        function taskComplete(taskName) {\n            var taskListeners = listeners[taskName] || [];\n            taskListeners.forEach(fn => fn());\n            processQueue();\n        }\n\n\n        function runTask(key, task) {\n            if (hasError) return;\n\n            var taskCallback = onlyOnce((err, ...result) => {\n                runningTasks--;\n                if (err === false) {\n                    canceled = true;\n                    return\n                }\n                if (result.length < 2) {\n                    [result] = result;\n                }\n                if (err) {\n                    var safeResults = {};\n                    Object.keys(results).forEach(rkey => {\n                        safeResults[rkey] = results[rkey];\n                    });\n                    safeResults[key] = result;\n                    hasError = true;\n                    listeners = Object.create(null);\n                    if (canceled) return\n                    callback(err, safeResults);\n                } else {\n                    results[key] = result;\n                    taskComplete(key);\n                }\n            });\n\n            runningTasks++;\n            var taskFn = wrapAsync(task[task.length - 1]);\n            if (task.length > 1) {\n                taskFn(results, taskCallback);\n            } else {\n                taskFn(taskCallback);\n            }\n        }\n\n        function checkForDeadlocks() {\n            // Kahn's algorithm\n            // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm\n            // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html\n            var currentTask;\n            var counter = 0;\n            while (readyToCheck.length) {\n                currentTask = readyToCheck.pop();\n                counter++;\n                getDependents(currentTask).forEach(dependent => {\n                    if (--uncheckedDependencies[dependent] === 0) {\n                        readyToCheck.push(dependent);\n                    }\n                });\n            }\n\n            if (counter !== numTasks) {\n                throw new Error(\n                    'async.auto cannot execute tasks due to a recursive dependency'\n                );\n            }\n        }\n\n        function getDependents(taskName) {\n            var result = [];\n            Object.keys(tasks).forEach(key => {\n                const task = tasks[key];\n                if (Array.isArray(task) && task.indexOf(taskName) >= 0) {\n                    result.push(key);\n                }\n            });\n            return result;\n        }\n\n        return callback[PROMISE_SYMBOL]\n    }\n\n    var FN_ARGS = /^(?:async\\s)?(?:function)?\\s*(?:\\w+\\s*)?\\(([^)]+)\\)(?:\\s*{)/;\n    var ARROW_FN_ARGS = /^(?:async\\s)?\\s*(?:\\(\\s*)?((?:[^)=\\s]\\s*)*)(?:\\)\\s*)?=>/;\n    var FN_ARG_SPLIT = /,/;\n    var FN_ARG = /(=.+)?(\\s*)$/;\n\n    function stripComments(string) {\n        let stripped = '';\n        let index = 0;\n        let endBlockComment = string.indexOf('*/');\n        while (index < string.length) {\n            if (string[index] === '/' && string[index+1] === '/') {\n                // inline comment\n                let endIndex = string.indexOf('\\n', index);\n                index = (endIndex === -1) ? string.length : endIndex;\n            } else if ((endBlockComment !== -1) && (string[index] === '/') && (string[index+1] === '*')) {\n                // block comment\n                let endIndex = string.indexOf('*/', index);\n                if (endIndex !== -1) {\n                    index = endIndex + 2;\n                    endBlockComment = string.indexOf('*/', index);\n                } else {\n                    stripped += string[index];\n                    index++;\n                }\n            } else {\n                stripped += string[index];\n                index++;\n            }\n        }\n        return stripped;\n    }\n\n    function parseParams(func) {\n        const src = stripComments(func.toString());\n        let match = src.match(FN_ARGS);\n        if (!match) {\n            match = src.match(ARROW_FN_ARGS);\n        }\n        if (!match) throw new Error('could not parse args in autoInject\\nSource:\\n' + src)\n        let [, args] = match;\n        return args\n            .replace(/\\s/g, '')\n            .split(FN_ARG_SPLIT)\n            .map((arg) => arg.replace(FN_ARG, '').trim());\n    }\n\n    /**\n     * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent\n     * tasks are specified as parameters to the function, after the usual callback\n     * parameter, with the parameter names matching the names of the tasks it\n     * depends on. This can provide even more readable task graphs which can be\n     * easier to maintain.\n     *\n     * If a final callback is specified, the task results are similarly injected,\n     * specified as named parameters after the initial error parameter.\n     *\n     * The autoInject function is purely syntactic sugar and its semantics are\n     * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.\n     *\n     * @name autoInject\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.auto]{@link module:ControlFlow.auto}\n     * @category Control Flow\n     * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of\n     * the form 'func([dependencies...], callback). The object's key of a property\n     * serves as the name of the task defined by that property, i.e. can be used\n     * when specifying requirements for other tasks.\n     * * The `callback` parameter is a `callback(err, result)` which must be called\n     *   when finished, passing an `error` (which can be `null`) and the result of\n     *   the function's execution. The remaining parameters name other tasks on\n     *   which the task is dependent, and the results from those tasks are the\n     *   arguments of those parameters.\n     * @param {Function} [callback] - An optional callback which is called when all\n     * the tasks have been completed. It receives the `err` argument if any `tasks`\n     * pass an error to their callback, and a `results` object with any completed\n     * task results, similar to `auto`.\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * //  The example from `auto` can be rewritten as follows:\n     * async.autoInject({\n     *     get_data: function(callback) {\n     *         // async code to get some data\n     *         callback(null, 'data', 'converted to array');\n     *     },\n     *     make_folder: function(callback) {\n     *         // async code to create a directory to store a file in\n     *         // this is run at the same time as getting the data\n     *         callback(null, 'folder');\n     *     },\n     *     write_file: function(get_data, make_folder, callback) {\n     *         // once there is some data and the directory exists,\n     *         // write the data to a file in the directory\n     *         callback(null, 'filename');\n     *     },\n     *     email_link: function(write_file, callback) {\n     *         // once the file is written let's email a link to it...\n     *         // write_file contains the filename returned by write_file.\n     *         callback(null, {'file':write_file, 'email':'user@example.com'});\n     *     }\n     * }, function(err, results) {\n     *     console.log('err = ', err);\n     *     console.log('email_link = ', results.email_link);\n     * });\n     *\n     * // If you are using a JS minifier that mangles parameter names, `autoInject`\n     * // will not work with plain functions, since the parameter names will be\n     * // collapsed to a single letter identifier.  To work around this, you can\n     * // explicitly specify the names of the parameters your task function needs\n     * // in an array, similar to Angular.js dependency injection.\n     *\n     * // This still has an advantage over plain `auto`, since the results a task\n     * // depends on are still spread into arguments.\n     * async.autoInject({\n     *     //...\n     *     write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {\n     *         callback(null, 'filename');\n     *     }],\n     *     email_link: ['write_file', function(write_file, callback) {\n     *         callback(null, {'file':write_file, 'email':'user@example.com'});\n     *     }]\n     *     //...\n     * }, function(err, results) {\n     *     console.log('err = ', err);\n     *     console.log('email_link = ', results.email_link);\n     * });\n     */\n    function autoInject(tasks, callback) {\n        var newTasks = {};\n\n        Object.keys(tasks).forEach(key => {\n            var taskFn = tasks[key];\n            var params;\n            var fnIsAsync = isAsync(taskFn);\n            var hasNoDeps =\n                (!fnIsAsync && taskFn.length === 1) ||\n                (fnIsAsync && taskFn.length === 0);\n\n            if (Array.isArray(taskFn)) {\n                params = [...taskFn];\n                taskFn = params.pop();\n\n                newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);\n            } else if (hasNoDeps) {\n                // no dependencies, use the function as-is\n                newTasks[key] = taskFn;\n            } else {\n                params = parseParams(taskFn);\n                if ((taskFn.length === 0 && !fnIsAsync) && params.length === 0) {\n                    throw new Error(\"autoInject task functions require explicit parameters.\");\n                }\n\n                // remove callback param\n                if (!fnIsAsync) params.pop();\n\n                newTasks[key] = params.concat(newTask);\n            }\n\n            function newTask(results, taskCb) {\n                var newArgs = params.map(name => results[name]);\n                newArgs.push(taskCb);\n                wrapAsync(taskFn)(...newArgs);\n            }\n        });\n\n        return auto(newTasks, callback);\n    }\n\n    // Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation\n    // used for queues. This implementation assumes that the node provided by the user can be modified\n    // to adjust the next and last properties. We implement only the minimal functionality\n    // for queue support.\n    class DLL {\n        constructor() {\n            this.head = this.tail = null;\n            this.length = 0;\n        }\n\n        removeLink(node) {\n            if (node.prev) node.prev.next = node.next;\n            else this.head = node.next;\n            if (node.next) node.next.prev = node.prev;\n            else this.tail = node.prev;\n\n            node.prev = node.next = null;\n            this.length -= 1;\n            return node;\n        }\n\n        empty () {\n            while(this.head) this.shift();\n            return this;\n        }\n\n        insertAfter(node, newNode) {\n            newNode.prev = node;\n            newNode.next = node.next;\n            if (node.next) node.next.prev = newNode;\n            else this.tail = newNode;\n            node.next = newNode;\n            this.length += 1;\n        }\n\n        insertBefore(node, newNode) {\n            newNode.prev = node.prev;\n            newNode.next = node;\n            if (node.prev) node.prev.next = newNode;\n            else this.head = newNode;\n            node.prev = newNode;\n            this.length += 1;\n        }\n\n        unshift(node) {\n            if (this.head) this.insertBefore(this.head, node);\n            else setInitial(this, node);\n        }\n\n        push(node) {\n            if (this.tail) this.insertAfter(this.tail, node);\n            else setInitial(this, node);\n        }\n\n        shift() {\n            return this.head && this.removeLink(this.head);\n        }\n\n        pop() {\n            return this.tail && this.removeLink(this.tail);\n        }\n\n        toArray() {\n            return [...this]\n        }\n\n        *[Symbol.iterator] () {\n            var cur = this.head;\n            while (cur) {\n                yield cur.data;\n                cur = cur.next;\n            }\n        }\n\n        remove (testFn) {\n            var curr = this.head;\n            while(curr) {\n                var {next} = curr;\n                if (testFn(curr)) {\n                    this.removeLink(curr);\n                }\n                curr = next;\n            }\n            return this;\n        }\n    }\n\n    function setInitial(dll, node) {\n        dll.length = 1;\n        dll.head = dll.tail = node;\n    }\n\n    function queue$1(worker, concurrency, payload) {\n        if (concurrency == null) {\n            concurrency = 1;\n        }\n        else if(concurrency === 0) {\n            throw new RangeError('Concurrency must not be zero');\n        }\n\n        var _worker = wrapAsync(worker);\n        var numRunning = 0;\n        var workersList = [];\n        const events = {\n            error: [],\n            drain: [],\n            saturated: [],\n            unsaturated: [],\n            empty: []\n        };\n\n        function on (event, handler) {\n            events[event].push(handler);\n        }\n\n        function once (event, handler) {\n            const handleAndRemove = (...args) => {\n                off(event, handleAndRemove);\n                handler(...args);\n            };\n            events[event].push(handleAndRemove);\n        }\n\n        function off (event, handler) {\n            if (!event) return Object.keys(events).forEach(ev => events[ev] = [])\n            if (!handler) return events[event] = []\n            events[event] = events[event].filter(ev => ev !== handler);\n        }\n\n        function trigger (event, ...args) {\n            events[event].forEach(handler => handler(...args));\n        }\n\n        var processingScheduled = false;\n        function _insert(data, insertAtFront, rejectOnError, callback) {\n            if (callback != null && typeof callback !== 'function') {\n                throw new Error('task callback must be a function');\n            }\n            q.started = true;\n\n            var res, rej;\n            function promiseCallback (err, ...args) {\n                // we don't care about the error, let the global error handler\n                // deal with it\n                if (err) return rejectOnError ? rej(err) : res()\n                if (args.length <= 1) return res(args[0])\n                res(args);\n            }\n\n            var item = q._createTaskItem(\n                data,\n                rejectOnError ? promiseCallback :\n                    (callback || promiseCallback)\n            );\n\n            if (insertAtFront) {\n                q._tasks.unshift(item);\n            } else {\n                q._tasks.push(item);\n            }\n\n            if (!processingScheduled) {\n                processingScheduled = true;\n                setImmediate$1(() => {\n                    processingScheduled = false;\n                    q.process();\n                });\n            }\n\n            if (rejectOnError || !callback) {\n                return new Promise((resolve, reject) => {\n                    res = resolve;\n                    rej = reject;\n                })\n            }\n        }\n\n        function _createCB(tasks) {\n            return function (err, ...args) {\n                numRunning -= 1;\n\n                for (var i = 0, l = tasks.length; i < l; i++) {\n                    var task = tasks[i];\n\n                    var index = workersList.indexOf(task);\n                    if (index === 0) {\n                        workersList.shift();\n                    } else if (index > 0) {\n                        workersList.splice(index, 1);\n                    }\n\n                    task.callback(err, ...args);\n\n                    if (err != null) {\n                        trigger('error', err, task.data);\n                    }\n                }\n\n                if (numRunning <= (q.concurrency - q.buffer) ) {\n                    trigger('unsaturated');\n                }\n\n                if (q.idle()) {\n                    trigger('drain');\n                }\n                q.process();\n            };\n        }\n\n        function _maybeDrain(data) {\n            if (data.length === 0 && q.idle()) {\n                // call drain immediately if there are no tasks\n                setImmediate$1(() => trigger('drain'));\n                return true\n            }\n            return false\n        }\n\n        const eventMethod = (name) => (handler) => {\n            if (!handler) {\n                return new Promise((resolve, reject) => {\n                    once(name, (err, data) => {\n                        if (err) return reject(err)\n                        resolve(data);\n                    });\n                })\n            }\n            off(name);\n            on(name, handler);\n\n        };\n\n        var isProcessing = false;\n        var q = {\n            _tasks: new DLL(),\n            _createTaskItem (data, callback) {\n                return {\n                    data,\n                    callback\n                };\n            },\n            *[Symbol.iterator] () {\n                yield* q._tasks[Symbol.iterator]();\n            },\n            concurrency,\n            payload,\n            buffer: concurrency / 4,\n            started: false,\n            paused: false,\n            push (data, callback) {\n                if (Array.isArray(data)) {\n                    if (_maybeDrain(data)) return\n                    return data.map(datum => _insert(datum, false, false, callback))\n                }\n                return _insert(data, false, false, callback);\n            },\n            pushAsync (data, callback) {\n                if (Array.isArray(data)) {\n                    if (_maybeDrain(data)) return\n                    return data.map(datum => _insert(datum, false, true, callback))\n                }\n                return _insert(data, false, true, callback);\n            },\n            kill () {\n                off();\n                q._tasks.empty();\n            },\n            unshift (data, callback) {\n                if (Array.isArray(data)) {\n                    if (_maybeDrain(data)) return\n                    return data.map(datum => _insert(datum, true, false, callback))\n                }\n                return _insert(data, true, false, callback);\n            },\n            unshiftAsync (data, callback) {\n                if (Array.isArray(data)) {\n                    if (_maybeDrain(data)) return\n                    return data.map(datum => _insert(datum, true, true, callback))\n                }\n                return _insert(data, true, true, callback);\n            },\n            remove (testFn) {\n                q._tasks.remove(testFn);\n            },\n            process () {\n                // Avoid trying to start too many processing operations. This can occur\n                // when callbacks resolve synchronously (#1267).\n                if (isProcessing) {\n                    return;\n                }\n                isProcessing = true;\n                while(!q.paused && numRunning < q.concurrency && q._tasks.length){\n                    var tasks = [], data = [];\n                    var l = q._tasks.length;\n                    if (q.payload) l = Math.min(l, q.payload);\n                    for (var i = 0; i < l; i++) {\n                        var node = q._tasks.shift();\n                        tasks.push(node);\n                        workersList.push(node);\n                        data.push(node.data);\n                    }\n\n                    numRunning += 1;\n\n                    if (q._tasks.length === 0) {\n                        trigger('empty');\n                    }\n\n                    if (numRunning === q.concurrency) {\n                        trigger('saturated');\n                    }\n\n                    var cb = onlyOnce(_createCB(tasks));\n                    _worker(data, cb);\n                }\n                isProcessing = false;\n            },\n            length () {\n                return q._tasks.length;\n            },\n            running () {\n                return numRunning;\n            },\n            workersList () {\n                return workersList;\n            },\n            idle() {\n                return q._tasks.length + numRunning === 0;\n            },\n            pause () {\n                q.paused = true;\n            },\n            resume () {\n                if (q.paused === false) { return; }\n                q.paused = false;\n                setImmediate$1(q.process);\n            }\n        };\n        // define these as fixed properties, so people get useful errors when updating\n        Object.defineProperties(q, {\n            saturated: {\n                writable: false,\n                value: eventMethod('saturated')\n            },\n            unsaturated: {\n                writable: false,\n                value: eventMethod('unsaturated')\n            },\n            empty: {\n                writable: false,\n                value: eventMethod('empty')\n            },\n            drain: {\n                writable: false,\n                value: eventMethod('drain')\n            },\n            error: {\n                writable: false,\n                value: eventMethod('error')\n            },\n        });\n        return q;\n    }\n\n    /**\n     * Creates a `cargo` object with the specified payload. Tasks added to the\n     * cargo will be processed altogether (up to the `payload` limit). If the\n     * `worker` is in progress, the task is queued until it becomes available. Once\n     * the `worker` has completed some tasks, each callback of those tasks is\n     * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)\n     * for how `cargo` and `queue` work.\n     *\n     * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers\n     * at a time, cargo passes an array of tasks to a single worker, repeating\n     * when the worker is finished.\n     *\n     * @name cargo\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.queue]{@link module:ControlFlow.queue}\n     * @category Control Flow\n     * @param {AsyncFunction} worker - An asynchronous function for processing an array\n     * of queued tasks. Invoked with `(tasks, callback)`.\n     * @param {number} [payload=Infinity] - An optional `integer` for determining\n     * how many tasks should be processed per round; if omitted, the default is\n     * unlimited.\n     * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can\n     * attached as certain properties to listen for specific events during the\n     * lifecycle of the cargo and inner queue.\n     * @example\n     *\n     * // create a cargo object with payload 2\n     * var cargo = async.cargo(function(tasks, callback) {\n     *     for (var i=0; i<tasks.length; i++) {\n     *         console.log('hello ' + tasks[i].name);\n     *     }\n     *     callback();\n     * }, 2);\n     *\n     * // add some items\n     * cargo.push({name: 'foo'}, function(err) {\n     *     console.log('finished processing foo');\n     * });\n     * cargo.push({name: 'bar'}, function(err) {\n     *     console.log('finished processing bar');\n     * });\n     * await cargo.push({name: 'baz'});\n     * console.log('finished processing baz');\n     */\n    function cargo$1(worker, payload) {\n        return queue$1(worker, 1, payload);\n    }\n\n    /**\n     * Creates a `cargoQueue` object with the specified payload. Tasks added to the\n     * cargoQueue will be processed together (up to the `payload` limit) in `concurrency` parallel workers.\n     * If the all `workers` are in progress, the task is queued until one becomes available. Once\n     * a `worker` has completed some tasks, each callback of those tasks is\n     * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)\n     * for how `cargo` and `queue` work.\n     *\n     * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers\n     * at a time, and [`cargo`]{@link module:ControlFlow.cargo} passes an array of tasks to a single worker,\n     * the cargoQueue passes an array of tasks to multiple parallel workers.\n     *\n     * @name cargoQueue\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.queue]{@link module:ControlFlow.queue}\n     * @see [async.cargo]{@link module:ControlFLow.cargo}\n     * @category Control Flow\n     * @param {AsyncFunction} worker - An asynchronous function for processing an array\n     * of queued tasks. Invoked with `(tasks, callback)`.\n     * @param {number} [concurrency=1] - An `integer` for determining how many\n     * `worker` functions should be run in parallel.  If omitted, the concurrency\n     * defaults to `1`.  If the concurrency is `0`, an error is thrown.\n     * @param {number} [payload=Infinity] - An optional `integer` for determining\n     * how many tasks should be processed per round; if omitted, the default is\n     * unlimited.\n     * @returns {module:ControlFlow.QueueObject} A cargoQueue object to manage the tasks. Callbacks can\n     * attached as certain properties to listen for specific events during the\n     * lifecycle of the cargoQueue and inner queue.\n     * @example\n     *\n     * // create a cargoQueue object with payload 2 and concurrency 2\n     * var cargoQueue = async.cargoQueue(function(tasks, callback) {\n     *     for (var i=0; i<tasks.length; i++) {\n     *         console.log('hello ' + tasks[i].name);\n     *     }\n     *     callback();\n     * }, 2, 2);\n     *\n     * // add some items\n     * cargoQueue.push({name: 'foo'}, function(err) {\n     *     console.log('finished processing foo');\n     * });\n     * cargoQueue.push({name: 'bar'}, function(err) {\n     *     console.log('finished processing bar');\n     * });\n     * cargoQueue.push({name: 'baz'}, function(err) {\n     *     console.log('finished processing baz');\n     * });\n     * cargoQueue.push({name: 'boo'}, function(err) {\n     *     console.log('finished processing boo');\n     * });\n     */\n    function cargo(worker, concurrency, payload) {\n        return queue$1(worker, concurrency, payload);\n    }\n\n    /**\n     * Reduces `coll` into a single value using an async `iteratee` to return each\n     * successive step. `memo` is the initial state of the reduction. This function\n     * only operates in series.\n     *\n     * For performance reasons, it may make sense to split a call to this function\n     * into a parallel map, and then use the normal `Array.prototype.reduce` on the\n     * results. This function is for situations where each step in the reduction\n     * needs to be async; if you can get the data before reducing it, then it's\n     * probably a good idea to do so.\n     *\n     * @name reduce\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @alias inject\n     * @alias foldl\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {*} memo - The initial state of the reduction.\n     * @param {AsyncFunction} iteratee - A function applied to each item in the\n     * array to produce the next step in the reduction.\n     * The `iteratee` should complete with the next state of the reduction.\n     * If the iteratee completes with an error, the reduction is stopped and the\n     * main `callback` is immediately called with the error.\n     * Invoked with (memo, item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Result is the reduced value. Invoked with\n     * (err, result).\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * // file1.txt is a file that is 1000 bytes in size\n     * // file2.txt is a file that is 2000 bytes in size\n     * // file3.txt is a file that is 3000 bytes in size\n     * // file4.txt does not exist\n     *\n     * const fileList = ['file1.txt','file2.txt','file3.txt'];\n     * const withMissingFileList = ['file1.txt','file2.txt','file3.txt', 'file4.txt'];\n     *\n     * // asynchronous function that computes the file size in bytes\n     * // file size is added to the memoized value, then returned\n     * function getFileSizeInBytes(memo, file, callback) {\n     *     fs.stat(file, function(err, stat) {\n     *         if (err) {\n     *             return callback(err);\n     *         }\n     *         callback(null, memo + stat.size);\n     *     });\n     * }\n     *\n     * // Using callbacks\n     * async.reduce(fileList, 0, getFileSizeInBytes, function(err, result) {\n     *     if (err) {\n     *         console.log(err);\n     *     } else {\n     *         console.log(result);\n     *         // 6000\n     *         // which is the sum of the file sizes of the three files\n     *     }\n     * });\n     *\n     * // Error Handling\n     * async.reduce(withMissingFileList, 0, getFileSizeInBytes, function(err, result) {\n     *     if (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *     } else {\n     *         console.log(result);\n     *     }\n     * });\n     *\n     * // Using Promises\n     * async.reduce(fileList, 0, getFileSizeInBytes)\n     * .then( result => {\n     *     console.log(result);\n     *     // 6000\n     *     // which is the sum of the file sizes of the three files\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Error Handling\n     * async.reduce(withMissingFileList, 0, getFileSizeInBytes)\n     * .then( result => {\n     *     console.log(result);\n     * }).catch( err => {\n     *     console.log(err);\n     *     // [ Error: ENOENT: no such file or directory ]\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.reduce(fileList, 0, getFileSizeInBytes);\n     *         console.log(result);\n     *         // 6000\n     *         // which is the sum of the file sizes of the three files\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * // Error Handling\n     * async () => {\n     *     try {\n     *         let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes);\n     *         console.log(result);\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *     }\n     * }\n     *\n     */\n    function reduce(coll, memo, iteratee, callback) {\n        callback = once(callback);\n        var _iteratee = wrapAsync(iteratee);\n        return eachOfSeries$1(coll, (x, i, iterCb) => {\n            _iteratee(memo, x, (err, v) => {\n                memo = v;\n                iterCb(err);\n            });\n        }, err => callback(err, memo));\n    }\n    var reduce$1 = awaitify(reduce, 4);\n\n    /**\n     * Version of the compose function that is more natural to read. Each function\n     * consumes the return value of the previous function. It is the equivalent of\n     * [compose]{@link module:ControlFlow.compose} with the arguments reversed.\n     *\n     * Each function is executed with the `this` binding of the composed function.\n     *\n     * @name seq\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.compose]{@link module:ControlFlow.compose}\n     * @category Control Flow\n     * @param {...AsyncFunction} functions - the asynchronous functions to compose\n     * @returns {Function} a function that composes the `functions` in order\n     * @example\n     *\n     * // Requires lodash (or underscore), express3 and dresende's orm2.\n     * // Part of an app, that fetches cats of the logged user.\n     * // This example uses `seq` function to avoid overnesting and error\n     * // handling clutter.\n     * app.get('/cats', function(request, response) {\n     *     var User = request.models.User;\n     *     async.seq(\n     *         User.get.bind(User),  // 'User.get' has signature (id, callback(err, data))\n     *         function(user, fn) {\n     *             user.getCats(fn);      // 'getCats' has signature (callback(err, data))\n     *         }\n     *     )(req.session.user_id, function (err, cats) {\n     *         if (err) {\n     *             console.error(err);\n     *             response.json({ status: 'error', message: err.message });\n     *         } else {\n     *             response.json({ status: 'ok', message: 'Cats found', data: cats });\n     *         }\n     *     });\n     * });\n     */\n    function seq(...functions) {\n        var _functions = functions.map(wrapAsync);\n        return function (...args) {\n            var that = this;\n\n            var cb = args[args.length - 1];\n            if (typeof cb == 'function') {\n                args.pop();\n            } else {\n                cb = promiseCallback();\n            }\n\n            reduce$1(_functions, args, (newargs, fn, iterCb) => {\n                fn.apply(that, newargs.concat((err, ...nextargs) => {\n                    iterCb(err, nextargs);\n                }));\n            },\n            (err, results) => cb(err, ...results));\n\n            return cb[PROMISE_SYMBOL]\n        };\n    }\n\n    /**\n     * Creates a function which is a composition of the passed asynchronous\n     * functions. Each function consumes the return value of the function that\n     * follows. Composing functions `f()`, `g()`, and `h()` would produce the result\n     * of `f(g(h()))`, only this version uses callbacks to obtain the return values.\n     *\n     * If the last argument to the composed function is not a function, a promise\n     * is returned when you call it.\n     *\n     * Each function is executed with the `this` binding of the composed function.\n     *\n     * @name compose\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {...AsyncFunction} functions - the asynchronous functions to compose\n     * @returns {Function} an asynchronous function that is the composed\n     * asynchronous `functions`\n     * @example\n     *\n     * function add1(n, callback) {\n     *     setTimeout(function () {\n     *         callback(null, n + 1);\n     *     }, 10);\n     * }\n     *\n     * function mul3(n, callback) {\n     *     setTimeout(function () {\n     *         callback(null, n * 3);\n     *     }, 10);\n     * }\n     *\n     * var add1mul3 = async.compose(mul3, add1);\n     * add1mul3(4, function (err, result) {\n     *     // result now equals 15\n     * });\n     */\n    function compose(...args) {\n        return seq(...args.reverse());\n    }\n\n    /**\n     * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.\n     *\n     * @name mapLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.map]{@link module:Collections.map}\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The iteratee should complete with the transformed item.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. Results is an array of the\n     * transformed items from the `coll`. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function mapLimit (coll, limit, iteratee, callback) {\n        return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback)\n    }\n    var mapLimit$1 = awaitify(mapLimit, 4);\n\n    /**\n     * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.\n     *\n     * @name concatLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.concat]{@link module:Collections.concat}\n     * @category Collection\n     * @alias flatMapLimit\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,\n     * which should use an array as its result. Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished, or an error occurs. Results is an array\n     * containing the concatenated results of the `iteratee` function. Invoked with\n     * (err, results).\n     * @returns A Promise, if no callback is passed\n     */\n    function concatLimit(coll, limit, iteratee, callback) {\n        var _iteratee = wrapAsync(iteratee);\n        return mapLimit$1(coll, limit, (val, iterCb) => {\n            _iteratee(val, (err, ...args) => {\n                if (err) return iterCb(err);\n                return iterCb(err, args);\n            });\n        }, (err, mapResults) => {\n            var result = [];\n            for (var i = 0; i < mapResults.length; i++) {\n                if (mapResults[i]) {\n                    result = result.concat(...mapResults[i]);\n                }\n            }\n\n            return callback(err, result);\n        });\n    }\n    var concatLimit$1 = awaitify(concatLimit, 4);\n\n    /**\n     * Applies `iteratee` to each item in `coll`, concatenating the results. Returns\n     * the concatenated list. The `iteratee`s are called in parallel, and the\n     * results are concatenated as they return. The results array will be returned in\n     * the original order of `coll` passed to the `iteratee` function.\n     *\n     * @name concat\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @category Collection\n     * @alias flatMap\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,\n     * which should use an array as its result. Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished, or an error occurs. Results is an array\n     * containing the concatenated results of the `iteratee` function. Invoked with\n     * (err, results).\n     * @returns A Promise, if no callback is passed\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     * // dir4 does not exist\n     *\n     * let directoryList = ['dir1','dir2','dir3'];\n     * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4'];\n     *\n     * // Using callbacks\n     * async.concat(directoryList, fs.readdir, function(err, results) {\n     *    if (err) {\n     *        console.log(err);\n     *    } else {\n     *        console.log(results);\n     *        // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]\n     *    }\n     * });\n     *\n     * // Error Handling\n     * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) {\n     *    if (err) {\n     *        console.log(err);\n     *        // [ Error: ENOENT: no such file or directory ]\n     *        // since dir4 does not exist\n     *    } else {\n     *        console.log(results);\n     *    }\n     * });\n     *\n     * // Using Promises\n     * async.concat(directoryList, fs.readdir)\n     * .then(results => {\n     *     console.log(results);\n     *     // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]\n     * }).catch(err => {\n     *      console.log(err);\n     * });\n     *\n     * // Error Handling\n     * async.concat(withMissingDirectoryList, fs.readdir)\n     * .then(results => {\n     *     console.log(results);\n     * }).catch(err => {\n     *     console.log(err);\n     *     // [ Error: ENOENT: no such file or directory ]\n     *     // since dir4 does not exist\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let results = await async.concat(directoryList, fs.readdir);\n     *         console.log(results);\n     *         // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]\n     *     } catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * // Error Handling\n     * async () => {\n     *     try {\n     *         let results = await async.concat(withMissingDirectoryList, fs.readdir);\n     *         console.log(results);\n     *     } catch (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *         // since dir4 does not exist\n     *     }\n     * }\n     *\n     */\n    function concat(coll, iteratee, callback) {\n        return concatLimit$1(coll, Infinity, iteratee, callback)\n    }\n    var concat$1 = awaitify(concat, 3);\n\n    /**\n     * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.\n     *\n     * @name concatSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.concat]{@link module:Collections.concat}\n     * @category Collection\n     * @alias flatMapSeries\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.\n     * The iteratee should complete with an array an array of results.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished, or an error occurs. Results is an array\n     * containing the concatenated results of the `iteratee` function. Invoked with\n     * (err, results).\n     * @returns A Promise, if no callback is passed\n     */\n    function concatSeries(coll, iteratee, callback) {\n        return concatLimit$1(coll, 1, iteratee, callback)\n    }\n    var concatSeries$1 = awaitify(concatSeries, 3);\n\n    /**\n     * Returns a function that when called, calls-back with the values provided.\n     * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to\n     * [`auto`]{@link module:ControlFlow.auto}.\n     *\n     * @name constant\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {...*} arguments... - Any number of arguments to automatically invoke\n     * callback with.\n     * @returns {AsyncFunction} Returns a function that when invoked, automatically\n     * invokes the callback with the previous given arguments.\n     * @example\n     *\n     * async.waterfall([\n     *     async.constant(42),\n     *     function (value, next) {\n     *         // value === 42\n     *     },\n     *     //...\n     * ], callback);\n     *\n     * async.waterfall([\n     *     async.constant(filename, \"utf8\"),\n     *     fs.readFile,\n     *     function (fileData, next) {\n     *         //...\n     *     }\n     *     //...\n     * ], callback);\n     *\n     * async.auto({\n     *     hostname: async.constant(\"https://server.net/\"),\n     *     port: findFreePort,\n     *     launchServer: [\"hostname\", \"port\", function (options, cb) {\n     *         startServer(options, cb);\n     *     }],\n     *     //...\n     * }, callback);\n     */\n    function constant$1(...args) {\n        return function (...ignoredArgs/*, callback*/) {\n            var callback = ignoredArgs.pop();\n            return callback(null, ...args);\n        };\n    }\n\n    function _createTester(check, getResult) {\n        return (eachfn, arr, _iteratee, cb) => {\n            var testPassed = false;\n            var testResult;\n            const iteratee = wrapAsync(_iteratee);\n            eachfn(arr, (value, _, callback) => {\n                iteratee(value, (err, result) => {\n                    if (err || err === false) return callback(err);\n\n                    if (check(result) && !testResult) {\n                        testPassed = true;\n                        testResult = getResult(true, value);\n                        return callback(null, breakLoop);\n                    }\n                    callback();\n                });\n            }, err => {\n                if (err) return cb(err);\n                cb(null, testPassed ? testResult : getResult(false));\n            });\n        };\n    }\n\n    /**\n     * Returns the first value in `coll` that passes an async truth test. The\n     * `iteratee` is applied in parallel, meaning the first iteratee to return\n     * `true` will fire the detect `callback` with that result. That means the\n     * result might not be the first item in the original `coll` (in terms of order)\n     * that passes the test.\n\n     * If order within the original `coll` is important, then look at\n     * [`detectSeries`]{@link module:Collections.detectSeries}.\n     *\n     * @name detect\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @alias find\n     * @category Collections\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.\n     * The iteratee must complete with a boolean value as its result.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called as soon as any\n     * iteratee returns `true`, or after all the `iteratee` functions have finished.\n     * Result will be the first item in the array that passes the truth test\n     * (iteratee) or the value `undefined` if none passed. Invoked with\n     * (err, result).\n     * @returns {Promise} a promise, if a callback is omitted\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     *\n     * // asynchronous function that checks if a file exists\n     * function fileExists(file, callback) {\n     *    fs.access(file, fs.constants.F_OK, (err) => {\n     *        callback(null, !err);\n     *    });\n     * }\n     *\n     * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists,\n     *    function(err, result) {\n     *        console.log(result);\n     *        // dir1/file1.txt\n     *        // result now equals the first file in the list that exists\n     *    }\n     *);\n     *\n     * // Using Promises\n     * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists)\n     * .then(result => {\n     *     console.log(result);\n     *     // dir1/file1.txt\n     *     // result now equals the first file in the list that exists\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists);\n     *         console.log(result);\n     *         // dir1/file1.txt\n     *         // result now equals the file in the list that exists\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function detect(coll, iteratee, callback) {\n        return _createTester(bool => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback)\n    }\n    var detect$1 = awaitify(detect, 3);\n\n    /**\n     * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a\n     * time.\n     *\n     * @name detectLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.detect]{@link module:Collections.detect}\n     * @alias findLimit\n     * @category Collections\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.\n     * The iteratee must complete with a boolean value as its result.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called as soon as any\n     * iteratee returns `true`, or after all the `iteratee` functions have finished.\n     * Result will be the first item in the array that passes the truth test\n     * (iteratee) or the value `undefined` if none passed. Invoked with\n     * (err, result).\n     * @returns {Promise} a promise, if a callback is omitted\n     */\n    function detectLimit(coll, limit, iteratee, callback) {\n        return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback)\n    }\n    var detectLimit$1 = awaitify(detectLimit, 4);\n\n    /**\n     * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.\n     *\n     * @name detectSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.detect]{@link module:Collections.detect}\n     * @alias findSeries\n     * @category Collections\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.\n     * The iteratee must complete with a boolean value as its result.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called as soon as any\n     * iteratee returns `true`, or after all the `iteratee` functions have finished.\n     * Result will be the first item in the array that passes the truth test\n     * (iteratee) or the value `undefined` if none passed. Invoked with\n     * (err, result).\n     * @returns {Promise} a promise, if a callback is omitted\n     */\n    function detectSeries(coll, iteratee, callback) {\n        return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback)\n    }\n\n    var detectSeries$1 = awaitify(detectSeries, 3);\n\n    function consoleFunc(name) {\n        return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => {\n            /* istanbul ignore else */\n            if (typeof console === 'object') {\n                /* istanbul ignore else */\n                if (err) {\n                    /* istanbul ignore else */\n                    if (console.error) {\n                        console.error(err);\n                    }\n                } else if (console[name]) { /* istanbul ignore else */\n                    resultArgs.forEach(x => console[name](x));\n                }\n            }\n        })\n    }\n\n    /**\n     * Logs the result of an [`async` function]{@link AsyncFunction} to the\n     * `console` using `console.dir` to display the properties of the resulting object.\n     * Only works in Node.js or in browsers that support `console.dir` and\n     * `console.error` (such as FF and Chrome).\n     * If multiple arguments are returned from the async function,\n     * `console.dir` is called on each argument in order.\n     *\n     * @name dir\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {AsyncFunction} function - The function you want to eventually apply\n     * all arguments to.\n     * @param {...*} arguments... - Any number of arguments to apply to the function.\n     * @example\n     *\n     * // in a module\n     * var hello = function(name, callback) {\n     *     setTimeout(function() {\n     *         callback(null, {hello: name});\n     *     }, 1000);\n     * };\n     *\n     * // in the node repl\n     * node> async.dir(hello, 'world');\n     * {hello: 'world'}\n     */\n    var dir = consoleFunc('dir');\n\n    /**\n     * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in\n     * the order of operations, the arguments `test` and `iteratee` are switched.\n     *\n     * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n     *\n     * @name doWhilst\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.whilst]{@link module:ControlFlow.whilst}\n     * @category Control Flow\n     * @param {AsyncFunction} iteratee - A function which is called each time `test`\n     * passes. Invoked with (callback).\n     * @param {AsyncFunction} test - asynchronous truth test to perform after each\n     * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the\n     * non-error args from the previous callback of `iteratee`.\n     * @param {Function} [callback] - A callback which is called after the test\n     * function has failed and repeated execution of `iteratee` has stopped.\n     * `callback` will be passed an error and any arguments passed to the final\n     * `iteratee`'s callback. Invoked with (err, [results]);\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function doWhilst(iteratee, test, callback) {\n        callback = onlyOnce(callback);\n        var _fn = wrapAsync(iteratee);\n        var _test = wrapAsync(test);\n        var results;\n\n        function next(err, ...args) {\n            if (err) return callback(err);\n            if (err === false) return;\n            results = args;\n            _test(...args, check);\n        }\n\n        function check(err, truth) {\n            if (err) return callback(err);\n            if (err === false) return;\n            if (!truth) return callback(null, ...results);\n            _fn(next);\n        }\n\n        return check(null, true);\n    }\n\n    var doWhilst$1 = awaitify(doWhilst, 3);\n\n    /**\n     * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the\n     * argument ordering differs from `until`.\n     *\n     * @name doUntil\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}\n     * @category Control Flow\n     * @param {AsyncFunction} iteratee - An async function which is called each time\n     * `test` fails. Invoked with (callback).\n     * @param {AsyncFunction} test - asynchronous truth test to perform after each\n     * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the\n     * non-error args from the previous callback of `iteratee`\n     * @param {Function} [callback] - A callback which is called after the test\n     * function has passed and repeated execution of `iteratee` has stopped. `callback`\n     * will be passed an error and any arguments passed to the final `iteratee`'s\n     * callback. Invoked with (err, [results]);\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function doUntil(iteratee, test, callback) {\n        const _test = wrapAsync(test);\n        return doWhilst$1(iteratee, (...args) => {\n            const cb = args.pop();\n            _test(...args, (err, truth) => cb (err, !truth));\n        }, callback);\n    }\n\n    function _withoutIndex(iteratee) {\n        return (value, index, callback) => iteratee(value, callback);\n    }\n\n    /**\n     * Applies the function `iteratee` to each item in `coll`, in parallel.\n     * The `iteratee` is called with an item from the list, and a callback for when\n     * it has finished. If the `iteratee` passes an error to its `callback`, the\n     * main `callback` (for the `each` function) is immediately called with the\n     * error.\n     *\n     * Note, that since this function applies `iteratee` to each item in parallel,\n     * there is no guarantee that the iteratee functions will complete in order.\n     *\n     * @name each\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @alias forEach\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to\n     * each item in `coll`. Invoked with (item, callback).\n     * The array index is not passed to the iteratee.\n     * If you need the index, use `eachOf`.\n     * @param {Function} [callback] - A callback which is called when all\n     * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n     * @returns {Promise} a promise, if a callback is omitted\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     * // dir4 does not exist\n     *\n     * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];\n     * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];\n     *\n     * // asynchronous function that deletes a file\n     * const deleteFile = function(file, callback) {\n     *     fs.unlink(file, callback);\n     * };\n     *\n     * // Using callbacks\n     * async.each(fileList, deleteFile, function(err) {\n     *     if( err ) {\n     *         console.log(err);\n     *     } else {\n     *         console.log('All files have been deleted successfully');\n     *     }\n     * });\n     *\n     * // Error Handling\n     * async.each(withMissingFileList, deleteFile, function(err){\n     *     console.log(err);\n     *     // [ Error: ENOENT: no such file or directory ]\n     *     // since dir4/file2.txt does not exist\n     *     // dir1/file1.txt could have been deleted\n     * });\n     *\n     * // Using Promises\n     * async.each(fileList, deleteFile)\n     * .then( () => {\n     *     console.log('All files have been deleted successfully');\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Error Handling\n     * async.each(fileList, deleteFile)\n     * .then( () => {\n     *     console.log('All files have been deleted successfully');\n     * }).catch( err => {\n     *     console.log(err);\n     *     // [ Error: ENOENT: no such file or directory ]\n     *     // since dir4/file2.txt does not exist\n     *     // dir1/file1.txt could have been deleted\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         await async.each(files, deleteFile);\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * // Error Handling\n     * async () => {\n     *     try {\n     *         await async.each(withMissingFileList, deleteFile);\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *         // since dir4/file2.txt does not exist\n     *         // dir1/file1.txt could have been deleted\n     *     }\n     * }\n     *\n     */\n    function eachLimit$2(coll, iteratee, callback) {\n        return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback);\n    }\n\n    var each = awaitify(eachLimit$2, 3);\n\n    /**\n     * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.\n     *\n     * @name eachLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.each]{@link module:Collections.each}\n     * @alias forEachLimit\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The array index is not passed to the iteratee.\n     * If you need the index, use `eachOfLimit`.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called when all\n     * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n     * @returns {Promise} a promise, if a callback is omitted\n     */\n    function eachLimit(coll, limit, iteratee, callback) {\n        return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);\n    }\n    var eachLimit$1 = awaitify(eachLimit, 4);\n\n    /**\n     * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.\n     *\n     * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item\n     * in series and therefore the iteratee functions will complete in order.\n\n     * @name eachSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.each]{@link module:Collections.each}\n     * @alias forEachSeries\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to each\n     * item in `coll`.\n     * The array index is not passed to the iteratee.\n     * If you need the index, use `eachOfSeries`.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called when all\n     * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n     * @returns {Promise} a promise, if a callback is omitted\n     */\n    function eachSeries(coll, iteratee, callback) {\n        return eachLimit$1(coll, 1, iteratee, callback)\n    }\n    var eachSeries$1 = awaitify(eachSeries, 3);\n\n    /**\n     * Wrap an async function and ensure it calls its callback on a later tick of\n     * the event loop.  If the function already calls its callback on a next tick,\n     * no extra deferral is added. This is useful for preventing stack overflows\n     * (`RangeError: Maximum call stack size exceeded`) and generally keeping\n     * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)\n     * contained. ES2017 `async` functions are returned as-is -- they are immune\n     * to Zalgo's corrupting influences, as they always resolve on a later tick.\n     *\n     * @name ensureAsync\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {AsyncFunction} fn - an async function, one that expects a node-style\n     * callback as its last argument.\n     * @returns {AsyncFunction} Returns a wrapped function with the exact same call\n     * signature as the function passed in.\n     * @example\n     *\n     * function sometimesAsync(arg, callback) {\n     *     if (cache[arg]) {\n     *         return callback(null, cache[arg]); // this would be synchronous!!\n     *     } else {\n     *         doSomeIO(arg, callback); // this IO would be asynchronous\n     *     }\n     * }\n     *\n     * // this has a risk of stack overflows if many results are cached in a row\n     * async.mapSeries(args, sometimesAsync, done);\n     *\n     * // this will defer sometimesAsync's callback if necessary,\n     * // preventing stack overflows\n     * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);\n     */\n    function ensureAsync(fn) {\n        if (isAsync(fn)) return fn;\n        return function (...args/*, callback*/) {\n            var callback = args.pop();\n            var sync = true;\n            args.push((...innerArgs) => {\n                if (sync) {\n                    setImmediate$1(() => callback(...innerArgs));\n                } else {\n                    callback(...innerArgs);\n                }\n            });\n            fn.apply(this, args);\n            sync = false;\n        };\n    }\n\n    /**\n     * Returns `true` if every element in `coll` satisfies an async test. If any\n     * iteratee call returns `false`, the main `callback` is immediately called.\n     *\n     * @name every\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @alias all\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async truth test to apply to each item\n     * in the collection in parallel.\n     * The iteratee must complete with a boolean result value.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Result will be either `true` or `false`\n     * depending on the values of the async tests. Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback provided\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     * // dir4 does not exist\n     *\n     * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt'];\n     * const withMissingFileList = ['file1.txt','file2.txt','file4.txt'];\n     *\n     * // asynchronous function that checks if a file exists\n     * function fileExists(file, callback) {\n     *    fs.access(file, fs.constants.F_OK, (err) => {\n     *        callback(null, !err);\n     *    });\n     * }\n     *\n     * // Using callbacks\n     * async.every(fileList, fileExists, function(err, result) {\n     *     console.log(result);\n     *     // true\n     *     // result is true since every file exists\n     * });\n     *\n     * async.every(withMissingFileList, fileExists, function(err, result) {\n     *     console.log(result);\n     *     // false\n     *     // result is false since NOT every file exists\n     * });\n     *\n     * // Using Promises\n     * async.every(fileList, fileExists)\n     * .then( result => {\n     *     console.log(result);\n     *     // true\n     *     // result is true since every file exists\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * async.every(withMissingFileList, fileExists)\n     * .then( result => {\n     *     console.log(result);\n     *     // false\n     *     // result is false since NOT every file exists\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.every(fileList, fileExists);\n     *         console.log(result);\n     *         // true\n     *         // result is true since every file exists\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * async () => {\n     *     try {\n     *         let result = await async.every(withMissingFileList, fileExists);\n     *         console.log(result);\n     *         // false\n     *         // result is false since NOT every file exists\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function every(coll, iteratee, callback) {\n        return _createTester(bool => !bool, res => !res)(eachOf$1, coll, iteratee, callback)\n    }\n    var every$1 = awaitify(every, 3);\n\n    /**\n     * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.\n     *\n     * @name everyLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.every]{@link module:Collections.every}\n     * @alias allLimit\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - An async truth test to apply to each item\n     * in the collection in parallel.\n     * The iteratee must complete with a boolean result value.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Result will be either `true` or `false`\n     * depending on the values of the async tests. Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback provided\n     */\n    function everyLimit(coll, limit, iteratee, callback) {\n        return _createTester(bool => !bool, res => !res)(eachOfLimit$2(limit), coll, iteratee, callback)\n    }\n    var everyLimit$1 = awaitify(everyLimit, 4);\n\n    /**\n     * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.\n     *\n     * @name everySeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.every]{@link module:Collections.every}\n     * @alias allSeries\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async truth test to apply to each item\n     * in the collection in series.\n     * The iteratee must complete with a boolean result value.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Result will be either `true` or `false`\n     * depending on the values of the async tests. Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback provided\n     */\n    function everySeries(coll, iteratee, callback) {\n        return _createTester(bool => !bool, res => !res)(eachOfSeries$1, coll, iteratee, callback)\n    }\n    var everySeries$1 = awaitify(everySeries, 3);\n\n    function filterArray(eachfn, arr, iteratee, callback) {\n        var truthValues = new Array(arr.length);\n        eachfn(arr, (x, index, iterCb) => {\n            iteratee(x, (err, v) => {\n                truthValues[index] = !!v;\n                iterCb(err);\n            });\n        }, err => {\n            if (err) return callback(err);\n            var results = [];\n            for (var i = 0; i < arr.length; i++) {\n                if (truthValues[i]) results.push(arr[i]);\n            }\n            callback(null, results);\n        });\n    }\n\n    function filterGeneric(eachfn, coll, iteratee, callback) {\n        var results = [];\n        eachfn(coll, (x, index, iterCb) => {\n            iteratee(x, (err, v) => {\n                if (err) return iterCb(err);\n                if (v) {\n                    results.push({index, value: x});\n                }\n                iterCb(err);\n            });\n        }, err => {\n            if (err) return callback(err);\n            callback(null, results\n                .sort((a, b) => a.index - b.index)\n                .map(v => v.value));\n        });\n    }\n\n    function _filter(eachfn, coll, iteratee, callback) {\n        var filter = isArrayLike(coll) ? filterArray : filterGeneric;\n        return filter(eachfn, coll, wrapAsync(iteratee), callback);\n    }\n\n    /**\n     * Returns a new array of all the values in `coll` which pass an async truth\n     * test. This operation is performed in parallel, but the results array will be\n     * in the same order as the original.\n     *\n     * @name filter\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @alias select\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n     * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n     * with a boolean argument once it has completed. Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback provided\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     *\n     * const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt'];\n     *\n     * // asynchronous function that checks if a file exists\n     * function fileExists(file, callback) {\n     *    fs.access(file, fs.constants.F_OK, (err) => {\n     *        callback(null, !err);\n     *    });\n     * }\n     *\n     * // Using callbacks\n     * async.filter(files, fileExists, function(err, results) {\n     *    if(err) {\n     *        console.log(err);\n     *    } else {\n     *        console.log(results);\n     *        // [ 'dir1/file1.txt', 'dir2/file3.txt' ]\n     *        // results is now an array of the existing files\n     *    }\n     * });\n     *\n     * // Using Promises\n     * async.filter(files, fileExists)\n     * .then(results => {\n     *     console.log(results);\n     *     // [ 'dir1/file1.txt', 'dir2/file3.txt' ]\n     *     // results is now an array of the existing files\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let results = await async.filter(files, fileExists);\n     *         console.log(results);\n     *         // [ 'dir1/file1.txt', 'dir2/file3.txt' ]\n     *         // results is now an array of the existing files\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function filter (coll, iteratee, callback) {\n        return _filter(eachOf$1, coll, iteratee, callback)\n    }\n    var filter$1 = awaitify(filter, 3);\n\n    /**\n     * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a\n     * time.\n     *\n     * @name filterLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.filter]{@link module:Collections.filter}\n     * @alias selectLimit\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n     * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n     * with a boolean argument once it has completed. Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback provided\n     */\n    function filterLimit (coll, limit, iteratee, callback) {\n        return _filter(eachOfLimit$2(limit), coll, iteratee, callback)\n    }\n    var filterLimit$1 = awaitify(filterLimit, 4);\n\n    /**\n     * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.\n     *\n     * @name filterSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.filter]{@link module:Collections.filter}\n     * @alias selectSeries\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n     * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n     * with a boolean argument once it has completed. Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Invoked with (err, results)\n     * @returns {Promise} a promise, if no callback provided\n     */\n    function filterSeries (coll, iteratee, callback) {\n        return _filter(eachOfSeries$1, coll, iteratee, callback)\n    }\n    var filterSeries$1 = awaitify(filterSeries, 3);\n\n    /**\n     * Calls the asynchronous function `fn` with a callback parameter that allows it\n     * to call itself again, in series, indefinitely.\n\n     * If an error is passed to the callback then `errback` is called with the\n     * error, and execution stops, otherwise it will never be called.\n     *\n     * @name forever\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {AsyncFunction} fn - an async function to call repeatedly.\n     * Invoked with (next).\n     * @param {Function} [errback] - when `fn` passes an error to it's callback,\n     * this function will be called, and execution stops. Invoked with (err).\n     * @returns {Promise} a promise that rejects if an error occurs and an errback\n     * is not passed\n     * @example\n     *\n     * async.forever(\n     *     function(next) {\n     *         // next is suitable for passing to things that need a callback(err [, whatever]);\n     *         // it will result in this function being called again.\n     *     },\n     *     function(err) {\n     *         // if next is called with a value in its first parameter, it will appear\n     *         // in here as 'err', and execution will stop.\n     *     }\n     * );\n     */\n    function forever(fn, errback) {\n        var done = onlyOnce(errback);\n        var task = wrapAsync(ensureAsync(fn));\n\n        function next(err) {\n            if (err) return done(err);\n            if (err === false) return;\n            task(next);\n        }\n        return next();\n    }\n    var forever$1 = awaitify(forever, 2);\n\n    /**\n     * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.\n     *\n     * @name groupByLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.groupBy]{@link module:Collections.groupBy}\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The iteratee should complete with a `key` to group the value under.\n     * Invoked with (value, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. Result is an `Object` whoses\n     * properties are arrays of values which returned the corresponding key.\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function groupByLimit(coll, limit, iteratee, callback) {\n        var _iteratee = wrapAsync(iteratee);\n        return mapLimit$1(coll, limit, (val, iterCb) => {\n            _iteratee(val, (err, key) => {\n                if (err) return iterCb(err);\n                return iterCb(err, {key, val});\n            });\n        }, (err, mapResults) => {\n            var result = {};\n            // from MDN, handle object having an `hasOwnProperty` prop\n            var {hasOwnProperty} = Object.prototype;\n\n            for (var i = 0; i < mapResults.length; i++) {\n                if (mapResults[i]) {\n                    var {key} = mapResults[i];\n                    var {val} = mapResults[i];\n\n                    if (hasOwnProperty.call(result, key)) {\n                        result[key].push(val);\n                    } else {\n                        result[key] = [val];\n                    }\n                }\n            }\n\n            return callback(err, result);\n        });\n    }\n\n    var groupByLimit$1 = awaitify(groupByLimit, 4);\n\n    /**\n     * Returns a new object, where each value corresponds to an array of items, from\n     * `coll`, that returned the corresponding key. That is, the keys of the object\n     * correspond to the values passed to the `iteratee` callback.\n     *\n     * Note: Since this function applies the `iteratee` to each item in parallel,\n     * there is no guarantee that the `iteratee` functions will complete in order.\n     * However, the values for each key in the `result` will be in the same order as\n     * the original `coll`. For Objects, the values will roughly be in the order of\n     * the original Objects' keys (but this can vary across JavaScript engines).\n     *\n     * @name groupBy\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The iteratee should complete with a `key` to group the value under.\n     * Invoked with (value, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. Result is an `Object` whoses\n     * properties are arrays of values which returned the corresponding key.\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     * // dir4 does not exist\n     *\n     * const files = ['dir1/file1.txt','dir2','dir4']\n     *\n     * // asynchronous function that detects file type as none, file, or directory\n     * function detectFile(file, callback) {\n     *     fs.stat(file, function(err, stat) {\n     *         if (err) {\n     *             return callback(null, 'none');\n     *         }\n     *         callback(null, stat.isDirectory() ? 'directory' : 'file');\n     *     });\n     * }\n     *\n     * //Using callbacks\n     * async.groupBy(files, detectFile, function(err, result) {\n     *     if(err) {\n     *         console.log(err);\n     *     } else {\n     *\t       console.log(result);\n     *         // {\n     *         //     file: [ 'dir1/file1.txt' ],\n     *         //     none: [ 'dir4' ],\n     *         //     directory: [ 'dir2']\n     *         // }\n     *         // result is object containing the files grouped by type\n     *     }\n     * });\n     *\n     * // Using Promises\n     * async.groupBy(files, detectFile)\n     * .then( result => {\n     *     console.log(result);\n     *     // {\n     *     //     file: [ 'dir1/file1.txt' ],\n     *     //     none: [ 'dir4' ],\n     *     //     directory: [ 'dir2']\n     *     // }\n     *     // result is object containing the files grouped by type\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.groupBy(files, detectFile);\n     *         console.log(result);\n     *         // {\n     *         //     file: [ 'dir1/file1.txt' ],\n     *         //     none: [ 'dir4' ],\n     *         //     directory: [ 'dir2']\n     *         // }\n     *         // result is object containing the files grouped by type\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function groupBy (coll, iteratee, callback) {\n        return groupByLimit$1(coll, Infinity, iteratee, callback)\n    }\n\n    /**\n     * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.\n     *\n     * @name groupBySeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.groupBy]{@link module:Collections.groupBy}\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The iteratee should complete with a `key` to group the value under.\n     * Invoked with (value, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. Result is an `Object` whose\n     * properties are arrays of values which returned the corresponding key.\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function groupBySeries (coll, iteratee, callback) {\n        return groupByLimit$1(coll, 1, iteratee, callback)\n    }\n\n    /**\n     * Logs the result of an `async` function to the `console`. Only works in\n     * Node.js or in browsers that support `console.log` and `console.error` (such\n     * as FF and Chrome). If multiple arguments are returned from the async\n     * function, `console.log` is called on each argument in order.\n     *\n     * @name log\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {AsyncFunction} function - The function you want to eventually apply\n     * all arguments to.\n     * @param {...*} arguments... - Any number of arguments to apply to the function.\n     * @example\n     *\n     * // in a module\n     * var hello = function(name, callback) {\n     *     setTimeout(function() {\n     *         callback(null, 'hello ' + name);\n     *     }, 1000);\n     * };\n     *\n     * // in the node repl\n     * node> async.log(hello, 'world');\n     * 'hello world'\n     */\n    var log = consoleFunc('log');\n\n    /**\n     * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a\n     * time.\n     *\n     * @name mapValuesLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.mapValues]{@link module:Collections.mapValues}\n     * @category Collection\n     * @param {Object} obj - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - A function to apply to each value and key\n     * in `coll`.\n     * The iteratee should complete with the transformed value as its result.\n     * Invoked with (value, key, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. `result` is a new object consisting\n     * of each key from `obj`, with each transformed value on the right-hand side.\n     * Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function mapValuesLimit(obj, limit, iteratee, callback) {\n        callback = once(callback);\n        var newObj = {};\n        var _iteratee = wrapAsync(iteratee);\n        return eachOfLimit$2(limit)(obj, (val, key, next) => {\n            _iteratee(val, key, (err, result) => {\n                if (err) return next(err);\n                newObj[key] = result;\n                next(err);\n            });\n        }, err => callback(err, newObj));\n    }\n\n    var mapValuesLimit$1 = awaitify(mapValuesLimit, 4);\n\n    /**\n     * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.\n     *\n     * Produces a new Object by mapping each value of `obj` through the `iteratee`\n     * function. The `iteratee` is called each `value` and `key` from `obj` and a\n     * callback for when it has finished processing. Each of these callbacks takes\n     * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`\n     * passes an error to its callback, the main `callback` (for the `mapValues`\n     * function) is immediately called with the error.\n     *\n     * Note, the order of the keys in the result is not guaranteed.  The keys will\n     * be roughly in the order they complete, (but this is very engine-specific)\n     *\n     * @name mapValues\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @category Collection\n     * @param {Object} obj - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - A function to apply to each value and key\n     * in `coll`.\n     * The iteratee should complete with the transformed value as its result.\n     * Invoked with (value, key, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. `result` is a new object consisting\n     * of each key from `obj`, with each transformed value on the right-hand side.\n     * Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * // file1.txt is a file that is 1000 bytes in size\n     * // file2.txt is a file that is 2000 bytes in size\n     * // file3.txt is a file that is 3000 bytes in size\n     * // file4.txt does not exist\n     *\n     * const fileMap = {\n     *     f1: 'file1.txt',\n     *     f2: 'file2.txt',\n     *     f3: 'file3.txt'\n     * };\n     *\n     * const withMissingFileMap = {\n     *     f1: 'file1.txt',\n     *     f2: 'file2.txt',\n     *     f3: 'file4.txt'\n     * };\n     *\n     * // asynchronous function that returns the file size in bytes\n     * function getFileSizeInBytes(file, key, callback) {\n     *     fs.stat(file, function(err, stat) {\n     *         if (err) {\n     *             return callback(err);\n     *         }\n     *         callback(null, stat.size);\n     *     });\n     * }\n     *\n     * // Using callbacks\n     * async.mapValues(fileMap, getFileSizeInBytes, function(err, result) {\n     *     if (err) {\n     *         console.log(err);\n     *     } else {\n     *         console.log(result);\n     *         // result is now a map of file size in bytes for each file, e.g.\n     *         // {\n     *         //     f1: 1000,\n     *         //     f2: 2000,\n     *         //     f3: 3000\n     *         // }\n     *     }\n     * });\n     *\n     * // Error handling\n     * async.mapValues(withMissingFileMap, getFileSizeInBytes, function(err, result) {\n     *     if (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *     } else {\n     *         console.log(result);\n     *     }\n     * });\n     *\n     * // Using Promises\n     * async.mapValues(fileMap, getFileSizeInBytes)\n     * .then( result => {\n     *     console.log(result);\n     *     // result is now a map of file size in bytes for each file, e.g.\n     *     // {\n     *     //     f1: 1000,\n     *     //     f2: 2000,\n     *     //     f3: 3000\n     *     // }\n     * }).catch (err => {\n     *     console.log(err);\n     * });\n     *\n     * // Error Handling\n     * async.mapValues(withMissingFileMap, getFileSizeInBytes)\n     * .then( result => {\n     *     console.log(result);\n     * }).catch (err => {\n     *     console.log(err);\n     *     // [ Error: ENOENT: no such file or directory ]\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.mapValues(fileMap, getFileSizeInBytes);\n     *         console.log(result);\n     *         // result is now a map of file size in bytes for each file, e.g.\n     *         // {\n     *         //     f1: 1000,\n     *         //     f2: 2000,\n     *         //     f3: 3000\n     *         // }\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * // Error Handling\n     * async () => {\n     *     try {\n     *         let result = await async.mapValues(withMissingFileMap, getFileSizeInBytes);\n     *         console.log(result);\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *     }\n     * }\n     *\n     */\n    function mapValues(obj, iteratee, callback) {\n        return mapValuesLimit$1(obj, Infinity, iteratee, callback)\n    }\n\n    /**\n     * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.\n     *\n     * @name mapValuesSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.mapValues]{@link module:Collections.mapValues}\n     * @category Collection\n     * @param {Object} obj - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - A function to apply to each value and key\n     * in `coll`.\n     * The iteratee should complete with the transformed value as its result.\n     * Invoked with (value, key, callback).\n     * @param {Function} [callback] - A callback which is called when all `iteratee`\n     * functions have finished, or an error occurs. `result` is a new object consisting\n     * of each key from `obj`, with each transformed value on the right-hand side.\n     * Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function mapValuesSeries(obj, iteratee, callback) {\n        return mapValuesLimit$1(obj, 1, iteratee, callback)\n    }\n\n    /**\n     * Caches the results of an async function. When creating a hash to store\n     * function results against, the callback is omitted from the hash and an\n     * optional hash function can be used.\n     *\n     * **Note: if the async function errs, the result will not be cached and\n     * subsequent calls will call the wrapped function.**\n     *\n     * If no hash function is specified, the first argument is used as a hash key,\n     * which may work reasonably if it is a string or a data type that converts to a\n     * distinct string. Note that objects and arrays will not behave reasonably.\n     * Neither will cases where the other arguments are significant. In such cases,\n     * specify your own hash function.\n     *\n     * The cache of results is exposed as the `memo` property of the function\n     * returned by `memoize`.\n     *\n     * @name memoize\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {AsyncFunction} fn - The async function to proxy and cache results from.\n     * @param {Function} hasher - An optional function for generating a custom hash\n     * for storing results. It has all the arguments applied to it apart from the\n     * callback, and must be synchronous.\n     * @returns {AsyncFunction} a memoized version of `fn`\n     * @example\n     *\n     * var slow_fn = function(name, callback) {\n     *     // do something\n     *     callback(null, result);\n     * };\n     * var fn = async.memoize(slow_fn);\n     *\n     * // fn can now be used as if it were slow_fn\n     * fn('some name', function() {\n     *     // callback\n     * });\n     */\n    function memoize(fn, hasher = v => v) {\n        var memo = Object.create(null);\n        var queues = Object.create(null);\n        var _fn = wrapAsync(fn);\n        var memoized = initialParams((args, callback) => {\n            var key = hasher(...args);\n            if (key in memo) {\n                setImmediate$1(() => callback(null, ...memo[key]));\n            } else if (key in queues) {\n                queues[key].push(callback);\n            } else {\n                queues[key] = [callback];\n                _fn(...args, (err, ...resultArgs) => {\n                    // #1465 don't memoize if an error occurred\n                    if (!err) {\n                        memo[key] = resultArgs;\n                    }\n                    var q = queues[key];\n                    delete queues[key];\n                    for (var i = 0, l = q.length; i < l; i++) {\n                        q[i](err, ...resultArgs);\n                    }\n                });\n            }\n        });\n        memoized.memo = memo;\n        memoized.unmemoized = fn;\n        return memoized;\n    }\n\n    /* istanbul ignore file */\n\n    /**\n     * Calls `callback` on a later loop around the event loop. In Node.js this just\n     * calls `process.nextTick`.  In the browser it will use `setImmediate` if\n     * available, otherwise `setTimeout(callback, 0)`, which means other higher\n     * priority events may precede the execution of `callback`.\n     *\n     * This is used internally for browser-compatibility purposes.\n     *\n     * @name nextTick\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @see [async.setImmediate]{@link module:Utils.setImmediate}\n     * @category Util\n     * @param {Function} callback - The function to call on a later loop around\n     * the event loop. Invoked with (args...).\n     * @param {...*} args... - any number of additional arguments to pass to the\n     * callback on the next tick.\n     * @example\n     *\n     * var call_order = [];\n     * async.nextTick(function() {\n     *     call_order.push('two');\n     *     // call_order now equals ['one','two']\n     * });\n     * call_order.push('one');\n     *\n     * async.setImmediate(function (a, b, c) {\n     *     // a, b, and c equal 1, 2, and 3\n     * }, 1, 2, 3);\n     */\n    var _defer;\n\n    if (hasNextTick) {\n        _defer = process.nextTick;\n    } else if (hasSetImmediate) {\n        _defer = setImmediate;\n    } else {\n        _defer = fallback;\n    }\n\n    var nextTick = wrap(_defer);\n\n    var _parallel = awaitify((eachfn, tasks, callback) => {\n        var results = isArrayLike(tasks) ? [] : {};\n\n        eachfn(tasks, (task, key, taskCb) => {\n            wrapAsync(task)((err, ...result) => {\n                if (result.length < 2) {\n                    [result] = result;\n                }\n                results[key] = result;\n                taskCb(err);\n            });\n        }, err => callback(err, results));\n    }, 3);\n\n    /**\n     * Run the `tasks` collection of functions in parallel, without waiting until\n     * the previous function has completed. If any of the functions pass an error to\n     * its callback, the main `callback` is immediately called with the value of the\n     * error. Once the `tasks` have completed, the results are passed to the final\n     * `callback` as an array.\n     *\n     * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about\n     * parallel execution of code.  If your tasks do not use any timers or perform\n     * any I/O, they will actually be executed in series.  Any synchronous setup\n     * sections for each task will happen one after the other.  JavaScript remains\n     * single-threaded.\n     *\n     * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the\n     * execution of other tasks when a task fails.\n     *\n     * It is also possible to use an object instead of an array. Each property will\n     * be run as a function and the results will be passed to the final `callback`\n     * as an object instead of an array. This can be a more readable way of handling\n     * results from {@link async.parallel}.\n     *\n     * @name parallel\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of\n     * [async functions]{@link AsyncFunction} to run.\n     * Each async function can complete with any number of optional `result` values.\n     * @param {Function} [callback] - An optional callback to run once all the\n     * functions have completed successfully. This function gets a results array\n     * (or object) containing all the result arguments passed to the task callbacks.\n     * Invoked with (err, results).\n     * @returns {Promise} a promise, if a callback is not passed\n     *\n     * @example\n     *\n     * //Using Callbacks\n     * async.parallel([\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'one');\n     *         }, 200);\n     *     },\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'two');\n     *         }, 100);\n     *     }\n     * ], function(err, results) {\n     *     console.log(results);\n     *     // results is equal to ['one','two'] even though\n     *     // the second function had a shorter timeout.\n     * });\n     *\n     * // an example using an object instead of an array\n     * async.parallel({\n     *     one: function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 1);\n     *         }, 200);\n     *     },\n     *     two: function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 2);\n     *         }, 100);\n     *     }\n     * }, function(err, results) {\n     *     console.log(results);\n     *     // results is equal to: { one: 1, two: 2 }\n     * });\n     *\n     * //Using Promises\n     * async.parallel([\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'one');\n     *         }, 200);\n     *     },\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'two');\n     *         }, 100);\n     *     }\n     * ]).then(results => {\n     *     console.log(results);\n     *     // results is equal to ['one','two'] even though\n     *     // the second function had a shorter timeout.\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * // an example using an object instead of an array\n     * async.parallel({\n     *     one: function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 1);\n     *         }, 200);\n     *     },\n     *     two: function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 2);\n     *         }, 100);\n     *     }\n     * }).then(results => {\n     *     console.log(results);\n     *     // results is equal to: { one: 1, two: 2 }\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * //Using async/await\n     * async () => {\n     *     try {\n     *         let results = await async.parallel([\n     *             function(callback) {\n     *                 setTimeout(function() {\n     *                     callback(null, 'one');\n     *                 }, 200);\n     *             },\n     *             function(callback) {\n     *                 setTimeout(function() {\n     *                     callback(null, 'two');\n     *                 }, 100);\n     *             }\n     *         ]);\n     *         console.log(results);\n     *         // results is equal to ['one','two'] even though\n     *         // the second function had a shorter timeout.\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * // an example using an object instead of an array\n     * async () => {\n     *     try {\n     *         let results = await async.parallel({\n     *             one: function(callback) {\n     *                 setTimeout(function() {\n     *                     callback(null, 1);\n     *                 }, 200);\n     *             },\n     *            two: function(callback) {\n     *                 setTimeout(function() {\n     *                     callback(null, 2);\n     *                 }, 100);\n     *            }\n     *         });\n     *         console.log(results);\n     *         // results is equal to: { one: 1, two: 2 }\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function parallel(tasks, callback) {\n        return _parallel(eachOf$1, tasks, callback);\n    }\n\n    /**\n     * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a\n     * time.\n     *\n     * @name parallelLimit\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.parallel]{@link module:ControlFlow.parallel}\n     * @category Control Flow\n     * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of\n     * [async functions]{@link AsyncFunction} to run.\n     * Each async function can complete with any number of optional `result` values.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {Function} [callback] - An optional callback to run once all the\n     * functions have completed successfully. This function gets a results array\n     * (or object) containing all the result arguments passed to the task callbacks.\n     * Invoked with (err, results).\n     * @returns {Promise} a promise, if a callback is not passed\n     */\n    function parallelLimit(tasks, limit, callback) {\n        return _parallel(eachOfLimit$2(limit), tasks, callback);\n    }\n\n    /**\n     * A queue of tasks for the worker function to complete.\n     * @typedef {Iterable} QueueObject\n     * @memberOf module:ControlFlow\n     * @property {Function} length - a function returning the number of items\n     * waiting to be processed. Invoke with `queue.length()`.\n     * @property {boolean} started - a boolean indicating whether or not any\n     * items have been pushed and processed by the queue.\n     * @property {Function} running - a function returning the number of items\n     * currently being processed. Invoke with `queue.running()`.\n     * @property {Function} workersList - a function returning the array of items\n     * currently being processed. Invoke with `queue.workersList()`.\n     * @property {Function} idle - a function returning false if there are items\n     * waiting or being processed, or true if not. Invoke with `queue.idle()`.\n     * @property {number} concurrency - an integer for determining how many `worker`\n     * functions should be run in parallel. This property can be changed after a\n     * `queue` is created to alter the concurrency on-the-fly.\n     * @property {number} payload - an integer that specifies how many items are\n     * passed to the worker function at a time. only applies if this is a\n     * [cargo]{@link module:ControlFlow.cargo} object\n     * @property {AsyncFunction} push - add a new task to the `queue`. Calls `callback`\n     * once the `worker` has finished processing the task. Instead of a single task,\n     * a `tasks` array can be submitted. The respective callback is used for every\n     * task in the list. Invoke with `queue.push(task, [callback])`,\n     * @property {AsyncFunction} unshift - add a new task to the front of the `queue`.\n     * Invoke with `queue.unshift(task, [callback])`.\n     * @property {AsyncFunction} pushAsync - the same as `q.push`, except this returns\n     * a promise that rejects if an error occurs.\n     * @property {AsyncFunction} unshiftAsync - the same as `q.unshift`, except this returns\n     * a promise that rejects if an error occurs.\n     * @property {Function} remove - remove items from the queue that match a test\n     * function.  The test function will be passed an object with a `data` property,\n     * and a `priority` property, if this is a\n     * [priorityQueue]{@link module:ControlFlow.priorityQueue} object.\n     * Invoked with `queue.remove(testFn)`, where `testFn` is of the form\n     * `function ({data, priority}) {}` and returns a Boolean.\n     * @property {Function} saturated - a function that sets a callback that is\n     * called when the number of running workers hits the `concurrency` limit, and\n     * further tasks will be queued.  If the callback is omitted, `q.saturated()`\n     * returns a promise for the next occurrence.\n     * @property {Function} unsaturated - a function that sets a callback that is\n     * called when the number of running workers is less than the `concurrency` &\n     * `buffer` limits, and further tasks will not be queued. If the callback is\n     * omitted, `q.unsaturated()` returns a promise for the next occurrence.\n     * @property {number} buffer - A minimum threshold buffer in order to say that\n     * the `queue` is `unsaturated`.\n     * @property {Function} empty - a function that sets a callback that is called\n     * when the last item from the `queue` is given to a `worker`. If the callback\n     * is omitted, `q.empty()` returns a promise for the next occurrence.\n     * @property {Function} drain - a function that sets a callback that is called\n     * when the last item from the `queue` has returned from the `worker`. If the\n     * callback is omitted, `q.drain()` returns a promise for the next occurrence.\n     * @property {Function} error - a function that sets a callback that is called\n     * when a task errors. Has the signature `function(error, task)`. If the\n     * callback is omitted, `error()` returns a promise that rejects on the next\n     * error.\n     * @property {boolean} paused - a boolean for determining whether the queue is\n     * in a paused state.\n     * @property {Function} pause - a function that pauses the processing of tasks\n     * until `resume()` is called. Invoke with `queue.pause()`.\n     * @property {Function} resume - a function that resumes the processing of\n     * queued tasks when the queue is paused. Invoke with `queue.resume()`.\n     * @property {Function} kill - a function that removes the `drain` callback and\n     * empties remaining tasks from the queue forcing it to go idle. No more tasks\n     * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.\n     *\n     * @example\n     * const q = async.queue(worker, 2)\n     * q.push(item1)\n     * q.push(item2)\n     * q.push(item3)\n     * // queues are iterable, spread into an array to inspect\n     * const items = [...q] // [item1, item2, item3]\n     * // or use for of\n     * for (let item of q) {\n     *     console.log(item)\n     * }\n     *\n     * q.drain(() => {\n     *     console.log('all done')\n     * })\n     * // or\n     * await q.drain()\n     */\n\n    /**\n     * Creates a `queue` object with the specified `concurrency`. Tasks added to the\n     * `queue` are processed in parallel (up to the `concurrency` limit). If all\n     * `worker`s are in progress, the task is queued until one becomes available.\n     * Once a `worker` completes a `task`, that `task`'s callback is called.\n     *\n     * @name queue\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {AsyncFunction} worker - An async function for processing a queued task.\n     * If you want to handle errors from an individual task, pass a callback to\n     * `q.push()`. Invoked with (task, callback).\n     * @param {number} [concurrency=1] - An `integer` for determining how many\n     * `worker` functions should be run in parallel.  If omitted, the concurrency\n     * defaults to `1`.  If the concurrency is `0`, an error is thrown.\n     * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can be\n     * attached as certain properties to listen for specific events during the\n     * lifecycle of the queue.\n     * @example\n     *\n     * // create a queue object with concurrency 2\n     * var q = async.queue(function(task, callback) {\n     *     console.log('hello ' + task.name);\n     *     callback();\n     * }, 2);\n     *\n     * // assign a callback\n     * q.drain(function() {\n     *     console.log('all items have been processed');\n     * });\n     * // or await the end\n     * await q.drain()\n     *\n     * // assign an error callback\n     * q.error(function(err, task) {\n     *     console.error('task experienced an error');\n     * });\n     *\n     * // add some items to the queue\n     * q.push({name: 'foo'}, function(err) {\n     *     console.log('finished processing foo');\n     * });\n     * // callback is optional\n     * q.push({name: 'bar'});\n     *\n     * // add some items to the queue (batch-wise)\n     * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {\n     *     console.log('finished processing item');\n     * });\n     *\n     * // add some items to the front of the queue\n     * q.unshift({name: 'bar'}, function (err) {\n     *     console.log('finished processing bar');\n     * });\n     */\n    function queue (worker, concurrency) {\n        var _worker = wrapAsync(worker);\n        return queue$1((items, cb) => {\n            _worker(items[0], cb);\n        }, concurrency, 1);\n    }\n\n    // Binary min-heap implementation used for priority queue.\n    // Implementation is stable, i.e. push time is considered for equal priorities\n    class Heap {\n        constructor() {\n            this.heap = [];\n            this.pushCount = Number.MIN_SAFE_INTEGER;\n        }\n\n        get length() {\n            return this.heap.length;\n        }\n\n        empty () {\n            this.heap = [];\n            return this;\n        }\n\n        percUp(index) {\n            let p;\n\n            while (index > 0 && smaller(this.heap[index], this.heap[p=parent(index)])) {\n                let t = this.heap[index];\n                this.heap[index] = this.heap[p];\n                this.heap[p] = t;\n\n                index = p;\n            }\n        }\n\n        percDown(index) {\n            let l;\n\n            while ((l=leftChi(index)) < this.heap.length) {\n                if (l+1 < this.heap.length && smaller(this.heap[l+1], this.heap[l])) {\n                    l = l+1;\n                }\n\n                if (smaller(this.heap[index], this.heap[l])) {\n                    break;\n                }\n\n                let t = this.heap[index];\n                this.heap[index] = this.heap[l];\n                this.heap[l] = t;\n\n                index = l;\n            }\n        }\n\n        push(node) {\n            node.pushCount = ++this.pushCount;\n            this.heap.push(node);\n            this.percUp(this.heap.length-1);\n        }\n\n        unshift(node) {\n            return this.heap.push(node);\n        }\n\n        shift() {\n            let [top] = this.heap;\n\n            this.heap[0] = this.heap[this.heap.length-1];\n            this.heap.pop();\n            this.percDown(0);\n\n            return top;\n        }\n\n        toArray() {\n            return [...this];\n        }\n\n        *[Symbol.iterator] () {\n            for (let i = 0; i < this.heap.length; i++) {\n                yield this.heap[i].data;\n            }\n        }\n\n        remove (testFn) {\n            let j = 0;\n            for (let i = 0; i < this.heap.length; i++) {\n                if (!testFn(this.heap[i])) {\n                    this.heap[j] = this.heap[i];\n                    j++;\n                }\n            }\n\n            this.heap.splice(j);\n\n            for (let i = parent(this.heap.length-1); i >= 0; i--) {\n                this.percDown(i);\n            }\n\n            return this;\n        }\n    }\n\n    function leftChi(i) {\n        return (i<<1)+1;\n    }\n\n    function parent(i) {\n        return ((i+1)>>1)-1;\n    }\n\n    function smaller(x, y) {\n        if (x.priority !== y.priority) {\n            return x.priority < y.priority;\n        }\n        else {\n            return x.pushCount < y.pushCount;\n        }\n    }\n\n    /**\n     * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and\n     * completed in ascending priority order.\n     *\n     * @name priorityQueue\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.queue]{@link module:ControlFlow.queue}\n     * @category Control Flow\n     * @param {AsyncFunction} worker - An async function for processing a queued task.\n     * If you want to handle errors from an individual task, pass a callback to\n     * `q.push()`.\n     * Invoked with (task, callback).\n     * @param {number} concurrency - An `integer` for determining how many `worker`\n     * functions should be run in parallel.  If omitted, the concurrency defaults to\n     * `1`.  If the concurrency is `0`, an error is thrown.\n     * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are three\n     * differences between `queue` and `priorityQueue` objects:\n     * * `push(task, priority, [callback])` - `priority` should be a number. If an\n     *   array of `tasks` is given, all tasks will be assigned the same priority.\n     * * `pushAsync(task, priority, [callback])` - the same as `priorityQueue.push`,\n     *   except this returns a promise that rejects if an error occurs.\n     * * The `unshift` and `unshiftAsync` methods were removed.\n     */\n    function priorityQueue(worker, concurrency) {\n        // Start with a normal queue\n        var q = queue(worker, concurrency);\n\n        var {\n            push,\n            pushAsync\n        } = q;\n\n        q._tasks = new Heap();\n        q._createTaskItem = ({data, priority}, callback) => {\n            return {\n                data,\n                priority,\n                callback\n            };\n        };\n\n        function createDataItems(tasks, priority) {\n            if (!Array.isArray(tasks)) {\n                return {data: tasks, priority};\n            }\n            return tasks.map(data => { return {data, priority}; });\n        }\n\n        // Override push to accept second parameter representing priority\n        q.push = function(data, priority = 0, callback) {\n            return push(createDataItems(data, priority), callback);\n        };\n\n        q.pushAsync = function(data, priority = 0, callback) {\n            return pushAsync(createDataItems(data, priority), callback);\n        };\n\n        // Remove unshift functions\n        delete q.unshift;\n        delete q.unshiftAsync;\n\n        return q;\n    }\n\n    /**\n     * Runs the `tasks` array of functions in parallel, without waiting until the\n     * previous function has completed. Once any of the `tasks` complete or pass an\n     * error to its callback, the main `callback` is immediately called. It's\n     * equivalent to `Promise.race()`.\n     *\n     * @name race\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}\n     * to run. Each function can complete with an optional `result` value.\n     * @param {Function} callback - A callback to run once any of the functions have\n     * completed. This function gets an error or result from the first function that\n     * completed. Invoked with (err, result).\n     * @returns {Promise} a promise, if a callback is omitted\n     * @example\n     *\n     * async.race([\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'one');\n     *         }, 200);\n     *     },\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'two');\n     *         }, 100);\n     *     }\n     * ],\n     * // main callback\n     * function(err, result) {\n     *     // the result will be equal to 'two' as it finishes earlier\n     * });\n     */\n    function race(tasks, callback) {\n        callback = once(callback);\n        if (!Array.isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));\n        if (!tasks.length) return callback();\n        for (var i = 0, l = tasks.length; i < l; i++) {\n            wrapAsync(tasks[i])(callback);\n        }\n    }\n\n    var race$1 = awaitify(race, 2);\n\n    /**\n     * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.\n     *\n     * @name reduceRight\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.reduce]{@link module:Collections.reduce}\n     * @alias foldr\n     * @category Collection\n     * @param {Array} array - A collection to iterate over.\n     * @param {*} memo - The initial state of the reduction.\n     * @param {AsyncFunction} iteratee - A function applied to each item in the\n     * array to produce the next step in the reduction.\n     * The `iteratee` should complete with the next state of the reduction.\n     * If the iteratee completes with an error, the reduction is stopped and the\n     * main `callback` is immediately called with the error.\n     * Invoked with (memo, item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Result is the reduced value. Invoked with\n     * (err, result).\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function reduceRight (array, memo, iteratee, callback) {\n        var reversed = [...array].reverse();\n        return reduce$1(reversed, memo, iteratee, callback);\n    }\n\n    /**\n     * Wraps the async function in another function that always completes with a\n     * result object, even when it errors.\n     *\n     * The result object has either the property `error` or `value`.\n     *\n     * @name reflect\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {AsyncFunction} fn - The async function you want to wrap\n     * @returns {Function} - A function that always passes null to it's callback as\n     * the error. The second argument to the callback will be an `object` with\n     * either an `error` or a `value` property.\n     * @example\n     *\n     * async.parallel([\n     *     async.reflect(function(callback) {\n     *         // do some stuff ...\n     *         callback(null, 'one');\n     *     }),\n     *     async.reflect(function(callback) {\n     *         // do some more stuff but error ...\n     *         callback('bad stuff happened');\n     *     }),\n     *     async.reflect(function(callback) {\n     *         // do some more stuff ...\n     *         callback(null, 'two');\n     *     })\n     * ],\n     * // optional callback\n     * function(err, results) {\n     *     // values\n     *     // results[0].value = 'one'\n     *     // results[1].error = 'bad stuff happened'\n     *     // results[2].value = 'two'\n     * });\n     */\n    function reflect(fn) {\n        var _fn = wrapAsync(fn);\n        return initialParams(function reflectOn(args, reflectCallback) {\n            args.push((error, ...cbArgs) => {\n                let retVal = {};\n                if (error) {\n                    retVal.error = error;\n                }\n                if (cbArgs.length > 0){\n                    var value = cbArgs;\n                    if (cbArgs.length <= 1) {\n                        [value] = cbArgs;\n                    }\n                    retVal.value = value;\n                }\n                reflectCallback(null, retVal);\n            });\n\n            return _fn.apply(this, args);\n        });\n    }\n\n    /**\n     * A helper function that wraps an array or an object of functions with `reflect`.\n     *\n     * @name reflectAll\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @see [async.reflect]{@link module:Utils.reflect}\n     * @category Util\n     * @param {Array|Object|Iterable} tasks - The collection of\n     * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.\n     * @returns {Array} Returns an array of async functions, each wrapped in\n     * `async.reflect`\n     * @example\n     *\n     * let tasks = [\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'one');\n     *         }, 200);\n     *     },\n     *     function(callback) {\n     *         // do some more stuff but error ...\n     *         callback(new Error('bad stuff happened'));\n     *     },\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'two');\n     *         }, 100);\n     *     }\n     * ];\n     *\n     * async.parallel(async.reflectAll(tasks),\n     * // optional callback\n     * function(err, results) {\n     *     // values\n     *     // results[0].value = 'one'\n     *     // results[1].error = Error('bad stuff happened')\n     *     // results[2].value = 'two'\n     * });\n     *\n     * // an example using an object instead of an array\n     * let tasks = {\n     *     one: function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'one');\n     *         }, 200);\n     *     },\n     *     two: function(callback) {\n     *         callback('two');\n     *     },\n     *     three: function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'three');\n     *         }, 100);\n     *     }\n     * };\n     *\n     * async.parallel(async.reflectAll(tasks),\n     * // optional callback\n     * function(err, results) {\n     *     // values\n     *     // results.one.value = 'one'\n     *     // results.two.error = 'two'\n     *     // results.three.value = 'three'\n     * });\n     */\n    function reflectAll(tasks) {\n        var results;\n        if (Array.isArray(tasks)) {\n            results = tasks.map(reflect);\n        } else {\n            results = {};\n            Object.keys(tasks).forEach(key => {\n                results[key] = reflect.call(this, tasks[key]);\n            });\n        }\n        return results;\n    }\n\n    function reject$2(eachfn, arr, _iteratee, callback) {\n        const iteratee = wrapAsync(_iteratee);\n        return _filter(eachfn, arr, (value, cb) => {\n            iteratee(value, (err, v) => {\n                cb(err, !v);\n            });\n        }, callback);\n    }\n\n    /**\n     * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.\n     *\n     * @name reject\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.filter]{@link module:Collections.filter}\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {Function} iteratee - An async truth test to apply to each item in\n     * `coll`.\n     * The should complete with a boolean value as its `result`.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     *\n     * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt'];\n     *\n     * // asynchronous function that checks if a file exists\n     * function fileExists(file, callback) {\n     *    fs.access(file, fs.constants.F_OK, (err) => {\n     *        callback(null, !err);\n     *    });\n     * }\n     *\n     * // Using callbacks\n     * async.reject(fileList, fileExists, function(err, results) {\n     *    // [ 'dir3/file6.txt' ]\n     *    // results now equals an array of the non-existing files\n     * });\n     *\n     * // Using Promises\n     * async.reject(fileList, fileExists)\n     * .then( results => {\n     *     console.log(results);\n     *     // [ 'dir3/file6.txt' ]\n     *     // results now equals an array of the non-existing files\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let results = await async.reject(fileList, fileExists);\n     *         console.log(results);\n     *         // [ 'dir3/file6.txt' ]\n     *         // results now equals an array of the non-existing files\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function reject (coll, iteratee, callback) {\n        return reject$2(eachOf$1, coll, iteratee, callback)\n    }\n    var reject$1 = awaitify(reject, 3);\n\n    /**\n     * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a\n     * time.\n     *\n     * @name rejectLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.reject]{@link module:Collections.reject}\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {Function} iteratee - An async truth test to apply to each item in\n     * `coll`.\n     * The should complete with a boolean value as its `result`.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function rejectLimit (coll, limit, iteratee, callback) {\n        return reject$2(eachOfLimit$2(limit), coll, iteratee, callback)\n    }\n    var rejectLimit$1 = awaitify(rejectLimit, 4);\n\n    /**\n     * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.\n     *\n     * @name rejectSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.reject]{@link module:Collections.reject}\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {Function} iteratee - An async truth test to apply to each item in\n     * `coll`.\n     * The should complete with a boolean value as its `result`.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback is passed\n     */\n    function rejectSeries (coll, iteratee, callback) {\n        return reject$2(eachOfSeries$1, coll, iteratee, callback)\n    }\n    var rejectSeries$1 = awaitify(rejectSeries, 3);\n\n    function constant(value) {\n        return function () {\n            return value;\n        }\n    }\n\n    /**\n     * Attempts to get a successful response from `task` no more than `times` times\n     * before returning an error. If the task is successful, the `callback` will be\n     * passed the result of the successful task. If all attempts fail, the callback\n     * will be passed the error and result (if any) of the final attempt.\n     *\n     * @name retry\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @see [async.retryable]{@link module:ControlFlow.retryable}\n     * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an\n     * object with `times` and `interval` or a number.\n     * * `times` - The number of attempts to make before giving up.  The default\n     *   is `5`.\n     * * `interval` - The time to wait between retries, in milliseconds.  The\n     *   default is `0`. The interval may also be specified as a function of the\n     *   retry count (see example).\n     * * `errorFilter` - An optional synchronous function that is invoked on\n     *   erroneous result. If it returns `true` the retry attempts will continue;\n     *   if the function returns `false` the retry flow is aborted with the current\n     *   attempt's error and result being returned to the final callback.\n     *   Invoked with (err).\n     * * If `opts` is a number, the number specifies the number of times to retry,\n     *   with the default interval of `0`.\n     * @param {AsyncFunction} task - An async function to retry.\n     * Invoked with (callback).\n     * @param {Function} [callback] - An optional callback which is called when the\n     * task has succeeded, or after the final failed attempt. It receives the `err`\n     * and `result` arguments of the last attempt at completing the `task`. Invoked\n     * with (err, results).\n     * @returns {Promise} a promise if no callback provided\n     *\n     * @example\n     *\n     * // The `retry` function can be used as a stand-alone control flow by passing\n     * // a callback, as shown below:\n     *\n     * // try calling apiMethod 3 times\n     * async.retry(3, apiMethod, function(err, result) {\n     *     // do something with the result\n     * });\n     *\n     * // try calling apiMethod 3 times, waiting 200 ms between each retry\n     * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {\n     *     // do something with the result\n     * });\n     *\n     * // try calling apiMethod 10 times with exponential backoff\n     * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)\n     * async.retry({\n     *   times: 10,\n     *   interval: function(retryCount) {\n     *     return 50 * Math.pow(2, retryCount);\n     *   }\n     * }, apiMethod, function(err, result) {\n     *     // do something with the result\n     * });\n     *\n     * // try calling apiMethod the default 5 times no delay between each retry\n     * async.retry(apiMethod, function(err, result) {\n     *     // do something with the result\n     * });\n     *\n     * // try calling apiMethod only when error condition satisfies, all other\n     * // errors will abort the retry control flow and return to final callback\n     * async.retry({\n     *   errorFilter: function(err) {\n     *     return err.message === 'Temporary error'; // only retry on a specific error\n     *   }\n     * }, apiMethod, function(err, result) {\n     *     // do something with the result\n     * });\n     *\n     * // to retry individual methods that are not as reliable within other\n     * // control flow functions, use the `retryable` wrapper:\n     * async.auto({\n     *     users: api.getUsers.bind(api),\n     *     payments: async.retryable(3, api.getPayments.bind(api))\n     * }, function(err, results) {\n     *     // do something with the results\n     * });\n     *\n     */\n    const DEFAULT_TIMES = 5;\n    const DEFAULT_INTERVAL = 0;\n\n    function retry(opts, task, callback) {\n        var options = {\n            times: DEFAULT_TIMES,\n            intervalFunc: constant(DEFAULT_INTERVAL)\n        };\n\n        if (arguments.length < 3 && typeof opts === 'function') {\n            callback = task || promiseCallback();\n            task = opts;\n        } else {\n            parseTimes(options, opts);\n            callback = callback || promiseCallback();\n        }\n\n        if (typeof task !== 'function') {\n            throw new Error(\"Invalid arguments for async.retry\");\n        }\n\n        var _task = wrapAsync(task);\n\n        var attempt = 1;\n        function retryAttempt() {\n            _task((err, ...args) => {\n                if (err === false) return\n                if (err && attempt++ < options.times &&\n                    (typeof options.errorFilter != 'function' ||\n                        options.errorFilter(err))) {\n                    setTimeout(retryAttempt, options.intervalFunc(attempt - 1));\n                } else {\n                    callback(err, ...args);\n                }\n            });\n        }\n\n        retryAttempt();\n        return callback[PROMISE_SYMBOL]\n    }\n\n    function parseTimes(acc, t) {\n        if (typeof t === 'object') {\n            acc.times = +t.times || DEFAULT_TIMES;\n\n            acc.intervalFunc = typeof t.interval === 'function' ?\n                t.interval :\n                constant(+t.interval || DEFAULT_INTERVAL);\n\n            acc.errorFilter = t.errorFilter;\n        } else if (typeof t === 'number' || typeof t === 'string') {\n            acc.times = +t || DEFAULT_TIMES;\n        } else {\n            throw new Error(\"Invalid arguments for async.retry\");\n        }\n    }\n\n    /**\n     * A close relative of [`retry`]{@link module:ControlFlow.retry}.  This method\n     * wraps a task and makes it retryable, rather than immediately calling it\n     * with retries.\n     *\n     * @name retryable\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.retry]{@link module:ControlFlow.retry}\n     * @category Control Flow\n     * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional\n     * options, exactly the same as from `retry`, except for a `opts.arity` that\n     * is the arity of the `task` function, defaulting to `task.length`\n     * @param {AsyncFunction} task - the asynchronous function to wrap.\n     * This function will be passed any arguments passed to the returned wrapper.\n     * Invoked with (...args, callback).\n     * @returns {AsyncFunction} The wrapped function, which when invoked, will\n     * retry on an error, based on the parameters specified in `opts`.\n     * This function will accept the same parameters as `task`.\n     * @example\n     *\n     * async.auto({\n     *     dep1: async.retryable(3, getFromFlakyService),\n     *     process: [\"dep1\", async.retryable(3, function (results, cb) {\n     *         maybeProcessData(results.dep1, cb);\n     *     })]\n     * }, callback);\n     */\n    function retryable (opts, task) {\n        if (!task) {\n            task = opts;\n            opts = null;\n        }\n        let arity = (opts && opts.arity) || task.length;\n        if (isAsync(task)) {\n            arity += 1;\n        }\n        var _task = wrapAsync(task);\n        return initialParams((args, callback) => {\n            if (args.length < arity - 1 || callback == null) {\n                args.push(callback);\n                callback = promiseCallback();\n            }\n            function taskFn(cb) {\n                _task(...args, cb);\n            }\n\n            if (opts) retry(opts, taskFn, callback);\n            else retry(taskFn, callback);\n\n            return callback[PROMISE_SYMBOL]\n        });\n    }\n\n    /**\n     * Run the functions in the `tasks` collection in series, each one running once\n     * the previous function has completed. If any functions in the series pass an\n     * error to its callback, no more functions are run, and `callback` is\n     * immediately called with the value of the error. Otherwise, `callback`\n     * receives an array of results when `tasks` have completed.\n     *\n     * It is also possible to use an object instead of an array. Each property will\n     * be run as a function, and the results will be passed to the final `callback`\n     * as an object instead of an array. This can be a more readable way of handling\n     *  results from {@link async.series}.\n     *\n     * **Note** that while many implementations preserve the order of object\n     * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)\n     * explicitly states that\n     *\n     * > The mechanics and order of enumerating the properties is not specified.\n     *\n     * So if you rely on the order in which your series of functions are executed,\n     * and want this to work on all platforms, consider using an array.\n     *\n     * @name series\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing\n     * [async functions]{@link AsyncFunction} to run in series.\n     * Each function can complete with any number of optional `result` values.\n     * @param {Function} [callback] - An optional callback to run once all the\n     * functions have completed. This function gets a results array (or object)\n     * containing all the result arguments passed to the `task` callbacks. Invoked\n     * with (err, result).\n     * @return {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * //Using Callbacks\n     * async.series([\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             // do some async task\n     *             callback(null, 'one');\n     *         }, 200);\n     *     },\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             // then do another async task\n     *             callback(null, 'two');\n     *         }, 100);\n     *     }\n     * ], function(err, results) {\n     *     console.log(results);\n     *     // results is equal to ['one','two']\n     * });\n     *\n     * // an example using objects instead of arrays\n     * async.series({\n     *     one: function(callback) {\n     *         setTimeout(function() {\n     *             // do some async task\n     *             callback(null, 1);\n     *         }, 200);\n     *     },\n     *     two: function(callback) {\n     *         setTimeout(function() {\n     *             // then do another async task\n     *             callback(null, 2);\n     *         }, 100);\n     *     }\n     * }, function(err, results) {\n     *     console.log(results);\n     *     // results is equal to: { one: 1, two: 2 }\n     * });\n     *\n     * //Using Promises\n     * async.series([\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'one');\n     *         }, 200);\n     *     },\n     *     function(callback) {\n     *         setTimeout(function() {\n     *             callback(null, 'two');\n     *         }, 100);\n     *     }\n     * ]).then(results => {\n     *     console.log(results);\n     *     // results is equal to ['one','two']\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * // an example using an object instead of an array\n     * async.series({\n     *     one: function(callback) {\n     *         setTimeout(function() {\n     *             // do some async task\n     *             callback(null, 1);\n     *         }, 200);\n     *     },\n     *     two: function(callback) {\n     *         setTimeout(function() {\n     *             // then do another async task\n     *             callback(null, 2);\n     *         }, 100);\n     *     }\n     * }).then(results => {\n     *     console.log(results);\n     *     // results is equal to: { one: 1, two: 2 }\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * //Using async/await\n     * async () => {\n     *     try {\n     *         let results = await async.series([\n     *             function(callback) {\n     *                 setTimeout(function() {\n     *                     // do some async task\n     *                     callback(null, 'one');\n     *                 }, 200);\n     *             },\n     *             function(callback) {\n     *                 setTimeout(function() {\n     *                     // then do another async task\n     *                     callback(null, 'two');\n     *                 }, 100);\n     *             }\n     *         ]);\n     *         console.log(results);\n     *         // results is equal to ['one','two']\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * // an example using an object instead of an array\n     * async () => {\n     *     try {\n     *         let results = await async.parallel({\n     *             one: function(callback) {\n     *                 setTimeout(function() {\n     *                     // do some async task\n     *                     callback(null, 1);\n     *                 }, 200);\n     *             },\n     *            two: function(callback) {\n     *                 setTimeout(function() {\n     *                     // then do another async task\n     *                     callback(null, 2);\n     *                 }, 100);\n     *            }\n     *         });\n     *         console.log(results);\n     *         // results is equal to: { one: 1, two: 2 }\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function series(tasks, callback) {\n        return _parallel(eachOfSeries$1, tasks, callback);\n    }\n\n    /**\n     * Returns `true` if at least one element in the `coll` satisfies an async test.\n     * If any iteratee call returns `true`, the main `callback` is immediately\n     * called.\n     *\n     * @name some\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @alias any\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async truth test to apply to each item\n     * in the collections in parallel.\n     * The iteratee should complete with a boolean `result` value.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called as soon as any\n     * iteratee returns `true`, or after all the iteratee functions have finished.\n     * Result will be either `true` or `false` depending on the values of the async\n     * tests. Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback provided\n     * @example\n     *\n     * // dir1 is a directory that contains file1.txt, file2.txt\n     * // dir2 is a directory that contains file3.txt, file4.txt\n     * // dir3 is a directory that contains file5.txt\n     * // dir4 does not exist\n     *\n     * // asynchronous function that checks if a file exists\n     * function fileExists(file, callback) {\n     *    fs.access(file, fs.constants.F_OK, (err) => {\n     *        callback(null, !err);\n     *    });\n     * }\n     *\n     * // Using callbacks\n     * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists,\n     *    function(err, result) {\n     *        console.log(result);\n     *        // true\n     *        // result is true since some file in the list exists\n     *    }\n     *);\n     *\n     * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists,\n     *    function(err, result) {\n     *        console.log(result);\n     *        // false\n     *        // result is false since none of the files exists\n     *    }\n     *);\n     *\n     * // Using Promises\n     * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists)\n     * .then( result => {\n     *     console.log(result);\n     *     // true\n     *     // result is true since some file in the list exists\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists)\n     * .then( result => {\n     *     console.log(result);\n     *     // false\n     *     // result is false since none of the files exists\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists);\n     *         console.log(result);\n     *         // true\n     *         // result is true since some file in the list exists\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     * async () => {\n     *     try {\n     *         let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists);\n     *         console.log(result);\n     *         // false\n     *         // result is false since none of the files exists\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function some(coll, iteratee, callback) {\n        return _createTester(Boolean, res => res)(eachOf$1, coll, iteratee, callback)\n    }\n    var some$1 = awaitify(some, 3);\n\n    /**\n     * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.\n     *\n     * @name someLimit\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.some]{@link module:Collections.some}\n     * @alias anyLimit\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - An async truth test to apply to each item\n     * in the collections in parallel.\n     * The iteratee should complete with a boolean `result` value.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called as soon as any\n     * iteratee returns `true`, or after all the iteratee functions have finished.\n     * Result will be either `true` or `false` depending on the values of the async\n     * tests. Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback provided\n     */\n    function someLimit(coll, limit, iteratee, callback) {\n        return _createTester(Boolean, res => res)(eachOfLimit$2(limit), coll, iteratee, callback)\n    }\n    var someLimit$1 = awaitify(someLimit, 4);\n\n    /**\n     * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.\n     *\n     * @name someSeries\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @see [async.some]{@link module:Collections.some}\n     * @alias anySeries\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async truth test to apply to each item\n     * in the collections in series.\n     * The iteratee should complete with a boolean `result` value.\n     * Invoked with (item, callback).\n     * @param {Function} [callback] - A callback which is called as soon as any\n     * iteratee returns `true`, or after all the iteratee functions have finished.\n     * Result will be either `true` or `false` depending on the values of the async\n     * tests. Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback provided\n     */\n    function someSeries(coll, iteratee, callback) {\n        return _createTester(Boolean, res => res)(eachOfSeries$1, coll, iteratee, callback)\n    }\n    var someSeries$1 = awaitify(someSeries, 3);\n\n    /**\n     * Sorts a list by the results of running each `coll` value through an async\n     * `iteratee`.\n     *\n     * @name sortBy\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {AsyncFunction} iteratee - An async function to apply to each item in\n     * `coll`.\n     * The iteratee should complete with a value to use as the sort criteria as\n     * its `result`.\n     * Invoked with (item, callback).\n     * @param {Function} callback - A callback which is called after all the\n     * `iteratee` functions have finished, or an error occurs. Results is the items\n     * from the original `coll` sorted by the values returned by the `iteratee`\n     * calls. Invoked with (err, results).\n     * @returns {Promise} a promise, if no callback passed\n     * @example\n     *\n     * // bigfile.txt is a file that is 251100 bytes in size\n     * // mediumfile.txt is a file that is 11000 bytes in size\n     * // smallfile.txt is a file that is 121 bytes in size\n     *\n     * // asynchronous function that returns the file size in bytes\n     * function getFileSizeInBytes(file, callback) {\n     *     fs.stat(file, function(err, stat) {\n     *         if (err) {\n     *             return callback(err);\n     *         }\n     *         callback(null, stat.size);\n     *     });\n     * }\n     *\n     * // Using callbacks\n     * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes,\n     *     function(err, results) {\n     *         if (err) {\n     *             console.log(err);\n     *         } else {\n     *             console.log(results);\n     *             // results is now the original array of files sorted by\n     *             // file size (ascending by default), e.g.\n     *             // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']\n     *         }\n     *     }\n     * );\n     *\n     * // By modifying the callback parameter the\n     * // sorting order can be influenced:\n     *\n     * // ascending order\n     * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], function(file, callback) {\n     *     getFileSizeInBytes(file, function(getFileSizeErr, fileSize) {\n     *         if (getFileSizeErr) return callback(getFileSizeErr);\n     *         callback(null, fileSize);\n     *     });\n     * }, function(err, results) {\n     *         if (err) {\n     *             console.log(err);\n     *         } else {\n     *             console.log(results);\n     *             // results is now the original array of files sorted by\n     *             // file size (ascending by default), e.g.\n     *             // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']\n     *         }\n     *     }\n     * );\n     *\n     * // descending order\n     * async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], function(file, callback) {\n     *     getFileSizeInBytes(file, function(getFileSizeErr, fileSize) {\n     *         if (getFileSizeErr) {\n     *             return callback(getFileSizeErr);\n     *         }\n     *         callback(null, fileSize * -1);\n     *     });\n     * }, function(err, results) {\n     *         if (err) {\n     *             console.log(err);\n     *         } else {\n     *             console.log(results);\n     *             // results is now the original array of files sorted by\n     *             // file size (ascending by default), e.g.\n     *             // [ 'bigfile.txt', 'mediumfile.txt', 'smallfile.txt']\n     *         }\n     *     }\n     * );\n     *\n     * // Error handling\n     * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes,\n     *     function(err, results) {\n     *         if (err) {\n     *             console.log(err);\n     *             // [ Error: ENOENT: no such file or directory ]\n     *         } else {\n     *             console.log(results);\n     *         }\n     *     }\n     * );\n     *\n     * // Using Promises\n     * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes)\n     * .then( results => {\n     *     console.log(results);\n     *     // results is now the original array of files sorted by\n     *     // file size (ascending by default), e.g.\n     *     // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']\n     * }).catch( err => {\n     *     console.log(err);\n     * });\n     *\n     * // Error handling\n     * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes)\n     * .then( results => {\n     *     console.log(results);\n     * }).catch( err => {\n     *     console.log(err);\n     *     // [ Error: ENOENT: no such file or directory ]\n     * });\n     *\n     * // Using async/await\n     * (async () => {\n     *     try {\n     *         let results = await async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes);\n     *         console.log(results);\n     *         // results is now the original array of files sorted by\n     *         // file size (ascending by default), e.g.\n     *         // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * })();\n     *\n     * // Error handling\n     * async () => {\n     *     try {\n     *         let results = await async.sortBy(['missingfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes);\n     *         console.log(results);\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *         // [ Error: ENOENT: no such file or directory ]\n     *     }\n     * }\n     *\n     */\n    function sortBy (coll, iteratee, callback) {\n        var _iteratee = wrapAsync(iteratee);\n        return map$1(coll, (x, iterCb) => {\n            _iteratee(x, (err, criteria) => {\n                if (err) return iterCb(err);\n                iterCb(err, {value: x, criteria});\n            });\n        }, (err, results) => {\n            if (err) return callback(err);\n            callback(null, results.sort(comparator).map(v => v.value));\n        });\n\n        function comparator(left, right) {\n            var a = left.criteria, b = right.criteria;\n            return a < b ? -1 : a > b ? 1 : 0;\n        }\n    }\n    var sortBy$1 = awaitify(sortBy, 3);\n\n    /**\n     * Sets a time limit on an asynchronous function. If the function does not call\n     * its callback within the specified milliseconds, it will be called with a\n     * timeout error. The code property for the error object will be `'ETIMEDOUT'`.\n     *\n     * @name timeout\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @category Util\n     * @param {AsyncFunction} asyncFn - The async function to limit in time.\n     * @param {number} milliseconds - The specified time limit.\n     * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)\n     * to timeout Error for more information..\n     * @returns {AsyncFunction} Returns a wrapped function that can be used with any\n     * of the control flow functions.\n     * Invoke this function with the same parameters as you would `asyncFunc`.\n     * @example\n     *\n     * function myFunction(foo, callback) {\n     *     doAsyncTask(foo, function(err, data) {\n     *         // handle errors\n     *         if (err) return callback(err);\n     *\n     *         // do some stuff ...\n     *\n     *         // return processed data\n     *         return callback(null, data);\n     *     });\n     * }\n     *\n     * var wrapped = async.timeout(myFunction, 1000);\n     *\n     * // call `wrapped` as you would `myFunction`\n     * wrapped({ bar: 'bar' }, function(err, data) {\n     *     // if `myFunction` takes < 1000 ms to execute, `err`\n     *     // and `data` will have their expected values\n     *\n     *     // else `err` will be an Error with the code 'ETIMEDOUT'\n     * });\n     */\n    function timeout(asyncFn, milliseconds, info) {\n        var fn = wrapAsync(asyncFn);\n\n        return initialParams((args, callback) => {\n            var timedOut = false;\n            var timer;\n\n            function timeoutCallback() {\n                var name = asyncFn.name || 'anonymous';\n                var error  = new Error('Callback function \"' + name + '\" timed out.');\n                error.code = 'ETIMEDOUT';\n                if (info) {\n                    error.info = info;\n                }\n                timedOut = true;\n                callback(error);\n            }\n\n            args.push((...cbArgs) => {\n                if (!timedOut) {\n                    callback(...cbArgs);\n                    clearTimeout(timer);\n                }\n            });\n\n            // setup timer and call original function\n            timer = setTimeout(timeoutCallback, milliseconds);\n            fn(...args);\n        });\n    }\n\n    function range(size) {\n        var result = Array(size);\n        while (size--) {\n            result[size] = size;\n        }\n        return result;\n    }\n\n    /**\n     * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a\n     * time.\n     *\n     * @name timesLimit\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.times]{@link module:ControlFlow.times}\n     * @category Control Flow\n     * @param {number} count - The number of times to run the function.\n     * @param {number} limit - The maximum number of async operations at a time.\n     * @param {AsyncFunction} iteratee - The async function to call `n` times.\n     * Invoked with the iteration index and a callback: (n, next).\n     * @param {Function} callback - see [async.map]{@link module:Collections.map}.\n     * @returns {Promise} a promise, if no callback is provided\n     */\n    function timesLimit(count, limit, iteratee, callback) {\n        var _iteratee = wrapAsync(iteratee);\n        return mapLimit$1(range(count), limit, _iteratee, callback);\n    }\n\n    /**\n     * Calls the `iteratee` function `n` times, and accumulates results in the same\n     * manner you would use with [map]{@link module:Collections.map}.\n     *\n     * @name times\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.map]{@link module:Collections.map}\n     * @category Control Flow\n     * @param {number} n - The number of times to run the function.\n     * @param {AsyncFunction} iteratee - The async function to call `n` times.\n     * Invoked with the iteration index and a callback: (n, next).\n     * @param {Function} callback - see {@link module:Collections.map}.\n     * @returns {Promise} a promise, if no callback is provided\n     * @example\n     *\n     * // Pretend this is some complicated async factory\n     * var createUser = function(id, callback) {\n     *     callback(null, {\n     *         id: 'user' + id\n     *     });\n     * };\n     *\n     * // generate 5 users\n     * async.times(5, function(n, next) {\n     *     createUser(n, function(err, user) {\n     *         next(err, user);\n     *     });\n     * }, function(err, users) {\n     *     // we should now have 5 users\n     * });\n     */\n    function times (n, iteratee, callback) {\n        return timesLimit(n, Infinity, iteratee, callback)\n    }\n\n    /**\n     * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.\n     *\n     * @name timesSeries\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.times]{@link module:ControlFlow.times}\n     * @category Control Flow\n     * @param {number} n - The number of times to run the function.\n     * @param {AsyncFunction} iteratee - The async function to call `n` times.\n     * Invoked with the iteration index and a callback: (n, next).\n     * @param {Function} callback - see {@link module:Collections.map}.\n     * @returns {Promise} a promise, if no callback is provided\n     */\n    function timesSeries (n, iteratee, callback) {\n        return timesLimit(n, 1, iteratee, callback)\n    }\n\n    /**\n     * A relative of `reduce`.  Takes an Object or Array, and iterates over each\n     * element in parallel, each step potentially mutating an `accumulator` value.\n     * The type of the accumulator defaults to the type of collection passed in.\n     *\n     * @name transform\n     * @static\n     * @memberOf module:Collections\n     * @method\n     * @category Collection\n     * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n     * @param {*} [accumulator] - The initial state of the transform.  If omitted,\n     * it will default to an empty Object or Array, depending on the type of `coll`\n     * @param {AsyncFunction} iteratee - A function applied to each item in the\n     * collection that potentially modifies the accumulator.\n     * Invoked with (accumulator, item, key, callback).\n     * @param {Function} [callback] - A callback which is called after all the\n     * `iteratee` functions have finished. Result is the transformed accumulator.\n     * Invoked with (err, result).\n     * @returns {Promise} a promise, if no callback provided\n     * @example\n     *\n     * // file1.txt is a file that is 1000 bytes in size\n     * // file2.txt is a file that is 2000 bytes in size\n     * // file3.txt is a file that is 3000 bytes in size\n     *\n     * // helper function that returns human-readable size format from bytes\n     * function formatBytes(bytes, decimals = 2) {\n     *   // implementation not included for brevity\n     *   return humanReadbleFilesize;\n     * }\n     *\n     * const fileList = ['file1.txt','file2.txt','file3.txt'];\n     *\n     * // asynchronous function that returns the file size, transformed to human-readable format\n     * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.\n     * function transformFileSize(acc, value, key, callback) {\n     *     fs.stat(value, function(err, stat) {\n     *         if (err) {\n     *             return callback(err);\n     *         }\n     *         acc[key] = formatBytes(stat.size);\n     *         callback(null);\n     *     });\n     * }\n     *\n     * // Using callbacks\n     * async.transform(fileList, transformFileSize, function(err, result) {\n     *     if(err) {\n     *         console.log(err);\n     *     } else {\n     *         console.log(result);\n     *         // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]\n     *     }\n     * });\n     *\n     * // Using Promises\n     * async.transform(fileList, transformFileSize)\n     * .then(result => {\n     *     console.log(result);\n     *     // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * (async () => {\n     *     try {\n     *         let result = await async.transform(fileList, transformFileSize);\n     *         console.log(result);\n     *         // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * })();\n     *\n     * @example\n     *\n     * // file1.txt is a file that is 1000 bytes in size\n     * // file2.txt is a file that is 2000 bytes in size\n     * // file3.txt is a file that is 3000 bytes in size\n     *\n     * // helper function that returns human-readable size format from bytes\n     * function formatBytes(bytes, decimals = 2) {\n     *   // implementation not included for brevity\n     *   return humanReadbleFilesize;\n     * }\n     *\n     * const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' };\n     *\n     * // asynchronous function that returns the file size, transformed to human-readable format\n     * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.\n     * function transformFileSize(acc, value, key, callback) {\n     *     fs.stat(value, function(err, stat) {\n     *         if (err) {\n     *             return callback(err);\n     *         }\n     *         acc[key] = formatBytes(stat.size);\n     *         callback(null);\n     *     });\n     * }\n     *\n     * // Using callbacks\n     * async.transform(fileMap, transformFileSize, function(err, result) {\n     *     if(err) {\n     *         console.log(err);\n     *     } else {\n     *         console.log(result);\n     *         // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }\n     *     }\n     * });\n     *\n     * // Using Promises\n     * async.transform(fileMap, transformFileSize)\n     * .then(result => {\n     *     console.log(result);\n     *     // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }\n     * }).catch(err => {\n     *     console.log(err);\n     * });\n     *\n     * // Using async/await\n     * async () => {\n     *     try {\n     *         let result = await async.transform(fileMap, transformFileSize);\n     *         console.log(result);\n     *         // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }\n     *     }\n     *     catch (err) {\n     *         console.log(err);\n     *     }\n     * }\n     *\n     */\n    function transform (coll, accumulator, iteratee, callback) {\n        if (arguments.length <= 3 && typeof accumulator === 'function') {\n            callback = iteratee;\n            iteratee = accumulator;\n            accumulator = Array.isArray(coll) ? [] : {};\n        }\n        callback = once(callback || promiseCallback());\n        var _iteratee = wrapAsync(iteratee);\n\n        eachOf$1(coll, (v, k, cb) => {\n            _iteratee(accumulator, v, k, cb);\n        }, err => callback(err, accumulator));\n        return callback[PROMISE_SYMBOL]\n    }\n\n    /**\n     * It runs each task in series but stops whenever any of the functions were\n     * successful. If one of the tasks were successful, the `callback` will be\n     * passed the result of the successful task. If all tasks fail, the callback\n     * will be passed the error and result (if any) of the final attempt.\n     *\n     * @name tryEach\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to\n     * run, each function is passed a `callback(err, result)` it must call on\n     * completion with an error `err` (which can be `null`) and an optional `result`\n     * value.\n     * @param {Function} [callback] - An optional callback which is called when one\n     * of the tasks has succeeded, or all have failed. It receives the `err` and\n     * `result` arguments of the last attempt at completing the `task`. Invoked with\n     * (err, results).\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     * async.tryEach([\n     *     function getDataFromFirstWebsite(callback) {\n     *         // Try getting the data from the first website\n     *         callback(err, data);\n     *     },\n     *     function getDataFromSecondWebsite(callback) {\n     *         // First website failed,\n     *         // Try getting the data from the backup website\n     *         callback(err, data);\n     *     }\n     * ],\n     * // optional callback\n     * function(err, results) {\n     *     Now do something with the data.\n     * });\n     *\n     */\n    function tryEach(tasks, callback) {\n        var error = null;\n        var result;\n        return eachSeries$1(tasks, (task, taskCb) => {\n            wrapAsync(task)((err, ...args) => {\n                if (err === false) return taskCb(err);\n\n                if (args.length < 2) {\n                    [result] = args;\n                } else {\n                    result = args;\n                }\n                error = err;\n                taskCb(err ? null : {});\n            });\n        }, () => callback(error, result));\n    }\n\n    var tryEach$1 = awaitify(tryEach);\n\n    /**\n     * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,\n     * unmemoized form. Handy for testing.\n     *\n     * @name unmemoize\n     * @static\n     * @memberOf module:Utils\n     * @method\n     * @see [async.memoize]{@link module:Utils.memoize}\n     * @category Util\n     * @param {AsyncFunction} fn - the memoized function\n     * @returns {AsyncFunction} a function that calls the original unmemoized function\n     */\n    function unmemoize(fn) {\n        return (...args) => {\n            return (fn.unmemoized || fn)(...args);\n        };\n    }\n\n    /**\n     * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when\n     * stopped, or an error occurs.\n     *\n     * @name whilst\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {AsyncFunction} test - asynchronous truth test to perform before each\n     * execution of `iteratee`. Invoked with (callback).\n     * @param {AsyncFunction} iteratee - An async function which is called each time\n     * `test` passes. Invoked with (callback).\n     * @param {Function} [callback] - A callback which is called after the test\n     * function has failed and repeated execution of `iteratee` has stopped. `callback`\n     * will be passed an error and any arguments passed to the final `iteratee`'s\n     * callback. Invoked with (err, [results]);\n     * @returns {Promise} a promise, if no callback is passed\n     * @example\n     *\n     * var count = 0;\n     * async.whilst(\n     *     function test(cb) { cb(null, count < 5); },\n     *     function iter(callback) {\n     *         count++;\n     *         setTimeout(function() {\n     *             callback(null, count);\n     *         }, 1000);\n     *     },\n     *     function (err, n) {\n     *         // 5 seconds have passed, n = 5\n     *     }\n     * );\n     */\n    function whilst(test, iteratee, callback) {\n        callback = onlyOnce(callback);\n        var _fn = wrapAsync(iteratee);\n        var _test = wrapAsync(test);\n        var results = [];\n\n        function next(err, ...rest) {\n            if (err) return callback(err);\n            results = rest;\n            if (err === false) return;\n            _test(check);\n        }\n\n        function check(err, truth) {\n            if (err) return callback(err);\n            if (err === false) return;\n            if (!truth) return callback(null, ...results);\n            _fn(next);\n        }\n\n        return _test(check);\n    }\n    var whilst$1 = awaitify(whilst, 3);\n\n    /**\n     * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when\n     * stopped, or an error occurs. `callback` will be passed an error and any\n     * arguments passed to the final `iteratee`'s callback.\n     *\n     * The inverse of [whilst]{@link module:ControlFlow.whilst}.\n     *\n     * @name until\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @see [async.whilst]{@link module:ControlFlow.whilst}\n     * @category Control Flow\n     * @param {AsyncFunction} test - asynchronous truth test to perform before each\n     * execution of `iteratee`. Invoked with (callback).\n     * @param {AsyncFunction} iteratee - An async function which is called each time\n     * `test` fails. Invoked with (callback).\n     * @param {Function} [callback] - A callback which is called after the test\n     * function has passed and repeated execution of `iteratee` has stopped. `callback`\n     * will be passed an error and any arguments passed to the final `iteratee`'s\n     * callback. Invoked with (err, [results]);\n     * @returns {Promise} a promise, if a callback is not passed\n     *\n     * @example\n     * const results = []\n     * let finished = false\n     * async.until(function test(cb) {\n     *     cb(null, finished)\n     * }, function iter(next) {\n     *     fetchPage(url, (err, body) => {\n     *         if (err) return next(err)\n     *         results = results.concat(body.objects)\n     *         finished = !!body.next\n     *         next(err)\n     *     })\n     * }, function done (err) {\n     *     // all pages have been fetched\n     * })\n     */\n    function until(test, iteratee, callback) {\n        const _test = wrapAsync(test);\n        return whilst$1((cb) => _test((err, truth) => cb (err, !truth)), iteratee, callback);\n    }\n\n    /**\n     * Runs the `tasks` array of functions in series, each passing their results to\n     * the next in the array. However, if any of the `tasks` pass an error to their\n     * own callback, the next function is not executed, and the main `callback` is\n     * immediately called with the error.\n     *\n     * @name waterfall\n     * @static\n     * @memberOf module:ControlFlow\n     * @method\n     * @category Control Flow\n     * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}\n     * to run.\n     * Each function should complete with any number of `result` values.\n     * The `result` values will be passed as arguments, in order, to the next task.\n     * @param {Function} [callback] - An optional callback to run once all the\n     * functions have completed. This will be passed the results of the last task's\n     * callback. Invoked with (err, [results]).\n     * @returns {Promise} a promise, if a callback is omitted\n     * @example\n     *\n     * async.waterfall([\n     *     function(callback) {\n     *         callback(null, 'one', 'two');\n     *     },\n     *     function(arg1, arg2, callback) {\n     *         // arg1 now equals 'one' and arg2 now equals 'two'\n     *         callback(null, 'three');\n     *     },\n     *     function(arg1, callback) {\n     *         // arg1 now equals 'three'\n     *         callback(null, 'done');\n     *     }\n     * ], function (err, result) {\n     *     // result now equals 'done'\n     * });\n     *\n     * // Or, with named functions:\n     * async.waterfall([\n     *     myFirstFunction,\n     *     mySecondFunction,\n     *     myLastFunction,\n     * ], function (err, result) {\n     *     // result now equals 'done'\n     * });\n     * function myFirstFunction(callback) {\n     *     callback(null, 'one', 'two');\n     * }\n     * function mySecondFunction(arg1, arg2, callback) {\n     *     // arg1 now equals 'one' and arg2 now equals 'two'\n     *     callback(null, 'three');\n     * }\n     * function myLastFunction(arg1, callback) {\n     *     // arg1 now equals 'three'\n     *     callback(null, 'done');\n     * }\n     */\n    function waterfall (tasks, callback) {\n        callback = once(callback);\n        if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));\n        if (!tasks.length) return callback();\n        var taskIndex = 0;\n\n        function nextTask(args) {\n            var task = wrapAsync(tasks[taskIndex++]);\n            task(...args, onlyOnce(next));\n        }\n\n        function next(err, ...args) {\n            if (err === false) return\n            if (err || taskIndex === tasks.length) {\n                return callback(err, ...args);\n            }\n            nextTask(args);\n        }\n\n        nextTask([]);\n    }\n\n    var waterfall$1 = awaitify(waterfall);\n\n    /**\n     * An \"async function\" in the context of Async is an asynchronous function with\n     * a variable number of parameters, with the final parameter being a callback.\n     * (`function (arg1, arg2, ..., callback) {}`)\n     * The final callback is of the form `callback(err, results...)`, which must be\n     * called once the function is completed.  The callback should be called with a\n     * Error as its first argument to signal that an error occurred.\n     * Otherwise, if no error occurred, it should be called with `null` as the first\n     * argument, and any additional `result` arguments that may apply, to signal\n     * successful completion.\n     * The callback must be called exactly once, ideally on a later tick of the\n     * JavaScript event loop.\n     *\n     * This type of function is also referred to as a \"Node-style async function\",\n     * or a \"continuation passing-style function\" (CPS). Most of the methods of this\n     * library are themselves CPS/Node-style async functions, or functions that\n     * return CPS/Node-style async functions.\n     *\n     * Wherever we accept a Node-style async function, we also directly accept an\n     * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.\n     * In this case, the `async` function will not be passed a final callback\n     * argument, and any thrown error will be used as the `err` argument of the\n     * implicit callback, and the return value will be used as the `result` value.\n     * (i.e. a `rejected` of the returned Promise becomes the `err` callback\n     * argument, and a `resolved` value becomes the `result`.)\n     *\n     * Note, due to JavaScript limitations, we can only detect native `async`\n     * functions and not transpilied implementations.\n     * Your environment must have `async`/`await` support for this to work.\n     * (e.g. Node > v7.6, or a recent version of a modern browser).\n     * If you are using `async` functions through a transpiler (e.g. Babel), you\n     * must still wrap the function with [asyncify]{@link module:Utils.asyncify},\n     * because the `async function` will be compiled to an ordinary function that\n     * returns a promise.\n     *\n     * @typedef {Function} AsyncFunction\n     * @static\n     */\n\n\n    var index = {\n        apply,\n        applyEach,\n        applyEachSeries,\n        asyncify,\n        auto,\n        autoInject,\n        cargo: cargo$1,\n        cargoQueue: cargo,\n        compose,\n        concat: concat$1,\n        concatLimit: concatLimit$1,\n        concatSeries: concatSeries$1,\n        constant: constant$1,\n        detect: detect$1,\n        detectLimit: detectLimit$1,\n        detectSeries: detectSeries$1,\n        dir,\n        doUntil,\n        doWhilst: doWhilst$1,\n        each,\n        eachLimit: eachLimit$1,\n        eachOf: eachOf$1,\n        eachOfLimit: eachOfLimit$1,\n        eachOfSeries: eachOfSeries$1,\n        eachSeries: eachSeries$1,\n        ensureAsync,\n        every: every$1,\n        everyLimit: everyLimit$1,\n        everySeries: everySeries$1,\n        filter: filter$1,\n        filterLimit: filterLimit$1,\n        filterSeries: filterSeries$1,\n        forever: forever$1,\n        groupBy,\n        groupByLimit: groupByLimit$1,\n        groupBySeries,\n        log,\n        map: map$1,\n        mapLimit: mapLimit$1,\n        mapSeries: mapSeries$1,\n        mapValues,\n        mapValuesLimit: mapValuesLimit$1,\n        mapValuesSeries,\n        memoize,\n        nextTick,\n        parallel,\n        parallelLimit,\n        priorityQueue,\n        queue,\n        race: race$1,\n        reduce: reduce$1,\n        reduceRight,\n        reflect,\n        reflectAll,\n        reject: reject$1,\n        rejectLimit: rejectLimit$1,\n        rejectSeries: rejectSeries$1,\n        retry,\n        retryable,\n        seq,\n        series,\n        setImmediate: setImmediate$1,\n        some: some$1,\n        someLimit: someLimit$1,\n        someSeries: someSeries$1,\n        sortBy: sortBy$1,\n        timeout,\n        times,\n        timesLimit,\n        timesSeries,\n        transform,\n        tryEach: tryEach$1,\n        unmemoize,\n        until,\n        waterfall: waterfall$1,\n        whilst: whilst$1,\n\n        // aliases\n        all: every$1,\n        allLimit: everyLimit$1,\n        allSeries: everySeries$1,\n        any: some$1,\n        anyLimit: someLimit$1,\n        anySeries: someSeries$1,\n        find: detect$1,\n        findLimit: detectLimit$1,\n        findSeries: detectSeries$1,\n        flatMap: concat$1,\n        flatMapLimit: concatLimit$1,\n        flatMapSeries: concatSeries$1,\n        forEach: each,\n        forEachSeries: eachSeries$1,\n        forEachLimit: eachLimit$1,\n        forEachOf: eachOf$1,\n        forEachOfSeries: eachOfSeries$1,\n        forEachOfLimit: eachOfLimit$1,\n        inject: reduce$1,\n        foldl: reduce$1,\n        foldr: reduceRight,\n        select: filter$1,\n        selectLimit: filterLimit$1,\n        selectSeries: filterSeries$1,\n        wrapSync: asyncify,\n        during: whilst$1,\n        doDuring: doWhilst$1\n    };\n\n    exports.all = every$1;\n    exports.allLimit = everyLimit$1;\n    exports.allSeries = everySeries$1;\n    exports.any = some$1;\n    exports.anyLimit = someLimit$1;\n    exports.anySeries = someSeries$1;\n    exports.apply = apply;\n    exports.applyEach = applyEach;\n    exports.applyEachSeries = applyEachSeries;\n    exports.asyncify = asyncify;\n    exports.auto = auto;\n    exports.autoInject = autoInject;\n    exports.cargo = cargo$1;\n    exports.cargoQueue = cargo;\n    exports.compose = compose;\n    exports.concat = concat$1;\n    exports.concatLimit = concatLimit$1;\n    exports.concatSeries = concatSeries$1;\n    exports.constant = constant$1;\n    exports.default = index;\n    exports.detect = detect$1;\n    exports.detectLimit = detectLimit$1;\n    exports.detectSeries = detectSeries$1;\n    exports.dir = dir;\n    exports.doDuring = doWhilst$1;\n    exports.doUntil = doUntil;\n    exports.doWhilst = doWhilst$1;\n    exports.during = whilst$1;\n    exports.each = each;\n    exports.eachLimit = eachLimit$1;\n    exports.eachOf = eachOf$1;\n    exports.eachOfLimit = eachOfLimit$1;\n    exports.eachOfSeries = eachOfSeries$1;\n    exports.eachSeries = eachSeries$1;\n    exports.ensureAsync = ensureAsync;\n    exports.every = every$1;\n    exports.everyLimit = everyLimit$1;\n    exports.everySeries = everySeries$1;\n    exports.filter = filter$1;\n    exports.filterLimit = filterLimit$1;\n    exports.filterSeries = filterSeries$1;\n    exports.find = detect$1;\n    exports.findLimit = detectLimit$1;\n    exports.findSeries = detectSeries$1;\n    exports.flatMap = concat$1;\n    exports.flatMapLimit = concatLimit$1;\n    exports.flatMapSeries = concatSeries$1;\n    exports.foldl = reduce$1;\n    exports.foldr = reduceRight;\n    exports.forEach = each;\n    exports.forEachLimit = eachLimit$1;\n    exports.forEachOf = eachOf$1;\n    exports.forEachOfLimit = eachOfLimit$1;\n    exports.forEachOfSeries = eachOfSeries$1;\n    exports.forEachSeries = eachSeries$1;\n    exports.forever = forever$1;\n    exports.groupBy = groupBy;\n    exports.groupByLimit = groupByLimit$1;\n    exports.groupBySeries = groupBySeries;\n    exports.inject = reduce$1;\n    exports.log = log;\n    exports.map = map$1;\n    exports.mapLimit = mapLimit$1;\n    exports.mapSeries = mapSeries$1;\n    exports.mapValues = mapValues;\n    exports.mapValuesLimit = mapValuesLimit$1;\n    exports.mapValuesSeries = mapValuesSeries;\n    exports.memoize = memoize;\n    exports.nextTick = nextTick;\n    exports.parallel = parallel;\n    exports.parallelLimit = parallelLimit;\n    exports.priorityQueue = priorityQueue;\n    exports.queue = queue;\n    exports.race = race$1;\n    exports.reduce = reduce$1;\n    exports.reduceRight = reduceRight;\n    exports.reflect = reflect;\n    exports.reflectAll = reflectAll;\n    exports.reject = reject$1;\n    exports.rejectLimit = rejectLimit$1;\n    exports.rejectSeries = rejectSeries$1;\n    exports.retry = retry;\n    exports.retryable = retryable;\n    exports.select = filter$1;\n    exports.selectLimit = filterLimit$1;\n    exports.selectSeries = filterSeries$1;\n    exports.seq = seq;\n    exports.series = series;\n    exports.setImmediate = setImmediate$1;\n    exports.some = some$1;\n    exports.someLimit = someLimit$1;\n    exports.someSeries = someSeries$1;\n    exports.sortBy = sortBy$1;\n    exports.timeout = timeout;\n    exports.times = times;\n    exports.timesLimit = timesLimit;\n    exports.timesSeries = timesSeries;\n    exports.transform = transform;\n    exports.tryEach = tryEach$1;\n    exports.unmemoize = unmemoize;\n    exports.until = until;\n    exports.waterfall = waterfall$1;\n    exports.whilst = whilst$1;\n    exports.wrapSync = asyncify;\n\n    Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","var EventEmitter = require('events').EventEmitter;\nvar util = require('util');\nvar stream = require('stream');\n\nfunction Lazy(em, opts) {\n    if (!(this instanceof Lazy)) return new Lazy(em, opts);\n    EventEmitter.call(this);\n    var self = this;\n\n\n    self.once = function (name, f) {\n        self.on(name, function g () {\n            self.removeListener(name, g);\n            f.apply(this, arguments);\n        });\n    }\n\n    if (!opts) opts = {};\n    var dataName = opts.data || 'data';\n    var pipeName = opts.pipe || 'pipe';\n    var endName = opts.pipe || 'end';\n\n    if (pipeName != endName) {\n        var piped = false;\n        self.once(pipeName, function () { piped = true });\n        self.once(endName, function () {\n            if (!piped) self.emit(pipeName);\n        });\n    }\n\n    self.push = function (x) {\n        self.emit(dataName, x);\n    }\n\n    self.end = function () {\n        self.emit(endName);\n    }\n\n    if (em && em.on) {\n        em.on(endName, function () {\n            self.emit(endName);\n        });\n        self.on(pipeName, function () {\n            em.emit(pipeName);\n        });\n        // Check for v0.10 or Greater (Stream2 has Duplex type)\n        if (stream.Duplex && em instanceof(stream)) {\n            em.on('readable', function () {\n                var x = em.read();\n                self.emit(dataName, x);\n            });\n        } else {\n            // Old Stream1 or Event support\n            em.on(dataName, function (x) {\n                self.emit(dataName, x);\n            });\n        }\n    }\n\n    function newLazy (g, h, l) {\n        if (!g) {\n            g = function () {\n                return true;\n            };\n        }\n        if (!h) {\n            h = function (x) {\n                return x;\n            };\n        }\n        var lazy = new Lazy(null, opts, l);\n        self.on(dataName, function (x, y) {\n            if (g.call(lazy, x)) {\n                lazy.emit(dataName, h(x), y);\n            }\n        });\n        self.once(pipeName, function () {\n            lazy.emit(pipeName);\n        });\n        return lazy;\n    }\n\n    self.filter = function (f) {\n        return newLazy(function (x) {\n            return f(x);\n        });\n    }\n\n    self.forEach = function (f) {\n        return newLazy(function (x) {\n            f(x);\n            return true;\n        });\n    }\n\n    self.map = function (f) {\n        return newLazy(\n            function () { return true },\n            function (x) { return f(x) }\n        );\n    }\n\n    self.head = function (f) {\n        var lazy = newLazy();\n        lazy.on(dataName, function g (x) {\n            f(x)\n            lazy.removeListener(dataName, g)\n        })\n    }\n\n    self.tail = function () {\n        var skip = true;\n        return newLazy(function () {\n            if (skip) {\n                skip = false;\n                return false;\n            }\n            return true;\n        });\n    }\n\n    self.skip = function (n) {\n        return newLazy(function () {\n            if (n > 0) {\n                n--;\n                return false;\n            }\n            return true;\n        });\n    }\n\n    self.take = function (n) {\n        return newLazy(function () {\n            if (n == 0) self.emit(pipeName);\n            return n-- > 0;\n        });\n    }\n\n    self.takeWhile = function (f) {\n        var cond = true;\n        return newLazy(function (x) {\n            if (cond && f(x)) return true;\n            cond = false;\n            self.emit(pipeName);\n            return false;\n        });\n    }\n\n    self.foldr = function (op, i, f) {\n        var acc = i;\n        var lazy = newLazy();\n        lazy.on(dataName, function g (x) {\n            acc = op(x, acc);\n        });\n        lazy.once(pipeName, function () {\n            f(acc);\n        });\n    }\n\n    self.sum = function (f) {\n        return self.foldr(function (x, acc) { return x + acc }, 0, f);\n    }\n\n    self.product = function (f) {\n        return self.foldr(function (x, acc) { return x*acc }, 1, f);\n    }\n\n    self.join = function (f) {\n        var data = []\n        var lazy = newLazy(function (x) {\n            data.push(x);\n            return true;\n        });\n        lazy.once(pipeName, function () { f(data) });\n        return self;\n    }\n\n    self.bucket = function (init, f) {\n        var lazy = new Lazy(null, opts);\n        var yieldTo = function (x) {\n            lazy.emit(dataName, x);\n        };\n\n        var acc = init;\n\n        self.on(dataName, function (x) {\n            acc = f.call(yieldTo, acc, x);\n        });\n\n        self.once(pipeName, function () {\n            lazy.emit(pipeName);\n        });\n\n        // flush on end event\n        self.once(endName, function () {\n            var finalBuffer = mergeBuffers(acc);\n            if (finalBuffer) {\n                yieldTo(finalBuffer);\n            }\n        });\n\n        return lazy;\n    }\n\n    // Streams that use this should emit strings or buffers only\n    self.__defineGetter__('lines', function () {\n        return self.bucket([], function (chunkArray, chunk) {\n            var newline = '\\n'.charCodeAt(0), lastNewLineIndex = 0;\n            if (typeof chunk === 'string') chunk = new Buffer(chunk);\n        if (chunk){\n            \tfor (var i = 0; i < chunk.length; i++) {\n                \tif (chunk[i] === newline) {\n                    \t// If we have content from the current chunk to append to our buffers, do it.\n                    \t\tif (i > 0) {\n                        \t\tchunkArray.push(chunk.slice(lastNewLineIndex, i));\n                    \t\t}\n\n                    \t\t// Wrap all our buffers and emit it.\n                    \t\tthis(mergeBuffers(chunkArray));\n                    \t\tlastNewLineIndex = i + 1;\n                \t}\n            }\n\t    }\n\n            if (lastNewLineIndex > 0) {\n                // New line found in the chunk, push the remaining part of the buffer.\n                if (lastNewLineIndex < chunk.length) {\n                    chunkArray.push(chunk.slice(lastNewLineIndex));\n                }\n            } else {\n                // No new line found, push the whole buffer.\n                if (chunk && chunk.length) {\n                    chunkArray.push(chunk);\n                }\n            }\n            return chunkArray;\n        });\n    });\n}\n\nLazy.range = function () {\n    var args = arguments;\n    var step = 1;\n    var infinite = false;\n\n    if (args.length == 1 && typeof args[0] == 'number') {\n        var i = 0, j = args[0];\n    }\n    else if (args.length == 1 && typeof args[0] == 'string') { // 'start[,next]..[end]'\n        var arg = args[0];\n        var startOpen = false, endClosed = false;\n        if (arg[0] == '(' || arg[0] == '[') {\n            if (arg[0] == '(') startOpen = true;\n            arg = arg.slice(1);\n        }\n        if (arg.slice(-1) == ']') endClosed = true;\n\n        var parts = arg.split('..');\n        if (parts.length != 2)\n            throw new Error(\"single argument range takes 'start..' or 'start..end' or 'start,next..end'\");\n\n        if (parts[1] == '') { // 'start..'\n            var i = parts[0];\n            infinite = true;\n        }\n        else { // 'start[,next]..end'\n            var progression = parts[0].split(',');\n            if (progression.length == 1) { // start..end\n                var i = parts[0], j = parts[1];\n            }\n            else { // 'start,next..end'\n                var i = progression[0], j = parts[1];\n                step = Math.abs(progression[1]-i);\n            }\n        }\n\n        i = parseInt(i, 10);\n        j = parseInt(j, 10);\n\n        if (startOpen) {\n            if (infinite || i < j) i++;\n            else i--;\n        }\n\n        if (endClosed) {\n            if (i < j) j++;\n            else j--;\n        }\n    }\n    else if (args.length == 2 || args.length == 3) { // start, end[, step]\n        var i = args[0], j = args[1];\n        if (args.length == 3) {\n            var step = args[2];\n        }\n    }\n    else {\n        throw new Error(\"range takes 1, 2 or 3 arguments\");\n    }\n    var lazy = new Lazy;\n    var stopInfinite = false;\n    lazy.on('pipe', function () {\n        stopInfinite = true;\n    });\n    if (infinite) {\n        process.nextTick(function g () {\n            if (stopInfinite) return;\n            lazy.emit('data', i++);\n            process.nextTick(g);\n        });\n    }\n    else {\n        process.nextTick(function () {\n            if (i < j) {\n                for (; i<j; i+=step) {\n                    lazy.emit('data', i)\n                }\n            }\n            else {\n                for (; i>j; i-=step) {\n                    lazy.emit('data', i)\n                }\n            }\n            lazy.emit('end');\n        });\n    }\n    return lazy;\n}\n\nvar mergeBuffers = function mergeBuffers(buffers) {\n  // We expect buffers to be a non-empty Array\n  if (!buffers || !Array.isArray(buffers) || !buffers.length) return;\n\n  var finalBufferLength, finalBuffer, currentBuffer, currentSize = 0;\n\n  // Sum all the buffers lengths\n  finalBufferLength = buffers.reduce(function(left, right) { return (left.length||left) + (right.length||right); }, 0);\n  finalBuffer = new Buffer(finalBufferLength);\n  while(buffers.length) {\n    currentBuffer = buffers.shift();\n    currentBuffer.copy(finalBuffer, currentSize);\n    currentSize += currentBuffer.length;\n  }\n\n  return finalBuffer;\n}\n\n\nutil.inherits(Lazy, EventEmitter);\nmodule.exports = Lazy;\n","'use strict'\n\nexports.supports = function supports (...manifests) {\n  const manifest = manifests.reduce((acc, m) => Object.assign(acc, m), {})\n\n  // Snapshots is an alias for backwards compatibility\n  const implicitSnapshots = manifest.implicitSnapshots || manifest.snapshots || false\n  const explicitSnapshots = manifest.explicitSnapshots || false\n\n  return Object.assign(manifest, {\n    implicitSnapshots,\n    explicitSnapshots,\n    snapshots: implicitSnapshots,\n    has: manifest.has || false,\n    permanence: manifest.permanence || false,\n    seek: manifest.seek || false,\n    createIfMissing: manifest.createIfMissing || false,\n    errorIfExists: manifest.errorIfExists || false,\n    deferredOpen: manifest.deferredOpen || false,\n    streams: manifest.streams || false,\n    encodings: Object.assign({}, manifest.encodings),\n    events: Object.assign({}, manifest.events),\n    additionalMethods: Object.assign({}, manifest.additionalMethods),\n    signals: Object.assign({}, manifest.signals)\n  })\n}\n","'use strict'\n\nmodule.exports = class ModuleError extends Error {\n  /**\n   * @param {string} message Error message\n   * @param {{ code?: string, cause?: Error, expected?: boolean, transient?: boolean }} [options]\n   */\n  constructor (message, options) {\n    super(message || '')\n\n    if (typeof options === 'object' && options !== null) {\n      if (options.code) this.code = String(options.code)\n      if (options.expected) this.expected = true\n      if (options.transient) this.transient = true\n      if (options.cause) this.cause = options.cause\n    }\n\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, this.constructor)\n    }\n  }\n}\n","'use strict'\n\n/** @type {{ textEncoder: TextEncoder, textDecoder: TextDecoder }|null} */\nlet lazy = null\n\n/**\n * Get semi-global instances of TextEncoder and TextDecoder.\n * @returns {{ textEncoder: TextEncoder, textDecoder: TextDecoder }}\n */\nmodule.exports = function () {\n  if (lazy === null) {\n    lazy = {\n      textEncoder: new TextEncoder(),\n      textDecoder: new TextDecoder()\n    }\n  }\n\n  return lazy\n}\n","'use strict'\n\nconst ModuleError = require('module-error')\nconst formats = new Set(['buffer', 'view', 'utf8'])\n\n/**\n * @template TIn, TFormat, TOut\n * @abstract\n */\nclass Encoding {\n  /**\n   * @param {IEncoding<TIn,TFormat,TOut>} options\n   */\n  constructor (options) {\n    /** @type {(data: TIn) => TFormat} */\n    this.encode = options.encode || this.encode\n\n    /** @type {(data: TFormat) => TOut} */\n    this.decode = options.decode || this.decode\n\n    /** @type {string} */\n    this.name = options.name || this.name\n\n    /** @type {string} */\n    this.format = options.format || this.format\n\n    if (typeof this.encode !== 'function') {\n      throw new TypeError(\"The 'encode' property must be a function\")\n    }\n\n    if (typeof this.decode !== 'function') {\n      throw new TypeError(\"The 'decode' property must be a function\")\n    }\n\n    this.encode = this.encode.bind(this)\n    this.decode = this.decode.bind(this)\n\n    if (typeof this.name !== 'string' || this.name === '') {\n      throw new TypeError(\"The 'name' property must be a string\")\n    }\n\n    if (typeof this.format !== 'string' || !formats.has(this.format)) {\n      throw new TypeError(\"The 'format' property must be one of 'buffer', 'view', 'utf8'\")\n    }\n\n    if (options.createViewTranscoder) {\n      this.createViewTranscoder = options.createViewTranscoder\n    }\n\n    if (options.createBufferTranscoder) {\n      this.createBufferTranscoder = options.createBufferTranscoder\n    }\n\n    if (options.createUTF8Transcoder) {\n      this.createUTF8Transcoder = options.createUTF8Transcoder\n    }\n  }\n\n  get commonName () {\n    return /** @type {string} */ (this.name.split('+')[0])\n  }\n\n  /** @return {BufferFormat<TIn,TOut>} */\n  createBufferTranscoder () {\n    throw new ModuleError(`Encoding '${this.name}' cannot be transcoded to 'buffer'`, {\n      code: 'LEVEL_ENCODING_NOT_SUPPORTED'\n    })\n  }\n\n  /** @return {ViewFormat<TIn,TOut>} */\n  createViewTranscoder () {\n    throw new ModuleError(`Encoding '${this.name}' cannot be transcoded to 'view'`, {\n      code: 'LEVEL_ENCODING_NOT_SUPPORTED'\n    })\n  }\n\n  /** @return {UTF8Format<TIn,TOut>} */\n  createUTF8Transcoder () {\n    throw new ModuleError(`Encoding '${this.name}' cannot be transcoded to 'utf8'`, {\n      code: 'LEVEL_ENCODING_NOT_SUPPORTED'\n    })\n  }\n}\n\nexports.Encoding = Encoding\n\n/**\n * @typedef {import('./encoding').IEncoding<TIn,TFormat,TOut>} IEncoding\n * @template TIn, TFormat, TOut\n */\n\n/**\n * @typedef {import('./formats').BufferFormat<TIn,TOut>} BufferFormat\n * @template TIn, TOut\n */\n\n/**\n * @typedef {import('./formats').ViewFormat<TIn,TOut>} ViewFormat\n * @template TIn, TOut\n */\n\n/**\n * @typedef {import('./formats').UTF8Format<TIn,TOut>} UTF8Format\n * @template TIn, TOut\n */\n","'use strict'\n\nconst { Buffer } = require('buffer') || {}\nconst { Encoding } = require('./encoding')\nconst textEndec = require('./text-endec')\n\n/**\n * @template TIn, TOut\n * @extends {Encoding<TIn,Buffer,TOut>}\n */\nclass BufferFormat extends Encoding {\n  /**\n   * @param {Omit<IEncoding<TIn, Buffer, TOut>, 'format'>} options\n   */\n  constructor (options) {\n    super({ ...options, format: 'buffer' })\n  }\n\n  /** @override */\n  createViewTranscoder () {\n    return new ViewFormat({\n      encode: this.encode, // Buffer is a view (UInt8Array)\n      decode: (data) => this.decode(\n        Buffer.from(data.buffer, data.byteOffset, data.byteLength)\n      ),\n      name: `${this.name}+view`\n    })\n  }\n\n  /** @override */\n  createBufferTranscoder () {\n    return this\n  }\n}\n\n/**\n * @extends {Encoding<TIn,Uint8Array,TOut>}\n * @template TIn, TOut\n */\nclass ViewFormat extends Encoding {\n  /**\n   * @param {Omit<IEncoding<TIn, Uint8Array, TOut>, 'format'>} options\n   */\n  constructor (options) {\n    super({ ...options, format: 'view' })\n  }\n\n  /** @override */\n  createBufferTranscoder () {\n    return new BufferFormat({\n      encode: (data) => {\n        const view = this.encode(data)\n        return Buffer.from(view.buffer, view.byteOffset, view.byteLength)\n      },\n      decode: this.decode, // Buffer is a view (UInt8Array)\n      name: `${this.name}+buffer`\n    })\n  }\n\n  /** @override */\n  createViewTranscoder () {\n    return this\n  }\n}\n\n/**\n * @extends {Encoding<TIn,string,TOut>}\n * @template TIn, TOut\n */\nclass UTF8Format extends Encoding {\n  /**\n   * @param {Omit<IEncoding<TIn, string, TOut>, 'format'>} options\n   */\n  constructor (options) {\n    super({ ...options, format: 'utf8' })\n  }\n\n  /** @override */\n  createBufferTranscoder () {\n    return new BufferFormat({\n      encode: (data) => Buffer.from(this.encode(data), 'utf8'),\n      decode: (data) => this.decode(data.toString('utf8')),\n      name: `${this.name}+buffer`\n    })\n  }\n\n  /** @override */\n  createViewTranscoder () {\n    const { textEncoder, textDecoder } = textEndec()\n\n    return new ViewFormat({\n      encode: (data) => textEncoder.encode(this.encode(data)),\n      decode: (data) => this.decode(textDecoder.decode(data)),\n      name: `${this.name}+view`\n    })\n  }\n\n  /** @override */\n  createUTF8Transcoder () {\n    return this\n  }\n}\n\nexports.BufferFormat = BufferFormat\nexports.ViewFormat = ViewFormat\nexports.UTF8Format = UTF8Format\n\n/**\n * @typedef {import('./encoding').IEncoding<TIn,TFormat,TOut>} IEncoding\n * @template TIn, TFormat, TOut\n */\n","'use strict'\n\nconst { Buffer } = require('buffer') || { Buffer: { isBuffer: () => false } }\nconst { textEncoder, textDecoder } = require('./text-endec')()\nconst { BufferFormat, ViewFormat, UTF8Format } = require('./formats')\n\n/** @type {<T>(v: T) => v} */\nconst identity = (v) => v\n\n/**\n * @type {typeof import('./encodings').utf8}\n */\nexports.utf8 = new UTF8Format({\n  encode: function (data) {\n    // On node 16.9.1 buffer.toString() is 5x faster than TextDecoder\n    return Buffer.isBuffer(data)\n      ? data.toString('utf8')\n      : ArrayBuffer.isView(data)\n        ? textDecoder.decode(data)\n        : String(data)\n  },\n  decode: identity,\n  name: 'utf8',\n  createViewTranscoder () {\n    return new ViewFormat({\n      encode: function (data) {\n        return ArrayBuffer.isView(data) ? data : textEncoder.encode(data)\n      },\n      decode: function (data) {\n        return textDecoder.decode(data)\n      },\n      name: `${this.name}+view`\n    })\n  },\n  createBufferTranscoder () {\n    return new BufferFormat({\n      encode: function (data) {\n        return Buffer.isBuffer(data)\n          ? data\n          : ArrayBuffer.isView(data)\n            ? Buffer.from(data.buffer, data.byteOffset, data.byteLength)\n            : Buffer.from(String(data), 'utf8')\n      },\n      decode: function (data) {\n        return data.toString('utf8')\n      },\n      name: `${this.name}+buffer`\n    })\n  }\n})\n\n/**\n * @type {typeof import('./encodings').json}\n */\nexports.json = new UTF8Format({\n  encode: JSON.stringify,\n  decode: JSON.parse,\n  name: 'json'\n})\n\n/**\n * @type {typeof import('./encodings').buffer}\n */\nexports.buffer = new BufferFormat({\n  encode: function (data) {\n    return Buffer.isBuffer(data)\n      ? data\n      : ArrayBuffer.isView(data)\n        ? Buffer.from(data.buffer, data.byteOffset, data.byteLength)\n        : Buffer.from(String(data), 'utf8')\n  },\n  decode: identity,\n  name: 'buffer',\n  createViewTranscoder () {\n    return new ViewFormat({\n      encode: function (data) {\n        return ArrayBuffer.isView(data) ? data : Buffer.from(String(data), 'utf8')\n      },\n      decode: function (data) {\n        return Buffer.from(data.buffer, data.byteOffset, data.byteLength)\n      },\n      name: `${this.name}+view`\n    })\n  }\n})\n\n/**\n * @type {typeof import('./encodings').view}\n */\nexports.view = new ViewFormat({\n  encode: function (data) {\n    return ArrayBuffer.isView(data) ? data : textEncoder.encode(data)\n  },\n  decode: identity,\n  name: 'view',\n  createBufferTranscoder () {\n    return new BufferFormat({\n      encode: function (data) {\n        return Buffer.isBuffer(data)\n          ? data\n          : ArrayBuffer.isView(data)\n            ? Buffer.from(data.buffer, data.byteOffset, data.byteLength)\n            : Buffer.from(String(data), 'utf8')\n      },\n      decode: identity,\n      name: `${this.name}+buffer`\n    })\n  }\n})\n\n/**\n * @type {typeof import('./encodings').hex}\n */\nexports.hex = new BufferFormat({\n  encode: function (data) {\n    return Buffer.isBuffer(data) ? data : Buffer.from(String(data), 'hex')\n  },\n  decode: function (buffer) {\n    return buffer.toString('hex')\n  },\n  name: 'hex'\n})\n\n/**\n * @type {typeof import('./encodings').base64}\n */\nexports.base64 = new BufferFormat({\n  encode: function (data) {\n    return Buffer.isBuffer(data) ? data : Buffer.from(String(data), 'base64')\n  },\n  decode: function (buffer) {\n    return buffer.toString('base64')\n  },\n  name: 'base64'\n})\n","'use strict'\n\nconst ModuleError = require('module-error')\nconst encodings = require('./lib/encodings')\nconst { Encoding } = require('./lib/encoding')\nconst { BufferFormat, ViewFormat, UTF8Format } = require('./lib/formats')\n\nconst kFormats = Symbol('formats')\nconst kEncodings = Symbol('encodings')\nconst validFormats = new Set(['buffer', 'view', 'utf8'])\n\n/** @template T */\nclass Transcoder {\n  /**\n   * @param {Array<'buffer'|'view'|'utf8'>} formats\n   */\n  constructor (formats) {\n    if (!Array.isArray(formats)) {\n      throw new TypeError(\"The first argument 'formats' must be an array\")\n    } else if (!formats.every(f => validFormats.has(f))) {\n      // Note: we only only support aliases in key- and valueEncoding options (where we already did)\n      throw new TypeError(\"Format must be one of 'buffer', 'view', 'utf8'\")\n    }\n\n    /** @type {Map<string|MixedEncoding<any, any, any>, Encoding<any, any, any>>} */\n    this[kEncodings] = new Map()\n    this[kFormats] = new Set(formats)\n\n    // Register encodings (done early in order to populate encodings())\n    for (const k in encodings) {\n      try {\n        this.encoding(k)\n      } catch (err) {\n        /* istanbul ignore if: assertion */\n        if (err.code !== 'LEVEL_ENCODING_NOT_SUPPORTED') throw err\n      }\n    }\n  }\n\n  /**\n   * @returns {Array<Encoding<any,T,any>>}\n   */\n  encodings () {\n    return Array.from(new Set(this[kEncodings].values()))\n  }\n\n  /**\n   * @param {string|MixedEncoding<any, any, any>} encoding\n   * @returns {Encoding<any, T, any>}\n   */\n  encoding (encoding) {\n    let resolved = this[kEncodings].get(encoding)\n\n    if (resolved === undefined) {\n      if (typeof encoding === 'string' && encoding !== '') {\n        resolved = lookup[encoding]\n\n        if (!resolved) {\n          throw new ModuleError(`Encoding '${encoding}' is not found`, {\n            code: 'LEVEL_ENCODING_NOT_FOUND'\n          })\n        }\n      } else if (typeof encoding !== 'object' || encoding === null) {\n        throw new TypeError(\"First argument 'encoding' must be a string or object\")\n      } else {\n        resolved = from(encoding)\n      }\n\n      const { name, format } = resolved\n\n      if (!this[kFormats].has(format)) {\n        if (this[kFormats].has('view')) {\n          resolved = resolved.createViewTranscoder()\n        } else if (this[kFormats].has('buffer')) {\n          resolved = resolved.createBufferTranscoder()\n        } else if (this[kFormats].has('utf8')) {\n          resolved = resolved.createUTF8Transcoder()\n        } else {\n          throw new ModuleError(`Encoding '${name}' cannot be transcoded`, {\n            code: 'LEVEL_ENCODING_NOT_SUPPORTED'\n          })\n        }\n      }\n\n      for (const k of [encoding, name, resolved.name, resolved.commonName]) {\n        this[kEncodings].set(k, resolved)\n      }\n    }\n\n    return resolved\n  }\n}\n\nexports.Transcoder = Transcoder\n\n/**\n * @param {MixedEncoding<any, any, any>} options\n * @returns {Encoding<any, any, any>}\n */\nfunction from (options) {\n  if (options instanceof Encoding) {\n    return options\n  }\n\n  // Loosely typed for ecosystem compatibility\n  const maybeType = 'type' in options && typeof options.type === 'string' ? options.type : undefined\n  const name = options.name || maybeType || `anonymous-${anonymousCount++}`\n\n  switch (detectFormat(options)) {\n    case 'view': return new ViewFormat({ ...options, name })\n    case 'utf8': return new UTF8Format({ ...options, name })\n    case 'buffer': return new BufferFormat({ ...options, name })\n    default: {\n      throw new TypeError(\"Format must be one of 'buffer', 'view', 'utf8'\")\n    }\n  }\n}\n\n/**\n * If format is not provided, fallback to detecting `level-codec`\n * or `multiformats` encodings, else assume a format of buffer.\n * @param {MixedEncoding<any, any, any>} options\n * @returns {string}\n */\nfunction detectFormat (options) {\n  if ('format' in options && options.format !== undefined) {\n    return options.format\n  } else if ('buffer' in options && typeof options.buffer === 'boolean') {\n    return options.buffer ? 'buffer' : 'utf8' // level-codec\n  } else if ('code' in options && Number.isInteger(options.code)) {\n    return 'view' // multiformats\n  } else {\n    return 'buffer'\n  }\n}\n\n/**\n * @typedef {import('./lib/encoding').MixedEncoding<TIn,TFormat,TOut>} MixedEncoding\n * @template TIn, TFormat, TOut\n */\n\n/**\n * @type {Object.<string, Encoding<any, any, any>>}\n */\nconst aliases = {\n  binary: encodings.buffer,\n  'utf-8': encodings.utf8\n}\n\n/**\n * @type {Object.<string, Encoding<any, any, any>>}\n */\nconst lookup = {\n  ...encodings,\n  ...aliases\n}\n\nlet anonymousCount = 0\n","'use strict'\n\nconst kErrors = Symbol('kErrors')\n\nmodule.exports = function (errors) {\n  errors = errors.filter(defined)\n\n  if (errors.length === 0) return\n  if (errors.length === 1) return errors[0]\n\n  return new CombinedError(errors)\n}\n\nclass CombinedError extends Error {\n  constructor (errors) {\n    const unique = new Set(errors.map(getMessage).filter(Boolean))\n    const message = Array.from(unique).join('; ')\n\n    super(message)\n\n    value(this, 'name', 'CombinedError')\n    value(this, kErrors, errors)\n\n    getter(this, 'stack', () => errors.map(getStack).join('\\n\\n'))\n    getter(this, 'transient', () => errors.length > 0 && errors.every(transient))\n    getter(this, 'expected', () => errors.length > 0 && errors.every(expected))\n  }\n\n  [Symbol.iterator] () {\n    return this[kErrors][Symbol.iterator]()\n  }\n}\n\nfunction value (obj, prop, value) {\n  Object.defineProperty(obj, prop, { value })\n}\n\nfunction getter (obj, prop, get) {\n  Object.defineProperty(obj, prop, { get })\n}\n\nfunction defined (err) {\n  return err != null\n}\n\nfunction getMessage (err) {\n  return err.message\n}\n\nfunction getStack (err) {\n  return err.stack\n}\n\nfunction transient (err) {\n  return err.transient === true\n}\n\nfunction expected (err) {\n  return err.expected === true\n}\n","'use strict'\n\nconst ModuleError = require('module-error')\nconst deprecations = new Set()\n\nexports.getOptions = function (options, def) {\n  if (typeof options === 'object' && options !== null) {\n    return options\n  }\n\n  if (def !== undefined) {\n    return def\n  }\n\n  return {}\n}\n\nexports.emptyOptions = Object.freeze({})\nexports.noop = function () {}\nexports.resolvedPromise = Promise.resolve()\n\nexports.deprecate = function (message) {\n  if (!deprecations.has(message)) {\n    deprecations.add(message)\n\n    // Avoid polyfills\n    const c = globalThis.console\n\n    if (typeof c !== 'undefined' && typeof c.warn === 'function') {\n      c.warn(new ModuleError(message, { code: 'LEVEL_LEGACY' }))\n    }\n  }\n}\n","'use strict'\n\nconst ModuleError = require('module-error')\n\nclass AbortError extends ModuleError {\n  constructor (cause) {\n    super('Operation has been aborted', {\n      code: 'LEVEL_ABORTED',\n      cause\n    })\n  }\n\n  // Set name to AbortError for web compatibility. See:\n  // https://dom.spec.whatwg.org/#aborting-ongoing-activities\n  // https://github.com/nodejs/node/pull/35911#discussion_r515779306\n  get name () {\n    return 'AbortError'\n  }\n}\n\nexports.AbortError = AbortError\n","'use strict'\n\nconst ModuleError = require('module-error')\nconst combineErrors = require('maybe-combine-errors')\nconst { getOptions, emptyOptions, noop } = require('./lib/common')\nconst { AbortError } = require('./lib/errors')\n\nconst kDecodeOne = Symbol('decodeOne')\nconst kDecodeMany = Symbol('decodeMany')\nconst kKeyEncoding = Symbol('keyEncoding')\nconst kValueEncoding = Symbol('valueEncoding')\n\n// This class is an internal utility for common functionality between AbstractIterator,\n// AbstractKeyIterator and AbstractValueIterator. It's not exported.\nclass CommonIterator {\n  #working = false\n  #pendingClose = null\n  #closingPromise = null\n  #count = 0\n  #signal\n  #limit\n  #ended\n  #snapshot\n\n  constructor (db, options) {\n    if (typeof db !== 'object' || db === null) {\n      const hint = db === null ? 'null' : typeof db\n      throw new TypeError(`The first argument must be an abstract-level database, received ${hint}`)\n    }\n\n    if (typeof options !== 'object' || options === null) {\n      throw new TypeError('The second argument must be an options object')\n    }\n\n    this[kKeyEncoding] = options[kKeyEncoding]\n    this[kValueEncoding] = options[kValueEncoding]\n\n    this.#limit = Number.isInteger(options.limit) && options.limit >= 0 ? options.limit : Infinity\n    this.#signal = options.signal != null ? options.signal : null\n    this.#snapshot = options.snapshot != null ? options.snapshot : null\n\n    // Ending means reaching the natural end of the data and (unlike closing) that can\n    // be reset by seek(), unless the limit was reached.\n    this.#ended = false\n\n    this.db = db\n    this.db.attachResource(this)\n  }\n\n  get count () {\n    return this.#count\n  }\n\n  get limit () {\n    return this.#limit\n  }\n\n  async next () {\n    this.#startWork()\n\n    try {\n      if (this.#ended || this.#count >= this.#limit) {\n        this.#ended = true\n        return undefined\n      }\n\n      let item = await this._next()\n\n      if (item === undefined) {\n        this.#ended = true\n        return undefined\n      }\n\n      try {\n        item = this[kDecodeOne](item)\n      } catch (err) {\n        throw new IteratorDecodeError(err)\n      }\n\n      this.#count++\n      return item\n    } finally {\n      this.#endWork()\n    }\n  }\n\n  async _next () {}\n\n  async nextv (size, options) {\n    if (!Number.isInteger(size)) {\n      throw new TypeError(\"The first argument 'size' must be an integer\")\n    }\n\n    options = getOptions(options, emptyOptions)\n\n    if (size < 1) size = 1\n    if (this.#limit < Infinity) size = Math.min(size, this.#limit - this.#count)\n\n    this.#startWork()\n\n    try {\n      if (this.#ended || size <= 0) {\n        this.#ended = true\n        return []\n      }\n\n      const items = await this._nextv(size, options)\n\n      if (items.length === 0) {\n        this.#ended = true\n        return items\n      }\n\n      try {\n        this[kDecodeMany](items)\n      } catch (err) {\n        throw new IteratorDecodeError(err)\n      }\n\n      this.#count += items.length\n      return items\n    } finally {\n      this.#endWork()\n    }\n  }\n\n  async _nextv (size, options) {\n    const acc = []\n\n    while (acc.length < size) {\n      const item = await this._next(options)\n\n      if (item !== undefined) {\n        acc.push(item)\n      } else {\n        // Must track this here because we're directly calling _next()\n        this.#ended = true\n        break\n      }\n    }\n\n    return acc\n  }\n\n  async all (options) {\n    options = getOptions(options, emptyOptions)\n    this.#startWork()\n\n    try {\n      if (this.#ended || this.#count >= this.#limit) {\n        return []\n      }\n\n      const items = await this._all(options)\n\n      try {\n        this[kDecodeMany](items)\n      } catch (err) {\n        throw new IteratorDecodeError(err)\n      }\n\n      this.#count += items.length\n      return items\n    } catch (err) {\n      this.#endWork()\n      await this.#destroy(err)\n    } finally {\n      this.#ended = true\n\n      if (this.#working) {\n        this.#endWork()\n        await this.close()\n      }\n    }\n  }\n\n  async _all (options) {\n    // Must count here because we're directly calling _nextv()\n    let count = this.#count\n\n    const acc = []\n\n    while (true) {\n      // Not configurable, because implementations should optimize _all().\n      const size = this.#limit < Infinity ? Math.min(1e3, this.#limit - count) : 1e3\n\n      if (size <= 0) {\n        return acc\n      }\n\n      const items = await this._nextv(size, options)\n\n      if (items.length === 0) {\n        return acc\n      }\n\n      acc.push.apply(acc, items)\n      count += items.length\n    }\n  }\n\n  seek (target, options) {\n    options = getOptions(options, emptyOptions)\n\n    if (this.#closingPromise !== null) {\n      // Don't throw here, to be kind to implementations that wrap\n      // another db and don't necessarily control when the db is closed\n    } else if (this.#working) {\n      throw new ModuleError('Iterator is busy: cannot call seek() until next() has completed', {\n        code: 'LEVEL_ITERATOR_BUSY'\n      })\n    } else {\n      const keyEncoding = this.db.keyEncoding(options.keyEncoding || this[kKeyEncoding])\n      const keyFormat = keyEncoding.format\n\n      if (options.keyEncoding !== keyFormat) {\n        options = { ...options, keyEncoding: keyFormat }\n      }\n\n      const mapped = this.db.prefixKey(keyEncoding.encode(target), keyFormat, false)\n      this._seek(mapped, options)\n\n      // If _seek() was successfull, more data may be available.\n      this.#ended = false\n    }\n  }\n\n  _seek (target, options) {\n    throw new ModuleError('Iterator does not implement seek()', {\n      code: 'LEVEL_NOT_SUPPORTED'\n    })\n  }\n\n  async close () {\n    if (this.#closingPromise !== null) {\n      // First caller of close() is responsible for error\n      return this.#closingPromise.catch(noop)\n    }\n\n    // Wrap to avoid race issues on recursive calls\n    this.#closingPromise = new Promise((resolve, reject) => {\n      this.#pendingClose = () => {\n        this.#pendingClose = null\n        this.#privateClose().then(resolve, reject)\n      }\n    })\n\n    // If working we'll delay closing, but still handle the close error (if any) here\n    if (!this.#working) {\n      this.#pendingClose()\n    }\n\n    return this.#closingPromise\n  }\n\n  async _close () {}\n\n  async * [Symbol.asyncIterator] () {\n    try {\n      let item\n\n      while ((item = (await this.next())) !== undefined) {\n        yield item\n      }\n    } catch (err) {\n      await this.#destroy(err)\n    } finally {\n      await this.close()\n    }\n  }\n\n  #startWork () {\n    if (this.#closingPromise !== null) {\n      throw new ModuleError('Iterator is not open: cannot read after close()', {\n        code: 'LEVEL_ITERATOR_NOT_OPEN'\n      })\n    } else if (this.#working) {\n      throw new ModuleError('Iterator is busy: cannot read until previous read has completed', {\n        code: 'LEVEL_ITERATOR_BUSY'\n      })\n    } else if (this.#signal?.aborted) {\n      throw new AbortError()\n    }\n\n    // Keep snapshot open during operation\n    this.#snapshot?.ref()\n    this.#working = true\n  }\n\n  #endWork () {\n    this.#working = false\n    this.#pendingClose?.()\n    this.#snapshot?.unref()\n  }\n\n  async #privateClose () {\n    await this._close()\n    this.db.detachResource(this)\n  }\n\n  async #destroy (err) {\n    try {\n      await this.close()\n    } catch (closeErr) {\n      throw combineErrors([err, closeErr])\n    }\n\n    throw err\n  }\n}\n\nif (typeof Symbol.asyncDispose === 'symbol') {\n  CommonIterator.prototype[Symbol.asyncDispose] = async function () {\n    return this.close()\n  }\n}\n\n// For backwards compatibility this class is not (yet) called AbstractEntryIterator.\nclass AbstractIterator extends CommonIterator {\n  #keys\n  #values\n\n  constructor (db, options) {\n    super(db, options)\n    this.#keys = options.keys !== false\n    this.#values = options.values !== false\n  }\n\n  [kDecodeOne] (entry) {\n    const key = entry[0]\n    const value = entry[1]\n\n    if (key !== undefined) {\n      entry[0] = this.#keys ? this[kKeyEncoding].decode(key) : undefined\n    }\n\n    if (value !== undefined) {\n      entry[1] = this.#values ? this[kValueEncoding].decode(value) : undefined\n    }\n\n    return entry\n  }\n\n  [kDecodeMany] (entries) {\n    const keyEncoding = this[kKeyEncoding]\n    const valueEncoding = this[kValueEncoding]\n\n    for (const entry of entries) {\n      const key = entry[0]\n      const value = entry[1]\n\n      if (key !== undefined) entry[0] = this.#keys ? keyEncoding.decode(key) : undefined\n      if (value !== undefined) entry[1] = this.#values ? valueEncoding.decode(value) : undefined\n    }\n  }\n}\n\nclass AbstractKeyIterator extends CommonIterator {\n  [kDecodeOne] (key) {\n    return this[kKeyEncoding].decode(key)\n  }\n\n  [kDecodeMany] (keys) {\n    const keyEncoding = this[kKeyEncoding]\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i]\n      if (key !== undefined) keys[i] = keyEncoding.decode(key)\n    }\n  }\n}\n\nclass AbstractValueIterator extends CommonIterator {\n  [kDecodeOne] (value) {\n    return this[kValueEncoding].decode(value)\n  }\n\n  [kDecodeMany] (values) {\n    const valueEncoding = this[kValueEncoding]\n\n    for (let i = 0; i < values.length; i++) {\n      const value = values[i]\n      if (value !== undefined) values[i] = valueEncoding.decode(value)\n    }\n  }\n}\n\n// Internal utility, not typed or exported\nclass IteratorDecodeError extends ModuleError {\n  constructor (cause) {\n    super('Iterator could not decode data', {\n      code: 'LEVEL_DECODE_ERROR',\n      cause\n    })\n  }\n}\n\n// Exposed so that AbstractLevel can set these options\nAbstractIterator.keyEncoding = kKeyEncoding\nAbstractIterator.valueEncoding = kValueEncoding\n\nexports.AbstractIterator = AbstractIterator\nexports.AbstractKeyIterator = AbstractKeyIterator\nexports.AbstractValueIterator = AbstractValueIterator\n","'use strict'\n\nconst { AbstractKeyIterator, AbstractValueIterator } = require('../abstract-iterator')\n\nconst kIterator = Symbol('iterator')\nconst kHandleOne = Symbol('handleOne')\nconst kHandleMany = Symbol('handleMany')\n\nclass DefaultKeyIterator extends AbstractKeyIterator {\n  constructor (db, options) {\n    super(db, options)\n\n    this[kIterator] = db.iterator({ ...options, keys: true, values: false })\n  }\n\n  [kHandleOne] (entry) {\n    return entry[0]\n  }\n\n  [kHandleMany] (entries) {\n    for (let i = 0; i < entries.length; i++) {\n      entries[i] = entries[i][0]\n    }\n  }\n}\n\nclass DefaultValueIterator extends AbstractValueIterator {\n  constructor (db, options) {\n    super(db, options)\n\n    this[kIterator] = db.iterator({ ...options, keys: false, values: true })\n  }\n\n  [kHandleOne] (entry) {\n    return entry[1]\n  }\n\n  [kHandleMany] (entries) {\n    for (let i = 0; i < entries.length; i++) {\n      entries[i] = entries[i][1]\n    }\n  }\n}\n\nfor (const Iterator of [DefaultKeyIterator, DefaultValueIterator]) {\n  Iterator.prototype._next = async function () {\n    const entry = await this[kIterator].next()\n    return entry === undefined ? entry : this[kHandleOne](entry)\n  }\n\n  Iterator.prototype._nextv = async function (size, options) {\n    const entries = await this[kIterator].nextv(size, options)\n    this[kHandleMany](entries)\n    return entries\n  }\n\n  Iterator.prototype._all = async function (options) {\n    const entries = await this[kIterator].all(options)\n    this[kHandleMany](entries)\n    return entries\n  }\n\n  Iterator.prototype._seek = function (target, options) {\n    this[kIterator].seek(target, options)\n  }\n\n  Iterator.prototype._close = async function () {\n    return this[kIterator].close()\n  }\n}\n\n// Internal utilities, should be typed as AbstractKeyIterator and AbstractValueIterator\nexports.DefaultKeyIterator = DefaultKeyIterator\nexports.DefaultValueIterator = DefaultValueIterator\n","'use strict'\n\nconst { AbstractIterator, AbstractKeyIterator, AbstractValueIterator } = require('../abstract-iterator')\nconst ModuleError = require('module-error')\n\nconst kNut = Symbol('nut')\nconst kUndefer = Symbol('undefer')\nconst kFactory = Symbol('factory')\nconst kSignalOptions = Symbol('signalOptions')\n\nclass DeferredIterator extends AbstractIterator {\n  constructor (db, options) {\n    super(db, options)\n\n    this[kNut] = null\n    this[kFactory] = () => db.iterator(options)\n    this[kSignalOptions] = { signal: options.signal }\n\n    this.db.defer(() => this[kUndefer](), this[kSignalOptions])\n  }\n}\n\nclass DeferredKeyIterator extends AbstractKeyIterator {\n  constructor (db, options) {\n    super(db, options)\n\n    this[kNut] = null\n    this[kFactory] = () => db.keys(options)\n    this[kSignalOptions] = { signal: options.signal }\n\n    this.db.defer(() => this[kUndefer](), this[kSignalOptions])\n  }\n}\n\nclass DeferredValueIterator extends AbstractValueIterator {\n  constructor (db, options) {\n    super(db, options)\n\n    this[kNut] = null\n    this[kFactory] = () => db.values(options)\n    this[kSignalOptions] = { signal: options.signal }\n\n    this.db.defer(() => this[kUndefer](), this[kSignalOptions])\n  }\n}\n\nfor (const Iterator of [DeferredIterator, DeferredKeyIterator, DeferredValueIterator]) {\n  Iterator.prototype[kUndefer] = function () {\n    if (this.db.status === 'open') {\n      this[kNut] = this[kFactory]()\n    }\n  }\n\n  Iterator.prototype._next = async function () {\n    if (this[kNut] !== null) {\n      return this[kNut].next()\n    } else if (this.db.status === 'opening') {\n      return this.db.deferAsync(() => this._next(), this[kSignalOptions])\n    } else {\n      throw new ModuleError('Iterator is not open: cannot call next() after close()', {\n        code: 'LEVEL_ITERATOR_NOT_OPEN'\n      })\n    }\n  }\n\n  Iterator.prototype._nextv = async function (size, options) {\n    if (this[kNut] !== null) {\n      return this[kNut].nextv(size, options)\n    } else if (this.db.status === 'opening') {\n      return this.db.deferAsync(() => this._nextv(size, options), this[kSignalOptions])\n    } else {\n      throw new ModuleError('Iterator is not open: cannot call nextv() after close()', {\n        code: 'LEVEL_ITERATOR_NOT_OPEN'\n      })\n    }\n  }\n\n  Iterator.prototype._all = async function (options) {\n    if (this[kNut] !== null) {\n      return this[kNut].all()\n    } else if (this.db.status === 'opening') {\n      return this.db.deferAsync(() => this._all(options), this[kSignalOptions])\n    } else {\n      throw new ModuleError('Iterator is not open: cannot call all() after close()', {\n        code: 'LEVEL_ITERATOR_NOT_OPEN'\n      })\n    }\n  }\n\n  Iterator.prototype._seek = function (target, options) {\n    if (this[kNut] !== null) {\n      // TODO: explain why we need _seek() rather than seek() here\n      this[kNut]._seek(target, options)\n    } else if (this.db.status === 'opening') {\n      this.db.defer(() => this._seek(target, options), this[kSignalOptions])\n    }\n  }\n\n  Iterator.prototype._close = async function () {\n    if (this[kNut] !== null) {\n      return this[kNut].close()\n    } else if (this.db.status === 'opening') {\n      return this.db.deferAsync(() => this._close())\n    }\n  }\n}\n\nexports.DeferredIterator = DeferredIterator\nexports.DeferredKeyIterator = DeferredKeyIterator\nexports.DeferredValueIterator = DeferredValueIterator\n","'use strict'\n\nexports.prefixDescendantKey = function (key, keyFormat, descendant, ancestor) {\n  while (descendant !== null && descendant !== ancestor) {\n    key = descendant.prefixKey(key, keyFormat, true)\n    descendant = descendant.parent\n  }\n\n  return key\n}\n\n// Check if db is a descendant of ancestor\n// TODO: optimize, when used alongside prefixDescendantKey\n// which means we visit parents twice.\nexports.isDescendant = function (db, ancestor) {\n  while (true) {\n    if (db.parent == null) return false\n    if (db.parent === ancestor) return true\n    db = db.parent\n  }\n}\n","'use strict'\n\nconst { prefixDescendantKey, isDescendant } = require('./prefixes')\n\n// An interface for prewrite hook functions to add operations\nclass PrewriteBatch {\n  #db\n  #privateOperations\n  #publicOperations\n\n  constructor (db, privateOperations, publicOperations) {\n    this.#db = db\n\n    // Note: if for db.batch([]), these arrays include input operations (or empty slots\n    // for them) but if for chained batch then it does not. Small implementation detail.\n    this.#privateOperations = privateOperations\n    this.#publicOperations = publicOperations\n  }\n\n  add (op) {\n    const isPut = op.type === 'put'\n    const delegated = op.sublevel != null\n    const db = delegated ? op.sublevel : this.#db\n\n    db._assertValidKey(op.key)\n    op.keyEncoding = db.keyEncoding(op.keyEncoding)\n\n    if (isPut) {\n      db._assertValidValue(op.value)\n      op.valueEncoding = db.valueEncoding(op.valueEncoding)\n    } else if (op.type !== 'del') {\n      throw new TypeError(\"A batch operation must have a type property that is 'put' or 'del'\")\n    }\n\n    // Encode data for private API\n    const keyEncoding = op.keyEncoding\n    const preencodedKey = keyEncoding.encode(op.key)\n    const keyFormat = keyEncoding.format\n\n    // If the sublevel is not a descendant then forward that option to the parent db\n    // so that we don't erroneously add our own prefix to the key of the operation.\n    const siblings = delegated && !isDescendant(op.sublevel, this.#db) && op.sublevel !== this.#db\n    const encodedKey = delegated && !siblings\n      ? prefixDescendantKey(preencodedKey, keyFormat, db, this.#db)\n      : preencodedKey\n\n    // Only prefix once\n    if (delegated && !siblings) {\n      op.sublevel = null\n    }\n\n    let publicOperation = null\n\n    // If the sublevel is not a descendant then we shouldn't emit events\n    if (this.#publicOperations !== null && !siblings) {\n      // Clone op before we mutate it for the private API\n      publicOperation = { ...op }\n      publicOperation.encodedKey = encodedKey\n\n      if (delegated) {\n        // Ensure emitted data makes sense in the context of this.#db\n        publicOperation.key = encodedKey\n        publicOperation.keyEncoding = this.#db.keyEncoding(keyFormat)\n      }\n\n      this.#publicOperations.push(publicOperation)\n    }\n\n    // If we're forwarding the sublevel option then don't prefix the key yet\n    op.key = siblings ? encodedKey : this.#db.prefixKey(encodedKey, keyFormat, true)\n    op.keyEncoding = keyFormat\n\n    if (isPut) {\n      const valueEncoding = op.valueEncoding\n      const encodedValue = valueEncoding.encode(op.value)\n      const valueFormat = valueEncoding.format\n\n      op.value = encodedValue\n      op.valueEncoding = valueFormat\n\n      if (publicOperation !== null) {\n        publicOperation.encodedValue = encodedValue\n\n        if (delegated) {\n          publicOperation.value = encodedValue\n          publicOperation.valueEncoding = this.#db.valueEncoding(valueFormat)\n        }\n      }\n    }\n\n    this.#privateOperations.push(op)\n    return this\n  }\n}\n\nexports.PrewriteBatch = PrewriteBatch\n","'use strict'\n\nconst combineErrors = require('maybe-combine-errors')\nconst ModuleError = require('module-error')\nconst { getOptions, emptyOptions, noop } = require('./lib/common')\nconst { prefixDescendantKey, isDescendant } = require('./lib/prefixes')\nconst { PrewriteBatch } = require('./lib/prewrite-batch')\n\nconst kPublicOperations = Symbol('publicOperations')\nconst kPrivateOperations = Symbol('privateOperations')\n\nclass AbstractChainedBatch {\n  #status = 'open'\n  #length = 0\n  #closePromise = null\n  #publicOperations\n  #prewriteRun\n  #prewriteBatch\n  #prewriteData\n  #addMode\n\n  constructor (db, options) {\n    if (typeof db !== 'object' || db === null) {\n      const hint = db === null ? 'null' : typeof db\n      throw new TypeError(`The first argument must be an abstract-level database, received ${hint}`)\n    }\n\n    const enableWriteEvent = db.listenerCount('write') > 0\n    const enablePrewriteHook = !db.hooks.prewrite.noop\n\n    // Operations for write event. We can skip populating this array (and cloning of\n    // operations, which is the expensive part) if there are 0 write event listeners.\n    this.#publicOperations = enableWriteEvent ? [] : null\n\n    this.#addMode = getOptions(options, emptyOptions).add === true\n\n    if (enablePrewriteHook) {\n      // Use separate arrays to collect operations added by hook functions, because\n      // we wait to apply those until write(). Store these arrays in PrewriteData which\n      // exists to separate internal data from the public PrewriteBatch interface.\n      const data = new PrewriteData([], enableWriteEvent ? [] : null)\n\n      this.#prewriteData = data\n      this.#prewriteBatch = new PrewriteBatch(db, data[kPrivateOperations], data[kPublicOperations])\n      this.#prewriteRun = db.hooks.prewrite.run // TODO: document why\n    } else {\n      this.#prewriteData = null\n      this.#prewriteBatch = null\n      this.#prewriteRun = null\n    }\n\n    this.db = db\n    this.db.attachResource(this)\n  }\n\n  get length () {\n    if (this.#prewriteData !== null) {\n      return this.#length + this.#prewriteData.length\n    } else {\n      return this.#length\n    }\n  }\n\n  put (key, value, options) {\n    this.#assertStatus()\n    options = getOptions(options, emptyOptions)\n\n    const delegated = options.sublevel != null\n    const db = delegated ? options.sublevel : this.db\n\n    db._assertValidKey(key)\n    db._assertValidValue(value)\n\n    const op = {\n      ...options,\n      type: 'put',\n      key,\n      value,\n      keyEncoding: db.keyEncoding(options.keyEncoding),\n      valueEncoding: db.valueEncoding(options.valueEncoding)\n    }\n\n    if (this.#prewriteRun !== null) {\n      try {\n        // Note: we could have chosen to recurse here so that prewriteBatch.put() would\n        // call this.put(). But then operations added by hook functions would be inserted\n        // before rather than after user operations. Instead we process those operations\n        // lazily in write(). This does hurt the only performance benefit benefit of a\n        // chained batch though, which is that it avoids blocking the event loop with\n        // more than one operation at a time. On the other hand, if operations added by\n        // hook functions are adjacent (i.e. sorted) committing them should be faster.\n        this.#prewriteRun(op, this.#prewriteBatch)\n\n        // Normalize encodings again in case they were modified\n        op.keyEncoding = db.keyEncoding(op.keyEncoding)\n        op.valueEncoding = db.valueEncoding(op.valueEncoding)\n      } catch (err) {\n        throw new ModuleError('The prewrite hook failed on batch.put()', {\n          code: 'LEVEL_HOOK_ERROR',\n          cause: err\n        })\n      }\n    }\n\n    // Encode data for private API\n    const keyEncoding = op.keyEncoding\n    const preencodedKey = keyEncoding.encode(op.key)\n    const keyFormat = keyEncoding.format\n\n    // If the sublevel is not a descendant then forward that option to the parent db\n    // so that we don't erroneously add our own prefix to the key of the operation.\n    const siblings = delegated && !isDescendant(op.sublevel, this.db) && op.sublevel !== this.db\n    const encodedKey = delegated && !siblings\n      ? prefixDescendantKey(preencodedKey, keyFormat, db, this.db)\n      : preencodedKey\n\n    const valueEncoding = op.valueEncoding\n    const encodedValue = valueEncoding.encode(op.value)\n    const valueFormat = valueEncoding.format\n\n    // Only prefix once\n    if (delegated && !siblings) {\n      op.sublevel = null\n    }\n\n    // If the sublevel is not a descendant then we shouldn't emit events\n    if (this.#publicOperations !== null && !siblings) {\n      // Clone op before we mutate it for the private API\n      const publicOperation = { ...op }\n      publicOperation.encodedKey = encodedKey\n      publicOperation.encodedValue = encodedValue\n\n      if (delegated) {\n        // Ensure emitted data makes sense in the context of this db\n        publicOperation.key = encodedKey\n        publicOperation.value = encodedValue\n        publicOperation.keyEncoding = this.db.keyEncoding(keyFormat)\n        publicOperation.valueEncoding = this.db.valueEncoding(valueFormat)\n      }\n\n      this.#publicOperations.push(publicOperation)\n    }\n\n    // If we're forwarding the sublevel option then don't prefix the key yet\n    op.key = siblings ? encodedKey : this.db.prefixKey(encodedKey, keyFormat, true)\n    op.value = encodedValue\n    op.keyEncoding = keyFormat\n    op.valueEncoding = valueFormat\n\n    if (this.#addMode) {\n      this._add(op)\n    } else {\n      // This \"operation as options\" trick avoids further cloning\n      this._put(op.key, encodedValue, op)\n    }\n\n    // Increment only on success\n    this.#length++\n    return this\n  }\n\n  _put (key, value, options) {}\n\n  del (key, options) {\n    this.#assertStatus()\n    options = getOptions(options, emptyOptions)\n\n    const delegated = options.sublevel != null\n    const db = delegated ? options.sublevel : this.db\n\n    db._assertValidKey(key)\n\n    const op = {\n      ...options,\n      type: 'del',\n      key,\n      keyEncoding: db.keyEncoding(options.keyEncoding)\n    }\n\n    if (this.#prewriteRun !== null) {\n      try {\n        this.#prewriteRun(op, this.#prewriteBatch)\n\n        // Normalize encoding again in case it was modified\n        op.keyEncoding = db.keyEncoding(op.keyEncoding)\n      } catch (err) {\n        throw new ModuleError('The prewrite hook failed on batch.del()', {\n          code: 'LEVEL_HOOK_ERROR',\n          cause: err\n        })\n      }\n    }\n\n    // Encode data for private API\n    const keyEncoding = op.keyEncoding\n    const preencodedKey = keyEncoding.encode(op.key)\n    const keyFormat = keyEncoding.format\n    const encodedKey = delegated ? prefixDescendantKey(preencodedKey, keyFormat, db, this.db) : preencodedKey\n\n    // Prevent double prefixing\n    if (delegated) op.sublevel = null\n\n    if (this.#publicOperations !== null) {\n      // Clone op before we mutate it for the private API\n      const publicOperation = { ...op }\n      publicOperation.encodedKey = encodedKey\n\n      if (delegated) {\n        // Ensure emitted data makes sense in the context of this db\n        publicOperation.key = encodedKey\n        publicOperation.keyEncoding = this.db.keyEncoding(keyFormat)\n      }\n\n      this.#publicOperations.push(publicOperation)\n    }\n\n    op.key = this.db.prefixKey(encodedKey, keyFormat, true)\n    op.keyEncoding = keyFormat\n\n    if (this.#addMode) {\n      this._add(op)\n    } else {\n      // This \"operation as options\" trick avoids further cloning\n      this._del(op.key, op)\n    }\n\n    // Increment only on success\n    this.#length++\n    return this\n  }\n\n  _del (key, options) {}\n\n  _add (op) {}\n\n  clear () {\n    this.#assertStatus()\n    this._clear()\n\n    if (this.#publicOperations !== null) this.#publicOperations = []\n    if (this.#prewriteData !== null) this.#prewriteData.clear()\n\n    this.#length = 0\n    return this\n  }\n\n  _clear () {}\n\n  async write (options) {\n    this.#assertStatus()\n    options = getOptions(options)\n\n    if (this.#length === 0) {\n      return this.close()\n    } else {\n      this.#status = 'writing'\n\n      // Prepare promise in case close() is called in the mean time\n      const close = this.#prepareClose()\n\n      try {\n        // Process operations added by prewrite hook functions\n        if (this.#prewriteData !== null) {\n          const publicOperations = this.#prewriteData[kPublicOperations]\n          const privateOperations = this.#prewriteData[kPrivateOperations]\n          const length = this.#prewriteData.length\n\n          for (let i = 0; i < length; i++) {\n            const op = privateOperations[i]\n\n            // We can _add(), _put() or _del() even though status is now 'writing' because\n            // status isn't exposed to the private API, so there's no difference in state\n            // from that perspective, unless an implementation overrides the public write()\n            // method at its own risk.\n            if (this.#addMode) {\n              this._add(op)\n            } else if (op.type === 'put') {\n              this._put(op.key, op.value, op)\n            } else {\n              this._del(op.key, op)\n            }\n          }\n\n          if (publicOperations !== null && length !== 0) {\n            this.#publicOperations = this.#publicOperations.concat(publicOperations)\n          }\n        }\n\n        await this._write(options)\n      } catch (err) {\n        close()\n\n        try {\n          await this.#closePromise\n        } catch (closeErr) {\n          // eslint-disable-next-line no-ex-assign\n          err = combineErrors([err, closeErr])\n        }\n\n        throw err\n      }\n\n      close()\n\n      // Emit after initiating the closing, because event may trigger a\n      // db close which in turn triggers (idempotently) closing this batch.\n      if (this.#publicOperations !== null) {\n        this.db.emit('write', this.#publicOperations)\n      }\n\n      return this.#closePromise\n    }\n  }\n\n  async _write (options) {}\n\n  async close () {\n    if (this.#closePromise !== null) {\n      // First caller of close() or write() is responsible for error\n      return this.#closePromise.catch(noop)\n    } else {\n      // Wrap promise to avoid race issues on recursive calls\n      this.#prepareClose()()\n      return this.#closePromise\n    }\n  }\n\n  async _close () {}\n\n  #assertStatus () {\n    if (this.#status !== 'open') {\n      throw new ModuleError('Batch is not open: cannot change operations after write() or close()', {\n        code: 'LEVEL_BATCH_NOT_OPEN'\n      })\n    }\n\n    // Can technically be removed, because it's no longer possible to call db.batch() when\n    // status is not 'open', and db.close() closes the batch. Keep for now, in case of\n    // unforseen userland behaviors.\n    if (this.db.status !== 'open') {\n      /* istanbul ignore next */\n      throw new ModuleError('Database is not open', {\n        code: 'LEVEL_DATABASE_NOT_OPEN'\n      })\n    }\n  }\n\n  #prepareClose () {\n    let close\n\n    this.#closePromise = new Promise((resolve, reject) => {\n      close = () => {\n        this.#privateClose().then(resolve, reject)\n      }\n    })\n\n    return close\n  }\n\n  async #privateClose () {\n    // TODO: should we not set status earlier?\n    this.#status = 'closing'\n    await this._close()\n    this.db.detachResource(this)\n  }\n}\n\nif (typeof Symbol.asyncDispose === 'symbol') {\n  AbstractChainedBatch.prototype[Symbol.asyncDispose] = async function () {\n    return this.close()\n  }\n}\n\nclass PrewriteData {\n  constructor (privateOperations, publicOperations) {\n    this[kPrivateOperations] = privateOperations\n    this[kPublicOperations] = publicOperations\n  }\n\n  get length () {\n    return this[kPrivateOperations].length\n  }\n\n  clear () {\n    // Clear operation arrays if present.\n    for (const k of [kPublicOperations, kPrivateOperations]) {\n      const ops = this[k]\n\n      if (ops !== null) {\n        // Keep array alive because PrewriteBatch has a reference to it\n        ops.splice(0, ops.length)\n      }\n    }\n  }\n}\n\nexports.AbstractChainedBatch = AbstractChainedBatch\n","'use strict'\n\nconst { AbstractChainedBatch } = require('../abstract-chained-batch')\n\n// Functional default for chained batch\nclass DefaultChainedBatch extends AbstractChainedBatch {\n  #encoded = []\n\n  constructor (db) {\n    // Opt-in to _add() instead of _put() and _del()\n    super(db, { add: true })\n  }\n\n  _add (op) {\n    this.#encoded.push(op)\n  }\n\n  _clear () {\n    this.#encoded = []\n  }\n\n  async _write (options) {\n    // Need to call the private rather than public method, to prevent\n    // recursion, double prefixing, double encoding and double hooks.\n    return this.db._batch(this.#encoded, options)\n  }\n}\n\nexports.DefaultChainedBatch = DefaultChainedBatch\n","'use strict'\n\nconst { noop } = require('./common')\n\nclass DatabaseHooks {\n  constructor () {\n    this.postopen = new Hook({ async: true })\n    this.prewrite = new Hook({ async: false })\n    this.newsub = new Hook({ async: false })\n  }\n}\n\nclass Hook {\n  #functions = new Set()\n  #isAsync\n\n  constructor (options) {\n    this.#isAsync = options.async\n\n    // Offer a fast way to check if hook functions are present. We could also expose a\n    // size getter, which would be slower, or check it by hook.run !== noop, which would\n    // not allow userland to do the same check.\n    this.noop = true\n    this.run = this.#runner()\n  }\n\n  add (fn) {\n    // Validate now rather than in asynchronous code paths\n    assertFunction(fn)\n    this.#functions.add(fn)\n    this.noop = false\n    this.run = this.#runner()\n  }\n\n  delete (fn) {\n    assertFunction(fn)\n    this.#functions.delete(fn)\n    this.noop = this.#functions.size === 0\n    this.run = this.#runner()\n  }\n\n  #runner () {\n    if (this.noop) {\n      return noop\n    } else if (this.#functions.size === 1) {\n      const [fn] = this.#functions\n      return fn\n    } else if (this.#isAsync) {\n      // The run function should not reference hook, so that consumers like chained batch\n      // and db.open() can save a reference to hook.run and safely assume it won't change\n      // during their lifetime or async work.\n      const run = async function (functions, ...args) {\n        for (const fn of functions) {\n          await fn(...args)\n        }\n      }\n\n      return run.bind(null, Array.from(this.#functions))\n    } else {\n      const run = function (functions, ...args) {\n        for (const fn of functions) {\n          fn(...args)\n        }\n      }\n\n      return run.bind(null, Array.from(this.#functions))\n    }\n  }\n}\n\nconst assertFunction = function (fn) {\n  if (typeof fn !== 'function') {\n    const hint = fn === null ? 'null' : typeof fn\n    throw new TypeError(`The first argument must be a function, received ${hint}`)\n  }\n}\n\nexports.DatabaseHooks = DatabaseHooks\n","'use strict'\n\nconst { deprecate } = require('./common')\n\nexports.EventMonitor = class EventMonitor {\n  constructor (emitter) {\n    // Track whether listeners are present, because checking\n    // a boolean is faster than checking listenerCount().\n    this.write = false\n\n    const beforeAdded = (name) => {\n      if (name === 'write') {\n        this.write = true\n      }\n\n      if (name === 'put' || name === 'del' || name === 'batch') {\n        deprecate(`The '${name}' event has been removed in favor of 'write'`)\n      }\n    }\n\n    const afterRemoved = (name) => {\n      if (name === 'write') {\n        this.write = emitter.listenerCount('write') > 0\n      }\n    }\n\n    emitter.on('newListener', beforeAdded)\n    emitter.on('removeListener', afterRemoved)\n  }\n}\n","'use strict'\n\nconst { getOptions, emptyOptions } = require('./common')\nconst { AbortError } = require('./errors')\n\nclass DeferredOperation {\n  constructor (fn, signal) {\n    this.fn = fn\n    this.signal = signal\n  }\n}\n\nclass DeferredQueue {\n  #operations\n  #signals\n\n  constructor () {\n    this.#operations = []\n    this.#signals = new Set()\n  }\n\n  add (fn, options) {\n    options = getOptions(options, emptyOptions)\n    const signal = options.signal\n\n    if (signal == null) {\n      this.#operations.push(new DeferredOperation(fn, null))\n      return\n    }\n\n    if (signal.aborted) {\n      // Note that this is called in the same tick\n      fn(new AbortError())\n      return\n    }\n\n    if (!this.#signals.has(signal)) {\n      this.#signals.add(signal)\n      signal.addEventListener('abort', this.#handleAbort, { once: true })\n    }\n\n    this.#operations.push(new DeferredOperation(fn, signal))\n  }\n\n  drain () {\n    const operations = this.#operations\n    const signals = this.#signals\n\n    this.#operations = []\n    this.#signals = new Set()\n\n    for (const signal of signals) {\n      signal.removeEventListener('abort', this.#handleAbort)\n    }\n\n    for (const operation of operations) {\n      operation.fn.call(null)\n    }\n  }\n\n  #handleAbort = (ev) => {\n    const signal = ev.target\n    const err = new AbortError()\n    const aborted = []\n\n    // TODO: optimize\n    this.#operations = this.#operations.filter(function (operation) {\n      if (operation.signal !== null && operation.signal === signal) {\n        aborted.push(operation)\n        return false\n      } else {\n        return true\n      }\n    })\n\n    this.#signals.delete(signal)\n\n    for (const operation of aborted) {\n      operation.fn.call(null, err)\n    }\n  }\n}\n\nexports.DeferredQueue = DeferredQueue\n","'use strict'\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst rangeOptions = new Set(['lt', 'lte', 'gt', 'gte'])\n\nmodule.exports = function (options, keyEncoding) {\n  const result = {}\n\n  for (const k in options) {\n    if (!hasOwnProperty.call(options, k)) continue\n    if (k === 'keyEncoding' || k === 'valueEncoding') continue\n\n    if (rangeOptions.has(k)) {\n      // Note that we don't reject nullish and empty options here. While\n      // those types are invalid as keys, they are valid as range options.\n      result[k] = keyEncoding.encode(options[k])\n    } else {\n      result[k] = options[k]\n    }\n  }\n\n  result.reverse = !!result.reverse\n  result.limit = Number.isInteger(result.limit) && result.limit >= 0 ? result.limit : -1\n\n  return result\n}\n","'use strict'\n\nconst { AbstractIterator, AbstractKeyIterator, AbstractValueIterator } = require('../abstract-iterator')\n\n// TODO: unfix natively if db supports it\nclass AbstractSublevelIterator extends AbstractIterator {\n  #iterator\n  #unfix\n\n  constructor (db, options, iterator, unfix) {\n    super(db, options)\n\n    this.#iterator = iterator\n    this.#unfix = unfix\n  }\n\n  async _next () {\n    const entry = await this.#iterator.next()\n\n    if (entry !== undefined) {\n      const key = entry[0]\n      if (key !== undefined) entry[0] = this.#unfix(key)\n    }\n\n    return entry\n  }\n\n  async _nextv (size, options) {\n    const entries = await this.#iterator.nextv(size, options)\n    const unfix = this.#unfix\n\n    for (const entry of entries) {\n      const key = entry[0]\n      if (key !== undefined) entry[0] = unfix(key)\n    }\n\n    return entries\n  }\n\n  async _all (options) {\n    const entries = await this.#iterator.all(options)\n    const unfix = this.#unfix\n\n    for (const entry of entries) {\n      const key = entry[0]\n      if (key !== undefined) entry[0] = unfix(key)\n    }\n\n    return entries\n  }\n\n  _seek (target, options) {\n    this.#iterator.seek(target, options)\n  }\n\n  async _close () {\n    return this.#iterator.close()\n  }\n}\n\nclass AbstractSublevelKeyIterator extends AbstractKeyIterator {\n  #iterator\n  #unfix\n\n  constructor (db, options, iterator, unfix) {\n    super(db, options)\n\n    this.#iterator = iterator\n    this.#unfix = unfix\n  }\n\n  async _next () {\n    const key = await this.#iterator.next()\n    return key === undefined ? key : this.#unfix(key)\n  }\n\n  async _nextv (size, options) {\n    const keys = await this.#iterator.nextv(size, options)\n    const unfix = this.#unfix\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i]\n      if (key !== undefined) keys[i] = unfix(key)\n    }\n\n    return keys\n  }\n\n  async _all (options) {\n    const keys = await this.#iterator.all(options)\n    const unfix = this.#unfix\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i]\n      if (key !== undefined) keys[i] = unfix(key)\n    }\n\n    return keys\n  }\n\n  _seek (target, options) {\n    this.#iterator.seek(target, options)\n  }\n\n  async _close () {\n    return this.#iterator.close()\n  }\n}\n\nclass AbstractSublevelValueIterator extends AbstractValueIterator {\n  #iterator\n\n  constructor (db, options, iterator) {\n    super(db, options)\n    this.#iterator = iterator\n  }\n\n  async _next () {\n    return this.#iterator.next()\n  }\n\n  async _nextv (size, options) {\n    return this.#iterator.nextv(size, options)\n  }\n\n  async _all (options) {\n    return this.#iterator.all(options)\n  }\n\n  _seek (target, options) {\n    this.#iterator.seek(target, options)\n  }\n\n  async _close () {\n    return this.#iterator.close()\n  }\n}\n\nexports.AbstractSublevelIterator = AbstractSublevelIterator\nexports.AbstractSublevelKeyIterator = AbstractSublevelKeyIterator\nexports.AbstractSublevelValueIterator = AbstractSublevelValueIterator\n","'use strict'\n\nconst ModuleError = require('module-error')\nconst { Buffer } = require('buffer') || {}\nconst {\n  AbstractSublevelIterator,\n  AbstractSublevelKeyIterator,\n  AbstractSublevelValueIterator\n} = require('./abstract-sublevel-iterator')\n\nconst kRoot = Symbol('root')\nconst textEncoder = new TextEncoder()\nconst defaults = { separator: '!' }\n\n// Wrapped to avoid circular dependency\nmodule.exports = function ({ AbstractLevel }) {\n  class AbstractSublevel extends AbstractLevel {\n    #globalPrefix\n    #localPrefix\n    #localPath\n    #globalPath\n    #globalUpperBound\n    #parent\n    #unfix\n\n    static defaults (options) {\n      if (options == null) {\n        return defaults\n      } else if (!options.separator) {\n        return { ...options, separator: '!' }\n      } else {\n        return options\n      }\n    }\n\n    constructor (db, name, options) {\n      // Don't forward AbstractSublevel options to AbstractLevel\n      const { separator, manifest, ...forward } = AbstractSublevel.defaults(options)\n      const names = [].concat(name).map(name => trim(name, separator))\n\n      // Reserve one character between separator and name to give us an upper bound\n      const reserved = separator.charCodeAt(0) + 1\n      const root = db[kRoot] || db\n\n      // Keys should sort like ['!a!', '!a!!a!', '!a\"', '!aa!', '!b!'].\n      // Use ASCII for consistent length between string, Buffer and Uint8Array\n      if (!names.every(name => textEncoder.encode(name).every(x => x > reserved && x < 127))) {\n        throw new ModuleError(`Sublevel name must use bytes > ${reserved} < ${127}`, {\n          code: 'LEVEL_INVALID_PREFIX'\n        })\n      }\n\n      super(mergeManifests(db, manifest), forward)\n\n      const localPrefix = names.map(name => separator + name + separator).join('')\n      const globalPrefix = (db.prefix || '') + localPrefix\n      const globalUpperBound = globalPrefix.slice(0, -1) + String.fromCharCode(reserved)\n\n      // Most operations are forwarded to the parent database, but clear() and iterators\n      // still forward to the root database - which is older logic and does not yet need\n      // to change, until we add some form of preread or postread hooks.\n      this[kRoot] = root\n      this.#parent = db\n      this.#localPath = names\n      this.#globalPath = db.prefix ? db.path().concat(names) : names\n      this.#globalPrefix = new MultiFormat(globalPrefix)\n      this.#globalUpperBound = new MultiFormat(globalUpperBound)\n      this.#localPrefix = new MultiFormat(localPrefix)\n      this.#unfix = new Unfixer()\n    }\n\n    prefixKey (key, keyFormat, local) {\n      const prefix = local ? this.#localPrefix : this.#globalPrefix\n\n      if (keyFormat === 'utf8') {\n        return prefix.utf8 + key\n      } else if (key.byteLength === 0) {\n        // Fast path for empty key (no copy)\n        return prefix[keyFormat]\n      } else if (keyFormat === 'view') {\n        const view = prefix.view\n        const result = new Uint8Array(view.byteLength + key.byteLength)\n\n        result.set(view, 0)\n        result.set(key, view.byteLength)\n\n        return result\n      } else {\n        const buffer = prefix.buffer\n        return Buffer.concat([buffer, key], buffer.byteLength + key.byteLength)\n      }\n    }\n\n    // Not exposed for now.\n    #prefixRange (range, keyFormat) {\n      if (range.gte !== undefined) {\n        range.gte = this.prefixKey(range.gte, keyFormat, false)\n      } else if (range.gt !== undefined) {\n        range.gt = this.prefixKey(range.gt, keyFormat, false)\n      } else {\n        range.gte = this.#globalPrefix[keyFormat]\n      }\n\n      if (range.lte !== undefined) {\n        range.lte = this.prefixKey(range.lte, keyFormat, false)\n      } else if (range.lt !== undefined) {\n        range.lt = this.prefixKey(range.lt, keyFormat, false)\n      } else {\n        range.lte = this.#globalUpperBound[keyFormat]\n      }\n    }\n\n    get prefix () {\n      return this.#globalPrefix.utf8\n    }\n\n    get db () {\n      return this[kRoot]\n    }\n\n    get parent () {\n      return this.#parent\n    }\n\n    path (local = false) {\n      return local ? this.#localPath : this.#globalPath\n    }\n\n    async _open (options) {\n      // The parent db must open itself or be (re)opened by the user because\n      // a sublevel should not initiate state changes on the rest of the db.\n      await this.#parent.open({ passive: true })\n\n      // Close sublevel when parent is closed\n      this.#parent.attachResource(this)\n    }\n\n    async _close () {\n      this.#parent.detachResource(this)\n    }\n\n    async _put (key, value, options) {\n      return this.#parent.put(key, value, options)\n    }\n\n    async _get (key, options) {\n      return this.#parent.get(key, options)\n    }\n\n    _getSync (key, options) {\n      return this.#parent.getSync(key, options)\n    }\n\n    async _getMany (keys, options) {\n      return this.#parent.getMany(keys, options)\n    }\n\n    async _has (key, options) {\n      return this.#parent.has(key, options)\n    }\n\n    async _hasMany (keys, options) {\n      return this.#parent.hasMany(keys, options)\n    }\n\n    async _del (key, options) {\n      return this.#parent.del(key, options)\n    }\n\n    async _batch (operations, options) {\n      return this.#parent.batch(operations, options)\n    }\n\n    // TODO: call parent instead of root\n    async _clear (options) {\n      // TODO (refactor): move to AbstractLevel\n      this.#prefixRange(options, options.keyEncoding)\n      return this[kRoot].clear(options)\n    }\n\n    // TODO: call parent instead of root\n    _iterator (options) {\n      // TODO (refactor): move to AbstractLevel\n      this.#prefixRange(options, options.keyEncoding)\n      const iterator = this[kRoot].iterator(options)\n      const unfix = this.#unfix.get(this.#globalPrefix.utf8.length, options.keyEncoding)\n      return new AbstractSublevelIterator(this, options, iterator, unfix)\n    }\n\n    _keys (options) {\n      this.#prefixRange(options, options.keyEncoding)\n      const iterator = this[kRoot].keys(options)\n      const unfix = this.#unfix.get(this.#globalPrefix.utf8.length, options.keyEncoding)\n      return new AbstractSublevelKeyIterator(this, options, iterator, unfix)\n    }\n\n    _values (options) {\n      this.#prefixRange(options, options.keyEncoding)\n      const iterator = this[kRoot].values(options)\n      return new AbstractSublevelValueIterator(this, options, iterator)\n    }\n\n    _snapshot (options) {\n      return this[kRoot].snapshot(options)\n    }\n  }\n\n  return { AbstractSublevel }\n}\n\nconst mergeManifests = function (parent, manifest) {\n  return {\n    // Inherit manifest of parent db\n    ...parent.supports,\n\n    // Disable unsupported features\n    createIfMissing: false,\n    errorIfExists: false,\n\n    // Unset additional events because we're not forwarding them\n    events: {},\n\n    // Unset additional methods (like approximateSize) which we can't support here unless\n    // the AbstractSublevel class is overridden by an implementation of `abstract-level`.\n    additionalMethods: {},\n\n    // Inherit manifest of custom AbstractSublevel subclass. Such a class is not\n    // allowed to override encodings.\n    ...manifest,\n\n    encodings: {\n      utf8: supportsEncoding(parent, 'utf8'),\n      buffer: supportsEncoding(parent, 'buffer'),\n      view: supportsEncoding(parent, 'view')\n    }\n  }\n}\n\nconst supportsEncoding = function (parent, encoding) {\n  // Prefer a non-transcoded encoding for optimal performance\n  return parent.supports.encodings[encoding]\n    ? parent.keyEncoding(encoding).name === encoding\n    : false\n}\n\nclass MultiFormat {\n  constructor (key) {\n    this.utf8 = key\n    this.view = textEncoder.encode(key)\n    this.buffer = Buffer ? Buffer.from(this.view.buffer, 0, this.view.byteLength) : {}\n  }\n}\n\nclass Unfixer {\n  constructor () {\n    this.cache = new Map()\n  }\n\n  get (prefixLength, keyFormat) {\n    let unfix = this.cache.get(keyFormat)\n\n    if (unfix === undefined) {\n      if (keyFormat === 'view') {\n        unfix = function (prefixLength, key) {\n          // Avoid Uint8Array#slice() because it copies\n          return key.subarray(prefixLength)\n        }.bind(null, prefixLength)\n      } else {\n        unfix = function (prefixLength, key) {\n          // Avoid Buffer#subarray() because it's slow\n          return key.slice(prefixLength)\n        }.bind(null, prefixLength)\n      }\n\n      this.cache.set(keyFormat, unfix)\n    }\n\n    return unfix\n  }\n}\n\nconst trim = function (str, char) {\n  let start = 0\n  let end = str.length\n\n  while (start < end && str[start] === char) start++\n  while (end > start && str[end - 1] === char) end--\n\n  return str.slice(start, end)\n}\n","'use strict'\n\nconst { supports } = require('level-supports')\nconst { Transcoder } = require('level-transcoder')\nconst { EventEmitter } = require('events')\nconst ModuleError = require('module-error')\nconst combineErrors = require('maybe-combine-errors')\nconst { AbstractIterator } = require('./abstract-iterator')\nconst { DefaultKeyIterator, DefaultValueIterator } = require('./lib/default-kv-iterator')\nconst { DeferredIterator, DeferredKeyIterator, DeferredValueIterator } = require('./lib/deferred-iterator')\nconst { DefaultChainedBatch } = require('./lib/default-chained-batch')\nconst { DatabaseHooks } = require('./lib/hooks')\nconst { PrewriteBatch } = require('./lib/prewrite-batch')\nconst { EventMonitor } = require('./lib/event-monitor')\nconst { getOptions, noop, emptyOptions, resolvedPromise } = require('./lib/common')\nconst { prefixDescendantKey, isDescendant } = require('./lib/prefixes')\nconst { DeferredQueue } = require('./lib/deferred-queue')\nconst rangeOptions = require('./lib/range-options')\n\nclass AbstractLevel extends EventEmitter {\n  #status = 'opening'\n  #deferOpen = true\n  #statusChange = null\n  #statusLocked = false\n  #resources\n  #queue\n  #options\n  #defaultOptions\n  #transcoder\n  #keyEncoding\n  #valueEncoding\n  #eventMonitor\n\n  constructor (manifest, options) {\n    super()\n\n    if (typeof manifest !== 'object' || manifest === null) {\n      throw new TypeError(\"The first argument 'manifest' must be an object\")\n    }\n\n    options = getOptions(options)\n    const { keyEncoding, valueEncoding, passive, ...forward } = options\n\n    this.#resources = new Set()\n    this.#queue = new DeferredQueue()\n    this.#options = forward\n\n    // Aliased for backwards compatibility\n    const implicitSnapshots = manifest.snapshots !== false &&\n      manifest.implicitSnapshots !== false\n\n    this.hooks = new DatabaseHooks()\n    this.supports = supports(manifest, {\n      deferredOpen: true,\n      seek: true,\n      implicitSnapshots,\n      permanence: manifest.permanence !== false,\n\n      encodings: manifest.encodings || {},\n      events: {\n        ...manifest.events,\n        opening: true,\n        open: true,\n        closing: true,\n        closed: true,\n        write: true,\n        clear: true\n      }\n    })\n\n    this.#eventMonitor = new EventMonitor(this)\n    this.#transcoder = new Transcoder(formats(this))\n    this.#keyEncoding = this.#transcoder.encoding(keyEncoding || 'utf8')\n    this.#valueEncoding = this.#transcoder.encoding(valueEncoding || 'utf8')\n\n    // Add custom and transcoder encodings to manifest\n    for (const encoding of this.#transcoder.encodings()) {\n      if (!this.supports.encodings[encoding.commonName]) {\n        this.supports.encodings[encoding.commonName] = true\n      }\n    }\n\n    this.#defaultOptions = {\n      empty: emptyOptions,\n      entry: Object.freeze({\n        keyEncoding: this.#keyEncoding.commonName,\n        valueEncoding: this.#valueEncoding.commonName\n      }),\n      entryFormat: Object.freeze({\n        keyEncoding: this.#keyEncoding.format,\n        valueEncoding: this.#valueEncoding.format\n      }),\n      key: Object.freeze({\n        keyEncoding: this.#keyEncoding.commonName\n      }),\n      keyFormat: Object.freeze({\n        keyEncoding: this.#keyEncoding.format\n      }),\n      owner: Object.freeze({\n        owner: this\n      })\n    }\n\n    // Before we start opening, let subclass finish its constructor\n    // and allow events and postopen hook functions to be added.\n    queueMicrotask(() => {\n      if (this.#deferOpen) {\n        this.open({ passive: false }).catch(noop)\n      }\n    })\n  }\n\n  get status () {\n    return this.#status\n  }\n\n  get parent () {\n    return null\n  }\n\n  keyEncoding (encoding) {\n    return this.#transcoder.encoding(encoding ?? this.#keyEncoding)\n  }\n\n  valueEncoding (encoding) {\n    return this.#transcoder.encoding(encoding ?? this.#valueEncoding)\n  }\n\n  async open (options) {\n    options = { ...this.#options, ...getOptions(options) }\n\n    options.createIfMissing = options.createIfMissing !== false\n    options.errorIfExists = !!options.errorIfExists\n\n    // TODO: document why we do this\n    const postopen = this.hooks.postopen.noop ? null : this.hooks.postopen.run\n    const passive = options.passive\n\n    if (passive && this.#deferOpen) {\n      // Wait a tick until constructor calls open() non-passively\n      await undefined\n    }\n\n    // Wait for pending changes and check that opening is allowed\n    this.#assertUnlocked()\n    while (this.#statusChange !== null) await this.#statusChange.catch(noop)\n    this.#assertUnlocked()\n\n    if (passive) {\n      if (this.#status !== 'open') throw new NotOpenError()\n    } else if (this.#status === 'closed' || this.#deferOpen) {\n      this.#deferOpen = false\n      this.#statusChange = resolvedPromise // TODO: refactor\n      this.#statusChange = (async () => {\n        this.#status = 'opening'\n\n        try {\n          this.emit('opening')\n          await this._open(options)\n        } catch (err) {\n          this.#status = 'closed'\n\n          // Must happen before we close resources, in case their close() is waiting\n          // on a deferred operation which in turn is waiting on db.open().\n          this.#queue.drain()\n\n          try {\n            await this.#closeResources()\n          } catch (resourceErr) {\n            // eslint-disable-next-line no-ex-assign\n            err = combineErrors([err, resourceErr])\n          }\n\n          throw new NotOpenError(err)\n        }\n\n        this.#status = 'open'\n\n        if (postopen !== null) {\n          let hookErr\n\n          try {\n            // Prevent deadlock\n            this.#statusLocked = true\n            await postopen(options)\n          } catch (err) {\n            hookErr = convertRejection(err)\n          } finally {\n            this.#statusLocked = false\n          }\n\n          // Revert\n          if (hookErr) {\n            this.#status = 'closing'\n            this.#queue.drain()\n\n            try {\n              await this.#closeResources()\n              await this._close()\n            } catch (closeErr) {\n              // There's no safe state to return to. Can't return to 'open' because\n              // postopen hook failed. Can't return to 'closed' (with the ability to\n              // reopen) because the underlying database is potentially still open.\n              this.#statusLocked = true\n              hookErr = combineErrors([hookErr, closeErr])\n            }\n\n            this.#status = 'closed'\n\n            throw new ModuleError('The postopen hook failed on open()', {\n              code: 'LEVEL_HOOK_ERROR',\n              cause: hookErr\n            })\n          }\n        }\n\n        this.#queue.drain()\n        this.emit('open')\n      })()\n\n      try {\n        await this.#statusChange\n      } finally {\n        this.#statusChange = null\n      }\n    } else if (this.#status !== 'open') {\n      /* istanbul ignore next: should not happen */\n      throw new NotOpenError()\n    }\n  }\n\n  async _open (options) {}\n\n  async close () {\n    // Wait for pending changes and check that closing is allowed\n    this.#assertUnlocked()\n    while (this.#statusChange !== null) await this.#statusChange.catch(noop)\n    this.#assertUnlocked()\n\n    if (this.#status === 'open' || this.#deferOpen) {\n      // If close() was called after constructor, we didn't open yet\n      const fromInitial = this.#deferOpen\n\n      this.#deferOpen = false\n      this.#statusChange = resolvedPromise\n      this.#statusChange = (async () => {\n        this.#status = 'closing'\n        this.#queue.drain()\n\n        try {\n          this.emit('closing')\n          await this.#closeResources()\n          if (!fromInitial) await this._close()\n        } catch (err) {\n          this.#status = 'open'\n          this.#queue.drain()\n          throw new NotClosedError(err)\n        }\n\n        this.#status = 'closed'\n        this.#queue.drain()\n        this.emit('closed')\n      })()\n\n      try {\n        await this.#statusChange\n      } finally {\n        this.#statusChange = null\n      }\n    } else if (this.#status !== 'closed') {\n      /* istanbul ignore next: should not happen */\n      throw new NotClosedError()\n    }\n  }\n\n  async #closeResources () {\n    if (this.#resources.size === 0) {\n      return\n    }\n\n    // In parallel so that all resources know they are closed\n    const resources = Array.from(this.#resources)\n    const promises = resources.map(closeResource)\n    const results = await Promise.allSettled(promises)\n    const errors = []\n\n    for (let i = 0; i < results.length; i++) {\n      if (results[i].status === 'fulfilled') {\n        this.#resources.delete(resources[i])\n      } else {\n        errors.push(convertRejection(results[i].reason))\n      }\n    }\n\n    if (errors.length > 0) {\n      throw combineErrors(errors)\n    }\n  }\n\n  async _close () {}\n\n  async get (key, options) {\n    options = getOptions(options, this.#defaultOptions.entry)\n\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.get(key, options))\n    }\n\n    this.#assertOpen()\n    this._assertValidKey(key)\n\n    const snapshot = options.snapshot\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const valueEncoding = this.valueEncoding(options.valueEncoding)\n    const keyFormat = keyEncoding.format\n    const valueFormat = valueEncoding.format\n\n    // Forward encoding options. Avoid cloning if possible.\n    if (options === this.#defaultOptions.entry) {\n      options = this.#defaultOptions.entryFormat\n    } else if (options.keyEncoding !== keyFormat || options.valueEncoding !== valueFormat) {\n      options = { ...options, keyEncoding: keyFormat, valueEncoding: valueFormat }\n    }\n\n    const encodedKey = keyEncoding.encode(key)\n    const mappedKey = this.prefixKey(encodedKey, keyFormat, true)\n\n    // Keep snapshot open during operation\n    snapshot?.ref()\n\n    let value\n\n    try {\n      value = await this._get(mappedKey, options)\n    } finally {\n      // Release snapshot\n      snapshot?.unref()\n    }\n\n    try {\n      return value === undefined ? value : valueEncoding.decode(value)\n    } catch (err) {\n      throw new ModuleError('Could not decode value', {\n        code: 'LEVEL_DECODE_ERROR',\n        cause: err\n      })\n    }\n  }\n\n  async _get (key, options) {\n    return undefined\n  }\n\n  getSync (key, options) {\n    if (this.status !== 'open') {\n      throw new ModuleError('Database is not open', {\n        code: 'LEVEL_DATABASE_NOT_OPEN'\n      })\n    }\n\n    this._assertValidKey(key)\n\n    // Fast-path for default options (known encoding, no cloning, no snapshot)\n    if (options == null) {\n      const encodedKey = this.#keyEncoding.encode(key)\n      const mappedKey = this.prefixKey(encodedKey, this.#keyEncoding.format, true)\n      const value = this._getSync(mappedKey, this.#defaultOptions.entryFormat)\n\n      try {\n        return value !== undefined ? this.#valueEncoding.decode(value) : undefined\n      } catch (err) {\n        throw new ModuleError('Could not decode value', {\n          code: 'LEVEL_DECODE_ERROR',\n          cause: err\n        })\n      }\n    }\n\n    const snapshot = options.snapshot\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const valueEncoding = this.valueEncoding(options.valueEncoding)\n    const keyFormat = keyEncoding.format\n    const valueFormat = valueEncoding.format\n\n    // Forward encoding options. Avoid cloning if possible.\n    if (options.keyEncoding !== keyFormat || options.valueEncoding !== valueFormat) {\n      options = { ...options, keyEncoding: keyFormat, valueEncoding: valueFormat }\n    }\n\n    const encodedKey = keyEncoding.encode(key)\n    const mappedKey = this.prefixKey(encodedKey, keyFormat, true)\n\n    let value\n\n    // Keep snapshot open during operation\n    snapshot?.ref()\n\n    try {\n      value = this._getSync(mappedKey, options)\n    } finally {\n      // Release snapshot\n      snapshot?.unref()\n    }\n\n    try {\n      return value !== undefined ? valueEncoding.decode(value) : undefined\n    } catch (err) {\n      throw new ModuleError('Could not decode value', {\n        code: 'LEVEL_DECODE_ERROR',\n        cause: err\n      })\n    }\n  }\n\n  _getSync (key, options) {\n    throw new ModuleError('Database does not support getSync()', {\n      code: 'LEVEL_NOT_SUPPORTED'\n    })\n  }\n\n  async getMany (keys, options) {\n    options = getOptions(options, this.#defaultOptions.entry)\n\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.getMany(keys, options))\n    }\n\n    this.#assertOpen()\n\n    if (!Array.isArray(keys)) {\n      throw new TypeError(\"The first argument 'keys' must be an array\")\n    }\n\n    if (keys.length === 0) {\n      return []\n    }\n\n    const snapshot = options.snapshot\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const valueEncoding = this.valueEncoding(options.valueEncoding)\n    const keyFormat = keyEncoding.format\n    const valueFormat = valueEncoding.format\n\n    // Forward encoding options. Avoid cloning if possible.\n    if (options === this.#defaultOptions.entry) {\n      options = this.#defaultOptions.entryFormat\n    } else if (options.keyEncoding !== keyFormat || options.valueEncoding !== valueFormat) {\n      options = { ...options, keyEncoding: keyFormat, valueEncoding: valueFormat }\n    }\n\n    const mappedKeys = new Array(keys.length)\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i]\n      this._assertValidKey(key)\n      mappedKeys[i] = this.prefixKey(keyEncoding.encode(key), keyFormat, true)\n    }\n\n    // Keep snapshot open during operation\n    snapshot?.ref()\n\n    let values\n\n    try {\n      values = await this._getMany(mappedKeys, options)\n    } finally {\n      // Release snapshot\n      snapshot?.unref()\n    }\n\n    try {\n      for (let i = 0; i < values.length; i++) {\n        if (values[i] !== undefined) {\n          values[i] = valueEncoding.decode(values[i])\n        }\n      }\n    } catch (err) {\n      throw new ModuleError(`Could not decode one or more of ${values.length} value(s)`, {\n        code: 'LEVEL_DECODE_ERROR',\n        cause: err\n      })\n    }\n\n    return values\n  }\n\n  async _getMany (keys, options) {\n    return new Array(keys.length).fill(undefined)\n  }\n\n  async has (key, options) {\n    options = getOptions(options, this.#defaultOptions.key)\n\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.has(key, options))\n    }\n\n    this.#assertOpen()\n    this._assertValidKey(key)\n\n    const snapshot = options.snapshot\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const keyFormat = keyEncoding.format\n\n    // Forward encoding options. Avoid cloning if possible.\n    if (options === this.#defaultOptions.key) {\n      options = this.#defaultOptions.keyFormat\n    } else if (options.keyEncoding !== keyFormat) {\n      options = { ...options, keyEncoding: keyFormat }\n    }\n\n    const encodedKey = keyEncoding.encode(key)\n    const mappedKey = this.prefixKey(encodedKey, keyFormat, true)\n\n    // Keep snapshot open during operation\n    snapshot?.ref()\n\n    try {\n      return this._has(mappedKey, options)\n    } finally {\n      // Release snapshot\n      snapshot?.unref()\n    }\n  }\n\n  async _has (key, options) {\n    throw new ModuleError('Database does not support has()', {\n      code: 'LEVEL_NOT_SUPPORTED'\n    })\n  }\n\n  async hasMany (keys, options) {\n    options = getOptions(options, this.#defaultOptions.key)\n\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.hasMany(keys, options))\n    }\n\n    this.#assertOpen()\n\n    if (!Array.isArray(keys)) {\n      throw new TypeError(\"The first argument 'keys' must be an array\")\n    }\n\n    if (keys.length === 0) {\n      return []\n    }\n\n    const snapshot = options.snapshot\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const keyFormat = keyEncoding.format\n\n    // Forward encoding options. Avoid cloning if possible.\n    if (options === this.#defaultOptions.key) {\n      options = this.#defaultOptions.keyFormat\n    } else if (options.keyEncoding !== keyFormat) {\n      options = { ...options, keyEncoding: keyFormat }\n    }\n\n    const mappedKeys = new Array(keys.length)\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i]\n      this._assertValidKey(key)\n      mappedKeys[i] = this.prefixKey(keyEncoding.encode(key), keyFormat, true)\n    }\n\n    // Keep snapshot open during operation\n    snapshot?.ref()\n\n    try {\n      return this._hasMany(mappedKeys, options)\n    } finally {\n      // Release snapshot\n      snapshot?.unref()\n    }\n  }\n\n  async _hasMany (keys, options) {\n    throw new ModuleError('Database does not support hasMany()', {\n      code: 'LEVEL_NOT_SUPPORTED'\n    })\n  }\n\n  async put (key, value, options) {\n    if (!this.hooks.prewrite.noop) {\n      // Forward to batch() which will run the hook\n      // Note: technically means that put() supports the sublevel option in this case,\n      // but it generally doesn't per documentation (which makes sense). Same for del().\n      return this.batch([{ type: 'put', key, value }], options)\n    }\n\n    options = getOptions(options, this.#defaultOptions.entry)\n\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.put(key, value, options))\n    }\n\n    this.#assertOpen()\n\n    this._assertValidKey(key)\n    this._assertValidValue(value)\n\n    // Encode data for private API\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const valueEncoding = this.valueEncoding(options.valueEncoding)\n    const keyFormat = keyEncoding.format\n    const valueFormat = valueEncoding.format\n    const enableWriteEvent = this.#eventMonitor.write\n    const original = options\n\n    // Forward encoding options. Avoid cloning if possible.\n    if (options === this.#defaultOptions.entry) {\n      options = this.#defaultOptions.entryFormat\n    } else if (options.keyEncoding !== keyFormat || options.valueEncoding !== valueFormat) {\n      options = { ...options, keyEncoding: keyFormat, valueEncoding: valueFormat }\n    }\n\n    const encodedKey = keyEncoding.encode(key)\n    const prefixedKey = this.prefixKey(encodedKey, keyFormat, true)\n    const encodedValue = valueEncoding.encode(value)\n\n    await this._put(prefixedKey, encodedValue, options)\n\n    if (enableWriteEvent) {\n      const op = {\n        ...original,\n        type: 'put',\n        key,\n        value,\n        keyEncoding,\n        valueEncoding,\n        encodedKey,\n        encodedValue\n      }\n\n      this.emit('write', [op])\n    }\n  }\n\n  async _put (key, value, options) {}\n\n  async del (key, options) {\n    if (!this.hooks.prewrite.noop) {\n      // Forward to batch() which will run the hook\n      return this.batch([{ type: 'del', key }], options)\n    }\n\n    options = getOptions(options, this.#defaultOptions.key)\n\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.del(key, options))\n    }\n\n    this.#assertOpen()\n    this._assertValidKey(key)\n\n    // Encode data for private API\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const keyFormat = keyEncoding.format\n    const enableWriteEvent = this.#eventMonitor.write\n    const original = options\n\n    // Forward encoding options. Avoid cloning if possible.\n    if (options === this.#defaultOptions.key) {\n      options = this.#defaultOptions.keyFormat\n    } else if (options.keyEncoding !== keyFormat) {\n      options = { ...options, keyEncoding: keyFormat }\n    }\n\n    const encodedKey = keyEncoding.encode(key)\n    const prefixedKey = this.prefixKey(encodedKey, keyFormat, true)\n\n    await this._del(prefixedKey, options)\n\n    if (enableWriteEvent) {\n      const op = {\n        ...original,\n        type: 'del',\n        key,\n        keyEncoding,\n        encodedKey\n      }\n\n      this.emit('write', [op])\n    }\n  }\n\n  async _del (key, options) {}\n\n  // TODO (future): add way for implementations to declare which options are for the\n  // whole batch rather than defaults for individual operations. E.g. the sync option\n  // of classic-level, that should not be copied to individual operations.\n  batch (operations, options) {\n    if (!arguments.length) {\n      this.#assertOpen()\n      return this._chainedBatch()\n    }\n\n    options = getOptions(options, this.#defaultOptions.empty)\n    return this.#arrayBatch(operations, options)\n  }\n\n  // Wrapped for async error handling\n  async #arrayBatch (operations, options) {\n    // TODO (not urgent): freeze prewrite hook and write event\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.#arrayBatch(operations, options))\n    }\n\n    this.#assertOpen()\n\n    if (!Array.isArray(operations)) {\n      throw new TypeError(\"The first argument 'operations' must be an array\")\n    }\n\n    if (operations.length === 0) {\n      return\n    }\n\n    const length = operations.length\n    const enablePrewriteHook = !this.hooks.prewrite.noop\n    const enableWriteEvent = this.#eventMonitor.write\n    const publicOperations = enableWriteEvent ? new Array(length) : null\n    const privateOperations = new Array(length)\n    const prewriteBatch = enablePrewriteHook\n      ? new PrewriteBatch(this, privateOperations, publicOperations)\n      : null\n\n    for (let i = 0; i < length; i++) {\n      // Clone the op so that we can freely mutate it. We can't use a class because the\n      // op can have userland properties that we'd have to copy, negating the performance\n      // benefits of a class. So use a plain object.\n      const op = { ...options, ...operations[i] }\n\n      // Hook functions can modify op but not its type or sublevel, so cache those\n      const isPut = op.type === 'put'\n      const delegated = op.sublevel != null\n      const db = delegated ? op.sublevel : this\n\n      db._assertValidKey(op.key)\n\n      op.keyEncoding = db.keyEncoding(op.keyEncoding)\n\n      if (isPut) {\n        db._assertValidValue(op.value)\n        op.valueEncoding = db.valueEncoding(op.valueEncoding)\n      } else if (op.type !== 'del') {\n        throw new TypeError(\"A batch operation must have a type property that is 'put' or 'del'\")\n      }\n\n      if (enablePrewriteHook) {\n        try {\n          this.hooks.prewrite.run(op, prewriteBatch)\n\n          // Normalize encodings again in case they were modified\n          op.keyEncoding = db.keyEncoding(op.keyEncoding)\n          if (isPut) op.valueEncoding = db.valueEncoding(op.valueEncoding)\n        } catch (err) {\n          throw new ModuleError('The prewrite hook failed on batch()', {\n            code: 'LEVEL_HOOK_ERROR',\n            cause: err\n          })\n        }\n      }\n\n      // Encode data for private API\n      const keyEncoding = op.keyEncoding\n      const preencodedKey = keyEncoding.encode(op.key)\n      const keyFormat = keyEncoding.format\n\n      // If the sublevel is not a descendant then forward that option to the parent db\n      // so that we don't erroneously add our own prefix to the key of the operation.\n      const siblings = delegated && !isDescendant(op.sublevel, this) && op.sublevel !== this\n      const encodedKey = delegated && !siblings\n        ? prefixDescendantKey(preencodedKey, keyFormat, db, this)\n        : preencodedKey\n\n      // Only prefix once\n      if (delegated && !siblings) {\n        op.sublevel = null\n      }\n\n      let publicOperation = null\n\n      // If the sublevel is not a descendant then we shouldn't emit events\n      if (enableWriteEvent && !siblings) {\n        // Clone op before we mutate it for the private API\n        // TODO (future semver-major): consider sending this shape to private API too\n        publicOperation = { ...op }\n        publicOperation.encodedKey = encodedKey\n\n        if (delegated) {\n          // Ensure emitted data makes sense in the context of this db\n          publicOperation.key = encodedKey\n          publicOperation.keyEncoding = this.keyEncoding(keyFormat)\n        }\n\n        publicOperations[i] = publicOperation\n      }\n\n      // If we're forwarding the sublevel option then don't prefix the key yet\n      op.key = siblings ? encodedKey : this.prefixKey(encodedKey, keyFormat, true)\n      op.keyEncoding = keyFormat\n\n      if (isPut) {\n        const valueEncoding = op.valueEncoding\n        const encodedValue = valueEncoding.encode(op.value)\n        const valueFormat = valueEncoding.format\n\n        op.value = encodedValue\n        op.valueEncoding = valueFormat\n\n        if (enableWriteEvent && !siblings) {\n          publicOperation.encodedValue = encodedValue\n\n          if (delegated) {\n            publicOperation.value = encodedValue\n            publicOperation.valueEncoding = this.valueEncoding(valueFormat)\n          }\n        }\n      }\n\n      privateOperations[i] = op\n    }\n\n    // TODO (future): maybe add separate hook to run on private data. Currently can't work\n    // because prefixing happens too soon; we need to move that logic to the private\n    // API of AbstractSublevel (or reimplement with hooks). TBD how it'd work in chained\n    // batch. Hook would look something like hooks.midwrite.run(privateOperations, ...).\n\n    await this._batch(privateOperations, options)\n\n    if (enableWriteEvent) {\n      this.emit('write', publicOperations)\n    }\n  }\n\n  async _batch (operations, options) {}\n\n  sublevel (name, options) {\n    const xopts = AbstractSublevel.defaults(options)\n    const sublevel = this._sublevel(name, xopts)\n\n    if (!this.hooks.newsub.noop) {\n      try {\n        this.hooks.newsub.run(sublevel, xopts)\n      } catch (err) {\n        throw new ModuleError('The newsub hook failed on sublevel()', {\n          code: 'LEVEL_HOOK_ERROR',\n          cause: err\n        })\n      }\n    }\n\n    return sublevel\n  }\n\n  _sublevel (name, options) {\n    return new AbstractSublevel(this, name, options)\n  }\n\n  prefixKey (key, keyFormat, local) {\n    return key\n  }\n\n  async clear (options) {\n    options = getOptions(options, this.#defaultOptions.empty)\n\n    if (this.#status === 'opening') {\n      return this.deferAsync(() => this.clear(options))\n    }\n\n    this.#assertOpen()\n\n    const original = options\n    const keyEncoding = this.keyEncoding(options.keyEncoding)\n    const snapshot = options.snapshot\n\n    options = rangeOptions(options, keyEncoding)\n    options.keyEncoding = keyEncoding.format\n\n    if (options.limit !== 0) {\n      // Keep snapshot open during operation\n      snapshot?.ref()\n\n      try {\n        await this._clear(options)\n      } finally {\n        // Release snapshot\n        snapshot?.unref()\n      }\n\n      this.emit('clear', original)\n    }\n  }\n\n  async _clear (options) {}\n\n  iterator (options) {\n    const keyEncoding = this.keyEncoding(options?.keyEncoding)\n    const valueEncoding = this.valueEncoding(options?.valueEncoding)\n\n    options = rangeOptions(options, keyEncoding)\n    options.keys = options.keys !== false\n    options.values = options.values !== false\n\n    // We need the original encoding options in AbstractIterator in order to decode data\n    options[AbstractIterator.keyEncoding] = keyEncoding\n    options[AbstractIterator.valueEncoding] = valueEncoding\n\n    // Forward encoding options to private API\n    options.keyEncoding = keyEncoding.format\n    options.valueEncoding = valueEncoding.format\n\n    if (this.#status === 'opening') {\n      return new DeferredIterator(this, options)\n    }\n\n    this.#assertOpen()\n    return this._iterator(options)\n  }\n\n  _iterator (options) {\n    return new AbstractIterator(this, options)\n  }\n\n  keys (options) {\n    // Also include valueEncoding (though unused) because we may fallback to _iterator()\n    const keyEncoding = this.keyEncoding(options?.keyEncoding)\n    const valueEncoding = this.valueEncoding(options?.valueEncoding)\n\n    options = rangeOptions(options, keyEncoding)\n\n    // We need the original encoding options in AbstractKeyIterator in order to decode data\n    options[AbstractIterator.keyEncoding] = keyEncoding\n    options[AbstractIterator.valueEncoding] = valueEncoding\n\n    // Forward encoding options to private API\n    options.keyEncoding = keyEncoding.format\n    options.valueEncoding = valueEncoding.format\n\n    if (this.#status === 'opening') {\n      return new DeferredKeyIterator(this, options)\n    }\n\n    this.#assertOpen()\n    return this._keys(options)\n  }\n\n  _keys (options) {\n    return new DefaultKeyIterator(this, options)\n  }\n\n  values (options) {\n    const keyEncoding = this.keyEncoding(options?.keyEncoding)\n    const valueEncoding = this.valueEncoding(options?.valueEncoding)\n\n    options = rangeOptions(options, keyEncoding)\n\n    // We need the original encoding options in AbstractValueIterator in order to decode data\n    options[AbstractIterator.keyEncoding] = keyEncoding\n    options[AbstractIterator.valueEncoding] = valueEncoding\n\n    // Forward encoding options to private API\n    options.keyEncoding = keyEncoding.format\n    options.valueEncoding = valueEncoding.format\n\n    if (this.#status === 'opening') {\n      return new DeferredValueIterator(this, options)\n    }\n\n    this.#assertOpen()\n    return this._values(options)\n  }\n\n  _values (options) {\n    return new DefaultValueIterator(this, options)\n  }\n\n  snapshot (options) {\n    this.#assertOpen()\n\n    // Owner is an undocumented option explained in AbstractSnapshot\n    if (typeof options !== 'object' || options === null) {\n      options = this.#defaultOptions.owner\n    } else if (options.owner == null) {\n      options = { ...options, owner: this }\n    }\n\n    return this._snapshot(options)\n  }\n\n  _snapshot (options) {\n    throw new ModuleError('Database does not support explicit snapshots', {\n      code: 'LEVEL_NOT_SUPPORTED'\n    })\n  }\n\n  defer (fn, options) {\n    if (typeof fn !== 'function') {\n      throw new TypeError('The first argument must be a function')\n    }\n\n    this.#queue.add(function (abortError) {\n      if (!abortError) fn()\n    }, options)\n  }\n\n  deferAsync (fn, options) {\n    if (typeof fn !== 'function') {\n      throw new TypeError('The first argument must be a function')\n    }\n\n    return new Promise((resolve, reject) => {\n      this.#queue.add(function (abortError) {\n        if (abortError) reject(abortError)\n        else fn().then(resolve, reject)\n      }, options)\n    })\n  }\n\n  attachResource (resource) {\n    if (typeof resource !== 'object' || resource === null ||\n      typeof resource.close !== 'function') {\n      throw new TypeError('The first argument must be a resource object')\n    }\n\n    this.#resources.add(resource)\n  }\n\n  detachResource (resource) {\n    this.#resources.delete(resource)\n  }\n\n  _chainedBatch () {\n    return new DefaultChainedBatch(this)\n  }\n\n  _assertValidKey (key) {\n    if (key === null || key === undefined) {\n      throw new ModuleError('Key cannot be null or undefined', {\n        code: 'LEVEL_INVALID_KEY'\n      })\n    }\n  }\n\n  _assertValidValue (value) {\n    if (value === null || value === undefined) {\n      throw new ModuleError('Value cannot be null or undefined', {\n        code: 'LEVEL_INVALID_VALUE'\n      })\n    }\n  }\n\n  #assertOpen () {\n    if (this.#status !== 'open') {\n      throw new ModuleError('Database is not open', {\n        code: 'LEVEL_DATABASE_NOT_OPEN'\n      })\n    }\n  }\n\n  #assertUnlocked () {\n    if (this.#statusLocked) {\n      throw new ModuleError('Database status is locked', {\n        code: 'LEVEL_STATUS_LOCKED'\n      })\n    }\n  }\n}\n\nconst { AbstractSublevel } = require('./lib/abstract-sublevel')({ AbstractLevel })\n\nexports.AbstractLevel = AbstractLevel\nexports.AbstractSublevel = AbstractSublevel\n\nif (typeof Symbol.asyncDispose === 'symbol') {\n  AbstractLevel.prototype[Symbol.asyncDispose] = async function () {\n    return this.close()\n  }\n}\n\nconst formats = function (db) {\n  return Object.keys(db.supports.encodings)\n    .filter(k => !!db.supports.encodings[k])\n}\n\nconst closeResource = function (resource) {\n  return resource.close()\n}\n\n// Ensure that we don't work with falsy err values, because JavaScript unfortunately\n// allows Promise.reject(null) and similar patterns. Which'd break `if (err)` logic.\nconst convertRejection = function (reason) {\n  if (reason instanceof Error) {\n    return reason\n  }\n\n  if (Object.prototype.toString.call(reason) === '[object Error]') {\n    return reason\n  }\n\n  const hint = reason === null ? 'null' : typeof reason\n  const msg = `Promise rejection reason must be an Error, received ${hint}`\n\n  return new TypeError(msg)\n}\n\n// Internal utilities, not typed or exported\nclass NotOpenError extends ModuleError {\n  constructor (cause) {\n    super('Database failed to open', {\n      code: 'LEVEL_DATABASE_NOT_OPEN',\n      cause\n    })\n  }\n}\n\nclass NotClosedError extends ModuleError {\n  constructor (cause) {\n    super('Database failed to close', {\n      code: 'LEVEL_DATABASE_NOT_CLOSED',\n      cause\n    })\n  }\n}\n","'use strict'\n\nconst ModuleError = require('module-error')\nconst { noop } = require('./lib/common')\n\nclass AbstractSnapshot {\n  #open = true\n  #referenceCount = 0\n  #pendingClose = null\n  #closePromise = null\n  #owner\n\n  constructor (options) {\n    // Defining this as an option gives sublevels the opportunity to create a snapshot\n    // via their parent database but still designate themselves as the \"owner\", which\n    // just means which database will close the snapshot upon db.close(). This ensures\n    // that the API of AbstractSublevel is symmetrical to AbstractLevel.\n    const owner = options.owner\n\n    if (typeof owner !== 'object' || owner === null) {\n      const hint = owner === null ? 'null' : typeof owner\n      throw new TypeError(`Owner must be an abstract-level database, received ${hint}`)\n    }\n\n    // Also ensures this db will not be garbage collected\n    this.#owner = owner\n    this.#owner.attachResource(this)\n  }\n\n  ref () {\n    if (!this.#open) {\n      throw new ModuleError('Snapshot is not open: cannot use snapshot after close()', {\n        code: 'LEVEL_SNAPSHOT_NOT_OPEN'\n      })\n    }\n\n    this.#referenceCount++\n  }\n\n  unref () {\n    if (--this.#referenceCount === 0) {\n      this.#pendingClose?.()\n    }\n  }\n\n  async close () {\n    if (this.#closePromise !== null) {\n      // First caller of close() is responsible for error\n      return this.#closePromise.catch(noop)\n    }\n\n    this.#open = false\n\n    // Wrap to avoid race issues on recursive calls\n    this.#closePromise = new Promise((resolve, reject) => {\n      this.#pendingClose = () => {\n        this.#pendingClose = null\n        privateClose(this, this.#owner).then(resolve, reject)\n      }\n    })\n\n    // If working we'll delay closing, but still handle the close error (if any) here\n    if (this.#referenceCount === 0) {\n      this.#pendingClose()\n    }\n\n    return this.#closePromise\n  }\n\n  async _close () {}\n}\n\nif (typeof Symbol.asyncDispose === 'symbol') {\n  AbstractSnapshot.prototype[Symbol.asyncDispose] = async function () {\n    return this.close()\n  }\n}\n\nconst privateClose = async function (snapshot, owner) {\n  await snapshot._close()\n  owner.detachResource(snapshot)\n}\n\nexports.AbstractSnapshot = AbstractSnapshot\n","'use strict'\n\nexports.AbstractLevel = require('./abstract-level').AbstractLevel\nexports.AbstractSublevel = require('./abstract-level').AbstractSublevel\nexports.AbstractIterator = require('./abstract-iterator').AbstractIterator\nexports.AbstractKeyIterator = require('./abstract-iterator').AbstractKeyIterator\nexports.AbstractValueIterator = require('./abstract-iterator').AbstractValueIterator\nexports.AbstractChainedBatch = require('./abstract-chained-batch').AbstractChainedBatch\nexports.AbstractSnapshot = require('./abstract-snapshot').AbstractSnapshot\n","// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","var fs = require('fs')\nvar path = require('path')\nvar os = require('os')\n\n// Workaround to fix webpack's build warnings: 'the request of a dependency is an expression'\nvar runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line\n\nvar vars = (process.config && process.config.variables) || {}\nvar prebuildsOnly = !!process.env.PREBUILDS_ONLY\nvar abi = process.versions.modules // TODO: support old node where this is undef\nvar runtime = isElectron() ? 'electron' : (isNwjs() ? 'node-webkit' : 'node')\n\nvar arch = process.env.npm_config_arch || os.arch()\nvar platform = process.env.npm_config_platform || os.platform()\nvar libc = process.env.LIBC || (isAlpine(platform) ? 'musl' : 'glibc')\nvar armv = process.env.ARM_VERSION || (arch === 'arm64' ? '8' : vars.arm_version) || ''\nvar uv = (process.versions.uv || '').split('.')[0]\n\nmodule.exports = load\n\nfunction load (dir) {\n  return runtimeRequire(load.resolve(dir))\n}\n\nload.resolve = load.path = function (dir) {\n  dir = path.resolve(dir || '.')\n\n  try {\n    var name = runtimeRequire(path.join(dir, 'package.json')).name.toUpperCase().replace(/-/g, '_')\n    if (process.env[name + '_PREBUILD']) dir = process.env[name + '_PREBUILD']\n  } catch (err) {}\n\n  if (!prebuildsOnly) {\n    var release = getFirst(path.join(dir, 'build/Release'), matchBuild)\n    if (release) return release\n\n    var debug = getFirst(path.join(dir, 'build/Debug'), matchBuild)\n    if (debug) return debug\n  }\n\n  var prebuild = resolve(dir)\n  if (prebuild) return prebuild\n\n  var nearby = resolve(path.dirname(process.execPath))\n  if (nearby) return nearby\n\n  var target = [\n    'platform=' + platform,\n    'arch=' + arch,\n    'runtime=' + runtime,\n    'abi=' + abi,\n    'uv=' + uv,\n    armv ? 'armv=' + armv : '',\n    'libc=' + libc,\n    'node=' + process.versions.node,\n    process.versions.electron ? 'electron=' + process.versions.electron : '',\n    typeof __webpack_require__ === 'function' ? 'webpack=true' : '' // eslint-disable-line\n  ].filter(Boolean).join(' ')\n\n  throw new Error('No native build was found for ' + target + '\\n    loaded from: ' + dir + '\\n')\n\n  function resolve (dir) {\n    // Find matching \"prebuilds/<platform>-<arch>\" directory\n    var tuples = readdirSync(path.join(dir, 'prebuilds')).map(parseTuple)\n    var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0]\n    if (!tuple) return\n\n    // Find most specific flavor first\n    var prebuilds = path.join(dir, 'prebuilds', tuple.name)\n    var parsed = readdirSync(prebuilds).map(parseTags)\n    var candidates = parsed.filter(matchTags(runtime, abi))\n    var winner = candidates.sort(compareTags(runtime))[0]\n    if (winner) return path.join(prebuilds, winner.file)\n  }\n}\n\nfunction readdirSync (dir) {\n  try {\n    return fs.readdirSync(dir)\n  } catch (err) {\n    return []\n  }\n}\n\nfunction getFirst (dir, filter) {\n  var files = readdirSync(dir).filter(filter)\n  return files[0] && path.join(dir, files[0])\n}\n\nfunction matchBuild (name) {\n  return /\\.node$/.test(name)\n}\n\nfunction parseTuple (name) {\n  // Example: darwin-x64+arm64\n  var arr = name.split('-')\n  if (arr.length !== 2) return\n\n  var platform = arr[0]\n  var architectures = arr[1].split('+')\n\n  if (!platform) return\n  if (!architectures.length) return\n  if (!architectures.every(Boolean)) return\n\n  return { name, platform, architectures }\n}\n\nfunction matchTuple (platform, arch) {\n  return function (tuple) {\n    if (tuple == null) return false\n    if (tuple.platform !== platform) return false\n    return tuple.architectures.includes(arch)\n  }\n}\n\nfunction compareTuples (a, b) {\n  // Prefer single-arch prebuilds over multi-arch\n  return a.architectures.length - b.architectures.length\n}\n\nfunction parseTags (file) {\n  var arr = file.split('.')\n  var extension = arr.pop()\n  var tags = { file: file, specificity: 0 }\n\n  if (extension !== 'node') return\n\n  for (var i = 0; i < arr.length; i++) {\n    var tag = arr[i]\n\n    if (tag === 'node' || tag === 'electron' || tag === 'node-webkit') {\n      tags.runtime = tag\n    } else if (tag === 'napi') {\n      tags.napi = true\n    } else if (tag.slice(0, 3) === 'abi') {\n      tags.abi = tag.slice(3)\n    } else if (tag.slice(0, 2) === 'uv') {\n      tags.uv = tag.slice(2)\n    } else if (tag.slice(0, 4) === 'armv') {\n      tags.armv = tag.slice(4)\n    } else if (tag === 'glibc' || tag === 'musl') {\n      tags.libc = tag\n    } else {\n      continue\n    }\n\n    tags.specificity++\n  }\n\n  return tags\n}\n\nfunction matchTags (runtime, abi) {\n  return function (tags) {\n    if (tags == null) return false\n    if (tags.runtime && tags.runtime !== runtime && !runtimeAgnostic(tags)) return false\n    if (tags.abi && tags.abi !== abi && !tags.napi) return false\n    if (tags.uv && tags.uv !== uv) return false\n    if (tags.armv && tags.armv !== armv) return false\n    if (tags.libc && tags.libc !== libc) return false\n\n    return true\n  }\n}\n\nfunction runtimeAgnostic (tags) {\n  return tags.runtime === 'node' && tags.napi\n}\n\nfunction compareTags (runtime) {\n  // Precedence: non-agnostic runtime, abi over napi, then by specificity.\n  return function (a, b) {\n    if (a.runtime !== b.runtime) {\n      return a.runtime === runtime ? -1 : 1\n    } else if (a.abi !== b.abi) {\n      return a.abi ? -1 : 1\n    } else if (a.specificity !== b.specificity) {\n      return a.specificity > b.specificity ? -1 : 1\n    } else {\n      return 0\n    }\n  }\n}\n\nfunction isNwjs () {\n  return !!(process.versions && process.versions.nw)\n}\n\nfunction isElectron () {\n  if (process.versions && process.versions.electron) return true\n  if (process.env.ELECTRON_RUN_AS_NODE) return true\n  return typeof window !== 'undefined' && window.process && window.process.type === 'renderer'\n}\n\nfunction isAlpine (platform) {\n  return platform === 'linux' && fs.existsSync('/etc/alpine-release')\n}\n\n// Exposed for unit tests\n// TODO: move to lib\nload.parseTags = parseTags\nload.matchTags = matchTags\nload.compareTags = compareTags\nload.parseTuple = parseTuple\nload.matchTuple = matchTuple\nload.compareTuples = compareTuples\n","const runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line\nif (typeof runtimeRequire.addon === 'function') { // if the platform supports native resolving prefer that\n  module.exports = runtimeRequire.addon.bind(runtimeRequire)\n} else { // else use the runtime version here\n  module.exports = require('./node-gyp-build.js')\n}\n","module.exports = require('node-gyp-build')(__dirname)\n","'use strict'\n\nconst { AbstractChainedBatch } = require('abstract-level')\nconst binding = require('./binding')\n\nconst kContext = Symbol('context')\n\nclass ChainedBatch extends AbstractChainedBatch {\n  constructor (db, context) {\n    super(db)\n    this[kContext] = binding.batch_init(context)\n  }\n\n  _put (key, value) {\n    binding.batch_put(this[kContext], key, value)\n  }\n\n  _del (key) {\n    binding.batch_del(this[kContext], key)\n  }\n\n  _clear () {\n    binding.batch_clear(this[kContext])\n  }\n\n  async _write (options) {\n    return binding.batch_write(this[kContext], options)\n  }\n\n  async _close () {\n    // TODO: close native batch (currently done on GC)\n  }\n}\n\nexports.ChainedBatch = ChainedBatch\n","'use strict'\n\nconst { AbstractIterator } = require('abstract-level')\nconst binding = require('./binding')\n\nconst kContext = Symbol('context')\nconst kCache = Symbol('cache')\nconst kFirst = Symbol('first')\nconst kPosition = Symbol('position')\nconst kState = Symbol('state')\nconst kSignal = Symbol('signal')\nconst kAbort = Symbol('abort')\nconst empty = []\n\n// Bit fields\nconst STATE_ENDED = 1\n\n// Does not implement _all() because the default implementation\n// of abstract-level falls back to nextv(1000) and using all()\n// on more entries than that probably isn't a realistic use case,\n// so it'll typically just make one nextv(1000) call and there's\n// no performance gain in overriding _all().\nclass Iterator extends AbstractIterator {\n  constructor (db, context, options, snapshotCtx) {\n    super(db, options)\n\n    this[kState] = new Uint8Array(1)\n    this[kContext] = binding.iterator_init(context, this[kState], options, snapshotCtx)\n    this[kFirst] = true\n    this[kCache] = empty\n    this[kPosition] = 0\n    this[kAbort] = this[kAbort].bind(this)\n\n    // TODO: consider exposing iterator.signal in abstract-level\n    if (options.signal != null) {\n      this[kSignal] = options.signal\n      this[kSignal].addEventListener('abort', this[kAbort], { once: true })\n    } else {\n      this[kSignal] = null\n    }\n  }\n\n  _seek (target, options) {\n    this[kFirst] = true\n    this[kCache] = empty\n    this[kState][0] &= ~STATE_ENDED // Unset\n    this[kPosition] = 0\n\n    binding.iterator_seek(this[kContext], target)\n  }\n\n  async _next () {\n    if (this[kPosition] < this[kCache].length) {\n      return this[kCache][this[kPosition]++]\n    }\n\n    // Avoid iterator_nextv() call if end was already reached\n    if ((this[kState][0] & STATE_ENDED) !== 0) {\n      return undefined\n    }\n\n    if (this[kFirst]) {\n      // It's common to only want one entry initially or after a seek()\n      this[kFirst] = false\n      this[kCache] = await binding.iterator_nextv(this[kContext], 1)\n      this[kPosition] = 0\n    } else {\n      // Limit the size of the cache to prevent starving the event loop\n      // while we're recursively nexting.\n      this[kCache] = await binding.iterator_nextv(this[kContext], 1000)\n      this[kPosition] = 0\n    }\n\n    if (this[kPosition] < this[kCache].length) {\n      return this[kCache][this[kPosition]++]\n    }\n  }\n\n  async _nextv (size, options) {\n    this[kFirst] = false\n\n    // If next() was called then empty the cache first\n    if (this[kPosition] < this[kCache].length) {\n      const length = Math.min(size, this[kCache].length - this[kPosition])\n      const chunk = this[kCache].slice(this[kPosition], this[kPosition] + length)\n\n      this[kPosition] += length\n      return chunk\n    }\n\n    // Avoid iterator_nextv() call if end was already reached\n    if ((this[kState][0] & STATE_ENDED) !== 0) {\n      return []\n    }\n\n    return binding.iterator_nextv(this[kContext], size)\n  }\n\n  async _close () {\n    this[kCache] = empty\n\n    if (this[kSignal] !== null) {\n      this[kSignal].removeEventListener('abort', this[kAbort])\n      this[kSignal] = null\n    }\n\n    // This is synchronous because that's faster than creating async work\n    binding.iterator_close(this[kContext])\n  }\n\n  [kAbort] () {\n    this[kSignal] = null\n    binding.iterator_abort(this[kContext])\n  }\n\n  // Undocumented, exposed for tests only\n  get cached () {\n    return this[kCache].length - this[kPosition]\n  }\n}\n\nexports.Iterator = Iterator\n","'use strict'\n\nconst { AbstractLevel, AbstractSnapshot } = require('abstract-level')\nconst ModuleError = require('module-error')\nconst fsp = require('fs/promises')\nconst binding = require('./binding')\nconst { ChainedBatch } = require('./chained-batch')\nconst { Iterator } = require('./iterator')\n\nconst kContext = Symbol('context')\nconst kLocation = Symbol('location')\n\nclass ClassicLevel extends AbstractLevel {\n  #sharedBuffer = null\n\n  constructor (location, options) {\n    if (typeof location !== 'string' || location === '') {\n      throw new TypeError(\"The first argument 'location' must be a non-empty string\")\n    }\n\n    super({\n      encodings: {\n        buffer: true,\n        utf8: true,\n        view: true\n      },\n      has: true,\n      createIfMissing: true,\n      errorIfExists: true,\n      explicitSnapshots: true,\n      getSync: true,\n      additionalMethods: {\n        approximateSize: true,\n        compactRange: true\n      },\n      signals: {\n        iterators: true\n      }\n    }, options)\n\n    this[kLocation] = location\n    this[kContext] = binding.db_init()\n  }\n\n  get location () {\n    return this[kLocation]\n  }\n\n  async _open (options) {\n    if (options.createIfMissing) {\n      await fsp.mkdir(this[kLocation], { recursive: true })\n    }\n\n    return binding.db_open(this[kContext], this[kLocation], options)\n  }\n\n  async _close () {\n    return binding.db_close(this[kContext])\n  }\n\n  async _put (key, value, options) {\n    return binding.db_put(this[kContext], key, value, options)\n  }\n\n  async _get (key, options) {\n    let flags = 0\n\n    if (options.fillCache !== false) flags |= FLAG_FILL_CACHE\n    if (options.valueEncoding !== 'utf8') flags |= FLAG_VALUE_AS_BUFFER\n\n    if (options.keyEncoding !== 'utf8') {\n      flags |= FLAG_KEY_AS_BUFFER\n\n      // If address of ArrayBuffer can move then copy it.\n      // TODO: the spec says \"Resizable ArrayBuffers are designed to be implementable with in-place\n      // growth\" (backed by virtual memory) so if V8 / Node.js implemented it that way, copying is\n      // not necessary. Check if the address changes after a (significant) resize.\n      if (key.buffer.resizable) {\n        key = new Uint8Array(key)\n      }\n    }\n\n    return binding.db_get(\n      this[kContext],\n      flags,\n      key,\n      options.snapshot?.[kContext]\n    )\n  }\n\n  _getSync (key, options) {\n    let flags = 0\n\n    if (options.fillCache !== false) flags |= FLAG_FILL_CACHE\n    if (options.valueEncoding !== 'utf8') flags |= FLAG_VALUE_AS_BUFFER\n\n    if (options.keyEncoding !== 'utf8') {\n      return binding.db_get_sync(\n        this[kContext],\n        flags,\n        key,\n        options.snapshot?.[kContext]\n      )\n    } else {\n      let keySize\n\n      // Write key to a reused buffer. This is slightly faster than\n      // napi_get_value_string_utf8 but is mainly here as a starting\n      // point for encodings that write into a buffer (WIP).\n      if (this.#sharedBuffer === null) {\n        keySize = this.#createSharedBuffer(key)\n      } else {\n        keySize = this.#sharedBuffer.write(key)\n\n        // Resize if needed\n        if (keySize === this.#sharedBuffer.byteLength) {\n          keySize = this.#createSharedBuffer(key)\n        }\n      }\n\n      return binding.db_get_sync(\n        this[kContext],\n        flags | FLAG_SHARED_KEY,\n        keySize,\n        options.snapshot?.[kContext]\n      )\n    }\n  }\n\n  #createSharedBuffer (str) {\n    // Add at least 1 byte to detect when size is exceeded (without needing\n    // to precompute size on every write) and more to avoid frequent resizing.\n    this.#sharedBuffer = Buffer.allocUnsafe(Buffer.byteLength(str) + 64)\n\n    // Save buffer on the database so that we can subsequently read from a\n    // raw pointer instead of going through Node-API again.\n    binding.db_set_shared_buffer(this[kContext], this.#sharedBuffer)\n\n    return this.#sharedBuffer.write(str)\n  }\n\n  async _getMany (keys, options) {\n    return binding.db_get_many(\n      this[kContext],\n      keys,\n      options,\n      options.snapshot?.[kContext]\n    )\n  }\n\n  async _has (key, options) {\n    return binding.db_has(\n      this[kContext],\n      key,\n      options.fillCache,\n      options.snapshot?.[kContext]\n    )\n  }\n\n  async _hasMany (keys, options) {\n    // Use a space-efficient bitset (with 32-bit words) to contain found keys\n    const wordCount = (keys.length + 32) >>> 5\n    const buffer = new ArrayBuffer(wordCount * 4)\n    const bitset = new Uint32Array(buffer)\n\n    await binding.db_has_many(\n      this[kContext],\n      keys,\n      options.fillCache,\n      options.snapshot?.[kContext],\n      buffer\n    )\n\n    const values = new Array(keys.length)\n\n    for (let i = 0; i < values.length; i++) {\n      // Check if bit is set\n      values[i] = (bitset[i >>> 5] & (1 << (i & 31))) !== 0\n    }\n\n    return values\n  }\n\n  async _del (key, options) {\n    return binding.db_del(this[kContext], key, options)\n  }\n\n  async _clear (options) {\n    return binding.db_clear(\n      this[kContext],\n      options,\n      options.snapshot?.[kContext]\n    )\n  }\n\n  _chainedBatch () {\n    return new ChainedBatch(this, this[kContext])\n  }\n\n  async _batch (operations, options) {\n    return binding.batch_do(this[kContext], operations, options)\n  }\n\n  async approximateSize (start, end, options) {\n    if (arguments.length < 2) {\n      throw new TypeError(\"The arguments 'start' and 'end' are required\")\n    } else if (typeof options !== 'object') {\n      options = null\n    }\n\n    if (this.status === 'opening') {\n      return this.deferAsync(() => this.approximateSize(start, end, options))\n    } else if (this.status !== 'open') {\n      throw new ModuleError('Database is not open: cannot call approximateSize()', {\n        code: 'LEVEL_DATABASE_NOT_OPEN'\n      })\n    } else {\n      const keyEncoding = this.keyEncoding(options && options.keyEncoding)\n      start = keyEncoding.encode(start)\n      end = keyEncoding.encode(end)\n      return binding.db_approximate_size(this[kContext], start, end)\n    }\n  }\n\n  async compactRange (start, end, options) {\n    if (arguments.length < 2) {\n      throw new TypeError(\"The arguments 'start' and 'end' are required\")\n    } else if (typeof options !== 'object') {\n      options = null\n    }\n\n    if (this.status === 'opening') {\n      return this.deferAsync(() => this.compactRange(start, end, options))\n    } else if (this.status !== 'open') {\n      throw new ModuleError('Database is not open: cannot call compactRange()', {\n        code: 'LEVEL_DATABASE_NOT_OPEN'\n      })\n    } else {\n      const keyEncoding = this.keyEncoding(options && options.keyEncoding)\n      start = keyEncoding.encode(start)\n      end = keyEncoding.encode(end)\n      return binding.db_compact_range(this[kContext], start, end)\n    }\n  }\n\n  getProperty (property) {\n    if (typeof property !== 'string') {\n      throw new TypeError(\"The first argument 'property' must be a string\")\n    }\n\n    // Is synchronous, so can't be deferred\n    if (this.status !== 'open') {\n      throw new ModuleError('Database is not open', {\n        code: 'LEVEL_DATABASE_NOT_OPEN'\n      })\n    }\n\n    return binding.db_get_property(this[kContext], property)\n  }\n\n  _iterator (options) {\n    return new Iterator(\n      this,\n      this[kContext],\n      options,\n      options.snapshot?.[kContext]\n    )\n  }\n\n  _snapshot (options) {\n    return new Snapshot(this[kContext], options)\n  }\n\n  static async destroy (location) {\n    if (typeof location !== 'string' || location === '') {\n      throw new TypeError(\"The first argument 'location' must be a non-empty string\")\n    }\n\n    return binding.destroy_db(location)\n  }\n\n  static async repair (location) {\n    if (typeof location !== 'string' || location === '') {\n      throw new TypeError(\"The first argument 'location' must be a non-empty string\")\n    }\n\n    return binding.repair_db(location)\n  }\n}\n\n// Defined here so that both ClassicLevel and Snapshot can access kContext\nclass Snapshot extends AbstractSnapshot {\n  constructor (context, options) {\n    super(options)\n    this[kContext] = binding.snapshot_init(context)\n  }\n\n  async _close () {\n    // This is synchronous because that's faster than creating async work\n    binding.snapshot_close(this[kContext])\n  }\n}\n\nexports.ClassicLevel = ClassicLevel\n\n// Singular values are cheaper to transfer from JS to C++, so we\n// combine options into flags.\nconst FLAG_FILL_CACHE = 1\nconst FLAG_KEY_AS_BUFFER = 2\nconst FLAG_VALUE_AS_BUFFER = 4\nconst FLAG_SHARED_KEY = 8\n","exports.Level = require('classic-level').ClassicLevel\n","\"use strict\"\n\nmodule.exports = createRBTree\n\nvar RED   = 0\nvar BLACK = 1\n\nfunction RBNode(color, key, value, left, right, count) {\n  this._color = color\n  this.key = key\n  this.value = value\n  this.left = left\n  this.right = right\n  this._count = count\n}\n\nfunction cloneNode(node) {\n  return new RBNode(node._color, node.key, node.value, node.left, node.right, node._count)\n}\n\nfunction repaint(color, node) {\n  return new RBNode(color, node.key, node.value, node.left, node.right, node._count)\n}\n\nfunction recount(node) {\n  node._count = 1 + (node.left ? node.left._count : 0) + (node.right ? node.right._count : 0)\n}\n\nfunction RedBlackTree(compare, root) {\n  this._compare = compare\n  this.root = root\n}\n\nvar proto = RedBlackTree.prototype\n\nObject.defineProperty(proto, \"keys\", {\n  get: function() {\n    var result = []\n    this.forEach(function(k,v) {\n      result.push(k)\n    })\n    return result\n  }\n})\n\nObject.defineProperty(proto, \"values\", {\n  get: function() {\n    var result = []\n    this.forEach(function(k,v) {\n      result.push(v)\n    })\n    return result\n  }\n})\n\n//Returns the number of nodes in the tree\nObject.defineProperty(proto, \"length\", {\n  get: function() {\n    if(this.root) {\n      return this.root._count\n    }\n    return 0\n  }\n})\n\n//Insert a new item into the tree\nproto.insert = function(key, value) {\n  var cmp = this._compare\n  //Find point to insert new node at\n  var n = this.root\n  var n_stack = []\n  var d_stack = []\n  while(n) {\n    var d = cmp(key, n.key)\n    n_stack.push(n)\n    d_stack.push(d)\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  //Rebuild path to leaf node\n  n_stack.push(new RBNode(RED, key, value, null, null, 1))\n  for(var s=n_stack.length-2; s>=0; --s) {\n    var n = n_stack[s]\n    if(d_stack[s] <= 0) {\n      n_stack[s] = new RBNode(n._color, n.key, n.value, n_stack[s+1], n.right, n._count+1)\n    } else {\n      n_stack[s] = new RBNode(n._color, n.key, n.value, n.left, n_stack[s+1], n._count+1)\n    }\n  }\n  //Rebalance tree using rotations\n  //console.log(\"start insert\", key, d_stack)\n  for(var s=n_stack.length-1; s>1; --s) {\n    var p = n_stack[s-1]\n    var n = n_stack[s]\n    if(p._color === BLACK || n._color === BLACK) {\n      break\n    }\n    var pp = n_stack[s-2]\n    if(pp.left === p) {\n      if(p.left === n) {\n        var y = pp.right\n        if(y && y._color === RED) {\n          //console.log(\"LLr\")\n          p._color = BLACK\n          pp.right = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"LLb\")\n          pp._color = RED\n          pp.left = p.right\n          p._color = BLACK\n          p.right = pp\n          n_stack[s-2] = p\n          n_stack[s-1] = n\n          recount(pp)\n          recount(p)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.left === pp) {\n              ppp.left = p\n            } else {\n              ppp.right = p\n            }\n          }\n          break\n        }\n      } else {\n        var y = pp.right\n        if(y && y._color === RED) {\n          //console.log(\"LRr\")\n          p._color = BLACK\n          pp.right = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"LRb\")\n          p.right = n.left\n          pp._color = RED\n          pp.left = n.right\n          n._color = BLACK\n          n.left = p\n          n.right = pp\n          n_stack[s-2] = n\n          n_stack[s-1] = p\n          recount(pp)\n          recount(p)\n          recount(n)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.left === pp) {\n              ppp.left = n\n            } else {\n              ppp.right = n\n            }\n          }\n          break\n        }\n      }\n    } else {\n      if(p.right === n) {\n        var y = pp.left\n        if(y && y._color === RED) {\n          //console.log(\"RRr\", y.key)\n          p._color = BLACK\n          pp.left = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"RRb\")\n          pp._color = RED\n          pp.right = p.left\n          p._color = BLACK\n          p.left = pp\n          n_stack[s-2] = p\n          n_stack[s-1] = n\n          recount(pp)\n          recount(p)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.right === pp) {\n              ppp.right = p\n            } else {\n              ppp.left = p\n            }\n          }\n          break\n        }\n      } else {\n        var y = pp.left\n        if(y && y._color === RED) {\n          //console.log(\"RLr\")\n          p._color = BLACK\n          pp.left = repaint(BLACK, y)\n          pp._color = RED\n          s -= 1\n        } else {\n          //console.log(\"RLb\")\n          p.left = n.right\n          pp._color = RED\n          pp.right = n.left\n          n._color = BLACK\n          n.right = p\n          n.left = pp\n          n_stack[s-2] = n\n          n_stack[s-1] = p\n          recount(pp)\n          recount(p)\n          recount(n)\n          if(s >= 3) {\n            var ppp = n_stack[s-3]\n            if(ppp.right === pp) {\n              ppp.right = n\n            } else {\n              ppp.left = n\n            }\n          }\n          break\n        }\n      }\n    }\n  }\n  //Return new tree\n  n_stack[0]._color = BLACK\n  return new RedBlackTree(cmp, n_stack[0])\n}\n\n\n//Visit all nodes inorder\nfunction doVisitFull(visit, node) {\n  if(node.left) {\n    var v = doVisitFull(visit, node.left)\n    if(v) { return v }\n  }\n  var v = visit(node.key, node.value)\n  if(v) { return v }\n  if(node.right) {\n    return doVisitFull(visit, node.right)\n  }\n}\n\n//Visit half nodes in order\nfunction doVisitHalf(lo, compare, visit, node) {\n  var l = compare(lo, node.key)\n  if(l <= 0) {\n    if(node.left) {\n      var v = doVisitHalf(lo, compare, visit, node.left)\n      if(v) { return v }\n    }\n    var v = visit(node.key, node.value)\n    if(v) { return v }\n  }\n  if(node.right) {\n    return doVisitHalf(lo, compare, visit, node.right)\n  }\n}\n\n//Visit all nodes within a range\nfunction doVisit(lo, hi, compare, visit, node) {\n  var l = compare(lo, node.key)\n  var h = compare(hi, node.key)\n  var v\n  if(l <= 0) {\n    if(node.left) {\n      v = doVisit(lo, hi, compare, visit, node.left)\n      if(v) { return v }\n    }\n    if(h > 0) {\n      v = visit(node.key, node.value)\n      if(v) { return v }\n    }\n  }\n  if(h > 0 && node.right) {\n    return doVisit(lo, hi, compare, visit, node.right)\n  }\n}\n\n\nproto.forEach = function rbTreeForEach(visit, lo, hi) {\n  if(!this.root) {\n    return\n  }\n  switch(arguments.length) {\n    case 1:\n      return doVisitFull(visit, this.root)\n    break\n\n    case 2:\n      return doVisitHalf(lo, this._compare, visit, this.root)\n    break\n\n    case 3:\n      if(this._compare(lo, hi) >= 0) {\n        return\n      }\n      return doVisit(lo, hi, this._compare, visit, this.root)\n    break\n  }\n}\n\n//First item in list\nObject.defineProperty(proto, \"begin\", {\n  get: function() {\n    var stack = []\n    var n = this.root\n    while(n) {\n      stack.push(n)\n      n = n.left\n    }\n    return new RedBlackTreeIterator(this, stack)\n  }\n})\n\n//Last item in list\nObject.defineProperty(proto, \"end\", {\n  get: function() {\n    var stack = []\n    var n = this.root\n    while(n) {\n      stack.push(n)\n      n = n.right\n    }\n    return new RedBlackTreeIterator(this, stack)\n  }\n})\n\n//Find the ith item in the tree\nproto.at = function(idx) {\n  if(idx < 0) {\n    return new RedBlackTreeIterator(this, [])\n  }\n  var n = this.root\n  var stack = []\n  while(true) {\n    stack.push(n)\n    if(n.left) {\n      if(idx < n.left._count) {\n        n = n.left\n        continue\n      }\n      idx -= n.left._count\n    }\n    if(!idx) {\n      return new RedBlackTreeIterator(this, stack)\n    }\n    idx -= 1\n    if(n.right) {\n      if(idx >= n.right._count) {\n        break\n      }\n      n = n.right\n    } else {\n      break\n    }\n  }\n  return new RedBlackTreeIterator(this, [])\n}\n\nproto.ge = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d <= 0) {\n      last_ptr = stack.length\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\nproto.gt = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d < 0) {\n      last_ptr = stack.length\n    }\n    if(d < 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\nproto.lt = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d > 0) {\n      last_ptr = stack.length\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\nproto.le = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  var last_ptr = 0\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d >= 0) {\n      last_ptr = stack.length\n    }\n    if(d < 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  stack.length = last_ptr\n  return new RedBlackTreeIterator(this, stack)\n}\n\n//Finds the item with key if it exists\nproto.find = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  var stack = []\n  while(n) {\n    var d = cmp(key, n.key)\n    stack.push(n)\n    if(d === 0) {\n      return new RedBlackTreeIterator(this, stack)\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  return new RedBlackTreeIterator(this, [])\n}\n\n//Removes item with key from tree\nproto.remove = function(key) {\n  var iter = this.find(key)\n  if(iter) {\n    return iter.remove()\n  }\n  return this\n}\n\n//Returns the item at `key`\nproto.get = function(key) {\n  var cmp = this._compare\n  var n = this.root\n  while(n) {\n    var d = cmp(key, n.key)\n    if(d === 0) {\n      return n.value\n    }\n    if(d <= 0) {\n      n = n.left\n    } else {\n      n = n.right\n    }\n  }\n  return\n}\n\n//Iterator for red black tree\nfunction RedBlackTreeIterator(tree, stack) {\n  this.tree = tree\n  this._stack = stack\n}\n\nvar iproto = RedBlackTreeIterator.prototype\n\n//Test if iterator is valid\nObject.defineProperty(iproto, \"valid\", {\n  get: function() {\n    return this._stack.length > 0\n  }\n})\n\n//Node of the iterator\nObject.defineProperty(iproto, \"node\", {\n  get: function() {\n    if(this._stack.length > 0) {\n      return this._stack[this._stack.length-1]\n    }\n    return null\n  },\n  enumerable: true\n})\n\n//Makes a copy of an iterator\niproto.clone = function() {\n  return new RedBlackTreeIterator(this.tree, this._stack.slice())\n}\n\n//Swaps two nodes\nfunction swapNode(n, v) {\n  n.key = v.key\n  n.value = v.value\n  n.left = v.left\n  n.right = v.right\n  n._color = v._color\n  n._count = v._count\n}\n\n//Fix up a double black node in a tree\nfunction fixDoubleBlack(stack) {\n  var n, p, s, z\n  for(var i=stack.length-1; i>=0; --i) {\n    n = stack[i]\n    if(i === 0) {\n      n._color = BLACK\n      return\n    }\n    //console.log(\"visit node:\", n.key, i, stack[i].key, stack[i-1].key)\n    p = stack[i-1]\n    if(p.left === n) {\n      //console.log(\"left child\")\n      s = p.right\n      if(s.right && s.right._color === RED) {\n        //console.log(\"case 1: right sibling child red\")\n        s = p.right = cloneNode(s)\n        z = s.right = cloneNode(s.right)\n        p.right = s.left\n        s.left = p\n        s.right = z\n        s._color = p._color\n        n._color = BLACK\n        p._color = BLACK\n        z._color = BLACK\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.left === p) {\n            pp.left = s\n          } else {\n            pp.right = s\n          }\n        }\n        stack[i-1] = s\n        return\n      } else if(s.left && s.left._color === RED) {\n        //console.log(\"case 1: left sibling child red\")\n        s = p.right = cloneNode(s)\n        z = s.left = cloneNode(s.left)\n        p.right = z.left\n        s.left = z.right\n        z.left = p\n        z.right = s\n        z._color = p._color\n        p._color = BLACK\n        s._color = BLACK\n        n._color = BLACK\n        recount(p)\n        recount(s)\n        recount(z)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.left === p) {\n            pp.left = z\n          } else {\n            pp.right = z\n          }\n        }\n        stack[i-1] = z\n        return\n      }\n      if(s._color === BLACK) {\n        if(p._color === RED) {\n          //console.log(\"case 2: black sibling, red parent\", p.right.value)\n          p._color = BLACK\n          p.right = repaint(RED, s)\n          return\n        } else {\n          //console.log(\"case 2: black sibling, black parent\", p.right.value)\n          p.right = repaint(RED, s)\n          continue  \n        }\n      } else {\n        //console.log(\"case 3: red sibling\")\n        s = cloneNode(s)\n        p.right = s.left\n        s.left = p\n        s._color = p._color\n        p._color = RED\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.left === p) {\n            pp.left = s\n          } else {\n            pp.right = s\n          }\n        }\n        stack[i-1] = s\n        stack[i] = p\n        if(i+1 < stack.length) {\n          stack[i+1] = n\n        } else {\n          stack.push(n)\n        }\n        i = i+2\n      }\n    } else {\n      //console.log(\"right child\")\n      s = p.left\n      if(s.left && s.left._color === RED) {\n        //console.log(\"case 1: left sibling child red\", p.value, p._color)\n        s = p.left = cloneNode(s)\n        z = s.left = cloneNode(s.left)\n        p.left = s.right\n        s.right = p\n        s.left = z\n        s._color = p._color\n        n._color = BLACK\n        p._color = BLACK\n        z._color = BLACK\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.right === p) {\n            pp.right = s\n          } else {\n            pp.left = s\n          }\n        }\n        stack[i-1] = s\n        return\n      } else if(s.right && s.right._color === RED) {\n        //console.log(\"case 1: right sibling child red\")\n        s = p.left = cloneNode(s)\n        z = s.right = cloneNode(s.right)\n        p.left = z.right\n        s.right = z.left\n        z.right = p\n        z.left = s\n        z._color = p._color\n        p._color = BLACK\n        s._color = BLACK\n        n._color = BLACK\n        recount(p)\n        recount(s)\n        recount(z)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.right === p) {\n            pp.right = z\n          } else {\n            pp.left = z\n          }\n        }\n        stack[i-1] = z\n        return\n      }\n      if(s._color === BLACK) {\n        if(p._color === RED) {\n          //console.log(\"case 2: black sibling, red parent\")\n          p._color = BLACK\n          p.left = repaint(RED, s)\n          return\n        } else {\n          //console.log(\"case 2: black sibling, black parent\")\n          p.left = repaint(RED, s)\n          continue  \n        }\n      } else {\n        //console.log(\"case 3: red sibling\")\n        s = cloneNode(s)\n        p.left = s.right\n        s.right = p\n        s._color = p._color\n        p._color = RED\n        recount(p)\n        recount(s)\n        if(i > 1) {\n          var pp = stack[i-2]\n          if(pp.right === p) {\n            pp.right = s\n          } else {\n            pp.left = s\n          }\n        }\n        stack[i-1] = s\n        stack[i] = p\n        if(i+1 < stack.length) {\n          stack[i+1] = n\n        } else {\n          stack.push(n)\n        }\n        i = i+2\n      }\n    }\n  }\n}\n\n//Removes item at iterator from tree\niproto.remove = function() {\n  var stack = this._stack\n  if(stack.length === 0) {\n    return this.tree\n  }\n  //First copy path to node\n  var cstack = new Array(stack.length)\n  var n = stack[stack.length-1]\n  cstack[cstack.length-1] = new RBNode(n._color, n.key, n.value, n.left, n.right, n._count)\n  for(var i=stack.length-2; i>=0; --i) {\n    var n = stack[i]\n    if(n.left === stack[i+1]) {\n      cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)\n    } else {\n      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)\n    }\n  }\n\n  //Get node\n  n = cstack[cstack.length-1]\n  //console.log(\"start remove: \", n.value)\n\n  //If not leaf, then swap with previous node\n  if(n.left && n.right) {\n    //console.log(\"moving to leaf\")\n\n    //First walk to previous leaf\n    var split = cstack.length\n    n = n.left\n    while(n.right) {\n      cstack.push(n)\n      n = n.right\n    }\n    //Copy path to leaf\n    var v = cstack[split-1]\n    cstack.push(new RBNode(n._color, v.key, v.value, n.left, n.right, n._count))\n    cstack[split-1].key = n.key\n    cstack[split-1].value = n.value\n\n    //Fix up stack\n    for(var i=cstack.length-2; i>=split; --i) {\n      n = cstack[i]\n      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)\n    }\n    cstack[split-1].left = cstack[split]\n  }\n  //console.log(\"stack=\", cstack.map(function(v) { return v.value }))\n\n  //Remove leaf node\n  n = cstack[cstack.length-1]\n  if(n._color === RED) {\n    //Easy case: removing red leaf\n    //console.log(\"RED leaf\")\n    var p = cstack[cstack.length-2]\n    if(p.left === n) {\n      p.left = null\n    } else if(p.right === n) {\n      p.right = null\n    }\n    cstack.pop()\n    for(var i=0; i<cstack.length; ++i) {\n      cstack[i]._count--\n    }\n    return new RedBlackTree(this.tree._compare, cstack[0])\n  } else {\n    if(n.left || n.right) {\n      //Second easy case:  Single child black parent\n      //console.log(\"BLACK single child\")\n      if(n.left) {\n        swapNode(n, n.left)\n      } else if(n.right) {\n        swapNode(n, n.right)\n      }\n      //Child must be red, so repaint it black to balance color\n      n._color = BLACK\n      for(var i=0; i<cstack.length-1; ++i) {\n        cstack[i]._count--\n      }\n      return new RedBlackTree(this.tree._compare, cstack[0])\n    } else if(cstack.length === 1) {\n      //Third easy case: root\n      //console.log(\"ROOT\")\n      return new RedBlackTree(this.tree._compare, null)\n    } else {\n      //Hard case: Repaint n, and then do some nasty stuff\n      //console.log(\"BLACK leaf no children\")\n      for(var i=0; i<cstack.length; ++i) {\n        cstack[i]._count--\n      }\n      var parent = cstack[cstack.length-2]\n      fixDoubleBlack(cstack)\n      //Fix up links\n      if(parent.left === n) {\n        parent.left = null\n      } else {\n        parent.right = null\n      }\n    }\n  }\n  return new RedBlackTree(this.tree._compare, cstack[0])\n}\n\n//Returns key\nObject.defineProperty(iproto, \"key\", {\n  get: function() {\n    if(this._stack.length > 0) {\n      return this._stack[this._stack.length-1].key\n    }\n    return\n  },\n  enumerable: true\n})\n\n//Returns value\nObject.defineProperty(iproto, \"value\", {\n  get: function() {\n    if(this._stack.length > 0) {\n      return this._stack[this._stack.length-1].value\n    }\n    return\n  },\n  enumerable: true\n})\n\n\n//Returns the position of this iterator in the sorted list\nObject.defineProperty(iproto, \"index\", {\n  get: function() {\n    var idx = 0\n    var stack = this._stack\n    if(stack.length === 0) {\n      var r = this.tree.root\n      if(r) {\n        return r._count\n      }\n      return 0\n    } else if(stack[stack.length-1].left) {\n      idx = stack[stack.length-1].left._count\n    }\n    for(var s=stack.length-2; s>=0; --s) {\n      if(stack[s+1] === stack[s].right) {\n        ++idx\n        if(stack[s].left) {\n          idx += stack[s].left._count\n        }\n      }\n    }\n    return idx\n  },\n  enumerable: true\n})\n\n//Advances iterator to next element in list\niproto.next = function() {\n  var stack = this._stack\n  if(stack.length === 0) {\n    return\n  }\n  var n = stack[stack.length-1]\n  if(n.right) {\n    n = n.right\n    while(n) {\n      stack.push(n)\n      n = n.left\n    }\n  } else {\n    stack.pop()\n    while(stack.length > 0 && stack[stack.length-1].right === n) {\n      n = stack[stack.length-1]\n      stack.pop()\n    }\n  }\n}\n\n//Checks if iterator is at end of tree\nObject.defineProperty(iproto, \"hasNext\", {\n  get: function() {\n    var stack = this._stack\n    if(stack.length === 0) {\n      return false\n    }\n    if(stack[stack.length-1].right) {\n      return true\n    }\n    for(var s=stack.length-1; s>0; --s) {\n      if(stack[s-1].left === stack[s]) {\n        return true\n      }\n    }\n    return false\n  }\n})\n\n//Update value\niproto.update = function(value) {\n  var stack = this._stack\n  if(stack.length === 0) {\n    throw new Error(\"Can't update empty node!\")\n  }\n  var cstack = new Array(stack.length)\n  var n = stack[stack.length-1]\n  cstack[cstack.length-1] = new RBNode(n._color, n.key, value, n.left, n.right, n._count)\n  for(var i=stack.length-2; i>=0; --i) {\n    n = stack[i]\n    if(n.left === stack[i+1]) {\n      cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)\n    } else {\n      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)\n    }\n  }\n  return new RedBlackTree(this.tree._compare, cstack[0])\n}\n\n//Moves iterator backward one element\niproto.prev = function() {\n  var stack = this._stack\n  if(stack.length === 0) {\n    return\n  }\n  var n = stack[stack.length-1]\n  if(n.left) {\n    n = n.left\n    while(n) {\n      stack.push(n)\n      n = n.right\n    }\n  } else {\n    stack.pop()\n    while(stack.length > 0 && stack[stack.length-1].left === n) {\n      n = stack[stack.length-1]\n      stack.pop()\n    }\n  }\n}\n\n//Checks if iterator is at start of tree\nObject.defineProperty(iproto, \"hasPrev\", {\n  get: function() {\n    var stack = this._stack\n    if(stack.length === 0) {\n      return false\n    }\n    if(stack[stack.length-1].left) {\n      return true\n    }\n    for(var s=stack.length-1; s>0; --s) {\n      if(stack[s-1].right === stack[s]) {\n        return true\n      }\n    }\n    return false\n  }\n})\n\n//Default comparison function\nfunction defaultCompare(a, b) {\n  if(a < b) {\n    return -1\n  }\n  if(a > b) {\n    return 1\n  }\n  return 0\n}\n\n//Build a tree\nfunction createRBTree(compare) {\n  return new RedBlackTree(compare || defaultCompare, null)\n}","'use strict'\n\nmodule.exports = function compare (a, b) {\n  // Only relevant when storeEncoding is 'utf8',\n  // which guarantees that b is also a string.\n  if (typeof a === 'string') {\n    return a < b ? -1 : a > b ? 1 : 0\n  }\n\n  const length = Math.min(a.byteLength, b.byteLength)\n\n  for (let i = 0; i < length; i++) {\n    const cmp = a[i] - b[i]\n    if (cmp !== 0) return cmp\n  }\n\n  return a.byteLength - b.byteLength\n}\n","'use strict'\n\n// Use setImmediate() in Node.js to allow IO in between work\n/* istanbul ignore else: coverage currently does not include browsers  */\nif (typeof process !== 'undefined' && !process.browser && typeof global !== 'undefined' && typeof global.setImmediate === 'function') {\n  const setImmediate = global.setImmediate\n\n  module.exports = function breathe () {\n    return new Promise(setImmediate)\n  }\n} else {\n  module.exports = async function breathe () { }\n}\n","'use strict'\n\nconst {\n  AbstractIterator,\n  AbstractKeyIterator,\n  AbstractValueIterator\n} = require('abstract-level')\n\nconst compare = require('./compare')\nconst breathe = require('./breathe')\n\nconst kNone = Symbol('none')\nconst kIterator = Symbol('iterator')\nconst kLowerBound = Symbol('lowerBound')\nconst kUpperBound = Symbol('upperBound')\nconst kOutOfRange = Symbol('outOfRange')\nconst kReverse = Symbol('reverse')\nconst kOptions = Symbol('options')\nconst kTest = Symbol('test')\nconst kAdvance = Symbol('advance')\nconst kInit = Symbol('init')\n\nfunction gt (value) {\n  return compare(value, this[kUpperBound]) > 0\n}\n\nfunction gte (value) {\n  return compare(value, this[kUpperBound]) >= 0\n}\n\nfunction lt (value) {\n  return compare(value, this[kUpperBound]) < 0\n}\n\nfunction lte (value) {\n  return compare(value, this[kUpperBound]) <= 0\n}\n\nclass MemoryEntryIterator extends AbstractIterator {\n  constructor (db, tree, options) {\n    super(db, options)\n    this[kInit](tree, options)\n  }\n\n  async _next () {\n    if (!this[kIterator].valid) return undefined\n\n    const key = this[kIterator].key\n    const value = this[kIterator].value\n\n    if (!this[kTest](key)) return undefined\n\n    this[kIterator][this[kAdvance]]()\n    return [key, value]\n  }\n\n  async _nextv (size, options) {\n    const it = this[kIterator]\n    const entries = []\n\n    while (it.valid && entries.length < size && this[kTest](it.key)) {\n      entries.push([it.key, it.value])\n      it[this[kAdvance]]()\n    }\n\n    return entries\n  }\n\n  async _all (options) {\n    const size = this.limit - this.count\n    const it = this[kIterator]\n    const entries = []\n\n    while (it.valid && entries.length < size && this[kTest](it.key)) {\n      entries.push([it.key, it.value])\n      it[this[kAdvance]]()\n    }\n\n    return entries\n  }\n}\n\nclass MemoryKeyIterator extends AbstractKeyIterator {\n  constructor (db, tree, options) {\n    super(db, options)\n    this[kInit](tree, options)\n  }\n\n  async _next () {\n    if (!this[kIterator].valid) return undefined\n\n    const key = this[kIterator].key\n    if (!this[kTest](key)) return undefined\n\n    this[kIterator][this[kAdvance]]()\n    return key\n  }\n\n  async _nextv (size, options) {\n    const it = this[kIterator]\n    const keys = []\n\n    while (it.valid && keys.length < size && this[kTest](it.key)) {\n      keys.push(it.key)\n      it[this[kAdvance]]()\n    }\n\n    return keys\n  }\n\n  async _all (options) {\n    const size = this.limit - this.count\n    const it = this[kIterator]\n    const keys = []\n\n    while (it.valid && keys.length < size && this[kTest](it.key)) {\n      keys.push(it.key)\n      it[this[kAdvance]]()\n    }\n\n    return keys\n  }\n}\n\nclass MemoryValueIterator extends AbstractValueIterator {\n  constructor (db, tree, options) {\n    super(db, options)\n    this[kInit](tree, options)\n  }\n\n  async _next (options) {\n    if (!this[kIterator].valid) return undefined\n\n    const key = this[kIterator].key\n    const value = this[kIterator].value\n\n    if (!this[kTest](key)) return undefined\n\n    this[kIterator][this[kAdvance]]()\n    return value\n  }\n\n  async _nextv (size, options) {\n    const it = this[kIterator]\n    const values = []\n\n    while (it.valid && values.length < size && this[kTest](it.key)) {\n      values.push(it.value)\n      it[this[kAdvance]]()\n    }\n\n    return values\n  }\n\n  async _all (options) {\n    const size = this.limit - this.count\n    const it = this[kIterator]\n    const values = []\n\n    while (it.valid && values.length < size && this[kTest](it.key)) {\n      values.push(it.value)\n      it[this[kAdvance]]()\n    }\n\n    return values\n  }\n}\n\nclass MemoryClearIterator extends AbstractKeyIterator {\n  constructor (db, tree, options) {\n    super(db, options)\n    this[kInit](tree, options)\n  }\n\n  // This is not an abstract-level API\n  async visit (visitor) {\n    const limit = this.limit\n    const it = this[kIterator]\n\n    let count = 0\n\n    while (true) {\n      for (let i = 0; i < 500; i++) {\n        if (++count > limit) return\n        if (!it.valid || !this[kTest](it.key)) return\n\n        visitor(it.key)\n        it[this[kAdvance]]()\n      }\n\n      // Some time to breathe\n      await breathe()\n    }\n  }\n}\n\nfor (const Ctor of [MemoryEntryIterator, MemoryKeyIterator, MemoryValueIterator, MemoryClearIterator]) {\n  Ctor.prototype[kInit] = function (tree, options) {\n    this[kReverse] = options.reverse\n    this[kOptions] = options\n\n    if (!this[kReverse]) {\n      this[kAdvance] = 'next'\n      this[kLowerBound] = 'gte' in options ? options.gte : 'gt' in options ? options.gt : kNone\n      this[kUpperBound] = 'lte' in options ? options.lte : 'lt' in options ? options.lt : kNone\n\n      if (this[kLowerBound] === kNone) {\n        this[kIterator] = tree.begin\n      } else if ('gte' in options) {\n        this[kIterator] = tree.ge(this[kLowerBound])\n      } else {\n        this[kIterator] = tree.gt(this[kLowerBound])\n      }\n\n      if (this[kUpperBound] !== kNone) {\n        this[kTest] = 'lte' in options ? lte : lt\n      }\n    } else {\n      this[kAdvance] = 'prev'\n      this[kLowerBound] = 'lte' in options ? options.lte : 'lt' in options ? options.lt : kNone\n      this[kUpperBound] = 'gte' in options ? options.gte : 'gt' in options ? options.gt : kNone\n\n      if (this[kLowerBound] === kNone) {\n        this[kIterator] = tree.end\n      } else if ('lte' in options) {\n        this[kIterator] = tree.le(this[kLowerBound])\n      } else {\n        this[kIterator] = tree.lt(this[kLowerBound])\n      }\n\n      if (this[kUpperBound] !== kNone) {\n        this[kTest] = 'gte' in options ? gte : gt\n      }\n    }\n  }\n\n  Ctor.prototype[kTest] = function () {\n    return true\n  }\n\n  Ctor.prototype[kOutOfRange] = function (target) {\n    if (!this[kTest](target)) {\n      return true\n    } else if (this[kLowerBound] === kNone) {\n      return false\n    } else if (!this[kReverse]) {\n      if ('gte' in this[kOptions]) {\n        return compare(target, this[kLowerBound]) < 0\n      } else {\n        return compare(target, this[kLowerBound]) <= 0\n      }\n    } else {\n      if ('lte' in this[kOptions]) {\n        return compare(target, this[kLowerBound]) > 0\n      } else {\n        return compare(target, this[kLowerBound]) >= 0\n      }\n    }\n  }\n\n  Ctor.prototype._seek = function (target, options) {\n    if (this[kOutOfRange](target)) {\n      this[kIterator] = this[kIterator].tree.end\n      this[kIterator].next()\n    } else if (this[kReverse]) {\n      this[kIterator] = this[kIterator].tree.le(target)\n    } else {\n      this[kIterator] = this[kIterator].tree.ge(target)\n    }\n  }\n}\n\nexports.MemoryEntryIterator = MemoryEntryIterator\nexports.MemoryKeyIterator = MemoryKeyIterator\nexports.MemoryValueIterator = MemoryValueIterator\nexports.MemoryClearIterator = MemoryClearIterator\n","'use strict'\n\nconst rangeOptions = new Set(['gt', 'gte', 'lt', 'lte'])\n\nmodule.exports = function isRangeOption (k) {\n  return rangeOptions.has(k)\n}\n","'use strict'\n\nconst { AbstractLevel, AbstractSnapshot } = require('abstract-level')\nconst ModuleError = require('module-error')\nconst createRBT = require('functional-red-black-tree')\nconst { MemoryEntryIterator } = require('./lib/iterator')\nconst { MemoryKeyIterator, MemoryValueIterator } = require('./lib/iterator')\nconst { MemoryClearIterator } = require('./lib/iterator')\nconst compare = require('./lib/compare')\nconst isRangeOption = require('./lib/is-range-option')\n\nconst kTree = Symbol('tree')\n\nclass MemoryLevel extends AbstractLevel {\n  #tree\n\n  constructor (location, options) {\n    // Take a dummy location argument to align with other implementations\n    if (typeof location === 'object' && location !== null) {\n      options = location\n    }\n\n    let { storeEncoding, ...forward } = options || {}\n    storeEncoding = storeEncoding || 'buffer'\n\n    // Our compare() function supports Buffer, Uint8Array and strings\n    if (!['buffer', 'view', 'utf8'].includes(storeEncoding)) {\n      throw new ModuleError(\"The storeEncoding option must be 'buffer', 'view' or 'utf8'\", {\n        code: 'LEVEL_ENCODING_NOT_SUPPORTED'\n      })\n    }\n\n    super({\n      seek: true,\n      explicitSnapshots: true,\n      permanence: false,\n      createIfMissing: false,\n      errorIfExists: false,\n      has: true,\n      getSync: true,\n      encodings: { [storeEncoding]: true },\n      signals: {\n        // Would have no value here because the operations are synchronous\n        iterators: false\n      }\n    }, forward)\n\n    this.#tree = createRBT(compare)\n  }\n\n  async _put (key, value, options) {\n    const it = this.#tree.find(key)\n\n    if (it.valid) {\n      this.#tree = it.update(value)\n    } else {\n      this.#tree = this.#tree.insert(key, value)\n    }\n  }\n\n  async _get (key, options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return tree.get(key)\n  }\n\n  _getSync (key, options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return tree.get(key)\n  }\n\n  async _getMany (keys, options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return keys.map(get, tree)\n  }\n\n  async _has (key, options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return tree.get(key) !== undefined\n  }\n\n  async _hasMany (keys, options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return keys.map(has, tree)\n  }\n\n  async _del (key, options) {\n    this.#tree = this.#tree.remove(key)\n  }\n\n  async _batch (operations, options) {\n    let tree = this.#tree\n\n    for (const op of operations) {\n      const key = op.key\n      const it = tree.find(key)\n\n      if (op.type === 'put') {\n        tree = it.valid ? it.update(op.value) : tree.insert(key, op.value)\n      } else {\n        tree = it.remove()\n      }\n    }\n\n    this.#tree = tree\n  }\n\n  async _clear (options) {\n    if (options.limit === -1 && !Object.keys(options).some(isRangeOption) && options.snapshot == null) {\n      // Delete everything by creating a new empty tree.\n      this.#tree = createRBT(compare)\n      return\n    }\n\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    const iterator = new MemoryClearIterator(this, tree, options)\n\n    try {\n      await iterator.visit(this.#clearKey)\n    } finally {\n      await iterator.close()\n    }\n  }\n\n  #clearKey = (key) => {\n    // Must also include changes made in parallel to clear()\n    this.#tree = this.#tree.remove(key)\n  }\n\n  _iterator (options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return new MemoryEntryIterator(this, tree, options)\n  }\n\n  _keys (options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return new MemoryKeyIterator(this, tree, options)\n  }\n\n  _values (options) {\n    const tree = options.snapshot?.[kTree] ?? this.#tree\n    return new MemoryValueIterator(this, tree, options)\n  }\n\n  _snapshot (options) {\n    return new MemorySnapshot(this.#tree, options)\n  }\n}\n\nclass MemorySnapshot extends AbstractSnapshot {\n  constructor (tree, options) {\n    super(options)\n    this[kTree] = tree\n  }\n}\n\nexports.MemoryLevel = MemoryLevel\n\nfunction get (key) {\n  return this.get(key)\n}\n\nfunction has (key) {\n  return this.get(key) !== undefined\n}\n","function Lock () {\r\n\r\n  var next = typeof setImmediate === 'undefined' ? setTimeout : setImmediate\r\n\r\n  var locked = {}\r\n\r\n  function _releaser (key, exec) {\r\n    return function (done) {\r\n      return function () {\r\n      _release(key, exec)\r\n      if (done) done.apply(null, arguments)\r\n      }\r\n    }\r\n  }\r\n\r\n  function _release (key, exec) {\r\n    var i = locked[key].indexOf(exec) //should usually be 0\r\n\r\n    if(!~i) return\r\n\r\n    locked[key].splice(i, 1)\r\n\r\n    //note, that the next locker isn't triggered until next tick,\r\n    //so it's always after the released callback\r\n    if(isLocked(key))\r\n      next(function () {\r\n        locked[key][0](_releaser(key, locked[key][0]))\r\n      })\r\n    else\r\n      delete locked[key]\r\n  }\r\n\r\n  function _lock(key, exec) {\r\n    if(isLocked(key))\r\n      return locked[key].push(exec), false\r\n    return locked[key] = [exec], true\r\n  }\r\n\r\n  function lock(key, exec) {\r\n    if(Array.isArray(key)) {\r\n      var keys = key.length, locks = []\r\n      var l = {}\r\n\r\n      function releaser (done) {\r\n        return function () {\r\n          var args = [].slice.call(arguments)\r\n          for(var key in l)\r\n            _release(key, l[key])\r\n          done.apply(this, args)\r\n        }\r\n      }\r\n\r\n      key.forEach(function (key) {\r\n        var n = 0\r\n\r\n        function ready () {\r\n          if(n++) return\r\n          if(!--keys)\r\n            //all the keys are ready!\r\n            exec(releaser)\r\n        }\r\n\r\n        l[key] = ready\r\n        if(_lock(key, ready)) ready()\r\n      })\r\n\r\n      return\r\n    }\r\n\r\n    if(_lock(key, exec))\r\n      exec(_releaser(key, exec))\r\n  }\r\n\r\n  function isLocked (key) {\r\n    return Array.isArray(locked[key]) ? !! locked[key].length : false\r\n  }\r\n\r\n  lock.isLocked = isLocked\r\n\r\n  return lock\r\n}\r\n\r\nmodule.exports.Lock = Lock","/*\r\n *  big.js v6.2.2\r\n *  A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n *  Copyright (c) 2024 Michael Mclaughlin\r\n *  https://github.com/MikeMcl/big.js/LICENCE.md\r\n */\r\n;(function (GLOBAL) {\r\n  'use strict';\r\n  var Big,\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n    // The default values below must be integers within the stated ranges.\r\n\r\n    /*\r\n     * The maximum number of decimal places (DP) of the results of operations involving division:\r\n     * div and sqrt, and pow with negative exponents.\r\n     */\r\n    DP = 20,            // 0 to MAX_DP\r\n\r\n    /*\r\n     * The rounding mode (RM) used when rounding to the above decimal places.\r\n     *\r\n     *  0  Towards zero (i.e. truncate, no rounding).       (ROUND_DOWN)\r\n     *  1  To nearest neighbour. If equidistant, round up.  (ROUND_HALF_UP)\r\n     *  2  To nearest neighbour. If equidistant, to even.   (ROUND_HALF_EVEN)\r\n     *  3  Away from zero.                                  (ROUND_UP)\r\n     */\r\n    RM = 1,             // 0, 1, 2 or 3\r\n\r\n    // The maximum value of DP and Big.DP.\r\n    MAX_DP = 1E6,       // 0 to 1000000\r\n\r\n    // The maximum magnitude of the exponent argument to the pow method.\r\n    MAX_POWER = 1E6,    // 1 to 1000000\r\n\r\n    /*\r\n     * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n     * (JavaScript numbers: -7)\r\n     * -1000000 is the minimum recommended exponent value of a Big.\r\n     */\r\n    NE = -7,            // 0 to -1000000\r\n\r\n    /*\r\n     * The positive exponent (PE) at and above which toString returns exponential notation.\r\n     * (JavaScript numbers: 21)\r\n     * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\r\n     */\r\n    PE = 21,            // 0 to 1000000\r\n\r\n    /*\r\n     * When true, an error will be thrown if a primitive number is passed to the Big constructor,\r\n     * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\r\n     * primitive number without a loss of precision.\r\n     */\r\n    STRICT = false,     // true or false\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n    // Error messages.\r\n    NAME = '[big.js] ',\r\n    INVALID = NAME + 'Invalid ',\r\n    INVALID_DP = INVALID + 'decimal places',\r\n    INVALID_RM = INVALID + 'rounding mode',\r\n    DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n    // The shared prototype object.\r\n    P = {},\r\n    UNDEFINED = void 0,\r\n    NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n  /*\r\n   * Create and return a Big constructor.\r\n   */\r\n  function _Big_() {\r\n\r\n    /*\r\n     * The Big constructor and exported function.\r\n     * Create and return a new instance of a Big number object.\r\n     *\r\n     * n {number|string|Big} A numeric value.\r\n     */\r\n    function Big(n) {\r\n      var x = this;\r\n\r\n      // Enable constructor usage without new.\r\n      if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n      // Duplicate.\r\n      if (n instanceof Big) {\r\n        x.s = n.s;\r\n        x.e = n.e;\r\n        x.c = n.c.slice();\r\n      } else {\r\n        if (typeof n !== 'string') {\r\n          if (Big.strict === true && typeof n !== 'bigint') {\r\n            throw TypeError(INVALID + 'value');\r\n          }\r\n\r\n          // Minus zero?\r\n          n = n === 0 && 1 / n < 0 ? '-0' : String(n);\r\n        }\r\n\r\n        parse(x, n);\r\n      }\r\n\r\n      // Retain a reference to this Big constructor.\r\n      // Shadow Big.prototype.constructor which points to Object.\r\n      x.constructor = Big;\r\n    }\r\n\r\n    Big.prototype = P;\r\n    Big.DP = DP;\r\n    Big.RM = RM;\r\n    Big.NE = NE;\r\n    Big.PE = PE;\r\n    Big.strict = STRICT;\r\n    Big.roundDown = 0;\r\n    Big.roundHalfUp = 1;\r\n    Big.roundHalfEven = 2;\r\n    Big.roundUp = 3;\r\n\r\n    return Big;\r\n  }\r\n\r\n\r\n  /*\r\n   * Parse the number or string value passed to a Big constructor.\r\n   *\r\n   * x {Big} A Big number instance.\r\n   * n {number|string} A numeric value.\r\n   */\r\n  function parse(x, n) {\r\n    var e, i, nl;\r\n\r\n    if (!NUMERIC.test(n)) {\r\n      throw Error(INVALID + 'number');\r\n    }\r\n\r\n    // Determine sign.\r\n    x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n    // Decimal point?\r\n    if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n    // Exponential form?\r\n    if ((i = n.search(/e/i)) > 0) {\r\n\r\n      // Determine exponent.\r\n      if (e < 0) e = i;\r\n      e += +n.slice(i + 1);\r\n      n = n.substring(0, i);\r\n    } else if (e < 0) {\r\n\r\n      // Integer.\r\n      e = n.length;\r\n    }\r\n\r\n    nl = n.length;\r\n\r\n    // Determine leading zeros.\r\n    for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n    if (i == nl) {\r\n\r\n      // Zero.\r\n      x.c = [x.e = 0];\r\n    } else {\r\n\r\n      // Determine trailing zeros.\r\n      for (; nl > 0 && n.charAt(--nl) == '0';);\r\n      x.e = e - i - 1;\r\n      x.c = [];\r\n\r\n      // Convert string to array of digits without leading/trailing zeros.\r\n      for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n    }\r\n\r\n    return x;\r\n  }\r\n\r\n\r\n  /*\r\n   * Round Big x to a maximum of sd significant digits using rounding mode rm.\r\n   *\r\n   * x {Big} The Big to round.\r\n   * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\r\n   * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n   * [more] {boolean} Whether the result of division was truncated.\r\n   */\r\n  function round(x, sd, rm, more) {\r\n    var xc = x.c;\r\n\r\n    if (rm === UNDEFINED) rm = x.constructor.RM;\r\n    if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\r\n      throw Error(INVALID_RM);\r\n    }\r\n\r\n    if (sd < 1) {\r\n      more =\r\n        rm === 3 && (more || !!xc[0]) || sd === 0 && (\r\n        rm === 1 && xc[0] >= 5 ||\r\n        rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED))\r\n      );\r\n\r\n      xc.length = 1;\r\n\r\n      if (more) {\r\n\r\n        // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n        x.e = x.e - sd + 1;\r\n        xc[0] = 1;\r\n      } else {\r\n\r\n        // Zero.\r\n        xc[0] = x.e = 0;\r\n      }\r\n    } else if (sd < xc.length) {\r\n\r\n      // xc[sd] is the digit after the digit that may be rounded up.\r\n      more =\r\n        rm === 1 && xc[sd] >= 5 ||\r\n        rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\r\n          (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\r\n        rm === 3 && (more || !!xc[0]);\r\n\r\n      // Remove any digits after the required precision.\r\n      xc.length = sd;\r\n\r\n      // Round up?\r\n      if (more) {\r\n\r\n        // Rounding up may mean the previous digit has to be rounded up.\r\n        for (; ++xc[--sd] > 9;) {\r\n          xc[sd] = 0;\r\n          if (sd === 0) {\r\n            ++x.e;\r\n            xc.unshift(1);\r\n            break;\r\n          }\r\n        }\r\n      }\r\n\r\n      // Remove trailing zeros.\r\n      for (sd = xc.length; !xc[--sd];) xc.pop();\r\n    }\r\n\r\n    return x;\r\n  }\r\n\r\n\r\n  /*\r\n   * Return a string representing the value of Big x in normal or exponential notation.\r\n   * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n   */\r\n  function stringify(x, doExponential, isNonzero) {\r\n    var e = x.e,\r\n      s = x.c.join(''),\r\n      n = s.length;\r\n\r\n    // Exponential notation?\r\n    if (doExponential) {\r\n      s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n    // Normal notation.\r\n    } else if (e < 0) {\r\n      for (; ++e;) s = '0' + s;\r\n      s = '0.' + s;\r\n    } else if (e > 0) {\r\n      if (++e > n) {\r\n        for (e -= n; e--;) s += '0';\r\n      } else if (e < n) {\r\n        s = s.slice(0, e) + '.' + s.slice(e);\r\n      }\r\n    } else if (n > 1) {\r\n      s = s.charAt(0) + '.' + s.slice(1);\r\n    }\r\n\r\n    return x.s < 0 && isNonzero ? '-' + s : s;\r\n  }\r\n\r\n\r\n  // Prototype/instance methods\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the absolute value of this Big.\r\n   */\r\n  P.abs = function () {\r\n    var x = new this.constructor(this);\r\n    x.s = 1;\r\n    return x;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return 1 if the value of this Big is greater than the value of Big y,\r\n   *       -1 if the value of this Big is less than the value of Big y, or\r\n   *        0 if they have the same value.\r\n   */\r\n  P.cmp = function (y) {\r\n    var isneg,\r\n      x = this,\r\n      xc = x.c,\r\n      yc = (y = new x.constructor(y)).c,\r\n      i = x.s,\r\n      j = y.s,\r\n      k = x.e,\r\n      l = y.e;\r\n\r\n    // Either zero?\r\n    if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n    // Signs differ?\r\n    if (i != j) return i;\r\n\r\n    isneg = i < 0;\r\n\r\n    // Compare exponents.\r\n    if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n    j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n    // Compare digit by digit.\r\n    for (i = -1; ++i < j;) {\r\n      if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n    }\r\n\r\n    // Compare lengths.\r\n    return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n   * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n   */\r\n  P.div = function (y) {\r\n    var x = this,\r\n      Big = x.constructor,\r\n      a = x.c,                  // dividend\r\n      b = (y = new Big(y)).c,   // divisor\r\n      k = x.s == y.s ? 1 : -1,\r\n      dp = Big.DP;\r\n\r\n    if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n      throw Error(INVALID_DP);\r\n    }\r\n\r\n    // Divisor is zero?\r\n    if (!b[0]) {\r\n      throw Error(DIV_BY_ZERO);\r\n    }\r\n\r\n    // Dividend is 0? Return +-0.\r\n    if (!a[0]) {\r\n      y.s = k;\r\n      y.c = [y.e = 0];\r\n      return y;\r\n    }\r\n\r\n    var bl, bt, n, cmp, ri,\r\n      bz = b.slice(),\r\n      ai = bl = b.length,\r\n      al = a.length,\r\n      r = a.slice(0, bl),   // remainder\r\n      rl = r.length,\r\n      q = y,                // quotient\r\n      qc = q.c = [],\r\n      qi = 0,\r\n      p = dp + (q.e = x.e - y.e) + 1;    // precision of the result\r\n\r\n    q.s = k;\r\n    k = p < 0 ? 0 : p;\r\n\r\n    // Create version of divisor with leading zero.\r\n    bz.unshift(0);\r\n\r\n    // Add zeros to make remainder as long as divisor.\r\n    for (; rl++ < bl;) r.push(0);\r\n\r\n    do {\r\n\r\n      // n is how many times the divisor goes into current remainder.\r\n      for (n = 0; n < 10; n++) {\r\n\r\n        // Compare divisor and remainder.\r\n        if (bl != (rl = r.length)) {\r\n          cmp = bl > rl ? 1 : -1;\r\n        } else {\r\n          for (ri = -1, cmp = 0; ++ri < bl;) {\r\n            if (b[ri] != r[ri]) {\r\n              cmp = b[ri] > r[ri] ? 1 : -1;\r\n              break;\r\n            }\r\n          }\r\n        }\r\n\r\n        // If divisor < remainder, subtract divisor from remainder.\r\n        if (cmp < 0) {\r\n\r\n          // Remainder can't be more than 1 digit longer than divisor.\r\n          // Equalise lengths using divisor with extra leading zero?\r\n          for (bt = rl == bl ? b : bz; rl;) {\r\n            if (r[--rl] < bt[rl]) {\r\n              ri = rl;\r\n              for (; ri && !r[--ri];) r[ri] = 9;\r\n              --r[ri];\r\n              r[rl] += 10;\r\n            }\r\n            r[rl] -= bt[rl];\r\n          }\r\n\r\n          for (; !r[0];) r.shift();\r\n        } else {\r\n          break;\r\n        }\r\n      }\r\n\r\n      // Add the digit n to the result array.\r\n      qc[qi++] = cmp ? n : ++n;\r\n\r\n      // Update the remainder.\r\n      if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n      else r = [a[ai]];\r\n\r\n    } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n    // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n    if (!qc[0] && qi != 1) {\r\n\r\n      // There can't be more than one zero.\r\n      qc.shift();\r\n      q.e--;\r\n      p--;\r\n    }\r\n\r\n    // Round?\r\n    if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\r\n\r\n    return q;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n   */\r\n  P.eq = function (y) {\r\n    return this.cmp(y) === 0;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n   * false.\r\n   */\r\n  P.gt = function (y) {\r\n    return this.cmp(y) > 0;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n   * return false.\r\n   */\r\n  P.gte = function (y) {\r\n    return this.cmp(y) > -1;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n   */\r\n  P.lt = function (y) {\r\n    return this.cmp(y) < 0;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n   * return false.\r\n   */\r\n  P.lte = function (y) {\r\n    return this.cmp(y) < 1;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n   */\r\n  P.minus = P.sub = function (y) {\r\n    var i, j, t, xlty,\r\n      x = this,\r\n      Big = x.constructor,\r\n      a = x.s,\r\n      b = (y = new Big(y)).s;\r\n\r\n    // Signs differ?\r\n    if (a != b) {\r\n      y.s = -b;\r\n      return x.plus(y);\r\n    }\r\n\r\n    var xc = x.c.slice(),\r\n      xe = x.e,\r\n      yc = y.c,\r\n      ye = y.e;\r\n\r\n    // Either zero?\r\n    if (!xc[0] || !yc[0]) {\r\n      if (yc[0]) {\r\n        y.s = -b;\r\n      } else if (xc[0]) {\r\n        y = new Big(x);\r\n      } else {\r\n        y.s = 1;\r\n      }\r\n      return y;\r\n    }\r\n\r\n    // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n    if (a = xe - ye) {\r\n\r\n      if (xlty = a < 0) {\r\n        a = -a;\r\n        t = xc;\r\n      } else {\r\n        ye = xe;\r\n        t = yc;\r\n      }\r\n\r\n      t.reverse();\r\n      for (b = a; b--;) t.push(0);\r\n      t.reverse();\r\n    } else {\r\n\r\n      // Exponents equal. Check digit by digit.\r\n      j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n      for (a = b = 0; b < j; b++) {\r\n        if (xc[b] != yc[b]) {\r\n          xlty = xc[b] < yc[b];\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    // x < y? Point xc to the array of the bigger number.\r\n    if (xlty) {\r\n      t = xc;\r\n      xc = yc;\r\n      yc = t;\r\n      y.s = -y.s;\r\n    }\r\n\r\n    /*\r\n     * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n     * needs to start at yc.length.\r\n     */\r\n    if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n    // Subtract yc from xc.\r\n    for (b = i; j > a;) {\r\n      if (xc[--j] < yc[j]) {\r\n        for (i = j; i && !xc[--i];) xc[i] = 9;\r\n        --xc[i];\r\n        xc[j] += 10;\r\n      }\r\n\r\n      xc[j] -= yc[j];\r\n    }\r\n\r\n    // Remove trailing zeros.\r\n    for (; xc[--b] === 0;) xc.pop();\r\n\r\n    // Remove leading zeros and adjust exponent accordingly.\r\n    for (; xc[0] === 0;) {\r\n      xc.shift();\r\n      --ye;\r\n    }\r\n\r\n    if (!xc[0]) {\r\n\r\n      // n - n = +0\r\n      y.s = 1;\r\n\r\n      // Result must be zero.\r\n      xc = [ye = 0];\r\n    }\r\n\r\n    y.c = xc;\r\n    y.e = ye;\r\n\r\n    return y;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n   */\r\n  P.mod = function (y) {\r\n    var ygtx,\r\n      x = this,\r\n      Big = x.constructor,\r\n      a = x.s,\r\n      b = (y = new Big(y)).s;\r\n\r\n    if (!y.c[0]) {\r\n      throw Error(DIV_BY_ZERO);\r\n    }\r\n\r\n    x.s = y.s = 1;\r\n    ygtx = y.cmp(x) == 1;\r\n    x.s = a;\r\n    y.s = b;\r\n\r\n    if (ygtx) return new Big(x);\r\n\r\n    a = Big.DP;\r\n    b = Big.RM;\r\n    Big.DP = Big.RM = 0;\r\n    x = x.div(y);\r\n    Big.DP = a;\r\n    Big.RM = b;\r\n\r\n    return this.minus(x.times(y));\r\n  };\r\n  \r\n  \r\n  /*\r\n   * Return a new Big whose value is the value of this Big negated.\r\n   */\r\n  P.neg = function () {\r\n    var x = new this.constructor(this);\r\n    x.s = -x.s;\r\n    return x;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n   */\r\n  P.plus = P.add = function (y) {\r\n    var e, k, t,\r\n      x = this,\r\n      Big = x.constructor;\r\n\r\n    y = new Big(y);\r\n\r\n    // Signs differ?\r\n    if (x.s != y.s) {\r\n      y.s = -y.s;\r\n      return x.minus(y);\r\n    }\r\n\r\n    var xe = x.e,\r\n      xc = x.c,\r\n      ye = y.e,\r\n      yc = y.c;\r\n\r\n    // Either zero?\r\n    if (!xc[0] || !yc[0]) {\r\n      if (!yc[0]) {\r\n        if (xc[0]) {\r\n          y = new Big(x);\r\n        } else {\r\n          y.s = x.s;\r\n        }\r\n      }\r\n      return y;\r\n    }\r\n\r\n    xc = xc.slice();\r\n\r\n    // Prepend zeros to equalise exponents.\r\n    // Note: reverse faster than unshifts.\r\n    if (e = xe - ye) {\r\n      if (e > 0) {\r\n        ye = xe;\r\n        t = yc;\r\n      } else {\r\n        e = -e;\r\n        t = xc;\r\n      }\r\n\r\n      t.reverse();\r\n      for (; e--;) t.push(0);\r\n      t.reverse();\r\n    }\r\n\r\n    // Point xc to the longer array.\r\n    if (xc.length - yc.length < 0) {\r\n      t = yc;\r\n      yc = xc;\r\n      xc = t;\r\n    }\r\n\r\n    e = yc.length;\r\n\r\n    // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n    for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\r\n\r\n    // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n    if (k) {\r\n      xc.unshift(k);\r\n      ++ye;\r\n    }\r\n\r\n    // Remove trailing zeros.\r\n    for (e = xc.length; xc[--e] === 0;) xc.pop();\r\n\r\n    y.c = xc;\r\n    y.e = ye;\r\n\r\n    return y;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a Big whose value is the value of this Big raised to the power n.\r\n   * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n   * mode Big.RM.\r\n   *\r\n   * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n   */\r\n  P.pow = function (n) {\r\n    var x = this,\r\n      one = new x.constructor('1'),\r\n      y = one,\r\n      isneg = n < 0;\r\n\r\n    if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\r\n      throw Error(INVALID + 'exponent');\r\n    }\r\n\r\n    if (isneg) n = -n;\r\n\r\n    for (;;) {\r\n      if (n & 1) y = y.times(x);\r\n      n >>= 1;\r\n      if (!n) break;\r\n      x = x.times(x);\r\n    }\r\n\r\n    return isneg ? one.div(y) : y;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\r\n   * significant digits using rounding mode rm, or Big.RM if rm is not specified.\r\n   *\r\n   * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n   * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n   */\r\n  P.prec = function (sd, rm) {\r\n    if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n      throw Error(INVALID + 'precision');\r\n    }\r\n    return round(new this.constructor(this), sd, rm);\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\r\n   * using rounding mode rm, or Big.RM if rm is not specified.\r\n   * If dp is negative, round to an integer which is a multiple of 10**-dp.\r\n   * If dp is not specified, round to 0 decimal places.\r\n   *\r\n   * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n   * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n   */\r\n  P.round = function (dp, rm) {\r\n    if (dp === UNDEFINED) dp = 0;\r\n    else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\r\n      throw Error(INVALID_DP);\r\n    }\r\n    return round(new this.constructor(this), dp + this.e + 1, rm);\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n   * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n   */\r\n  P.sqrt = function () {\r\n    var r, c, t,\r\n      x = this,\r\n      Big = x.constructor,\r\n      s = x.s,\r\n      e = x.e,\r\n      half = new Big('0.5');\r\n\r\n    // Zero?\r\n    if (!x.c[0]) return new Big(x);\r\n\r\n    // Negative?\r\n    if (s < 0) {\r\n      throw Error(NAME + 'No square root');\r\n    }\r\n\r\n    // Estimate.\r\n    s = Math.sqrt(+stringify(x, true, true));\r\n\r\n    // Math.sqrt underflow/overflow?\r\n    // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n    if (s === 0 || s === 1 / 0) {\r\n      c = x.c.join('');\r\n      if (!(c.length + e & 1)) c += '0';\r\n      s = Math.sqrt(c);\r\n      e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n      r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n    } else {\r\n      r = new Big(s + '');\r\n    }\r\n\r\n    e = r.e + (Big.DP += 4);\r\n\r\n    // Newton-Raphson iteration.\r\n    do {\r\n      t = r;\r\n      r = half.times(t.plus(x.div(t)));\r\n    } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n    return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a new Big whose value is the value of this Big times the value of Big y.\r\n   */\r\n  P.times = P.mul = function (y) {\r\n    var c,\r\n      x = this,\r\n      Big = x.constructor,\r\n      xc = x.c,\r\n      yc = (y = new Big(y)).c,\r\n      a = xc.length,\r\n      b = yc.length,\r\n      i = x.e,\r\n      j = y.e;\r\n\r\n    // Determine sign of result.\r\n    y.s = x.s == y.s ? 1 : -1;\r\n\r\n    // Return signed 0 if either 0.\r\n    if (!xc[0] || !yc[0]) {\r\n      y.c = [y.e = 0];\r\n      return y;\r\n    }\r\n\r\n    // Initialise exponent of result as x.e + y.e.\r\n    y.e = i + j;\r\n\r\n    // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n    if (a < b) {\r\n      c = xc;\r\n      xc = yc;\r\n      yc = c;\r\n      j = a;\r\n      a = b;\r\n      b = j;\r\n    }\r\n\r\n    // Initialise coefficient array of result with zeros.\r\n    for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n    // Multiply.\r\n\r\n    // i is initially xc.length.\r\n    for (i = b; i--;) {\r\n      b = 0;\r\n\r\n      // a is yc.length.\r\n      for (j = a + i; j > i;) {\r\n\r\n        // Current sum of products at this digit position, plus carry.\r\n        b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n        c[j--] = b % 10;\r\n\r\n        // carry\r\n        b = b / 10 | 0;\r\n      }\r\n\r\n      c[j] = b;\r\n    }\r\n\r\n    // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n    if (b) ++y.e;\r\n    else c.shift();\r\n\r\n    // Remove trailing zeros.\r\n    for (i = c.length; !c[--i];) c.pop();\r\n    y.c = c;\r\n\r\n    return y;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a string representing the value of this Big in exponential notation rounded to dp fixed\r\n   * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n   *\r\n   * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n   * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n   */\r\n  P.toExponential = function (dp, rm) {\r\n    var x = this,\r\n      n = x.c[0];\r\n\r\n    if (dp !== UNDEFINED) {\r\n      if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n        throw Error(INVALID_DP);\r\n      }\r\n      x = round(new x.constructor(x), ++dp, rm);\r\n      for (; x.c.length < dp;) x.c.push(0);\r\n    }\r\n\r\n    return stringify(x, true, !!n);\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a string representing the value of this Big in normal notation rounded to dp fixed\r\n   * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n   *\r\n   * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n   * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n   *\r\n   * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n   * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n   */\r\n  P.toFixed = function (dp, rm) {\r\n    var x = this,\r\n      n = x.c[0];\r\n\r\n    if (dp !== UNDEFINED) {\r\n      if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n        throw Error(INVALID_DP);\r\n      }\r\n      x = round(new x.constructor(x), dp + x.e + 1, rm);\r\n\r\n      // x.e may have changed if the value is rounded up.\r\n      for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\r\n    }\r\n\r\n    return stringify(x, false, !!n);\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a string representing the value of this Big.\r\n   * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n   * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n   * Omit the sign for negative zero.\r\n   */\r\n  P.toJSON = P.toString = function () {\r\n    var x = this,\r\n      Big = x.constructor;\r\n    return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\r\n  };\r\n\r\n\r\n  /*\r\n   * Return the value of this Big as a primitve number.\r\n   */\r\n  P.toNumber = function () {\r\n    var n = +stringify(this, true, true);\r\n    if (this.constructor.strict === true && !this.eq(n.toString())) {\r\n      throw Error(NAME + 'Imprecise conversion');\r\n    }\r\n    return n;\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a string representing the value of this Big rounded to sd significant digits using\r\n   * rounding mode rm, or Big.RM if rm is not specified.\r\n   * Use exponential notation if sd is less than the number of digits necessary to represent\r\n   * the integer part of the value in normal notation.\r\n   *\r\n   * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n   * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n   */\r\n  P.toPrecision = function (sd, rm) {\r\n    var x = this,\r\n      Big = x.constructor,\r\n      n = x.c[0];\r\n\r\n    if (sd !== UNDEFINED) {\r\n      if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n        throw Error(INVALID + 'precision');\r\n      }\r\n      x = round(new Big(x), sd, rm);\r\n      for (; x.c.length < sd;) x.c.push(0);\r\n    }\r\n\r\n    return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\r\n  };\r\n\r\n\r\n  /*\r\n   * Return a string representing the value of this Big.\r\n   * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n   * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n   * Include the sign for negative zero.\r\n   */\r\n  P.valueOf = function () {\r\n    var x = this,\r\n      Big = x.constructor;\r\n    if (Big.strict === true) {\r\n      throw Error(NAME + 'valueOf disallowed');\r\n    }\r\n    return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\r\n  };\r\n\r\n\r\n  // Export\r\n\r\n\r\n  Big = _Big_();\r\n\r\n  Big['default'] = Big.Big = Big;\r\n\r\n  //AMD.\r\n  if (typeof define === 'function' && define.amd) {\r\n    define(function () { return Big; });\r\n\r\n  // Node and other CommonJS-like environments that support module.exports.\r\n  } else if (typeof module !== 'undefined' && module.exports) {\r\n    module.exports = Big;\r\n\r\n  //Browser.\r\n  } else {\r\n    GLOBAL.Big = Big;\r\n  }\r\n})(this);\r\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n  if (fn && cb) return wrappy(fn)(cb)\n\n  if (typeof fn !== 'function')\n    throw new TypeError('need wrapper function')\n\n  Object.keys(fn).forEach(function (k) {\n    wrapper[k] = fn[k]\n  })\n\n  return wrapper\n\n  function wrapper() {\n    var args = new Array(arguments.length)\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i]\n    }\n    var ret = fn.apply(this, args)\n    var cb = args[args.length-1]\n    if (typeof ret === 'function' && ret !== cb) {\n      Object.keys(cb).forEach(function (k) {\n        ret[k] = cb[k]\n      })\n    }\n    return ret\n  }\n}\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n  Object.defineProperty(Function.prototype, 'once', {\n    value: function () {\n      return once(this)\n    },\n    configurable: true\n  })\n\n  Object.defineProperty(Function.prototype, 'onceStrict', {\n    value: function () {\n      return onceStrict(this)\n    },\n    configurable: true\n  })\n})\n\nfunction once (fn) {\n  var f = function () {\n    if (f.called) return f.value\n    f.called = true\n    return f.value = fn.apply(this, arguments)\n  }\n  f.called = false\n  return f\n}\n\nfunction onceStrict (fn) {\n  var f = function () {\n    if (f.called)\n      throw new Error(f.onceError)\n    f.called = true\n    return f.value = fn.apply(this, arguments)\n  }\n  var name = fn.name || 'Function wrapped with `once`'\n  f.onceError = name + \" shouldn't be called more than once\"\n  f.called = false\n  return f\n}\n","/**\n * Database Lifecycle Manager\n *\n * Manages database operations lifecycle including:\n * - Operation tracking for graceful shutdown\n * - Database state management\n * - Graceful closure with pending operation completion\n */\n\nfunction DatabaseLifecycleManager (db) {\n  var pendingOperations = new Set()\n  var state = 'open' // 'open', 'closing', 'closed'\n  var shutdownTimeout = 10000 // 10 seconds default timeout\n\n  /**\n   * Track a database operation to ensure graceful shutdown\n   * @param {Promise} operation - The database operation promise\n   * @returns {Promise} - The tracked operation promise\n   */\n  function trackOperation (operation) {\n    if (state === 'closed') {\n      return Promise.reject(new Error('Database is closed'))\n    }\n\n    // Add operation to tracking set\n    pendingOperations.add(operation)\n\n    // Remove operation when it completes (success or failure)\n    function cleanup () {\n      pendingOperations.delete(operation)\n    }\n\n    operation.then(cleanup, cleanup)\n\n    return operation\n  }\n\n  /**\n   * Get current database state\n   * @returns {string} - Current state: 'open', 'closing', or 'closed'\n   */\n  function getState () {\n    return state\n  }\n\n  /**\n   * Get count of pending operations\n   * @returns {number} - Number of pending operations\n   */\n  function getPendingOperationCount () {\n    return pendingOperations.size\n  }\n\n  /**\n   * Check if database is ready for operations\n   * @returns {boolean} - True if database is ready\n   */\n  function isReady () {\n    return state === 'open'\n  }\n\n  /**\n   * Gracefully close the database, waiting for pending operations to complete\n   * @param {Function} callback - Optional callback function\n   * @returns {Promise} - Promise that resolves when database is closed\n   */\n  function gracefulClose (callback) {\n    if (state === 'closed') {\n      if (callback) {\n        setImmediate(callback, null)\n        return\n      }\n      return Promise.resolve()\n    }\n\n    if (state === 'closing') {\n      // If already closing, wait for the existing close operation\n      if (callback) {\n        // Wait for state to become 'closed'\n        function checkClosed () {\n          if (state === 'closed') {\n            setImmediate(callback, null)\n          }\n          else {\n            setTimeout(checkClosed, 10)\n          }\n        }\n        checkClosed()\n        return\n      }\n      // Return a promise that resolves when closed\n      return new Promise(function waitForClose (resolve) {\n        function checkClosed () {\n          if (state === 'closed') {\n            resolve()\n          }\n          else {\n            setTimeout(checkClosed, 10)\n          }\n        }\n        checkClosed()\n      })\n    }\n\n    state = 'closing'\n\n    var closePromise = waitForOperationsAndClose()\n\n    if (callback) {\n      closePromise\n        .then(function onGracefulCloseSuccess () {\n          setImmediate(callback, null)\n        })\n        .catch(function onGracefulCloseError (err) {\n          setImmediate(callback, err)\n        })\n    }\n\n    return closePromise\n  }\n\n  /**\n   * Wait for pending operations to complete, then close database\n   * @private\n   * @returns {Promise} - Promise that resolves when database is closed\n   */\n  function waitForOperationsAndClose () {\n    return new Promise(function waitForOperationsPromise (resolve, reject) {\n      // Wait for all pending operations to complete\n      if (pendingOperations.size > 0) {\n        waitForPendingOperations()\n          .then(function onOperationsComplete () {\n            closeDatabase()\n              .then(resolve)\n              .catch(reject)\n          })\n          .catch(reject)\n      }\n      else {\n        closeDatabase()\n          .then(resolve)\n          .catch(reject)\n      }\n    })\n\n    function closeDatabase () {\n      return new Promise(function closeDatabasePromise (resolve, reject) {\n        try {\n          // Close the database using original close method\n          var closePromise\n          if (db.close._original) {\n            closePromise = db.close._original()\n          }\n          else {\n            closePromise = db.close()\n          }\n\n          closePromise\n            .then(function onDatabaseClosed () {\n              state = 'closed'\n              resolve()\n            })\n            .catch(function onDatabaseCloseError (error) {\n              state = 'closed' // Mark as closed even if there was an error\n              reject(error)\n            })\n        }\n        catch (error) {\n          state = 'closed'\n          reject(error)\n        }\n      })\n    }\n  }\n\n  /**\n   * Wait for all pending operations to complete with timeout\n   * @private\n   * @returns {Promise} - Promise that resolves when all operations complete\n   */\n  function waitForPendingOperations () {\n    return new Promise(function waitForPendingPromise (resolve, reject) {\n      var startTime = Date.now()\n\n      function checkOperations () {\n        if (pendingOperations.size === 0) {\n          resolve()\n          return\n        }\n\n        var elapsed = Date.now() - startTime\n        if (elapsed >= shutdownTimeout) {\n          reject(new Error('Shutdown timeout: ' + pendingOperations.size + ' operations still pending after ' + shutdownTimeout + 'ms'))\n          return\n        }\n\n        // Check again in 10ms\n        setTimeout(checkOperations, 10)\n      }\n\n      checkOperations()\n    })\n  }\n\n  /**\n   * Force close the database without waiting for operations\n   * @param {Function} callback - Optional callback function\n   * @returns {Promise} - Promise that resolves when database is closed\n   */\n  function forceClose (callback) {\n    if (state === 'closed') {\n      var err = new Error('Database is already closed')\n      if (callback) {\n        setImmediate(callback, err)\n        return\n      }\n      return Promise.reject(err)\n    }\n\n    state = 'closed'\n    pendingOperations.clear()\n\n    var closePromise = db.close._original ?\n      db.close._original() :\n      db.close()\n\n    if (callback) {\n      closePromise\n        .then(function onForceCloseSuccess () { setImmediate(callback, null) })\n        .catch(function onForceCloseError (err) { setImmediate(callback, err) })\n    }\n\n    return closePromise\n  }\n\n  /**\n   * Set shutdown timeout for graceful close operations\n   * @param {number} timeout - Timeout in milliseconds\n   */\n  function setShutdownTimeout (timeout) {\n    shutdownTimeout = timeout\n  }\n\n  /**\n   * Get current shutdown timeout\n   * @returns {number} - Timeout in milliseconds\n   */\n  function getShutdownTimeout () {\n    return shutdownTimeout\n  }\n\n  return {\n    trackOperation: trackOperation,\n    getState: getState,\n    getPendingOperationCount: getPendingOperationCount,\n    isReady: isReady,\n    gracefulClose: gracefulClose,\n    forceClose: forceClose,\n    setShutdownTimeout: setShutdownTimeout,\n    getShutdownTimeout: getShutdownTimeout,\n  }\n}\n\nmodule.exports = DatabaseLifecycleManager\n","var crypto = require('crypto'),\n  events = require('events'),\n  async = require('async'),\n  Lazy = require('lazy'),\n  { Level } = require('level'),\n  { MemoryLevel } = require('memory-level'),\n  lock = require('lock'),\n  Big = require('big.js'),\n  once = require('once'),\n  DatabaseLifecycleManager = require('./lifecycle')\n\nexports.MAX_SIZE = 409600 // TODO: get rid of this? or leave for backwards compat?\nexports.create = create\nexports.lazy = lazyStream\nexports.validateKey = validateKey\nexports.validateItem = validateItem\nexports.validateUpdates = validateUpdates\nexports.validateKeyPiece = validateKeyPiece\nexports.validateKeyPaths = validateKeyPaths\nexports.createKey = createKey\nexports.createIndexKey = createIndexKey\nexports.traverseKey = traverseKey\nexports.traverseIndexes = traverseIndexes\nexports.toRangeStr = toRangeStr\nexports.toLexiStr = toLexiStr\nexports.hashPrefix = hashPrefix\nexports.validationError = validationError\nexports.limitError = limitError\nexports.checkConditional = checkConditional\nexports.itemSize = itemSize\nexports.capacityUnits = capacityUnits\nexports.addConsumedCapacity = addConsumedCapacity\nexports.matchesFilter = matchesFilter\nexports.matchesExprFilter = matchesExprFilter\nexports.compare = compare\nexports.mapPaths = mapPaths\nexports.mapPath = mapPath\nexports.queryTable = queryTable\nexports.updateIndexes = updateIndexes\nexports.getIndexActions = getIndexActions\n\nfunction create (options) {\n  options = options || {}\n  if (options.createTableMs == null) options.createTableMs = 500\n  if (options.deleteTableMs == null) options.deleteTableMs = 500\n  if (options.updateTableMs == null) options.updateTableMs = 500\n  if (options.maxItemSizeKb == null) options.maxItemSizeKb = exports.MAX_SIZE / 1024\n  options.maxItemSize = options.maxItemSizeKb * 1024\n\n  var db = options.path ? new Level(options.path, { valueEncoding: 'json' }) : new MemoryLevel({ valueEncoding: 'json' }),\n    subDbs = Object.create(null)\n\n  // Create lifecycle manager for graceful shutdown\n  var lifecycleManager = new DatabaseLifecycleManager(db)\n\n  // Wrap the main database with callback compatibility (main db already has JSON encoding)\n  wrapWithCallbacks(db, lifecycleManager)\n\n  var tableDb = getSubDb('table')\n\n  // XXX: Is there a better way to get this?\n  tableDb.awsAccountId = (process.env.AWS_ACCOUNT_ID || '0000-0000-0000').replace(/[^\\d]/g, '')\n  tableDb.awsRegion = process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || 'us-east-1'\n\n  function getItemDb (name) {\n    return getSubDb('item-' + name)\n  }\n\n  function deleteItemDb (name, cb) {\n    deleteSubDb('item-' + name, cb)\n  }\n\n  function getIndexDb (indexType, tableName, indexName) {\n    return getSubDb('index-' + indexType.toLowerCase() + '~' + tableName + '~' + indexName)\n  }\n\n  function deleteIndexDb (indexType, tableName, indexName, cb) {\n    deleteSubDb('index-' + indexType.toLowerCase() + '~' + tableName + '~' + indexName, cb)\n  }\n\n  function getTagDb (name) {\n    return getSubDb('tag-' + name)\n  }\n\n  function deleteTagDb (name, cb) {\n    deleteSubDb('tag-' + name, cb)\n  }\n\n  function getSubDb (name) {\n    if (!subDbs[name]) {\n      // Instead of using sublevel, create a wrapper around the main db with prefixed keys\n      // This ensures we use the same JSON encoding as the main database\n      subDbs[name] = createPrefixedDbWrapper(db, name + '~', lifecycleManager)\n      subDbs[name].lock = lock.Lock()\n    }\n    return subDbs[name]\n  }\n\n  function createPrefixedDbWrapper (mainDb, prefix) {\n    return {\n      put: function (key, value, callback) {\n        mainDb.put(prefix + key, value, callback)\n      },\n      get: function (key, callback) {\n        mainDb.get(prefix + key, callback)\n      },\n      del: function (key, callback) {\n        mainDb.del(prefix + key, callback)\n      },\n      batch: function (operations, callback) {\n        const prefixedOps = operations.map(op => ({\n          ...op,\n          key: prefix + op.key,\n        }))\n        mainDb.batch(prefixedOps, callback)\n      },\n      createKeyStream: function (options) {\n        const { Readable } = require('stream')\n        const prefixLength = prefix.length\n\n        // Create a stream that filters keys by prefix and strips the prefix\n        const mainStream = mainDb.createKeyStream(options)\n\n        return new Readable({\n          objectMode: true,\n          read () {\n            // This is a simple pass-through that strips prefixes\n          },\n        }).wrap(mainStream).pipe(new (require('stream').Transform)({\n          objectMode: true,\n          transform (key, encoding, callback) {\n            if (key.startsWith(prefix)) {\n              callback(null, key.substring(prefixLength))\n            }\n            else {\n              callback() // Skip keys that don't match our prefix\n            }\n          },\n        }))\n      },\n      createValueStream: function (options) {\n        // Add prefix to all range options\n        const prefixedOptions = { ...options }\n\n        // Add prefix to existing range options\n        if (prefixedOptions.gte) {\n          prefixedOptions.gte = prefix + prefixedOptions.gte\n        }\n        else if (prefixedOptions.gt) {\n          prefixedOptions.gt = prefix + prefixedOptions.gt\n        }\n        else {\n          prefixedOptions.gte = prefix\n        }\n\n        if (prefixedOptions.lte) {\n          prefixedOptions.lte = prefix + prefixedOptions.lte\n        }\n        else if (prefixedOptions.lt) {\n          prefixedOptions.lt = prefix + prefixedOptions.lt\n        }\n        else {\n          prefixedOptions.lt = prefix + '\\xFF'\n        }\n\n        return mainDb.createValueStream(prefixedOptions)\n      },\n      createReadStream: function (options) {\n        // Alias for createValueStream for backward compatibility\n        return this.createValueStream(options)\n      },\n      close: function (callback) {\n        // Don't close the main db\n        if (callback) setImmediate(callback)\n      },\n    }\n  }\n\n\n\n\n\n  function wrapWithCallbacks (levelDb, lifecycleManager) {\n    // Store original promise-based methods\n    const originalPut = levelDb.put.bind(levelDb)\n    const originalGet = levelDb.get.bind(levelDb)\n    const originalDel = levelDb.del.bind(levelDb)\n    const originalBatch = levelDb.batch.bind(levelDb)\n\n    // Override with callback-compatible versions\n    levelDb.put = function (key, value, callback) {\n      if (lifecycleManager && lifecycleManager.getState() === 'closed') {\n        const err = new Error('Database is closed')\n        if (typeof callback === 'function') {\n          setImmediate(callback, err)\n          return\n        }\n        return Promise.reject(err)\n      }\n\n      let operation\n      try {\n        operation = originalPut(key, value)\n      }\n      catch (err) {\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          const dbErr = new Error('Database is closed')\n          if (typeof callback === 'function') {\n            setImmediate(callback, dbErr)\n            return\n          }\n          return Promise.reject(dbErr)\n        }\n        throw err\n      }\n\n      operation = operation.catch(err => {\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          throw new Error('Database is closed')\n        }\n        throw err\n      })\n\n      if (typeof callback === 'function') {\n        const trackedOperation = lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n        trackedOperation\n          .then(() => setImmediate(callback, null))\n          .catch(err => setImmediate(callback, err))\n      }\n      else {\n        return lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n      }\n    }\n\n    levelDb.get = function (key, callback) {\n      if (lifecycleManager && lifecycleManager.getState() === 'closed') {\n        const err = new Error('Database is closed')\n        if (typeof callback === 'function') {\n          setImmediate(callback, err)\n          return\n        }\n        return Promise.reject(err)\n      }\n\n      let operation\n      try {\n        operation = originalGet(key)\n      }\n      catch (err) {\n        // Handle synchronous errors from Level\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          const dbErr = new Error('Database is closed')\n          if (typeof callback === 'function') {\n            setImmediate(callback, dbErr)\n            return\n          }\n          return Promise.reject(dbErr)\n        }\n        throw err\n      }\n\n      // Handle asynchronous errors from Level\n      operation = operation.catch(err => {\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          throw new Error('Database is closed')\n        }\n        throw err\n      })\n\n      if (typeof callback === 'function') {\n        const trackedOperation = lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n        trackedOperation\n          .then(value => setImmediate(callback, null, value))\n          .catch(err => setImmediate(callback, err))\n      }\n      else {\n        return lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n      }\n    }\n\n    levelDb.del = function (key, callback) {\n      if (lifecycleManager && lifecycleManager.getState() === 'closed') {\n        const err = new Error('Database is closed')\n        if (typeof callback === 'function') {\n          setImmediate(callback, err)\n          return\n        }\n        return Promise.reject(err)\n      }\n\n      let operation\n      try {\n        operation = originalDel(key)\n      }\n      catch (err) {\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          const dbErr = new Error('Database is closed')\n          if (typeof callback === 'function') {\n            setImmediate(callback, dbErr)\n            return\n          }\n          return Promise.reject(dbErr)\n        }\n        throw err\n      }\n\n      operation = operation.catch(err => {\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          throw new Error('Database is closed')\n        }\n        throw err\n      })\n\n      if (typeof callback === 'function') {\n        const trackedOperation = lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n        trackedOperation\n          .then(() => setImmediate(callback, null))\n          .catch(err => setImmediate(callback, err))\n      }\n      else {\n        return lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n      }\n    }\n\n    levelDb.batch = function (operations, callback) {\n      if (lifecycleManager && lifecycleManager.getState() === 'closed') {\n        const err = new Error('Database is closed')\n        if (typeof callback === 'function') {\n          setImmediate(callback, err)\n          return\n        }\n        return Promise.reject(err)\n      }\n\n      let operation\n      try {\n        operation = originalBatch(operations)\n      }\n      catch (err) {\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          const dbErr = new Error('Database is closed')\n          if (typeof callback === 'function') {\n            setImmediate(callback, dbErr)\n            return\n          }\n          return Promise.reject(dbErr)\n        }\n        throw err\n      }\n\n      operation = operation.catch(err => {\n        if (err.code === 'LEVEL_DATABASE_NOT_OPEN') {\n          throw new Error('Database is closed')\n        }\n        throw err\n      })\n\n      if (typeof callback === 'function') {\n        const trackedOperation = lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n        trackedOperation\n          .then(() => setImmediate(callback, null))\n          .catch(err => setImmediate(callback, err))\n      }\n      else {\n        return lifecycleManager ? lifecycleManager.trackOperation(operation) : operation\n      }\n    }\n\n    // Add callback compatibility for close method with lifecycle management\n    const originalClose = levelDb.close.bind(levelDb)\n\n    // Only wrap the main database close method with lifecycle management\n    // Sublevels should not trigger graceful close\n    if (levelDb === db) {\n      levelDb.close = function (callback) {\n        if (lifecycleManager) {\n          return lifecycleManager.gracefulClose(callback)\n        }\n\n        if (typeof callback === 'function') {\n          originalClose()\n            .then(() => setImmediate(callback, null))\n            .catch(err => setImmediate(callback, err))\n        }\n        else {\n          return originalClose()\n        }\n      }\n    }\n    else {\n      // For sublevels, just add callback compatibility without lifecycle management\n      levelDb.close = function (callback) {\n        if (typeof callback === 'function') {\n          originalClose()\n            .then(() => setImmediate(callback, null))\n            .catch(err => setImmediate(callback, err))\n        }\n        else {\n          return originalClose()\n        }\n      }\n    }\n\n    // Store reference to original close for lifecycle manager\n    levelDb.close._original = originalClose\n\n\n\n    // Handle stream methods - convert async iterators to streams\n    levelDb.createKeyStream = function (options) {\n      const { Readable } = require('stream')\n      const iterator = levelDb.keys(options)\n\n      return new Readable({\n        objectMode: true,\n        read () {\n          iterator.next()\n            .then(value => {\n              if (value === undefined) {\n                this.push(null)\n              }\n              else {\n                this.push(value)\n              }\n            })\n            .catch(err => {\n              this.destroy(err)\n            })\n        },\n        destroy (err, callback) {\n          if (iterator.return) {\n            iterator.return()\n              .then(() => callback && callback(err))\n              .catch(() => callback && callback(err))\n          }\n          else {\n            callback && callback(err)\n          }\n        },\n      })\n    }\n\n    levelDb.createValueStream = function (options) {\n      const { Readable } = require('stream')\n      const iterator = levelDb.values(options)\n\n      return new Readable({\n        objectMode: true,\n        read () {\n          iterator.next()\n            .then(value => {\n              if (value === undefined) {\n                this.push(null)\n              }\n              else {\n                this.push(value)\n              }\n            })\n            .catch(err => {\n              this.destroy(err)\n            })\n        },\n        destroy (err, callback) {\n          if (iterator.return) {\n            iterator.return()\n              .then(() => callback && callback(err))\n              .catch(() => callback && callback(err))\n          }\n          else {\n            callback && callback(err)\n          }\n        },\n      })\n    }\n  }\n\n  function deleteSubDb (name, cb) {\n    cb = once(cb)\n    var subDb = getSubDb(name)\n    delete subDbs[name]\n    lazyStream(subDb.createKeyStream(), cb).join(function (keys) {\n      subDb.batch(keys.map(function (key) { return { type: 'del', key: key } }), cb)\n    })\n  }\n\n  function getTable (name, checkStatus, cb) {\n    if (typeof checkStatus == 'function') cb = checkStatus\n\n    tableDb.get(name, function (err, table) {\n      // Handle database decode errors (corrupted data)\n      if (err && (err.code === 'LEVEL_DECODE_ERROR' || err.message.includes('Could not decode value'))) {\n        // Data is corrupted, treat as not found and clean it up\n        tableDb.del(name, function () {\n          // Ignore cleanup errors\n        })\n        err = new Error('NotFoundError')\n        err.name = 'NotFoundError'\n      }\n\n      // Handle corrupted table entries\n      if (!err && (!table || typeof table !== 'object' || !table.TableStatus)) {\n        err = new Error('NotFoundError')\n        err.name = 'NotFoundError'\n      }\n\n      if (!err && checkStatus && (table.TableStatus == 'CREATING' || table.TableStatus == 'DELETING')) {\n        err = new Error('NotFoundError')\n        err.name = 'NotFoundError'\n      }\n      if (err) {\n        if (err.name == 'NotFoundError') {\n          err.statusCode = 400\n          err.body = {\n            __type: 'com.amazonaws.dynamodb.v20120810#ResourceNotFoundException',\n            message: 'Requested resource not found',\n          }\n          if (!checkStatus) err.body.message += ': Table: ' + name + ' not found'\n        }\n        return cb(err)\n      }\n\n      cb(null, table)\n    })\n  }\n\n  function recreate () {\n    var self = this, newStore = create(options)\n    Object.keys(newStore).forEach(function (key) {\n      self[key] = newStore[key]\n    })\n  }\n\n  return {\n    options: options,\n    db: db,\n    tableDb: tableDb,\n    getItemDb: getItemDb,\n    deleteItemDb: deleteItemDb,\n    getIndexDb: getIndexDb,\n    deleteIndexDb: deleteIndexDb,\n    getTagDb: getTagDb,\n    deleteTagDb: deleteTagDb,\n    getTable: getTable,\n    recreate: recreate,\n    lifecycleManager: lifecycleManager,\n  }\n}\n\nfunction lazyStream (stream, errHandler) {\n  if (errHandler) stream.on('error', errHandler)\n  var streamAsLazy = new Lazy(stream)\n  stream.removeAllListeners('readable')\n  stream.on('data', streamAsLazy.emit.bind(streamAsLazy, 'data'))\n  if (stream.destroy) streamAsLazy.on('pipe', stream.destroy.bind(stream))\n  return streamAsLazy\n}\n\nfunction validateKey (dataKey, table, keySchema) {\n  if (keySchema == null) keySchema = table.KeySchema\n  if (keySchema.length != Object.keys(dataKey).length) {\n    return validationError('The provided key element does not match the schema')\n  }\n  return traverseKey(table, keySchema, function (attr, type, isHash) {\n    return validateKeyPiece(dataKey, attr, type, isHash)\n  })\n}\n\nfunction validateItem (dataItem, table) {\n  return traverseKey(table, function (attr, type, isHash) {\n    if (dataItem[attr] == null) {\n      return validationError('One or more parameter values were invalid: ' +\n        'Missing the key ' + attr + ' in the item')\n    }\n    if (dataItem[attr][type] == null) {\n      return validationError('One or more parameter values were invalid: ' +\n        'Type mismatch for key ' + attr + ' expected: ' + type +\n        ' actual: ' + Object.keys(dataItem[attr])[0])\n    }\n    if (dataItem[attr][type] === '' && (type === 'S' || type === 'B')) {\n      return validationError('One or more parameter values are not valid. ' +\n        'The AttributeValue for a key attribute cannot contain an empty ' + (type === 'S' ? 'string' : 'binary') + ' value. Key: ' + attr)\n    }\n    return checkKeySize(dataItem[attr][type], type, isHash)\n  }) || traverseIndexes(table, function (attr, type, index) {\n    if (dataItem[attr] != null && dataItem[attr][type] == null) {\n      return validationError('One or more parameter values were invalid: ' +\n        'Type mismatch for Index Key ' + attr + ' Expected: ' + type +\n        ' Actual: ' + Object.keys(dataItem[attr])[0] + ' IndexName: ' + index.IndexName)\n    }\n  })\n}\n\nfunction validateUpdates (attributeUpdates, expressionUpdates, table) {\n  if (attributeUpdates == null && expressionUpdates == null) return\n\n  return traverseKey(table, function (attr) {\n    var hasKey = false\n    if (expressionUpdates) {\n      var sections = expressionUpdates.sections\n      for (var j = 0; j < sections.length; j++) {\n        if (sections[j].path[0] == attr) {\n          hasKey = true\n          break\n        }\n      }\n    }\n    else {\n      hasKey = attributeUpdates[attr] != null\n    }\n    if (hasKey) {\n      return validationError('One or more parameter values were invalid: ' +\n        'Cannot update attribute ' + attr + '. This attribute is part of the key')\n    }\n  }) || traverseIndexes(table, function (attr, type, index) {\n    var actualType\n    if (expressionUpdates) {\n      var sections = expressionUpdates.sections\n      for (var i = 0; i < sections.length; i++) {\n        var section = sections[i]\n        if (section.path.length == 1 && section.path[0] == attr) {\n          actualType = section.attrType\n          break\n        }\n      }\n    }\n    else {\n      actualType = attributeUpdates[attr] && attributeUpdates[attr].Value ?\n        Object.keys(attributeUpdates[attr].Value)[0] : null\n    }\n    if (actualType != null && actualType != type) {\n      return validationError('One or more parameter values were invalid: ' +\n        'Type mismatch for Index Key ' + attr + ' Expected: ' + type +\n        ' Actual: ' + actualType + ' IndexName: ' + index.IndexName)\n    }\n  }) || validateKeyPaths((expressionUpdates || {}).nestedPaths, table)\n}\n\nfunction validateKeyPiece (key, attr, type, isHash) {\n  if (key[attr] == null || key[attr][type] == null) {\n    return validationError('The provided key element does not match the schema')\n  }\n  if (key[attr][type] === '' && (type === 'S' || type === 'B')) {\n    return validationError('One or more parameter values were invalid: ' +\n      'The AttributeValue for a key attribute cannot contain an empty ' + (type === 'S' ? 'string' : 'binary') + ' value. Key: ' + attr)\n  }\n  return checkKeySize(key[attr][type], type, isHash)\n}\n\nfunction validateKeyPaths (nestedPaths, table) {\n  if (!nestedPaths) return\n  return traverseKey(table, function (attr) {\n    if (nestedPaths[attr]) {\n      return validationError('Key attributes must be scalars; ' +\n        'list random access \\'[]\\' and map lookup \\'.\\' are not allowed: Key: ' + attr)\n    }\n  }) || traverseIndexes(table, function (attr) {\n    if (nestedPaths[attr]) {\n      return validationError('Key attributes must be scalars; ' +\n        'list random access \\'[]\\' and map lookup \\'.\\' are not allowed: IndexKey: ' + attr)\n    }\n  })\n}\n\nfunction createKey (item, table, keySchema) {\n  if (keySchema == null) keySchema = table.KeySchema\n  var keyStr\n  traverseKey(table, keySchema, function (attr, type, isHash) {\n    if (isHash) keyStr = hashPrefix(item[attr][type], type) + '/'\n    keyStr += toRangeStr(item[attr][type], type) + '/'\n  })\n  return keyStr\n}\n\nfunction createIndexKey (item, table, keySchema) {\n  var tableKeyPieces = []\n  traverseKey(table, function (attr, type) { tableKeyPieces.push(item[attr][type], type) })\n  return createKey(item, table, keySchema) + hashPrefix.apply(this, tableKeyPieces)\n}\n\nfunction traverseKey (table, keySchema, visitKey) {\n  if (typeof keySchema == 'function') { visitKey = keySchema; keySchema = table.KeySchema }\n  var i, j, attr, type, found\n  for (i = 0; i < keySchema.length; i++) {\n    attr = keySchema[i].AttributeName\n    for (j = 0; j < table.AttributeDefinitions.length; j++) {\n      if (table.AttributeDefinitions[j].AttributeName != attr) continue\n      type = table.AttributeDefinitions[j].AttributeType\n      break\n    }\n    found = visitKey(attr, type, !i)\n    if (found) return found\n  }\n}\n\nfunction traverseIndexes (table, visitIndex) {\n  var i, j, k, attr, type, found\n  if (table.GlobalSecondaryIndexes) {\n    for (i = 0; i < table.GlobalSecondaryIndexes.length; i++) {\n      for (k = 0; k < table.GlobalSecondaryIndexes[i].KeySchema.length; k++) {\n        attr = table.GlobalSecondaryIndexes[i].KeySchema[k].AttributeName\n        for (j = 0; j < table.AttributeDefinitions.length; j++) {\n          if (table.AttributeDefinitions[j].AttributeName != attr) continue\n          type = table.AttributeDefinitions[j].AttributeType\n          break\n        }\n        found = visitIndex(attr, type, table.GlobalSecondaryIndexes[i], true)\n        if (found) return found\n      }\n    }\n  }\n  if (table.LocalSecondaryIndexes) {\n    for (i = 0; i < table.LocalSecondaryIndexes.length; i++) {\n      attr = table.LocalSecondaryIndexes[i].KeySchema[1].AttributeName\n      for (j = 0; j < table.AttributeDefinitions.length; j++) {\n        if (table.AttributeDefinitions[j].AttributeName != attr) continue\n        type = table.AttributeDefinitions[j].AttributeType\n        break\n      }\n      found = visitIndex(attr, type, table.LocalSecondaryIndexes[i], false)\n      if (found) return found\n    }\n  }\n}\n\nfunction checkKeySize (keyPiece, type, isHash) {\n  // Numbers are always fine\n  if (type == 'N') return null\n  if (type == 'B') keyPiece = Buffer.from(keyPiece, 'base64')\n  if (isHash && keyPiece.length > 2048)\n    return validationError('One or more parameter values were invalid: ' +\n      'Size of hashkey has exceeded the maximum size limit of2048 bytes')\n  else if (!isHash && keyPiece.length > 1024)\n    return validationError('One or more parameter values were invalid: ' +\n      'Aggregated size of all range keys has exceeded the size limit of 1024 bytes')\n}\n\nfunction toRangeStr (keyPiece, type) {\n  if (type == null) {\n    type = Object.keys(keyPiece)[0]\n    keyPiece = keyPiece[type]\n  }\n  if (type == 'S') return Buffer.from(keyPiece, 'utf8').toString('hex')\n  return toLexiStr(keyPiece, type)\n}\n\n// Creates lexigraphically sortable number strings\n//  0     7c    009   = '07c009' = -99.1\n// |-|   |--| |-----|\n// sign  exp  digits\n//\n// Sign is 0 for negative, 1 for positive\n// Exp is hex for the exponent modified by adding 130 if sign is positive or subtracting from 125 if negative\n// Digits are unchanged if sign is positive, or added to 10 if negative\n// Hence, in '07c009', the sign is negative, exponent is 125 - 124 = 1, digits are 10 + -0.09 = 9.91 => -9.91e1\n//\nfunction toLexiStr (keyPiece, type) {\n  if (keyPiece == null) return ''\n  if (type == null) {\n    type = Object.keys(keyPiece)[0]\n    keyPiece = keyPiece[type]\n  }\n  if (type == 'B') return Buffer.from(keyPiece, 'base64').toString('hex')\n  if (type != 'N') return keyPiece\n  var bigNum = new Big(keyPiece), digits,\n    exp = !bigNum.c[0] ? 0 : bigNum.s == -1 ? 125 - bigNum.e : 130 + bigNum.e\n  if (bigNum.s == -1) {\n    bigNum.e = 0\n    digits = new Big(10).plus(bigNum).toFixed().replace(/\\./, '')\n  }\n  else {\n    digits = bigNum.c.join('')\n  }\n  return (bigNum.s == -1 ? '0' : '1') + ('0' + exp.toString(16)).slice(-2) + digits\n}\n\nfunction hashPrefix (hashKey, hashType, rangeKey, rangeType) {\n  if (hashType == 'S') {\n    hashKey = Buffer.from(hashKey, 'utf8')\n  }\n  else if (hashType == 'N') {\n    hashKey = numToBuffer(hashKey)\n  }\n  else if (hashType == 'B') {\n    hashKey = Buffer.from(hashKey, 'base64')\n  }\n  if (rangeKey) {\n    if (rangeType == 'S') {\n      rangeKey = Buffer.from(rangeKey, 'utf8')\n    }\n    else if (rangeType == 'N') {\n      rangeKey = numToBuffer(rangeKey)\n    }\n    else if (rangeType == 'B') {\n      rangeKey = Buffer.from(rangeKey, 'base64')\n    }\n  }\n  else {\n    rangeKey = Buffer.from([])\n  }\n  // TODO: Can use the whole hash if we deem it important - for now just first six chars\n  return crypto.createHash('md5').update('Outliers').update(hashKey).update(rangeKey).digest('hex').slice(0, 6)\n}\n\nfunction numToBuffer (num) {\n  if (+num === 0) return Buffer.from([ -128 ])\n\n  num = new Big(num)\n\n  var scale = num.s, mantissa = num.c, exponent = num.e + 1, appendZero = exponent % 2 ? 1 : 0,\n    byteArrayLengthWithoutExponent = Math.floor((mantissa.length + appendZero + 1) / 2),\n    byteArray, appendedZero = false, mantissaIndex, byteArrayIndex\n\n  if (byteArrayLengthWithoutExponent < 20 && scale == -1) {\n    byteArray = new Array(byteArrayLengthWithoutExponent + 2)\n    byteArray[byteArrayLengthWithoutExponent + 1] = 102\n  }\n  else {\n    byteArray = new Array(byteArrayLengthWithoutExponent + 1)\n  }\n\n  byteArray[0] = Math.floor((exponent + appendZero) / 2) - 64\n  if (scale == -1)\n    byteArray[0] ^= 0xffffffff\n\n  for (mantissaIndex = 0; mantissaIndex < mantissa.length; mantissaIndex++) {\n    byteArrayIndex = Math.floor((mantissaIndex + appendZero) / 2) + 1\n    if (appendZero && !mantissaIndex && !appendedZero) {\n      byteArray[byteArrayIndex] = 0\n      appendedZero = true\n      mantissaIndex--\n    }\n    else if ((mantissaIndex + appendZero) % 2 === 0) {\n      byteArray[byteArrayIndex] = mantissa[mantissaIndex] * 10\n    }\n    else {\n      byteArray[byteArrayIndex] += mantissa[mantissaIndex]\n    }\n    if (((mantissaIndex + appendZero) % 2) || (mantissaIndex == mantissa.length - 1)) {\n      if (scale == -1)\n        byteArray[byteArrayIndex] = 101 - byteArray[byteArrayIndex]\n      else\n        byteArray[byteArrayIndex]++\n    }\n  }\n\n  return Buffer.from(byteArray)\n}\n\nfunction checkConditional (data, existingItem) {\n  existingItem = existingItem || {}\n\n  if (data._condition) {\n    if (!matchesExprFilter(existingItem, data._condition.expression)) {\n      return conditionalError()\n    }\n    return null\n  }\n  else if (!data.Expected) {\n    return null\n  }\n  if (!matchesFilter(existingItem, data.Expected, data.ConditionalOperator)) {\n    return conditionalError()\n  }\n}\n\nfunction validationError (msg) {\n  var err = new Error(msg)\n  err.statusCode = 400\n  err.body = {\n    __type: 'com.amazon.coral.validate#ValidationException',\n    message: msg,\n  }\n  return err\n}\n\nfunction conditionalError (msg) {\n  if (msg == null) msg = 'The conditional request failed'\n  var err = new Error(msg)\n  err.statusCode = 400\n  err.body = {\n    __type: 'com.amazonaws.dynamodb.v20120810#ConditionalCheckFailedException',\n    message: msg,\n  }\n  return err\n}\n\nfunction limitError (msg) {\n  var err = new Error(msg)\n  err.statusCode = 400\n  err.body = {\n    __type: 'com.amazonaws.dynamodb.v20120810#LimitExceededException',\n    message: msg,\n  }\n  return err\n}\n\nfunction itemSize (item, compress, addMetaSize, rangeKey) {\n  // Size of compressed item (for checking query/scan limit) seems complicated,\n  // probably due to some internal serialization format.\n  var rangeKeySize = 0\n  var size = Object.keys(item).reduce(function (sum, attr) {\n    var size = valSizeWithStorage(item[attr], compress && attr != rangeKey)\n    if (compress && attr == rangeKey) {\n      rangeKeySize = size\n      return sum\n    }\n    return sum + size + (compress ? 1 : attr.length)\n  }, 0)\n  return !addMetaSize ? size : 2 + size + ((1 + Math.floor((1 + size) / 3072)) * (18 + rangeKeySize))\n}\n\nfunction valSizeWithStorage (itemAttr, compress) {\n  var type = Object.keys(itemAttr)[0]\n  var val = itemAttr[type]\n  var size = valSize(val, type, compress)\n  if (!compress) return size\n  switch (type) {\n  case 'S':\n    return size + (size < 128 ? 1 : size < 16384 ? 2 : 3)\n  case 'B':\n    return size + 1\n  case 'N':\n    return size + 1\n  case 'SS':\n    return size + val.length + 1\n  case 'BS':\n    return size + val.length + 1\n  case 'NS':\n    return size + val.length + 1\n  case 'NULL':\n    return 0\n  case 'BOOL':\n    return 1\n  case 'L':\n    return size\n  case 'M':\n    return size\n  }\n}\n\nfunction valSize (val, type, compress) {\n  switch (type) {\n  case 'S':\n    return val.length\n  case 'B':\n    return Buffer.from(val, 'base64').length\n  case 'N':\n    val = new Big(val)\n    var numDigits = val.c.length\n    if (numDigits == 1 && val.c[0] === 0) return 1\n    return 1 + Math.ceil(numDigits / 2) + (numDigits % 2 || val.e % 2 ? 0 : 1) + (val.s == -1 ? 1 : 0)\n  case 'SS':\n    return val.reduce(function (sum, x) { return sum + valSize(x, 'S') }, 0)\n  case 'BS':\n    return val.reduce(function (sum, x) { return sum + valSize(x, 'B') }, 0)\n  case 'NS':\n    return val.reduce(function (sum, x) { return sum + valSize(x, 'N') }, 0)\n  case 'NULL':\n    return 1\n  case 'BOOL':\n    return 1\n  case 'L':\n    return 3 + val.reduce(function (sum, val) { return sum + 1 + valSizeWithStorage(val, compress) }, 0)\n  case 'M':\n    return 3 + Object.keys(val).length + itemSize(val, compress)\n  }\n}\n\nfunction capacityUnits (item, isRead, isConsistent) {\n  var size = item ? Math.ceil(itemSize(item) / 1024 / (isRead ? 4 : 1)) : 1\n  return size / (!isRead || isConsistent ? 1 : 2)\n}\n\nfunction addConsumedCapacity (data, isRead, newItem, oldItem) {\n  if (~[ 'TOTAL', 'INDEXES' ].indexOf(data.ReturnConsumedCapacity)) {\n    var capacity = capacityUnits(newItem, isRead, data.ConsistentRead)\n    if (oldItem != null) {\n      capacity = Math.max(capacity, capacityUnits(oldItem, isRead, data.ConsistentRead))\n    }\n    return {\n      CapacityUnits: capacity,\n      TableName: data.TableName,\n      Table: data.ReturnConsumedCapacity == 'INDEXES' ? { CapacityUnits: capacity } : undefined,\n    }\n  }\n}\n\nfunction valsEqual (val1, val2) {\n  if (Array.isArray(val1) && Array.isArray(val2)) {\n    if (val1.length != val2.length) return false\n    return val1.every(function (val) { return ~val2.indexOf(val) })\n  }\n  else {\n    return val1 == val2\n  }\n}\n\nfunction matchesFilter (val, filter, conditionalOperator) {\n  for (var attr in filter) {\n    var comp = filter[attr].Exists != null ? (filter[attr].Exists ? 'NOT_NULL' : 'NULL') :\n      filter[attr].ComparisonOperator || 'EQ'\n    var result = compare(comp, val[attr], filter[attr].AttributeValueList || filter[attr].Value)\n    if (!result) {\n      return false\n    }\n    else if (conditionalOperator == 'OR') {\n      return true\n    }\n  }\n  return true\n}\n\nfunction matchesExprFilter (item, expr) {\n  if (expr.type == 'and') {\n    return matchesExprFilter(item, expr.args[0]) && matchesExprFilter(item, expr.args[1])\n  }\n  else if (expr.type == 'or') {\n    return matchesExprFilter(item, expr.args[0]) || matchesExprFilter(item, expr.args[1])\n  }\n  else if (expr.type == 'not') {\n    return !matchesExprFilter(item, expr.args[0])\n  }\n  var args = expr.args.map(function (arg) { return resolveArg(arg, item) })\n  return compare(expr.type == 'function' ? expr.name : expr.type, args[0], args.slice(1))\n}\n\nfunction resolveArg (arg, item) {\n  if (Array.isArray(arg)) {\n    return mapPath(arg, item)\n  }\n  else if (arg.type == 'function' && arg.name == 'size') {\n    var args = arg.args.map(function (arg) { return resolveArg(arg, item) })\n    var val = args[0], length\n    if (!val) {\n      return null\n    }\n    else if (val.S) {\n      length = val.S.length\n    }\n    else if (val.B) {\n      length = Buffer.from(val.B, 'base64').length\n    }\n    else if (val.SS || val.BS || val.NS || val.L) {\n      length = (val.SS || val.BS || val.NS || val.L).length\n    }\n    else if (val.M) {\n      length = Object.keys(val.M).length\n    }\n    return length != null ? { N: length.toString() } : null\n  }\n  else {\n    return arg\n  }\n}\n\nfunction compare (comp, val, compVals) {\n  if (!Array.isArray(compVals)) compVals = [ compVals ]\n\n  var attrType = val ? Object.keys(val)[0] : null\n  var attrVal = attrType ? val[attrType] : null\n  var compType = compVals && compVals[0] ? Object.keys(compVals[0])[0] : null\n  var compVal = compType ? compVals[0][compType] : null\n\n  switch (comp) {\n  case 'EQ':\n  case '=':\n    if (compType != attrType || !valsEqual(attrVal, compVal)) return false\n    break\n  case 'NE':\n  case '<>':\n    if (compType == attrType && valsEqual(attrVal, compVal)) return false\n    break\n  case 'LE':\n  case '<=':\n    if (compType != attrType ||\n        (attrType == 'N' && !new Big(attrVal).lte(compVal)) ||\n        (attrType != 'N' && toLexiStr(attrVal, attrType) > toLexiStr(compVal, attrType))) return false\n    break\n  case 'LT':\n  case '<':\n    if (compType != attrType ||\n        (attrType == 'N' && !new Big(attrVal).lt(compVal)) ||\n        (attrType != 'N' && toLexiStr(attrVal, attrType) >= toLexiStr(compVal, attrType))) return false\n    break\n  case 'GE':\n  case '>=':\n    if (compType != attrType ||\n        (attrType == 'N' && !new Big(attrVal).gte(compVal)) ||\n        (attrType != 'N' && toLexiStr(attrVal, attrType) < toLexiStr(compVal, attrType))) return false\n    break\n  case 'GT':\n  case '>':\n    if (compType != attrType ||\n        (attrType == 'N' && !new Big(attrVal).gt(compVal)) ||\n        (attrType != 'N' && toLexiStr(attrVal, attrType) <= toLexiStr(compVal, attrType))) return false\n    break\n  case 'NOT_NULL':\n  case 'attribute_exists':\n    if (attrVal == null) return false\n    break\n  case 'NULL':\n  case 'attribute_not_exists':\n    if (attrVal != null) return false\n    break\n  case 'CONTAINS':\n  case 'contains':\n    return contains(compType, compVal, attrType, attrVal)\n  case 'NOT_CONTAINS':\n    return !contains(compType, compVal, attrType, attrVal)\n  case 'BEGINS_WITH':\n  case 'begins_with':\n    if (compType != attrType) return false\n    if (compType == 'B') {\n      attrVal = Buffer.from(attrVal, 'base64').toString()\n      compVal = Buffer.from(compVal, 'base64').toString()\n    }\n    if (attrVal.indexOf(compVal) !== 0) return false\n    break\n  case 'IN':\n  case 'in':\n    if (!attrVal) return false\n    if (!compVals.some(function (compVal) {\n      compType = Object.keys(compVal)[0]\n      compVal = compVal[compType]\n      return compType == attrType && valsEqual(attrVal, compVal)\n    })) return false\n    break\n  case 'BETWEEN':\n  case 'between':\n    if (!attrVal || compType != attrType ||\n        (attrType == 'N' && (!new Big(attrVal).gte(compVal) || !new Big(attrVal).lte(compVals[1].N))) ||\n        (attrType != 'N' && (toLexiStr(attrVal, attrType) < toLexiStr(compVal, attrType) ||\n          toLexiStr(attrVal, attrType) > toLexiStr(compVals[1][compType], attrType)))) return false\n    break\n  case 'attribute_type':\n    if (!attrVal || !valsEqual(attrType, compVal)) return false\n  }\n  return true\n}\n\nfunction contains (compType, compVal, attrType, attrVal) {\n  if (compType === 'S') {\n    if (attrType === 'S') return !!~attrVal.indexOf(compVal)\n    if (attrType === 'SS') return attrVal.some(function (val) {\n      return val === compVal\n    })\n    if (attrType === 'L') return attrVal.some(function (val) {\n      return val && val.S && val.S === compVal\n    })\n    return false\n  }\n  if (compType === 'N') {\n    if (attrType === 'NS') return attrVal.some(function (val) {\n      return val === compVal\n    })\n    if (attrType === 'L') return attrVal.some(function (val) {\n      return val && val.N && val.N === compVal\n    })\n    return false\n  }\n  if (compType === 'B') {\n    if (attrType !== 'B' && attrType !== 'BS' && attrType !== 'L') return false\n    var compValString = Buffer.from(compVal, 'base64').toString()\n    if (attrType === 'B') {\n      var attrValString = Buffer.from(attrVal, 'base64').toString()\n      return !!~attrValString.indexOf(compValString)\n    }\n    return attrVal.some(function (val) {\n      if (attrType !== 'L') return compValString === Buffer.from(val, 'base64').toString()\n      if (attrType === 'L' && val.B) return compValString === Buffer.from(val.B, 'base64').toString()\n      return false\n    })\n  }\n}\n\nfunction mapPaths (paths, item) {\n  var returnItem = Object.create(null), toSquash = []\n  for (var i = 0; i < paths.length; i++) {\n    var path = paths[i]\n    if (!Array.isArray(path)) path = [ path ]\n    var resolved = mapPath(path, item)\n    if (resolved == null) {\n      continue\n    }\n    if (path.length == 1) {\n      returnItem[path[0]] = resolved\n      continue\n    }\n    var curItem = { M: returnItem }\n    for (var j = 0; j < path.length; j++) {\n      var piece = path[j]\n      if (typeof piece == 'number') {\n        curItem.L = curItem.L || []\n        if (piece > curItem.L.length && !~toSquash.indexOf(curItem)) {\n          toSquash.push(curItem)\n        }\n        if (j < paths[i].length - 1) {\n          curItem.L[piece] = curItem.L[piece] || {}\n          curItem = curItem.L[piece]\n        }\n        else {\n          curItem.L[piece] = resolved\n        }\n      }\n      else {\n        curItem.M = curItem.M || {}\n        if (j < paths[i].length - 1) {\n          curItem.M[piece] = curItem.M[piece] || {}\n          curItem = curItem.M[piece]\n        }\n        else {\n          curItem.M[piece] = resolved\n        }\n      }\n    }\n  }\n  toSquash.forEach(function (obj) { obj.L = obj.L.filter(Boolean) })\n  return returnItem\n}\n\nfunction mapPath (path, item) {\n  if (path.length == 1) {\n    return item[path[0]]\n  }\n  var resolved = { M: item }\n  for (var i = 0; i < path.length; i++) {\n    var piece = path[i]\n    if (typeof piece == 'number' && resolved.L) {\n      resolved = resolved.L[piece]\n    }\n    else if (resolved.M) {\n      resolved = resolved.M[piece]\n    }\n    else {\n      resolved = null\n    }\n    if (resolved == null) {\n      break\n    }\n  }\n  return resolved\n}\n\nfunction queryTable (store, table, data, opts, isLocal, fetchFromItemDb, startKeyNames, cb) {\n  cb = once(cb)\n  var itemDb = store.getItemDb(data.TableName), vals\n\n  if (data.IndexName) {\n    var indexDb = store.getIndexDb(isLocal ? 'local' : 'global', data.TableName, data.IndexName)\n    vals = lazyStream(indexDb.createValueStream(opts), cb)\n  }\n  else {\n    vals = lazyStream(itemDb.createValueStream(opts), cb)\n  }\n\n  var tableCapacity = 0, indexCapacity = 0,\n    calculateCapacity = ~[ 'TOTAL', 'INDEXES' ].indexOf(data.ReturnConsumedCapacity)\n\n  if (fetchFromItemDb) {\n    var em = new events.EventEmitter\n    var queue = async.queue(function (key, cb) {\n      if (!key) {\n        em.emit('end')\n        return cb()\n      }\n      itemDb.get(key, function (err, item) {\n        if (err) {\n          em.emit('error', err)\n          return cb(err)\n        }\n        if (calculateCapacity) tableCapacity += itemSize(item)\n        em.emit('data', item)\n        cb()\n      })\n    })\n    var oldVals = vals\n    vals = new Lazy(em)\n\n    oldVals.map(function (item) {\n      if (calculateCapacity) indexCapacity += itemSize(item)\n      queue.push(createKey(item, table))\n    }).once('pipe', queue.push.bind(queue, ''))\n  }\n\n  var size = 0, count = 0, rangeKey = table.KeySchema[1] && table.KeySchema[1].AttributeName\n\n  vals = vals.takeWhile(function (val) {\n    if (count >= data.Limit || size >= 1024 * 1024) {\n      return false\n    }\n\n    if (calculateCapacity && !fetchFromItemDb) {\n      var capacitySize = itemSize(val)\n      if (data.IndexName) {\n        indexCapacity += capacitySize\n      }\n      else {\n        tableCapacity += capacitySize\n      }\n    }\n\n    count++\n\n    size += itemSize(val, true, true, rangeKey)\n\n    return true\n  })\n\n  vals.join(function (items) {\n    var lastItem = items[items.length - 1]\n\n    var queryFilter = data.QueryFilter || data.ScanFilter\n\n    if (data._filter) {\n      items = items.filter(function (val) { return matchesExprFilter(val, data._filter.expression) })\n    }\n    else if (queryFilter) {\n      items = items.filter(function (val) { return matchesFilter(val, queryFilter, data.ConditionalOperator) })\n    }\n\n    var result = { ScannedCount: count }\n    if (count >= data.Limit || size >= 1024 * 1024) {\n      if (data.Limit) items.splice(data.Limit)\n      if (lastItem) {\n        result.LastEvaluatedKey = startKeyNames.reduce(function (key, attr) {\n          key[attr] = lastItem[attr]\n          return key\n        }, {})\n      }\n    }\n\n    var paths = data._projection ? data._projection.paths : data.AttributesToGet\n    if (paths) {\n      items = items.map(mapPaths.bind(this, paths))\n    }\n\n    result.Count = items.length\n    if (data.Select != 'COUNT') result.Items = items\n    if (calculateCapacity) {\n      var tableUnits = Math.ceil(tableCapacity / 1024 / 4) * (data.ConsistentRead ? 1 : 0.5)\n      var indexUnits = Math.ceil(indexCapacity / 1024 / 4) * (data.ConsistentRead ? 1 : 0.5)\n      result.ConsumedCapacity = {\n        CapacityUnits: tableUnits + indexUnits,\n        TableName: data.TableName,\n      }\n      if (data.ReturnConsumedCapacity == 'INDEXES') {\n        result.ConsumedCapacity.Table = { CapacityUnits: tableUnits }\n        if (data.IndexName) {\n          var indexAttr = isLocal ? 'LocalSecondaryIndexes' : 'GlobalSecondaryIndexes'\n          result.ConsumedCapacity[indexAttr] = {}\n          result.ConsumedCapacity[indexAttr][data.IndexName] = { CapacityUnits: indexUnits }\n        }\n      }\n    }\n    cb(null, result)\n  })\n}\n\nfunction updateIndexes (store, table, existingItem, item, cb) {\n  if (!existingItem && !item) return cb()\n  var puts = [], deletes = []\n    ;[ 'Local', 'Global' ].forEach(function (indexType) {\n    var indexes = table[indexType + 'SecondaryIndexes'] || []\n    var actions = getIndexActions(indexes, existingItem, item, table)\n    puts = puts.concat(actions.puts.map(function (action) {\n      var indexDb = store.getIndexDb(indexType, table.TableName, action.index)\n      return indexDb.put.bind(indexDb, action.key, action.item)\n    }))\n    deletes = deletes.concat(actions.deletes.map(function (action) {\n      var indexDb = store.getIndexDb(indexType, table.TableName, action.index)\n      return indexDb.del.bind(indexDb, action.key)\n    }))\n  })\n\n  async.parallel(deletes, function (err) {\n    if (err) return cb(err)\n    async.parallel(puts, cb)\n  })\n}\n\nfunction getIndexActions (indexes, existingItem, item, table) {\n  var puts = [], deletes = [], tableKeys = table.KeySchema.map(function (key) { return key.AttributeName })\n  indexes.forEach(function (index) {\n    var indexKeys = index.KeySchema.map(function (key) { return key.AttributeName }), key = null, itemPieces = item\n\n    if (item && indexKeys.every(function (key) { return item[key] != null })) {\n      if (index.Projection.ProjectionType != 'ALL') {\n        var indexAttrs = indexKeys.concat(tableKeys, index.Projection.NonKeyAttributes || [])\n        itemPieces = indexAttrs.reduce(function (obj, attr) {\n          obj[attr] = item[attr]\n          return obj\n        }, Object.create(null))\n      }\n\n      key = createIndexKey(itemPieces, table, index.KeySchema)\n      puts.push({ index: index.IndexName, key: key, item: itemPieces })\n    }\n\n    if (existingItem && indexKeys.every(function (key) { return existingItem[key] != null })) {\n      var existingKey = createIndexKey(existingItem, table, index.KeySchema)\n      if (existingKey != key) {\n        deletes.push({ index: index.IndexName, key: existingKey })\n      }\n    }\n  })\n  return { puts: puts, deletes: deletes }\n}\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n\n\"use strict\";\n\nfunction peg$subclass(child, parent) {\n  function ctor() { this.constructor = child; }\n  ctor.prototype = parent.prototype;\n  child.prototype = new ctor();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n  this.message  = message;\n  this.expected = expected;\n  this.found    = found;\n  this.location = location;\n  this.name     = \"SyntaxError\";\n\n  if (typeof Error.captureStackTrace === \"function\") {\n    Error.captureStackTrace(this, peg$SyntaxError);\n  }\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n  var DESCRIBE_EXPECTATION_FNS = {\n        literal: function(expectation) {\n          return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n        },\n\n        \"class\": function(expectation) {\n          var escapedParts = \"\",\n              i;\n\n          for (i = 0; i < expectation.parts.length; i++) {\n            escapedParts += expectation.parts[i] instanceof Array\n              ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n              : classEscape(expectation.parts[i]);\n          }\n\n          return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n        },\n\n        any: function(expectation) {\n          return \"any character\";\n        },\n\n        end: function(expectation) {\n          return \"end of input\";\n        },\n\n        other: function(expectation) {\n          return expectation.description;\n        }\n      };\n\n  function hex(ch) {\n    return ch.charCodeAt(0).toString(16).toUpperCase();\n  }\n\n  function literalEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\"/g,  '\\\\\"')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function classEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\\]/g, '\\\\]')\n      .replace(/\\^/g, '\\\\^')\n      .replace(/-/g,  '\\\\-')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function describeExpectation(expectation) {\n    return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n  }\n\n  function describeExpected(expected) {\n    var descriptions = new Array(expected.length),\n        i, j;\n\n    for (i = 0; i < expected.length; i++) {\n      descriptions[i] = describeExpectation(expected[i]);\n    }\n\n    descriptions.sort();\n\n    if (descriptions.length > 0) {\n      for (i = 1, j = 1; i < descriptions.length; i++) {\n        if (descriptions[i - 1] !== descriptions[i]) {\n          descriptions[j] = descriptions[i];\n          j++;\n        }\n      }\n      descriptions.length = j;\n    }\n\n    switch (descriptions.length) {\n      case 1:\n        return descriptions[0];\n\n      case 2:\n        return descriptions[0] + \" or \" + descriptions[1];\n\n      default:\n        return descriptions.slice(0, -1).join(\", \")\n          + \", or \"\n          + descriptions[descriptions.length - 1];\n    }\n  }\n\n  function describeFound(found) {\n    return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n  }\n\n  return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n  options = options !== void 0 ? options : {};\n\n  var peg$FAILED = {},\n\n      peg$startRuleFunctions = { Start: peg$parseStart },\n      peg$startRuleFunction  = peg$parseStart,\n\n      peg$c0 = function(expr) {\n            checkMisusedSize(expr)\n            return checkErrors() || {expression: expr, nestedPaths: nestedPaths, pathHeads: pathHeads}\n          },\n      peg$c1 = function(x, token, y) {\n            [x, y].forEach(checkMisusedSize)\n            return {type: 'or', args: [x, y]}\n          },\n      peg$c2 = function(x, y) {\n            [x, y].forEach(checkMisusedSize)\n            return {type: 'and', args: [x, y]}\n          },\n      peg$c3 = function(token, expr) {\n            checkMisusedSize(expr)\n            return {type: 'not', args: [expr]}\n          },\n      peg$c4 = \"(\",\n      peg$c5 = peg$literalExpectation(\"(\", false),\n      peg$c6 = \")\",\n      peg$c7 = peg$literalExpectation(\")\", false),\n      peg$c8 = function(expr) {\n            redundantParensError()\n            return expr\n          },\n      peg$c9 = function(expr) {\n            redundantParensError()\n            checkConditionErrors()\n            return expr\n          },\n      peg$c10 = function(expr) {\n            checkConditionErrors()\n            return expr\n          },\n      peg$c11 = function(expr) {\n            return expr\n          },\n      peg$c12 = function(x, comp, y) {\n            checkMisusedFunction([x, y])\n            checkDistinct(comp, [x, y])\n            return {type: comp, args: [x, y]}\n          },\n      peg$c13 = function(x, y, z) {\n            checkMisusedFunction([x, y, z])\n            checkBetweenArgs(y, z)\n            return {type: 'between', args: [x, y, z]}\n          },\n      peg$c14 = function(x, token, args) {\n            checkMisusedFunction([x].concat(args))\n            return {type: 'in', args: [x].concat(args)}\n          },\n      peg$c15 = \">=\",\n      peg$c16 = peg$literalExpectation(\">=\", false),\n      peg$c17 = \"<=\",\n      peg$c18 = peg$literalExpectation(\"<=\", false),\n      peg$c19 = \"<>\",\n      peg$c20 = peg$literalExpectation(\"<>\", false),\n      peg$c21 = \"=\",\n      peg$c22 = peg$literalExpectation(\"=\", false),\n      peg$c23 = \"<\",\n      peg$c24 = peg$literalExpectation(\"<\", false),\n      peg$c25 = \">\",\n      peg$c26 = peg$literalExpectation(\">\", false),\n      peg$c27 = function(op) {\n            redundantParensError()\n            return op\n          },\n      peg$c28 = function(op) {\n            return op\n          },\n      peg$c29 = function(path) {\n            for (var i = 0; i < path.length; i++) {\n              if (typeof path[i] === 'string') {\n                checkReserved(path[i])\n              } else if (path[i] && path[i].type == 'attrName') {\n                path[i] = resolveAttrName(path[i].name)\n              }\n            }\n            if (path.length > 1) {\n              nestedPaths[path[0]] = true\n            }\n            pathHeads[path[0]] = true\n            return path\n          },\n      peg$c30 = function(head, tail, args) {\n            checkMisusedFunction(args)\n            var name = head + tail.join('')\n            var attrType = checkFunction(name, args)\n            return {type: 'function', name: name, args: args, attrType: attrType}\n          },\n      peg$c31 = \",\",\n      peg$c32 = peg$literalExpectation(\",\", false),\n      peg$c33 = function(head, expr) { return expr },\n      peg$c34 = function(head, tail) {\n            return [head].concat(tail)\n          },\n      peg$c35 = \"#\",\n      peg$c36 = peg$literalExpectation(\"#\", false),\n      peg$c37 = function(head, tail) {\n            return {type: 'attrName', name: head + tail.join('')}\n          },\n      peg$c38 = \":\",\n      peg$c39 = peg$literalExpectation(\":\", false),\n      peg$c40 = function(head, tail) {\n            return resolveAttrVal(head + tail.join(''))\n          },\n      peg$c41 = \"[\",\n      peg$c42 = peg$literalExpectation(\"[\", false),\n      peg$c43 = /^[0-9]/,\n      peg$c44 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n      peg$c45 = \"]\",\n      peg$c46 = peg$literalExpectation(\"]\", false),\n      peg$c47 = function(head, ix) {\n              return +(ix.join(''))\n            },\n      peg$c48 = \".\",\n      peg$c49 = peg$literalExpectation(\".\", false),\n      peg$c50 = function(head, prop) {\n              return prop\n            },\n      peg$c51 = function(head, tail) {\n            return (Array.isArray(head) ? head : [head]).concat(tail)\n          },\n      peg$c52 = function(path) {\n            redundantParensError()\n            return path\n          },\n      peg$c53 = function(path) {\n            return path\n          },\n      peg$c54 = function(head, tail) {\n            return head + tail.join('')\n          },\n      peg$c55 = /^[a-zA-Z]/,\n      peg$c56 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false),\n      peg$c57 = \"_\",\n      peg$c58 = peg$literalExpectation(\"_\", false),\n      peg$c59 = \"between\",\n      peg$c60 = peg$literalExpectation(\"BETWEEN\", true),\n      peg$c61 = \"in\",\n      peg$c62 = peg$literalExpectation(\"IN\", true),\n      peg$c63 = \"and\",\n      peg$c64 = peg$literalExpectation(\"AND\", true),\n      peg$c65 = \"or\",\n      peg$c66 = peg$literalExpectation(\"OR\", true),\n      peg$c67 = \"not\",\n      peg$c68 = peg$literalExpectation(\"NOT\", true),\n      peg$c69 = peg$otherExpectation(\"whitespace\"),\n      peg$c70 = /^[ \\t\\r\\n]/,\n      peg$c71 = peg$classExpectation([\" \", \"\\t\", \"\\r\", \"\\n\"], false, false),\n\n      peg$currPos          = 0,\n      peg$savedPos         = 0,\n      peg$posDetailsCache  = [{ line: 1, column: 1 }],\n      peg$maxFailPos       = 0,\n      peg$maxFailExpected  = [],\n      peg$silentFails      = 0,\n\n      peg$result;\n\n  if (\"startRule\" in options) {\n    if (!(options.startRule in peg$startRuleFunctions)) {\n      throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n    }\n\n    peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n  }\n\n  function text() {\n    return input.substring(peg$savedPos, peg$currPos);\n  }\n\n  function location() {\n    return peg$computeLocation(peg$savedPos, peg$currPos);\n  }\n\n  function expected(description, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildStructuredError(\n      [peg$otherExpectation(description)],\n      input.substring(peg$savedPos, peg$currPos),\n      location\n    );\n  }\n\n  function error(message, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildSimpleError(message, location);\n  }\n\n  function peg$literalExpectation(text, ignoreCase) {\n    return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n  }\n\n  function peg$classExpectation(parts, inverted, ignoreCase) {\n    return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n  }\n\n  function peg$anyExpectation() {\n    return { type: \"any\" };\n  }\n\n  function peg$endExpectation() {\n    return { type: \"end\" };\n  }\n\n  function peg$otherExpectation(description) {\n    return { type: \"other\", description: description };\n  }\n\n  function peg$computePosDetails(pos) {\n    var details = peg$posDetailsCache[pos], p;\n\n    if (details) {\n      return details;\n    } else {\n      p = pos - 1;\n      while (!peg$posDetailsCache[p]) {\n        p--;\n      }\n\n      details = peg$posDetailsCache[p];\n      details = {\n        line:   details.line,\n        column: details.column\n      };\n\n      while (p < pos) {\n        if (input.charCodeAt(p) === 10) {\n          details.line++;\n          details.column = 1;\n        } else {\n          details.column++;\n        }\n\n        p++;\n      }\n\n      peg$posDetailsCache[pos] = details;\n      return details;\n    }\n  }\n\n  function peg$computeLocation(startPos, endPos) {\n    var startPosDetails = peg$computePosDetails(startPos),\n        endPosDetails   = peg$computePosDetails(endPos);\n\n    return {\n      start: {\n        offset: startPos,\n        line:   startPosDetails.line,\n        column: startPosDetails.column\n      },\n      end: {\n        offset: endPos,\n        line:   endPosDetails.line,\n        column: endPosDetails.column\n      }\n    };\n  }\n\n  function peg$fail(expected) {\n    if (peg$currPos < peg$maxFailPos) { return; }\n\n    if (peg$currPos > peg$maxFailPos) {\n      peg$maxFailPos = peg$currPos;\n      peg$maxFailExpected = [];\n    }\n\n    peg$maxFailExpected.push(expected);\n  }\n\n  function peg$buildSimpleError(message, location) {\n    return new peg$SyntaxError(message, null, null, location);\n  }\n\n  function peg$buildStructuredError(expected, found, location) {\n    return new peg$SyntaxError(\n      peg$SyntaxError.buildMessage(expected, found),\n      expected,\n      found,\n      location\n    );\n  }\n\n  function peg$parseStart() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parse_();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parseOrConditionExpression();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parse_();\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c0(s2);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseOrConditionExpression() {\n    var s0, s1, s2, s3, s4, s5;\n\n    s0 = peg$currPos;\n    s1 = peg$parseAndConditionExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseOrToken();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parseOrConditionExpression();\n            if (s5 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c1(s1, s3, s5);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseAndConditionExpression();\n    }\n\n    return s0;\n  }\n\n  function peg$parseAndConditionExpression() {\n    var s0, s1, s2, s3, s4, s5;\n\n    s0 = peg$currPos;\n    s1 = peg$parseNotConditionExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseAndToken();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parseAndConditionExpression();\n            if (s5 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c2(s1, s5);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseNotConditionExpression();\n    }\n\n    return s0;\n  }\n\n  function peg$parseNotConditionExpression() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parseNotToken();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseParensConditionExpression();\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c3(s1, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseParensConditionExpression();\n    }\n\n    return s0;\n  }\n\n  function peg$parseParensConditionExpression() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    if (input.charCodeAt(peg$currPos) === 40) {\n      s1 = peg$c4;\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c5); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 40) {\n          s3 = peg$c4;\n          peg$currPos++;\n        } else {\n          s3 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c5); }\n        }\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parseOrConditionExpression();\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 41) {\n                  s7 = peg$c6;\n                  peg$currPos++;\n                } else {\n                  s7 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                }\n                if (s7 !== peg$FAILED) {\n                  s8 = peg$parse_();\n                  if (s8 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 41) {\n                      s9 = peg$c6;\n                      peg$currPos++;\n                    } else {\n                      s9 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                    }\n                    if (s9 !== peg$FAILED) {\n                      peg$savedPos = s0;\n                      s1 = peg$c8(s5);\n                      s0 = s1;\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      if (input.charCodeAt(peg$currPos) === 40) {\n        s1 = peg$c4;\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c5); }\n      }\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 40) {\n            s3 = peg$c4;\n            peg$currPos++;\n          } else {\n            s3 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c5); }\n          }\n          if (s3 !== peg$FAILED) {\n            s4 = peg$parse_();\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parseConditionExpression();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parse_();\n                if (s6 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 41) {\n                    s7 = peg$c6;\n                    peg$currPos++;\n                  } else {\n                    s7 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                  }\n                  if (s7 !== peg$FAILED) {\n                    s8 = peg$parse_();\n                    if (s8 !== peg$FAILED) {\n                      if (input.charCodeAt(peg$currPos) === 41) {\n                        s9 = peg$c6;\n                        peg$currPos++;\n                      } else {\n                        s9 = peg$FAILED;\n                        if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                      }\n                      if (s9 !== peg$FAILED) {\n                        peg$savedPos = s0;\n                        s1 = peg$c9(s5);\n                        s0 = s1;\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        s1 = peg$parseConditionExpression();\n        if (s1 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c10(s1);\n        }\n        s0 = s1;\n        if (s0 === peg$FAILED) {\n          s0 = peg$currPos;\n          if (input.charCodeAt(peg$currPos) === 40) {\n            s1 = peg$c4;\n            peg$currPos++;\n          } else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c5); }\n          }\n          if (s1 !== peg$FAILED) {\n            s2 = peg$parse_();\n            if (s2 !== peg$FAILED) {\n              s3 = peg$parseOrConditionExpression();\n              if (s3 !== peg$FAILED) {\n                s4 = peg$parse_();\n                if (s4 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 41) {\n                    s5 = peg$c6;\n                    peg$currPos++;\n                  } else {\n                    s5 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                  }\n                  if (s5 !== peg$FAILED) {\n                    peg$savedPos = s0;\n                    s1 = peg$c11(s3);\n                    s0 = s1;\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseConditionExpression() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    s1 = peg$parseOperandParens();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseComparator();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parseOperandParens();\n            if (s5 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c12(s1, s3, s5);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      s1 = peg$parseOperandParens();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parseBetweenToken();\n          if (s3 !== peg$FAILED) {\n            s4 = peg$parse_();\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parseOperandParens();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parse_();\n                if (s6 !== peg$FAILED) {\n                  s7 = peg$parseAndToken();\n                  if (s7 !== peg$FAILED) {\n                    s8 = peg$parse_();\n                    if (s8 !== peg$FAILED) {\n                      s9 = peg$parseOperandParens();\n                      if (s9 !== peg$FAILED) {\n                        peg$savedPos = s0;\n                        s1 = peg$c13(s1, s5, s9);\n                        s0 = s1;\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        s1 = peg$parseOperandParens();\n        if (s1 !== peg$FAILED) {\n          s2 = peg$parse_();\n          if (s2 !== peg$FAILED) {\n            s3 = peg$parseInToken();\n            if (s3 !== peg$FAILED) {\n              s4 = peg$parse_();\n              if (s4 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 40) {\n                  s5 = peg$c4;\n                  peg$currPos++;\n                } else {\n                  s5 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c5); }\n                }\n                if (s5 !== peg$FAILED) {\n                  s6 = peg$parse_();\n                  if (s6 !== peg$FAILED) {\n                    s7 = peg$parseFunctionArgumentList();\n                    if (s7 !== peg$FAILED) {\n                      s8 = peg$parse_();\n                      if (s8 !== peg$FAILED) {\n                        if (input.charCodeAt(peg$currPos) === 41) {\n                          s9 = peg$c6;\n                          peg$currPos++;\n                        } else {\n                          s9 = peg$FAILED;\n                          if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                        }\n                        if (s9 !== peg$FAILED) {\n                          peg$savedPos = s0;\n                          s1 = peg$c14(s1, s3, s7);\n                          s0 = s1;\n                        } else {\n                          peg$currPos = s0;\n                          s0 = peg$FAILED;\n                        }\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n        if (s0 === peg$FAILED) {\n          s0 = peg$parseFunction();\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseComparator() {\n    var s0;\n\n    if (input.substr(peg$currPos, 2) === peg$c15) {\n      s0 = peg$c15;\n      peg$currPos += 2;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c16); }\n    }\n    if (s0 === peg$FAILED) {\n      if (input.substr(peg$currPos, 2) === peg$c17) {\n        s0 = peg$c17;\n        peg$currPos += 2;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c18); }\n      }\n      if (s0 === peg$FAILED) {\n        if (input.substr(peg$currPos, 2) === peg$c19) {\n          s0 = peg$c19;\n          peg$currPos += 2;\n        } else {\n          s0 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c20); }\n        }\n        if (s0 === peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 61) {\n            s0 = peg$c21;\n            peg$currPos++;\n          } else {\n            s0 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c22); }\n          }\n          if (s0 === peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 60) {\n              s0 = peg$c23;\n              peg$currPos++;\n            } else {\n              s0 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c24); }\n            }\n            if (s0 === peg$FAILED) {\n              if (input.charCodeAt(peg$currPos) === 62) {\n                s0 = peg$c25;\n                peg$currPos++;\n              } else {\n                s0 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c26); }\n              }\n            }\n          }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseOperandParens() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    if (input.charCodeAt(peg$currPos) === 40) {\n      s1 = peg$c4;\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c5); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 40) {\n          s3 = peg$c4;\n          peg$currPos++;\n        } else {\n          s3 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c5); }\n        }\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parseOperand();\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 41) {\n                  s7 = peg$c6;\n                  peg$currPos++;\n                } else {\n                  s7 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                }\n                if (s7 !== peg$FAILED) {\n                  s8 = peg$parse_();\n                  if (s8 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 41) {\n                      s9 = peg$c6;\n                      peg$currPos++;\n                    } else {\n                      s9 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                    }\n                    if (s9 !== peg$FAILED) {\n                      peg$savedPos = s0;\n                      s1 = peg$c27(s5);\n                      s0 = s1;\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      if (input.charCodeAt(peg$currPos) === 40) {\n        s1 = peg$c4;\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c5); }\n      }\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parseOperand();\n          if (s3 !== peg$FAILED) {\n            s4 = peg$parse_();\n            if (s4 !== peg$FAILED) {\n              if (input.charCodeAt(peg$currPos) === 41) {\n                s5 = peg$c6;\n                peg$currPos++;\n              } else {\n                s5 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c7); }\n              }\n              if (s5 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c28(s3);\n                s0 = s1;\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$parseOperand();\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseOperand() {\n    var s0, s1;\n\n    s0 = peg$parseFunction();\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseExpressionAttributeValue();\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        s1 = peg$parsePathExpression();\n        if (s1 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c29(s1);\n        }\n        s0 = s1;\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseFunction() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parseIdentifierStart();\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 40) {\n              s5 = peg$c4;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c5); }\n            }\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                s7 = peg$parseFunctionArgumentList();\n                if (s7 !== peg$FAILED) {\n                  s8 = peg$parse_();\n                  if (s8 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 41) {\n                      s9 = peg$c6;\n                      peg$currPos++;\n                    } else {\n                      s9 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                    }\n                    if (s9 !== peg$FAILED) {\n                      peg$savedPos = s0;\n                      s1 = peg$c30(s2, s3, s7);\n                      s0 = s1;\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseFunctionArgumentList() {\n    var s0, s1, s2, s3, s4, s5, s6, s7;\n\n    s0 = peg$currPos;\n    s1 = peg$parseOperandParens();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s5 = peg$c31;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c32); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = peg$parseOperandParens();\n            if (s7 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c33(s1, s7);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 44) {\n            s5 = peg$c31;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c32); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseOperandParens();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c33(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c34(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseExpressionAttributeName() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 35) {\n        s2 = peg$c35;\n        peg$currPos++;\n      } else {\n        s2 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c36); }\n      }\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c37(s2, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseExpressionAttributeValue() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 58) {\n        s2 = peg$c38;\n        peg$currPos++;\n      } else {\n        s2 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c39); }\n      }\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c40(s2, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsePathExpression() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    s1 = peg$parseGroupedPathExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 91) {\n          s5 = peg$c41;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c42); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = [];\n            if (peg$c43.test(input.charAt(peg$currPos))) {\n              s8 = input.charAt(peg$currPos);\n              peg$currPos++;\n            } else {\n              s8 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c44); }\n            }\n            if (s8 !== peg$FAILED) {\n              while (s8 !== peg$FAILED) {\n                s7.push(s8);\n                if (peg$c43.test(input.charAt(peg$currPos))) {\n                  s8 = input.charAt(peg$currPos);\n                  peg$currPos++;\n                } else {\n                  s8 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c44); }\n                }\n              }\n            } else {\n              s7 = peg$FAILED;\n            }\n            if (s7 !== peg$FAILED) {\n              s8 = peg$parse_();\n              if (s8 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 93) {\n                  s9 = peg$c45;\n                  peg$currPos++;\n                } else {\n                  s9 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c46); }\n                }\n                if (s9 !== peg$FAILED) {\n                  peg$savedPos = s3;\n                  s4 = peg$c47(s1, s7);\n                  s3 = s4;\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      if (s3 === peg$FAILED) {\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 46) {\n            s5 = peg$c48;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c49); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseIdentifier();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c50(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 91) {\n            s5 = peg$c41;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c42); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = [];\n              if (peg$c43.test(input.charAt(peg$currPos))) {\n                s8 = input.charAt(peg$currPos);\n                peg$currPos++;\n              } else {\n                s8 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c44); }\n              }\n              if (s8 !== peg$FAILED) {\n                while (s8 !== peg$FAILED) {\n                  s7.push(s8);\n                  if (peg$c43.test(input.charAt(peg$currPos))) {\n                    s8 = input.charAt(peg$currPos);\n                    peg$currPos++;\n                  } else {\n                    s8 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c44); }\n                  }\n                }\n              } else {\n                s7 = peg$FAILED;\n              }\n              if (s7 !== peg$FAILED) {\n                s8 = peg$parse_();\n                if (s8 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 93) {\n                    s9 = peg$c45;\n                    peg$currPos++;\n                  } else {\n                    s9 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c46); }\n                  }\n                  if (s9 !== peg$FAILED) {\n                    peg$savedPos = s3;\n                    s4 = peg$c47(s1, s7);\n                    s3 = s4;\n                  } else {\n                    peg$currPos = s3;\n                    s3 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n        if (s3 === peg$FAILED) {\n          s3 = peg$currPos;\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 46) {\n              s5 = peg$c48;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c49); }\n            }\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                s7 = peg$parseIdentifier();\n                if (s7 !== peg$FAILED) {\n                  peg$savedPos = s3;\n                  s4 = peg$c50(s1, s7);\n                  s3 = s4;\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c51(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseGroupedPathExpression() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$parseIdentifier();\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      if (input.charCodeAt(peg$currPos) === 40) {\n        s1 = peg$c4;\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c5); }\n      }\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 40) {\n            s3 = peg$c4;\n            peg$currPos++;\n          } else {\n            s3 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c5); }\n          }\n          if (s3 !== peg$FAILED) {\n            s4 = peg$parse_();\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parsePathExpression();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parse_();\n                if (s6 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 41) {\n                    s7 = peg$c6;\n                    peg$currPos++;\n                  } else {\n                    s7 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                  }\n                  if (s7 !== peg$FAILED) {\n                    s8 = peg$parse_();\n                    if (s8 !== peg$FAILED) {\n                      if (input.charCodeAt(peg$currPos) === 41) {\n                        s9 = peg$c6;\n                        peg$currPos++;\n                      } else {\n                        s9 = peg$FAILED;\n                        if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                      }\n                      if (s9 !== peg$FAILED) {\n                        peg$savedPos = s0;\n                        s1 = peg$c52(s5);\n                        s0 = s1;\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 40) {\n          s1 = peg$c4;\n          peg$currPos++;\n        } else {\n          s1 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c5); }\n        }\n        if (s1 !== peg$FAILED) {\n          s2 = peg$parse_();\n          if (s2 !== peg$FAILED) {\n            s3 = peg$parsePathExpression();\n            if (s3 !== peg$FAILED) {\n              s4 = peg$parse_();\n              if (s4 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 41) {\n                  s5 = peg$c6;\n                  peg$currPos++;\n                } else {\n                  s5 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c7); }\n                }\n                if (s5 !== peg$FAILED) {\n                  peg$savedPos = s0;\n                  s1 = peg$c53(s3);\n                  s0 = s1;\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifier() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parseIdentifierStart();\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c54(s2, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseExpressionAttributeName();\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifierStart() {\n    var s0;\n\n    if (peg$c55.test(input.charAt(peg$currPos))) {\n      s0 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c56); }\n    }\n    if (s0 === peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 95) {\n        s0 = peg$c57;\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c58); }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifierPart() {\n    var s0;\n\n    s0 = peg$parseIdentifierStart();\n    if (s0 === peg$FAILED) {\n      if (peg$c43.test(input.charAt(peg$currPos))) {\n        s0 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c44); }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseAttributePart() {\n    var s0;\n\n    s0 = peg$parseIdentifierPart();\n    if (s0 === peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 35) {\n        s0 = peg$c35;\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c36); }\n      }\n      if (s0 === peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 58) {\n          s0 = peg$c38;\n          peg$currPos++;\n        } else {\n          s0 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c39); }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseReservedWord() {\n    var s0;\n\n    s0 = peg$parseBetweenToken();\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseInToken();\n      if (s0 === peg$FAILED) {\n        s0 = peg$parseAndToken();\n        if (s0 === peg$FAILED) {\n          s0 = peg$parseOrToken();\n          if (s0 === peg$FAILED) {\n            s0 = peg$parseNotToken();\n          }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseBetweenToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 7).toLowerCase() === peg$c59) {\n      s1 = input.substr(peg$currPos, 7);\n      peg$currPos += 7;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c60); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseInToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 2).toLowerCase() === peg$c61) {\n      s1 = input.substr(peg$currPos, 2);\n      peg$currPos += 2;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c62); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseAndToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 3).toLowerCase() === peg$c63) {\n      s1 = input.substr(peg$currPos, 3);\n      peg$currPos += 3;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c64); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseOrToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 2).toLowerCase() === peg$c65) {\n      s1 = input.substr(peg$currPos, 2);\n      peg$currPos += 2;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c66); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseNotToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 3).toLowerCase() === peg$c67) {\n      s1 = input.substr(peg$currPos, 3);\n      peg$currPos += 3;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c68); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parse_() {\n    var s0, s1;\n\n    peg$silentFails++;\n    s0 = [];\n    if (peg$c70.test(input.charAt(peg$currPos))) {\n      s1 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c71); }\n    }\n    while (s1 !== peg$FAILED) {\n      s0.push(s1);\n      if (peg$c70.test(input.charAt(peg$currPos))) {\n        s1 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c71); }\n      }\n    }\n    peg$silentFails--;\n    if (s0 === peg$FAILED) {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c69); }\n    }\n\n    return s0;\n  }\n\n\n    // Declared by PEG: input, options, parser, text(), location(), expected(), error()\n\n    var context = options.context\n    var attrNames = context.attrNames || {}\n    var attrVals = context.attrVals || {}\n    var unusedAttrNames = context.unusedAttrNames || {}\n    var unusedAttrVals = context.unusedAttrVals || {}\n    var isReserved = context.isReserved\n    var errors = Object.create(null)\n    var nestedPaths = Object.create(null)\n    var pathHeads = Object.create(null)\n\n    function checkReserved(name) {\n      if (isReserved(name) && !errors.reserved) {\n        errors.reserved = 'Attribute name is a reserved keyword; reserved keyword: ' + name\n      }\n    }\n\n    function resolveAttrName(name) {\n      if (errors.attrNameVal) {\n        return\n      }\n      if (!attrNames[name]) {\n        errors.attrNameVal = 'An expression attribute name used in the document path is not defined; attribute name: ' + name\n        return\n      }\n      delete unusedAttrNames[name]\n      return attrNames[name]\n    }\n\n    function resolveAttrVal(name) {\n      if (errors.attrNameVal) {\n        return\n      }\n      if (!attrVals[name]) {\n        errors.attrNameVal = 'An expression attribute value used in expression is not defined; attribute value: ' + name\n        return\n      }\n      delete unusedAttrVals[name]\n      return attrVals[name]\n    }\n\n    function checkFunction(name, args) {\n      if (errors.unknownFunction) {\n        return\n      }\n      var functions = {\n        attribute_exists: 1,\n        attribute_not_exists: 1,\n        attribute_type: 2,\n        begins_with: 2,\n        contains: 2,\n        size: 1,\n      }\n      var numOperands = functions[name]\n      if (numOperands == null) {\n        errors.unknownFunction = 'Invalid function name; function: ' + name\n        return\n      }\n\n      if (errors.operand) {\n        return\n      }\n      if (numOperands != args.length) {\n        errors.operand = 'Incorrect number of operands for operator or function; ' +\n          'operator or function: ' + name + ', number of operands: ' + args.length\n        return\n      }\n\n      checkDistinct(name, args)\n\n      if (errors.function) {\n        return\n      }\n      switch (name) {\n        case 'attribute_exists':\n        case 'attribute_not_exists':\n          if (!Array.isArray(args[0])) {\n            errors.function = 'Operator or function requires a document path; ' +\n              'operator or function: ' + name\n            return\n          }\n          return getType(args[1])\n        case 'begins_with':\n          for (var i = 0; i < args.length; i++) {\n            var type = getType(args[i])\n            if (type && type != 'S' && type != 'B') {\n              errors.function = 'Incorrect operand type for operator or function; ' +\n                'operator or function: ' + name + ', operand type: ' + type\n              return\n            }\n          }\n          return 'BOOL'\n        case 'attribute_type':\n          var type = getType(args[1])\n          if (type != 'S') {\n            if (type == null) type = '{NS,SS,L,BS,N,M,B,BOOL,NULL,S}'\n            errors.function = 'Incorrect operand type for operator or function; ' +\n              'operator or function: ' + name + ', operand type: ' + type\n            return\n          }\n          if (!~['S', 'N', 'B', 'NULL', 'SS', 'BOOL', 'L', 'BS', 'NS', 'M'].indexOf(args[1].S)) {\n            errors.function = 'Invalid attribute type name found; type: ' +\n              args[1].S + ', valid types: {B,NULL,SS,BOOL,L,BS,N,NS,S,M}'\n            return\n          }\n          return 'BOOL'\n        case 'size':\n          var type = getType(args[0])\n          if (~['N', 'BOOL', 'NULL'].indexOf(type)) {\n            errors.function = 'Incorrect operand type for operator or function; ' +\n              'operator or function: ' + name + ', operand type: ' + type\n            return\n          }\n          return 'N'\n        case 'contains':\n          return 'BOOL'\n      }\n    }\n\n    function redundantParensError() {\n      if (!errors.parens) {\n        errors.parens = 'The expression has redundant parentheses;'\n      }\n    }\n\n    function checkMisusedFunction(args) {\n      if (errors.misusedFunction) {\n        return\n      }\n      for (var i = 0; i < args.length; i++) {\n        if (args[i] && args[i].type == 'function' && args[i].name != 'size') {\n          errors.misusedFunction = 'The function is not allowed to be used this way in an expression; function: ' +\n            args[i].name\n          return\n        }\n      }\n    }\n\n    function checkMisusedSize(expr) {\n      if (expr.type == 'function' && expr.name == 'size' && !errors.misusedFunction) {\n        errors.misusedFunction = 'The function is not allowed to be used this way in an expression; function: ' + expr.name\n      }\n    }\n\n    function checkDistinct(name, args) {\n      if (errors.distinct || args.length != 2 || !Array.isArray(args[0]) || !Array.isArray(args[1]) || args[0].length != args[1].length) {\n        return\n      }\n      for (var i = 0; i < args[0].length; i++) {\n        if (args[0][i] !== args[1][i]) {\n          return\n        }\n      }\n      errors.distinct = 'The first operand must be distinct from the remaining operands for this operator or function; operator: ' +\n        name + ', first operand: ' + pathStr(args[0])\n    }\n\n    function checkBetweenArgs(x, y) {\n      if (errors.function) {\n        return\n      }\n      var type1 = getImmediateType(x)\n      var type2 = getImmediateType(y)\n      if (type1 && type2) {\n        if (type1 != type2) {\n          errors.function = 'The BETWEEN operator requires same data type for lower and upper bounds; ' +\n            'lower bound operand: AttributeValue: {' + type1 + ':' + x[type1] + '}, ' +\n            'upper bound operand: AttributeValue: {' + type2 + ':' + y[type2] + '}'\n        } else if (context.compare('GT', x, y)) {\n          errors.function = 'The BETWEEN operator requires upper bound to be greater than or equal to lower bound; ' +\n            'lower bound operand: AttributeValue: {' + type1 + ':' + x[type1] + '}, ' +\n            'upper bound operand: AttributeValue: {' + type2 + ':' + y[type2] + '}'\n        }\n      }\n    }\n\n    function pathStr(path) {\n      return '[' + path.map(function(piece) {\n        return typeof piece == 'number' ? '[' + piece + ']' : piece\n      }).join(', ') + ']'\n    }\n\n    function getType(val) {\n      if (!val || typeof val != 'object' || Array.isArray(val)) return null\n      if (val.attrType) return val.attrType\n      return getImmediateType(val)\n    }\n\n    function getImmediateType(val) {\n      if (!val || typeof val != 'object' || Array.isArray(val) || val.attrType) return null\n      var types = ['S', 'N', 'B', 'NULL', 'BOOL', 'SS', 'NS', 'BS', 'L', 'M']\n      for (var i = 0; i < types.length; i++) {\n        if (val[types[i]] != null) return types[i]\n      }\n      return null\n    }\n\n    function checkConditionErrors() {\n      if (errors.condition) {\n        return\n      }\n      var errorOrder = ['attrNameVal', 'operand', 'distinct', 'function']\n      for (var i = 0; i < errorOrder.length; i++) {\n        if (errors[errorOrder[i]]) {\n          errors.condition = errors[errorOrder[i]]\n          return\n        }\n      }\n    }\n\n    function checkErrors() {\n      var errorOrder = ['parens', 'unknownFunction', 'misusedFunction', 'reserved', 'condition']\n      for (var i = 0; i < errorOrder.length; i++) {\n        if (errors[errorOrder[i]]) return errors[errorOrder[i]]\n      }\n      return null\n    }\n\n\n  peg$result = peg$startRuleFunction();\n\n  if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n    return peg$result;\n  } else {\n    if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n      peg$fail(peg$endExpectation());\n    }\n\n    throw peg$buildStructuredError(\n      peg$maxFailExpected,\n      peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n      peg$maxFailPos < input.length\n        ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n        : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n    );\n  }\n}\n\nmodule.exports = {\n  SyntaxError: peg$SyntaxError,\n  parse:       peg$parse\n};\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n\n\"use strict\";\n\nfunction peg$subclass(child, parent) {\n  function ctor() { this.constructor = child; }\n  ctor.prototype = parent.prototype;\n  child.prototype = new ctor();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n  this.message  = message;\n  this.expected = expected;\n  this.found    = found;\n  this.location = location;\n  this.name     = \"SyntaxError\";\n\n  if (typeof Error.captureStackTrace === \"function\") {\n    Error.captureStackTrace(this, peg$SyntaxError);\n  }\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n  var DESCRIBE_EXPECTATION_FNS = {\n        literal: function(expectation) {\n          return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n        },\n\n        \"class\": function(expectation) {\n          var escapedParts = \"\",\n              i;\n\n          for (i = 0; i < expectation.parts.length; i++) {\n            escapedParts += expectation.parts[i] instanceof Array\n              ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n              : classEscape(expectation.parts[i]);\n          }\n\n          return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n        },\n\n        any: function(expectation) {\n          return \"any character\";\n        },\n\n        end: function(expectation) {\n          return \"end of input\";\n        },\n\n        other: function(expectation) {\n          return expectation.description;\n        }\n      };\n\n  function hex(ch) {\n    return ch.charCodeAt(0).toString(16).toUpperCase();\n  }\n\n  function literalEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\"/g,  '\\\\\"')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function classEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\\]/g, '\\\\]')\n      .replace(/\\^/g, '\\\\^')\n      .replace(/-/g,  '\\\\-')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function describeExpectation(expectation) {\n    return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n  }\n\n  function describeExpected(expected) {\n    var descriptions = new Array(expected.length),\n        i, j;\n\n    for (i = 0; i < expected.length; i++) {\n      descriptions[i] = describeExpectation(expected[i]);\n    }\n\n    descriptions.sort();\n\n    if (descriptions.length > 0) {\n      for (i = 1, j = 1; i < descriptions.length; i++) {\n        if (descriptions[i - 1] !== descriptions[i]) {\n          descriptions[j] = descriptions[i];\n          j++;\n        }\n      }\n      descriptions.length = j;\n    }\n\n    switch (descriptions.length) {\n      case 1:\n        return descriptions[0];\n\n      case 2:\n        return descriptions[0] + \" or \" + descriptions[1];\n\n      default:\n        return descriptions.slice(0, -1).join(\", \")\n          + \", or \"\n          + descriptions[descriptions.length - 1];\n    }\n  }\n\n  function describeFound(found) {\n    return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n  }\n\n  return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n  options = options !== void 0 ? options : {};\n\n  var peg$FAILED = {},\n\n      peg$startRuleFunctions = { Start: peg$parseStart },\n      peg$startRuleFunction  = peg$parseStart,\n\n      peg$c0 = function(paths) {\n            paths.forEach(checkPath)\n            return checkErrors() || {paths: paths, nestedPaths: nestedPaths}\n          },\n      peg$c1 = \",\",\n      peg$c2 = peg$literalExpectation(\",\", false),\n      peg$c3 = function(head, expr) { return expr },\n      peg$c4 = function(head, tail) {\n            return [head].concat(tail)\n          },\n      peg$c5 = peg$otherExpectation(\"whitespace\"),\n      peg$c6 = /^[ \\t\\r\\n]/,\n      peg$c7 = peg$classExpectation([\" \", \"\\t\", \"\\r\", \"\\n\"], false, false),\n      peg$c8 = function(head, tail) {\n            var name = head + tail.join('')\n            checkReserved(name)\n            return name\n          },\n      peg$c9 = /^[a-zA-Z]/,\n      peg$c10 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false),\n      peg$c11 = \"_\",\n      peg$c12 = peg$literalExpectation(\"_\", false),\n      peg$c13 = /^[0-9]/,\n      peg$c14 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n      peg$c15 = \"#\",\n      peg$c16 = peg$literalExpectation(\"#\", false),\n      peg$c17 = function(head, tail) {\n            return resolveAttrName(head + tail.join(''))\n          },\n      peg$c18 = \"[\",\n      peg$c19 = peg$literalExpectation(\"[\", false),\n      peg$c20 = \"]\",\n      peg$c21 = peg$literalExpectation(\"]\", false),\n      peg$c22 = function(head, ix) {\n              return +(ix.join(''))\n            },\n      peg$c23 = \".\",\n      peg$c24 = peg$literalExpectation(\".\", false),\n      peg$c25 = function(head, prop) {\n              return prop\n            },\n      peg$c26 = function(head, tail) {\n            var path = [head].concat(tail)\n            if (path.length > 1) {\n              nestedPaths[path[0]] = true\n            }\n            return path\n          },\n\n      peg$currPos          = 0,\n      peg$savedPos         = 0,\n      peg$posDetailsCache  = [{ line: 1, column: 1 }],\n      peg$maxFailPos       = 0,\n      peg$maxFailExpected  = [],\n      peg$silentFails      = 0,\n\n      peg$result;\n\n  if (\"startRule\" in options) {\n    if (!(options.startRule in peg$startRuleFunctions)) {\n      throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n    }\n\n    peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n  }\n\n  function text() {\n    return input.substring(peg$savedPos, peg$currPos);\n  }\n\n  function location() {\n    return peg$computeLocation(peg$savedPos, peg$currPos);\n  }\n\n  function expected(description, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildStructuredError(\n      [peg$otherExpectation(description)],\n      input.substring(peg$savedPos, peg$currPos),\n      location\n    );\n  }\n\n  function error(message, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildSimpleError(message, location);\n  }\n\n  function peg$literalExpectation(text, ignoreCase) {\n    return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n  }\n\n  function peg$classExpectation(parts, inverted, ignoreCase) {\n    return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n  }\n\n  function peg$anyExpectation() {\n    return { type: \"any\" };\n  }\n\n  function peg$endExpectation() {\n    return { type: \"end\" };\n  }\n\n  function peg$otherExpectation(description) {\n    return { type: \"other\", description: description };\n  }\n\n  function peg$computePosDetails(pos) {\n    var details = peg$posDetailsCache[pos], p;\n\n    if (details) {\n      return details;\n    } else {\n      p = pos - 1;\n      while (!peg$posDetailsCache[p]) {\n        p--;\n      }\n\n      details = peg$posDetailsCache[p];\n      details = {\n        line:   details.line,\n        column: details.column\n      };\n\n      while (p < pos) {\n        if (input.charCodeAt(p) === 10) {\n          details.line++;\n          details.column = 1;\n        } else {\n          details.column++;\n        }\n\n        p++;\n      }\n\n      peg$posDetailsCache[pos] = details;\n      return details;\n    }\n  }\n\n  function peg$computeLocation(startPos, endPos) {\n    var startPosDetails = peg$computePosDetails(startPos),\n        endPosDetails   = peg$computePosDetails(endPos);\n\n    return {\n      start: {\n        offset: startPos,\n        line:   startPosDetails.line,\n        column: startPosDetails.column\n      },\n      end: {\n        offset: endPos,\n        line:   endPosDetails.line,\n        column: endPosDetails.column\n      }\n    };\n  }\n\n  function peg$fail(expected) {\n    if (peg$currPos < peg$maxFailPos) { return; }\n\n    if (peg$currPos > peg$maxFailPos) {\n      peg$maxFailPos = peg$currPos;\n      peg$maxFailExpected = [];\n    }\n\n    peg$maxFailExpected.push(expected);\n  }\n\n  function peg$buildSimpleError(message, location) {\n    return new peg$SyntaxError(message, null, null, location);\n  }\n\n  function peg$buildStructuredError(expected, found, location) {\n    return new peg$SyntaxError(\n      peg$SyntaxError.buildMessage(expected, found),\n      expected,\n      found,\n      location\n    );\n  }\n\n  function peg$parseStart() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parse_();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parsePathList();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parse_();\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c0(s2);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsePathList() {\n    var s0, s1, s2, s3, s4, s5, s6, s7;\n\n    s0 = peg$currPos;\n    s1 = peg$parsePathExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s5 = peg$c1;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c2); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = peg$parsePathExpression();\n            if (s7 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c3(s1, s7);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 44) {\n            s5 = peg$c1;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c2); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parsePathExpression();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c3(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c4(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parse_() {\n    var s0, s1;\n\n    peg$silentFails++;\n    s0 = [];\n    if (peg$c6.test(input.charAt(peg$currPos))) {\n      s1 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c7); }\n    }\n    while (s1 !== peg$FAILED) {\n      s0.push(s1);\n      if (peg$c6.test(input.charAt(peg$currPos))) {\n        s1 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c7); }\n      }\n    }\n    peg$silentFails--;\n    if (s0 === peg$FAILED) {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c5); }\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifier() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parseIdentifierStart();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$parseIdentifierPart();\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$parseIdentifierPart();\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c8(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseExpressionAttributeName();\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifierStart() {\n    var s0;\n\n    if (peg$c9.test(input.charAt(peg$currPos))) {\n      s0 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c10); }\n    }\n    if (s0 === peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 95) {\n        s0 = peg$c11;\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c12); }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifierPart() {\n    var s0;\n\n    s0 = peg$parseIdentifierStart();\n    if (s0 === peg$FAILED) {\n      if (peg$c13.test(input.charAt(peg$currPos))) {\n        s0 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c14); }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseExpressionAttributeName() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.charCodeAt(peg$currPos) === 35) {\n      s1 = peg$c15;\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c16); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$parseIdentifierPart();\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$parseIdentifierPart();\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c17(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsePathExpression() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    s1 = peg$parseIdentifier();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 91) {\n          s5 = peg$c18;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c19); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = [];\n            if (peg$c13.test(input.charAt(peg$currPos))) {\n              s8 = input.charAt(peg$currPos);\n              peg$currPos++;\n            } else {\n              s8 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c14); }\n            }\n            if (s8 !== peg$FAILED) {\n              while (s8 !== peg$FAILED) {\n                s7.push(s8);\n                if (peg$c13.test(input.charAt(peg$currPos))) {\n                  s8 = input.charAt(peg$currPos);\n                  peg$currPos++;\n                } else {\n                  s8 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c14); }\n                }\n              }\n            } else {\n              s7 = peg$FAILED;\n            }\n            if (s7 !== peg$FAILED) {\n              s8 = peg$parse_();\n              if (s8 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 93) {\n                  s9 = peg$c20;\n                  peg$currPos++;\n                } else {\n                  s9 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c21); }\n                }\n                if (s9 !== peg$FAILED) {\n                  peg$savedPos = s3;\n                  s4 = peg$c22(s1, s7);\n                  s3 = s4;\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      if (s3 === peg$FAILED) {\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 46) {\n            s5 = peg$c23;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c24); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseIdentifier();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c25(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 91) {\n            s5 = peg$c18;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c19); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = [];\n              if (peg$c13.test(input.charAt(peg$currPos))) {\n                s8 = input.charAt(peg$currPos);\n                peg$currPos++;\n              } else {\n                s8 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c14); }\n              }\n              if (s8 !== peg$FAILED) {\n                while (s8 !== peg$FAILED) {\n                  s7.push(s8);\n                  if (peg$c13.test(input.charAt(peg$currPos))) {\n                    s8 = input.charAt(peg$currPos);\n                    peg$currPos++;\n                  } else {\n                    s8 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c14); }\n                  }\n                }\n              } else {\n                s7 = peg$FAILED;\n              }\n              if (s7 !== peg$FAILED) {\n                s8 = peg$parse_();\n                if (s8 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 93) {\n                    s9 = peg$c20;\n                    peg$currPos++;\n                  } else {\n                    s9 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c21); }\n                  }\n                  if (s9 !== peg$FAILED) {\n                    peg$savedPos = s3;\n                    s4 = peg$c22(s1, s7);\n                    s3 = s4;\n                  } else {\n                    peg$currPos = s3;\n                    s3 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n        if (s3 === peg$FAILED) {\n          s3 = peg$currPos;\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 46) {\n              s5 = peg$c23;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c24); }\n            }\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                s7 = peg$parseIdentifier();\n                if (s7 !== peg$FAILED) {\n                  peg$savedPos = s3;\n                  s4 = peg$c25(s1, s7);\n                  s3 = s4;\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c26(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n\n    // Declared by PEG: input, options, parser, text(), location(), expected(), error()\n\n    var context = options.context\n    var attrNames = context.attrNames || {}\n    var unusedAttrNames = context.unusedAttrNames || {}\n    var isReserved = context.isReserved\n    var errors = {}\n    var paths = []\n    var nestedPaths = Object.create(null)\n\n    function checkReserved(name) {\n      if (isReserved(name) && !errors.reserved) {\n        errors.reserved = 'Attribute name is a reserved keyword; reserved keyword: ' + name\n      }\n    }\n\n    function resolveAttrName(name) {\n      if (errors.attrNameVal) {\n        return\n      }\n      if (!attrNames[name]) {\n        errors.attrNameVal = 'An expression attribute name used in the document path is not defined; attribute name: ' + name\n        return\n      }\n      delete unusedAttrNames[name]\n      return attrNames[name]\n    }\n\n    function checkPath(path) {\n      if (errors.pathOverlap) {\n        return\n      }\n      for (var i = 0; i < paths.length; i++) {\n        checkPaths(paths[i], path)\n        if (errors.pathOverlap) {\n          return\n        }\n      }\n      paths.push(path)\n    }\n\n    function checkPaths(path1, path2) {\n      for (var i = 0; i < path1.length && i < path2.length; i++) {\n        if (typeof path1[i] !== typeof path2[i]) {\n          errors.pathConflict = 'Two document paths conflict with each other; ' +\n            'must remove or rewrite one of these paths; path one: ' + pathStr(path1) + ', path two: ' + pathStr(path2)\n          return\n        }\n        if (path1[i] !== path2[i]) return\n      }\n      if (errors.pathOverlap) {\n        return\n      }\n      errors.pathOverlap = 'Two document paths overlap with each other; ' +\n        'must remove or rewrite one of these paths; path one: ' + pathStr(path1) + ', path two: ' + pathStr(path2)\n    }\n\n    function pathStr(path) {\n      return '[' + path.map(function(piece) {\n        return typeof piece == 'number' ? '[' + piece + ']' : piece\n      }).join(', ') + ']'\n    }\n\n    function checkErrors() {\n      var errorOrder = ['reserved', 'attrNameVal', 'pathOverlap', 'pathConflict']\n      for (var i = 0; i < errorOrder.length; i++) {\n        if (errors[errorOrder[i]]) return errors[errorOrder[i]]\n      }\n      return null\n    }\n\n\n  peg$result = peg$startRuleFunction();\n\n  if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n    return peg$result;\n  } else {\n    if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n      peg$fail(peg$endExpectation());\n    }\n\n    throw peg$buildStructuredError(\n      peg$maxFailExpected,\n      peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n      peg$maxFailPos < input.length\n        ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n        : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n    );\n  }\n}\n\nmodule.exports = {\n  SyntaxError: peg$SyntaxError,\n  parse:       peg$parse\n};\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n\n\"use strict\";\n\nfunction peg$subclass(child, parent) {\n  function ctor() { this.constructor = child; }\n  ctor.prototype = parent.prototype;\n  child.prototype = new ctor();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n  this.message  = message;\n  this.expected = expected;\n  this.found    = found;\n  this.location = location;\n  this.name     = \"SyntaxError\";\n\n  if (typeof Error.captureStackTrace === \"function\") {\n    Error.captureStackTrace(this, peg$SyntaxError);\n  }\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n  var DESCRIBE_EXPECTATION_FNS = {\n        literal: function(expectation) {\n          return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n        },\n\n        \"class\": function(expectation) {\n          var escapedParts = \"\",\n              i;\n\n          for (i = 0; i < expectation.parts.length; i++) {\n            escapedParts += expectation.parts[i] instanceof Array\n              ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n              : classEscape(expectation.parts[i]);\n          }\n\n          return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n        },\n\n        any: function(expectation) {\n          return \"any character\";\n        },\n\n        end: function(expectation) {\n          return \"end of input\";\n        },\n\n        other: function(expectation) {\n          return expectation.description;\n        }\n      };\n\n  function hex(ch) {\n    return ch.charCodeAt(0).toString(16).toUpperCase();\n  }\n\n  function literalEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\"/g,  '\\\\\"')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function classEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\\]/g, '\\\\]')\n      .replace(/\\^/g, '\\\\^')\n      .replace(/-/g,  '\\\\-')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function describeExpectation(expectation) {\n    return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n  }\n\n  function describeExpected(expected) {\n    var descriptions = new Array(expected.length),\n        i, j;\n\n    for (i = 0; i < expected.length; i++) {\n      descriptions[i] = describeExpectation(expected[i]);\n    }\n\n    descriptions.sort();\n\n    if (descriptions.length > 0) {\n      for (i = 1, j = 1; i < descriptions.length; i++) {\n        if (descriptions[i - 1] !== descriptions[i]) {\n          descriptions[j] = descriptions[i];\n          j++;\n        }\n      }\n      descriptions.length = j;\n    }\n\n    switch (descriptions.length) {\n      case 1:\n        return descriptions[0];\n\n      case 2:\n        return descriptions[0] + \" or \" + descriptions[1];\n\n      default:\n        return descriptions.slice(0, -1).join(\", \")\n          + \", or \"\n          + descriptions[descriptions.length - 1];\n    }\n  }\n\n  function describeFound(found) {\n    return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n  }\n\n  return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n  options = options !== void 0 ? options : {};\n\n  var peg$FAILED = {},\n\n      peg$startRuleFunctions = { Start: peg$parseStart },\n      peg$startRuleFunction  = peg$parseStart,\n\n      peg$c0 = function(sections) {\n            return checkErrors() || {sections: sections, paths: paths, nestedPaths: nestedPaths}\n          },\n      peg$c1 = function(head, sec) { return sec },\n      peg$c2 = function(head, tail) {\n            return [].concat.apply(head, tail)\n          },\n      peg$c3 = function(args) {\n            checkSection('SET')\n            return args\n          },\n      peg$c4 = function(args) {\n            checkSection('REMOVE')\n            return args\n          },\n      peg$c5 = function(args) {\n            checkSection('ADD')\n            return args\n          },\n      peg$c6 = function(args) {\n            checkSection('DELETE')\n            return args\n          },\n      peg$c7 = \",\",\n      peg$c8 = peg$literalExpectation(\",\", false),\n      peg$c9 = function(head, expr) { return expr },\n      peg$c10 = function(head, tail) {\n            return [head].concat(tail)\n          },\n      peg$c11 = \"=\",\n      peg$c12 = peg$literalExpectation(\"=\", false),\n      peg$c13 = function(path, val) {\n            checkPath(path)\n            return {type: 'set', path: path, val: val, attrType: getType(val)}\n          },\n      peg$c14 = function(path) {\n            checkPath(path)\n            return {type: 'remove', path: path}\n          },\n      peg$c15 = function(path, val) {\n            checkPath(path)\n            var attrType = checkOperator('ADD', val)\n            return {type: 'add', path: path, val: val, attrType: attrType}\n          },\n      peg$c16 = function(path, val) {\n            checkPath(path)\n            var attrType = checkOperator('DELETE', val)\n            return {type: 'delete', path: path, val: val, attrType: attrType}\n          },\n      peg$c17 = \"(\",\n      peg$c18 = peg$literalExpectation(\"(\", false),\n      peg$c19 = \")\",\n      peg$c20 = peg$literalExpectation(\")\", false),\n      peg$c21 = function(val) { return val },\n      peg$c22 = \"+\",\n      peg$c23 = peg$literalExpectation(\"+\", false),\n      peg$c24 = function(arg1, arg2) {\n            var attrType = checkFunction('+', [arg1, arg2])\n            return {type: 'add', args: [arg1, arg2], attrType: attrType}\n          },\n      peg$c25 = \"-\",\n      peg$c26 = peg$literalExpectation(\"-\", false),\n      peg$c27 = function(arg1, arg2) {\n            var attrType = checkFunction('-', [arg1, arg2])\n            return {type: 'subtract', args: [arg1, arg2], attrType: attrType}\n          },\n      peg$c28 = function(op) { return op },\n      peg$c29 = function(head, tail, args) {\n            var name = head + tail.join('')\n            var attrType = checkFunction(name, args)\n            return {type: 'function', name: name, args: args, attrType: attrType}\n          },\n      peg$c30 = \"#\",\n      peg$c31 = peg$literalExpectation(\"#\", false),\n      peg$c32 = function(head, tail) {\n            return resolveAttrName(head + tail.join(''))\n          },\n      peg$c33 = \":\",\n      peg$c34 = peg$literalExpectation(\":\", false),\n      peg$c35 = function(head, tail) {\n            return resolveAttrVal(head + tail.join(''))\n          },\n      peg$c36 = \"[\",\n      peg$c37 = peg$literalExpectation(\"[\", false),\n      peg$c38 = /^[0-9]/,\n      peg$c39 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n      peg$c40 = \"]\",\n      peg$c41 = peg$literalExpectation(\"]\", false),\n      peg$c42 = function(head, ix) {\n              return +(ix.join(''))\n            },\n      peg$c43 = \".\",\n      peg$c44 = peg$literalExpectation(\".\", false),\n      peg$c45 = function(head, prop) {\n              return prop\n            },\n      peg$c46 = function(head, tail) {\n            var path = [head].concat(tail)\n            if (path.length > 1) {\n              nestedPaths[path[0]] = true\n            }\n            return path\n          },\n      peg$c47 = function(head, tail) {\n            var name = head + tail.join('')\n            checkReserved(name)\n            return name\n          },\n      peg$c48 = /^[a-zA-Z]/,\n      peg$c49 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false),\n      peg$c50 = \"_\",\n      peg$c51 = peg$literalExpectation(\"_\", false),\n      peg$c52 = \"set\",\n      peg$c53 = peg$literalExpectation(\"SET\", true),\n      peg$c54 = \"remove\",\n      peg$c55 = peg$literalExpectation(\"REMOVE\", true),\n      peg$c56 = \"add\",\n      peg$c57 = peg$literalExpectation(\"ADD\", true),\n      peg$c58 = \"delete\",\n      peg$c59 = peg$literalExpectation(\"DELETE\", true),\n      peg$c60 = peg$otherExpectation(\"whitespace\"),\n      peg$c61 = /^[ \\t\\r\\n]/,\n      peg$c62 = peg$classExpectation([\" \", \"\\t\", \"\\r\", \"\\n\"], false, false),\n\n      peg$currPos          = 0,\n      peg$savedPos         = 0,\n      peg$posDetailsCache  = [{ line: 1, column: 1 }],\n      peg$maxFailPos       = 0,\n      peg$maxFailExpected  = [],\n      peg$silentFails      = 0,\n\n      peg$result;\n\n  if (\"startRule\" in options) {\n    if (!(options.startRule in peg$startRuleFunctions)) {\n      throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n    }\n\n    peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n  }\n\n  function text() {\n    return input.substring(peg$savedPos, peg$currPos);\n  }\n\n  function location() {\n    return peg$computeLocation(peg$savedPos, peg$currPos);\n  }\n\n  function expected(description, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildStructuredError(\n      [peg$otherExpectation(description)],\n      input.substring(peg$savedPos, peg$currPos),\n      location\n    );\n  }\n\n  function error(message, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildSimpleError(message, location);\n  }\n\n  function peg$literalExpectation(text, ignoreCase) {\n    return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n  }\n\n  function peg$classExpectation(parts, inverted, ignoreCase) {\n    return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n  }\n\n  function peg$anyExpectation() {\n    return { type: \"any\" };\n  }\n\n  function peg$endExpectation() {\n    return { type: \"end\" };\n  }\n\n  function peg$otherExpectation(description) {\n    return { type: \"other\", description: description };\n  }\n\n  function peg$computePosDetails(pos) {\n    var details = peg$posDetailsCache[pos], p;\n\n    if (details) {\n      return details;\n    } else {\n      p = pos - 1;\n      while (!peg$posDetailsCache[p]) {\n        p--;\n      }\n\n      details = peg$posDetailsCache[p];\n      details = {\n        line:   details.line,\n        column: details.column\n      };\n\n      while (p < pos) {\n        if (input.charCodeAt(p) === 10) {\n          details.line++;\n          details.column = 1;\n        } else {\n          details.column++;\n        }\n\n        p++;\n      }\n\n      peg$posDetailsCache[pos] = details;\n      return details;\n    }\n  }\n\n  function peg$computeLocation(startPos, endPos) {\n    var startPosDetails = peg$computePosDetails(startPos),\n        endPosDetails   = peg$computePosDetails(endPos);\n\n    return {\n      start: {\n        offset: startPos,\n        line:   startPosDetails.line,\n        column: startPosDetails.column\n      },\n      end: {\n        offset: endPos,\n        line:   endPosDetails.line,\n        column: endPosDetails.column\n      }\n    };\n  }\n\n  function peg$fail(expected) {\n    if (peg$currPos < peg$maxFailPos) { return; }\n\n    if (peg$currPos > peg$maxFailPos) {\n      peg$maxFailPos = peg$currPos;\n      peg$maxFailExpected = [];\n    }\n\n    peg$maxFailExpected.push(expected);\n  }\n\n  function peg$buildSimpleError(message, location) {\n    return new peg$SyntaxError(message, null, null, location);\n  }\n\n  function peg$buildStructuredError(expected, found, location) {\n    return new peg$SyntaxError(\n      peg$SyntaxError.buildMessage(expected, found),\n      expected,\n      found,\n      location\n    );\n  }\n\n  function peg$parseStart() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parse_();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parseSectionList();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parse_();\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c0(s2);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseSectionList() {\n    var s0, s1, s2, s3, s4, s5;\n\n    s0 = peg$currPos;\n    s1 = peg$parseSection();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        s5 = peg$parseSection();\n        if (s5 !== peg$FAILED) {\n          peg$savedPos = s3;\n          s4 = peg$c1(s1, s5);\n          s3 = s4;\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          s5 = peg$parseSection();\n          if (s5 !== peg$FAILED) {\n            peg$savedPos = s3;\n            s4 = peg$c1(s1, s5);\n            s3 = s4;\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c2(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseSection() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parseSetToken();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseSetArgumentList();\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c3(s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      s1 = peg$parseRemoveToken();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          s3 = peg$parseRemoveArgumentList();\n          if (s3 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c4(s3);\n            s0 = s1;\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        s1 = peg$parseAddToken();\n        if (s1 !== peg$FAILED) {\n          s2 = peg$parse_();\n          if (s2 !== peg$FAILED) {\n            s3 = peg$parseAddArgumentList();\n            if (s3 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c5(s3);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n        if (s0 === peg$FAILED) {\n          s0 = peg$currPos;\n          s1 = peg$parseDeleteToken();\n          if (s1 !== peg$FAILED) {\n            s2 = peg$parse_();\n            if (s2 !== peg$FAILED) {\n              s3 = peg$parseDeleteArgumentList();\n              if (s3 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c6(s3);\n                s0 = s1;\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseSetArgumentList() {\n    var s0, s1, s2, s3, s4, s5, s6, s7;\n\n    s0 = peg$currPos;\n    s1 = peg$parseSetExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s5 = peg$c7;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c8); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = peg$parseSetExpression();\n            if (s7 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c9(s1, s7);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 44) {\n            s5 = peg$c7;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c8); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseSetExpression();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c9(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c10(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseRemoveArgumentList() {\n    var s0, s1, s2, s3, s4, s5, s6, s7;\n\n    s0 = peg$currPos;\n    s1 = peg$parseRemoveExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s5 = peg$c7;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c8); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = peg$parseRemoveExpression();\n            if (s7 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c9(s1, s7);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 44) {\n            s5 = peg$c7;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c8); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseRemoveExpression();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c9(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c10(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseAddArgumentList() {\n    var s0, s1, s2, s3, s4, s5, s6, s7;\n\n    s0 = peg$currPos;\n    s1 = peg$parseAddExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s5 = peg$c7;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c8); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = peg$parseAddExpression();\n            if (s7 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c9(s1, s7);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 44) {\n            s5 = peg$c7;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c8); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseAddExpression();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c9(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c10(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseDeleteArgumentList() {\n    var s0, s1, s2, s3, s4, s5, s6, s7;\n\n    s0 = peg$currPos;\n    s1 = peg$parseDeleteExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s5 = peg$c7;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c8); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = peg$parseDeleteExpression();\n            if (s7 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c9(s1, s7);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 44) {\n            s5 = peg$c7;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c8); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseDeleteExpression();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c9(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c10(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseSetExpression() {\n    var s0, s1, s2, s3, s4, s5;\n\n    s0 = peg$currPos;\n    s1 = peg$parsePathExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 61) {\n          s3 = peg$c11;\n          peg$currPos++;\n        } else {\n          s3 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c12); }\n        }\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parseSetValueParens();\n            if (s5 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c13(s1, s5);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseRemoveExpression() {\n    var s0, s1;\n\n    s0 = peg$currPos;\n    s1 = peg$parsePathExpression();\n    if (s1 !== peg$FAILED) {\n      peg$savedPos = s0;\n      s1 = peg$c14(s1);\n    }\n    s0 = s1;\n\n    return s0;\n  }\n\n  function peg$parseAddExpression() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parsePathExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseExpressionAttributeValue();\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c15(s1, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseDeleteExpression() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    s1 = peg$parsePathExpression();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseExpressionAttributeValue();\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c16(s1, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseSetValueParens() {\n    var s0, s1, s2, s3, s4, s5;\n\n    s0 = peg$currPos;\n    if (input.charCodeAt(peg$currPos) === 40) {\n      s1 = peg$c17;\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c18); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseSetValue();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 41) {\n              s5 = peg$c19;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c20); }\n            }\n            if (s5 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c21(s3);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseSetValue();\n    }\n\n    return s0;\n  }\n\n  function peg$parseSetValue() {\n    var s0, s1, s2, s3, s4, s5;\n\n    s0 = peg$currPos;\n    s1 = peg$parseOperandParens();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 43) {\n          s3 = peg$c22;\n          peg$currPos++;\n        } else {\n          s3 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c23); }\n        }\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parseOperandParens();\n            if (s5 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c24(s1, s5);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      s1 = peg$parseOperandParens();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 45) {\n            s3 = peg$c25;\n            peg$currPos++;\n          } else {\n            s3 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c26); }\n          }\n          if (s3 !== peg$FAILED) {\n            s4 = peg$parse_();\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parseOperandParens();\n              if (s5 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c27(s1, s5);\n                s0 = s1;\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$parseOperandParens();\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseOperandParens() {\n    var s0, s1, s2, s3, s4, s5;\n\n    s0 = peg$currPos;\n    if (input.charCodeAt(peg$currPos) === 40) {\n      s1 = peg$c17;\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c18); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parseOperand();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 41) {\n              s5 = peg$c19;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c20); }\n            }\n            if (s5 !== peg$FAILED) {\n              peg$savedPos = s0;\n              s1 = peg$c28(s3);\n              s0 = s1;\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseOperand();\n    }\n\n    return s0;\n  }\n\n  function peg$parseOperand() {\n    var s0;\n\n    s0 = peg$parseFunction();\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseExpressionAttributeValue();\n      if (s0 === peg$FAILED) {\n        s0 = peg$parsePathExpression();\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseFunction() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parseIdentifierStart();\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 40) {\n              s5 = peg$c17;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c18); }\n            }\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                s7 = peg$parseFunctionArgumentList();\n                if (s7 !== peg$FAILED) {\n                  s8 = peg$parse_();\n                  if (s8 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 41) {\n                      s9 = peg$c19;\n                      peg$currPos++;\n                    } else {\n                      s9 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c20); }\n                    }\n                    if (s9 !== peg$FAILED) {\n                      peg$savedPos = s0;\n                      s1 = peg$c29(s2, s3, s7);\n                      s0 = s1;\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseFunctionArgumentList() {\n    var s0, s1, s2, s3, s4, s5, s6, s7;\n\n    s0 = peg$currPos;\n    s1 = peg$parseOperandParens();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s5 = peg$c7;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c8); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = peg$parseOperandParens();\n            if (s7 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c9(s1, s7);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 44) {\n            s5 = peg$c7;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c8); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseOperandParens();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c9(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c10(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseExpressionAttributeName() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 35) {\n        s2 = peg$c30;\n        peg$currPos++;\n      } else {\n        s2 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c31); }\n      }\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c32(s2, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseExpressionAttributeValue() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 58) {\n        s2 = peg$c33;\n        peg$currPos++;\n      } else {\n        s2 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c34); }\n      }\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c35(s2, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsePathExpression() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n\n    s0 = peg$currPos;\n    s1 = peg$parseIdentifier();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      s4 = peg$parse_();\n      if (s4 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 91) {\n          s5 = peg$c36;\n          peg$currPos++;\n        } else {\n          s5 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c37); }\n        }\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parse_();\n          if (s6 !== peg$FAILED) {\n            s7 = [];\n            if (peg$c38.test(input.charAt(peg$currPos))) {\n              s8 = input.charAt(peg$currPos);\n              peg$currPos++;\n            } else {\n              s8 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c39); }\n            }\n            if (s8 !== peg$FAILED) {\n              while (s8 !== peg$FAILED) {\n                s7.push(s8);\n                if (peg$c38.test(input.charAt(peg$currPos))) {\n                  s8 = input.charAt(peg$currPos);\n                  peg$currPos++;\n                } else {\n                  s8 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c39); }\n                }\n              }\n            } else {\n              s7 = peg$FAILED;\n            }\n            if (s7 !== peg$FAILED) {\n              s8 = peg$parse_();\n              if (s8 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 93) {\n                  s9 = peg$c40;\n                  peg$currPos++;\n                } else {\n                  s9 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c41); }\n                }\n                if (s9 !== peg$FAILED) {\n                  peg$savedPos = s3;\n                  s4 = peg$c42(s1, s7);\n                  s3 = s4;\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      if (s3 === peg$FAILED) {\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 46) {\n            s5 = peg$c43;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c44); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = peg$parseIdentifier();\n              if (s7 !== peg$FAILED) {\n                peg$savedPos = s3;\n                s4 = peg$c45(s1, s7);\n                s3 = s4;\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        s4 = peg$parse_();\n        if (s4 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 91) {\n            s5 = peg$c36;\n            peg$currPos++;\n          } else {\n            s5 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c37); }\n          }\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parse_();\n            if (s6 !== peg$FAILED) {\n              s7 = [];\n              if (peg$c38.test(input.charAt(peg$currPos))) {\n                s8 = input.charAt(peg$currPos);\n                peg$currPos++;\n              } else {\n                s8 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c39); }\n              }\n              if (s8 !== peg$FAILED) {\n                while (s8 !== peg$FAILED) {\n                  s7.push(s8);\n                  if (peg$c38.test(input.charAt(peg$currPos))) {\n                    s8 = input.charAt(peg$currPos);\n                    peg$currPos++;\n                  } else {\n                    s8 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c39); }\n                  }\n                }\n              } else {\n                s7 = peg$FAILED;\n              }\n              if (s7 !== peg$FAILED) {\n                s8 = peg$parse_();\n                if (s8 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 93) {\n                    s9 = peg$c40;\n                    peg$currPos++;\n                  } else {\n                    s9 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c41); }\n                  }\n                  if (s9 !== peg$FAILED) {\n                    peg$savedPos = s3;\n                    s4 = peg$c42(s1, s7);\n                    s3 = s4;\n                  } else {\n                    peg$currPos = s3;\n                    s3 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n        if (s3 === peg$FAILED) {\n          s3 = peg$currPos;\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 46) {\n              s5 = peg$c43;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c44); }\n            }\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                s7 = peg$parseIdentifier();\n                if (s7 !== peg$FAILED) {\n                  peg$savedPos = s3;\n                  s4 = peg$c45(s1, s7);\n                  s3 = s4;\n                } else {\n                  peg$currPos = s3;\n                  s3 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s3;\n                s3 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c46(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifier() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    peg$silentFails++;\n    s2 = peg$parseReservedWord();\n    peg$silentFails--;\n    if (s2 === peg$FAILED) {\n      s1 = void 0;\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parseIdentifierStart();\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$parseIdentifierPart();\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$parseIdentifierPart();\n        }\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c47(s2, s3);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseExpressionAttributeName();\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifierStart() {\n    var s0;\n\n    if (peg$c48.test(input.charAt(peg$currPos))) {\n      s0 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c49); }\n    }\n    if (s0 === peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 95) {\n        s0 = peg$c50;\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c51); }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseIdentifierPart() {\n    var s0;\n\n    s0 = peg$parseIdentifierStart();\n    if (s0 === peg$FAILED) {\n      if (peg$c38.test(input.charAt(peg$currPos))) {\n        s0 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c39); }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseAttributePart() {\n    var s0;\n\n    s0 = peg$parseIdentifierPart();\n    if (s0 === peg$FAILED) {\n      if (input.charCodeAt(peg$currPos) === 35) {\n        s0 = peg$c30;\n        peg$currPos++;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c31); }\n      }\n      if (s0 === peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 58) {\n          s0 = peg$c33;\n          peg$currPos++;\n        } else {\n          s0 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c34); }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseReservedWord() {\n    var s0;\n\n    s0 = peg$parseSetToken();\n    if (s0 === peg$FAILED) {\n      s0 = peg$parseRemoveToken();\n      if (s0 === peg$FAILED) {\n        s0 = peg$parseAddToken();\n        if (s0 === peg$FAILED) {\n          s0 = peg$parseDeleteToken();\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseSetToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 3).toLowerCase() === peg$c52) {\n      s1 = input.substr(peg$currPos, 3);\n      peg$currPos += 3;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c53); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseRemoveToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 6).toLowerCase() === peg$c54) {\n      s1 = input.substr(peg$currPos, 6);\n      peg$currPos += 6;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c55); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseAddToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 3).toLowerCase() === peg$c56) {\n      s1 = input.substr(peg$currPos, 3);\n      peg$currPos += 3;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c57); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parseDeleteToken() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.substr(peg$currPos, 6).toLowerCase() === peg$c58) {\n      s1 = input.substr(peg$currPos, 6);\n      peg$currPos += 6;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c59); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = peg$currPos;\n      peg$silentFails++;\n      s3 = peg$parseAttributePart();\n      peg$silentFails--;\n      if (s3 === peg$FAILED) {\n        s2 = void 0;\n      } else {\n        peg$currPos = s2;\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        s1 = [s1, s2];\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parse_() {\n    var s0, s1;\n\n    peg$silentFails++;\n    s0 = [];\n    if (peg$c61.test(input.charAt(peg$currPos))) {\n      s1 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c62); }\n    }\n    while (s1 !== peg$FAILED) {\n      s0.push(s1);\n      if (peg$c61.test(input.charAt(peg$currPos))) {\n        s1 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c62); }\n      }\n    }\n    peg$silentFails--;\n    if (s0 === peg$FAILED) {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c60); }\n    }\n\n    return s0;\n  }\n\n\n    // Declared by PEG: input, options, parser, text(), location(), expected(), error()\n\n    var context = options.context\n    var attrNames = context.attrNames || Object.create(null)\n    var attrVals = context.attrVals || Object.create(null)\n    var unusedAttrNames = context.unusedAttrNames || Object.create(null)\n    var unusedAttrVals = context.unusedAttrVals || Object.create(null)\n    var isReserved = context.isReserved\n    var errors = Object.create(null)\n    var sections = Object.create(null)\n    var paths = []\n    var nestedPaths = Object.create(null)\n\n    function checkReserved(name) {\n      if (isReserved(name) && !errors.reserved) {\n        errors.reserved = 'Attribute name is a reserved keyword; reserved keyword: ' + name\n      }\n    }\n\n    function checkFunction(name, args) {\n      if (errors.unknownFunction) {\n        return\n      }\n      var functions = {\n        'if_not_exists': 2,\n        'list_append': 2,\n        '+': 2,\n        '-': 2,\n      }\n      var numOperands = functions[name]\n      if (numOperands == null) {\n        errors.unknownFunction = 'Invalid function name; function: ' + name\n        return\n      }\n      if (errors.function) {\n        return\n      }\n      if (numOperands != args.length) {\n        errors.function = 'Incorrect number of operands for operator or function; ' +\n          'operator or function: ' + name + ', number of operands: ' + args.length\n        return\n      }\n      switch (name) {\n        case 'if_not_exists':\n          if (!Array.isArray(args[0])) {\n            errors.function = 'Operator or function requires a document path; ' +\n              'operator or function: ' + name\n            return\n          }\n          return getType(args[1])\n        case 'list_append':\n          for (var i = 0; i < args.length; i++) {\n            var type = getImmediateType(args[i])\n            if (type && type != 'L') {\n              errors.function = 'Incorrect operand type for operator or function; ' +\n                'operator or function: ' + name + ', operand type: ' + type\n              return\n            }\n          }\n          return 'L'\n        case '+':\n        case '-':\n          for (var i = 0; i < args.length; i++) {\n            var type = getImmediateType(args[i])\n            if (type && type != 'N') {\n              errors.function = 'Incorrect operand type for operator or function; ' +\n                'operator or function: ' + name + ', operand type: ' + type\n              return\n            }\n          }\n          return 'N'\n      }\n    }\n\n    function checkSection(type) {\n      if (errors.section) {\n        return\n      }\n      if (sections[type]) {\n        errors.section = 'The \"' + type + '\" section can only be used once in an update expression;'\n        return\n      }\n      sections[type] = true\n    }\n\n    function resolveAttrName(name) {\n      if (errors.attrName) {\n        return\n      }\n      if (!attrNames[name]) {\n        errors.attrName = 'An expression attribute name used in the document path is not defined; attribute name: ' + name\n        return\n      }\n      delete unusedAttrNames[name]\n      return attrNames[name]\n    }\n\n    function resolveAttrVal(name) {\n      if (errors.attrVal) {\n        return\n      }\n      if (!attrVals[name]) {\n        errors.attrVal = 'An expression attribute value used in expression is not defined; attribute value: ' + name\n        return\n      }\n      delete unusedAttrVals[name]\n      return attrVals[name]\n    }\n\n    function checkPath(path) {\n      if (errors.pathOverlap || !Array.isArray(path)) {\n        return\n      }\n      for (var i = 0; i < paths.length; i++) {\n        checkPaths(paths[i], path)\n        if (errors.pathOverlap) {\n          return\n        }\n      }\n      paths.push(path)\n    }\n\n    function checkPaths(path1, path2) {\n      for (var i = 0; i < path1.length && i < path2.length; i++) {\n        if (typeof path1[i] !== typeof path2[i]) {\n          errors.pathConflict = 'Two document paths conflict with each other; ' +\n            'must remove or rewrite one of these paths; path one: ' + pathStr(path1) + ', path two: ' + pathStr(path2)\n          return\n        }\n        if (path1[i] !== path2[i]) return\n      }\n      if (errors.pathOverlap) {\n        return\n      }\n      errors.pathOverlap = 'Two document paths overlap with each other; ' +\n        'must remove or rewrite one of these paths; path one: ' + pathStr(path1) + ', path two: ' + pathStr(path2)\n    }\n\n    function pathStr(path) {\n      return '[' + path.map(function(piece) {\n        return typeof piece == 'number' ? '[' + piece + ']' : piece\n      }).join(', ') + ']'\n    }\n\n    function checkOperator(operator, val) {\n      if (errors.operand || !val) {\n        return\n      }\n      var typeMappings = {\n        S: 'STRING',\n        N: 'NUMBER',\n        B: 'BINARY',\n        NULL: 'NULL',\n        BOOL: 'BOOLEAN',\n        L: 'LIST',\n        M: 'MAP',\n      }\n      var type = getImmediateType(val)\n      if (typeMappings[type] && !(operator == 'ADD' && type == 'N')) {\n        errors.operand = 'Incorrect operand type for operator or function; operator: ' +\n          operator + ', operand type: ' + typeMappings[type]\n      }\n      return type\n    }\n\n    function getType(val) {\n      if (!val || typeof val != 'object' || Array.isArray(val)) return null\n      if (val.attrType) return val.attrType\n      return getImmediateType(val)\n    }\n\n    function getImmediateType(val) {\n      if (!val || typeof val != 'object' || Array.isArray(val) || val.attrType) return null\n      var types = ['S', 'N', 'B', 'NULL', 'BOOL', 'SS', 'NS', 'BS', 'L', 'M']\n      for (var i = 0; i < types.length; i++) {\n        if (val[types[i]] != null) return types[i]\n      }\n      return null\n    }\n\n    function checkErrors() {\n      var errorOrder = ['reserved', 'unknownFunction', 'section', 'attrName',\n        'attrVal', 'pathOverlap', 'pathConflict', 'operand', 'function']\n      for (var i = 0; i < errorOrder.length; i++) {\n        if (errors[errorOrder[i]]) return errors[errorOrder[i]]\n      }\n      return null\n    }\n\n\n  peg$result = peg$startRuleFunction();\n\n  if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n    return peg$result;\n  } else {\n    if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n      peg$fail(peg$endExpectation());\n    }\n\n    throw peg$buildStructuredError(\n      peg$maxFailExpected,\n      peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n      peg$maxFailPos < input.length\n        ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n        : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n    );\n  }\n}\n\nmodule.exports = {\n  SyntaxError: peg$SyntaxError,\n  parse:       peg$parse\n};\n","var Big = require('big.js'),\n  db = require('../db'),\n  conditionParser = require('../db/conditionParser'),\n  projectionParser = require('../db/projectionParser'),\n  updateParser = require('../db/updateParser')\n\nexports.checkTypes = checkTypes\nexports.checkValidations = checkValidations\nexports.toLowerFirst = toLowerFirst\nexports.findDuplicate = findDuplicate\nexports.validateAttributeValue = validateAttributeValue\nexports.validateConditions = validateConditions\nexports.validateAttributeConditions = validateAttributeConditions\nexports.validateExpressionParams = validateExpressionParams\nexports.validateExpressions = validateExpressions\nexports.convertKeyCondition = convertKeyCondition\n\nfunction checkTypes (data, types) {\n  var key\n  for (key in data) {\n    // TODO: deal with nulls\n    if (!types[key] || data[key] == null)\n      delete data[key]\n  }\n\n  return Object.keys(types).reduce(function (newData, key) {\n    var val = checkType(data[key], types[key])\n    if (val != null) newData[key] = val\n    return newData\n  }, {})\n\n  function typeError (msg) {\n    var err = new Error(msg)\n    err.statusCode = 400\n    err.body = {\n      __type: 'com.amazon.coral.service#SerializationException',\n      Message: msg,\n    }\n    return err\n  }\n\n  function checkType (val, type) {\n    if (val == null) return null\n    var children = type.children\n    if (typeof children == 'string') children = { type: children }\n    if (type.type) type = type.type\n    var subtypeMatch = type.match(/(.+?)<(.+)>$/), subtype\n    if (subtypeMatch != null) {\n      type = subtypeMatch[1]\n      subtype = subtypeMatch[2]\n    }\n\n    if (type == 'AttrStruct') {\n      return checkType(val, {\n        type: subtype + '<AttributeValue>',\n        children: {\n          S: 'String',\n          B: 'Blob',\n          N: 'String',\n          BOOL: 'Boolean',\n          NULL: 'Boolean',\n          BS: {\n            type: 'List',\n            children: 'Blob',\n          },\n          NS: {\n            type: 'List',\n            children: 'String',\n          },\n          SS: {\n            type: 'List',\n            children: 'String',\n          },\n          L: {\n            type: 'List',\n            children: 'AttrStruct<ValueStruct>',\n          },\n          M: {\n            type: 'Map<AttributeValue>',\n            children: 'AttrStruct<ValueStruct>',\n          },\n        },\n      })\n    }\n\n    switch (type) {\n    case 'Boolean':\n      switch (typeof val) {\n      case 'number':\n        throw typeError((val % 1 === 0 ? 'NUMBER_VALUE' : 'DECIMAL_VALUE') + ' cannot be converted to ' + type)\n      case 'string':\n        // 'true'/'false'/'1'/'0'/'no'/'yes' seem to convert fine\n        val = val.toUpperCase()\n        if (~[ 'TRUE', '1', 'YES' ].indexOf(val)) {\n          val = true\n        }\n        else if (~[ 'FALSE', '0', 'NO' ].indexOf(val)) {\n          val = false\n        }\n        else {\n          throw typeError('Unexpected token received from parser')\n        }\n        break\n      case 'object':\n        if (Array.isArray(val)) throw typeError('Unrecognized collection type class java.lang.' + type)\n        throw typeError('Start of structure or map found where not expected')\n      }\n      return val\n    case 'Short':\n    case 'Integer':\n    case 'Long':\n    case 'Double':\n      switch (typeof val) {\n      case 'boolean':\n        throw typeError((val ? 'TRUE_VALUE' : 'FALSE_VALUE') + ' cannot be converted to ' + type)\n      case 'number':\n        if (type != 'Double') val = Math.floor(val)\n        break\n      case 'string':\n        throw typeError('STRING_VALUE cannot be converted to ' + type)\n      case 'object':\n        if (Array.isArray(val)) throw typeError('Unrecognized collection type class java.lang.' + type)\n        throw typeError('Start of structure or map found where not expected')\n      }\n      return val\n    case 'String':\n      switch (typeof val) {\n      case 'boolean':\n        throw typeError((val ? 'TRUE_VALUE' : 'FALSE_VALUE') + ' cannot be converted to ' + type)\n      case 'number':\n        throw typeError((val % 1 === 0 ? 'NUMBER_VALUE' : 'DECIMAL_VALUE') + ' cannot be converted to ' + type)\n      case 'object':\n        if (Array.isArray(val)) throw typeError('Unrecognized collection type class java.lang.' + type)\n        throw typeError('Start of structure or map found where not expected')\n      }\n      return val\n    case 'Blob':\n      switch (typeof val) {\n      case 'boolean':\n      case 'number':\n        throw typeError('only base-64-encoded strings are convertible to bytes')\n      case 'object':\n        if (Array.isArray(val)) throw typeError('Unrecognized collection type class java.nio.ByteBuffer')\n        throw typeError('Start of structure or map found where not expected')\n      }\n      if (val.length % 4)\n        throw typeError('Base64 encoded length is expected a multiple of 4 bytes but found: ' + val.length)\n        // TODO: need a better check than this...\n      if (Buffer.from(val, 'base64').toString('base64') != val)\n        throw typeError('Invalid last non-pad Base64 character dectected')\n      return val\n    case 'List':\n      switch (typeof val) {\n      case 'boolean':\n      case 'number':\n      case 'string':\n        throw typeError('Unexpected field type')\n      case 'object':\n        if (!Array.isArray(val)) throw typeError('Start of structure or map found where not expected')\n      }\n      return val.map(function (child) { return checkType(child, children) })\n    case 'ParameterizedList':\n      switch (typeof val) {\n      case 'boolean':\n      case 'number':\n      case 'string':\n        throw typeError(\"class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to class java.lang.Class (sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl and java.lang.Class are in module java.base of loader 'bootstrap')\")\n      case 'object':\n        if (!Array.isArray(val)) throw typeError('Start of structure or map found where not expected')\n      }\n      return val.map(function (child) { return checkType(child, children) })\n    case 'ParameterizedMap':\n      switch (typeof val) {\n      case 'boolean':\n      case 'number':\n      case 'string':\n        throw typeError(\"class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to class java.lang.Class (sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl and java.lang.Class are in module java.base of loader 'bootstrap')\")\n      case 'object':\n        if (Array.isArray(val)) throw typeError('Unrecognized collection type java.util.Map<java.lang.String, com.amazonaws.dynamodb.v20120810.AttributeValue>')\n      }\n      return Object.keys(val).reduce(function (newVal, key) {\n        newVal[key] = checkType(val[key], children)\n        return newVal\n      }, {})\n    case 'Map':\n      switch (typeof val) {\n      case 'boolean':\n      case 'number':\n      case 'string':\n        throw typeError('Unexpected field type')\n      case 'object':\n        if (Array.isArray(val)) {\n          throw typeError('Unrecognized collection type java.util.Map<java.lang.String, ' +\n                (~subtype.indexOf('.') ? subtype : 'com.amazonaws.dynamodb.v20120810.' + subtype) + '>')\n        }\n      }\n      return Object.keys(val).reduce(function (newVal, key) {\n        newVal[key] = checkType(val[key], children)\n        return newVal\n      }, {})\n    case 'ValueStruct':\n      switch (typeof val) {\n      case 'boolean':\n      case 'number':\n      case 'string':\n        throw typeError('Unexpected value type in payload')\n      case 'object':\n        if (Array.isArray(val)) throw typeError('Unrecognized collection type class com.amazonaws.dynamodb.v20120810.' + subtype)\n      }\n      return checkTypes(val, children)\n    case 'FieldStruct':\n      switch (typeof val) {\n      case 'boolean':\n      case 'number':\n      case 'string':\n        throw typeError('Unexpected field type')\n      case 'object':\n        if (Array.isArray(val)) throw typeError('Unrecognized collection type class com.amazonaws.dynamodb.v20120810.' + subtype)\n      }\n      return checkTypes(val, children)\n    default:\n      throw new Error('Unknown type: ' + type)\n    }\n  }\n}\n\nvar validateFns = {}\n\nfunction checkValidations (data, validations, custom, store) {\n  var attr, msg, errors = []\n\n  for (attr in validations) {\n    if (validations[attr].required && data[attr] == null) {\n      throw db.validationError('The parameter \\'' + attr + '\\' is required but was not present in the request')\n    }\n    if (validations[attr].tableName) {\n      msg = validateTableName(attr, data[attr])\n      if (msg) throw db.validationError(msg)\n    }\n  }\n\n  function checkNonRequireds (data, types, parent) {\n    for (attr in types) {\n      checkNonRequired(attr, data[attr], types[attr], parent)\n    }\n  }\n\n  checkNonRequireds(data, validations)\n\n  function checkNonRequired (attr, data, validations, parent) {\n    if (validations == null || typeof validations != 'object') return\n    for (var validation in validations) {\n      if (errors.length >= 10) return\n      if (~[ 'type', 'required', 'tableName' ].indexOf(validation)) continue\n      if (validation != 'notNull' && data == null) continue\n      if (validation == 'children') {\n        if (/List$/.test(validations.type)) {\n          for (var i = 0; i < data.length; i++) {\n            checkNonRequired('member', data[i], validations.children,\n              (parent ? parent + '.' : '') + toLowerFirst(attr) + '.' + (i + 1))\n          }\n          continue\n        }\n        else if (/Map/.test(validations.type)) {\n          Object.keys(data).forEach(function (key) {\n            checkNonRequired('member', data[key], validations.children,\n              (parent ? parent + '.' : '') + toLowerFirst(attr) + '.' + key)\n          })\n          continue\n        }\n        checkNonRequireds(data, validations.children, (parent ? parent + '.' : '') + toLowerFirst(attr))\n        continue\n      }\n      validateFns[validation](parent, attr, validations[validation], data, errors)\n    }\n  }\n\n  if (errors.length)\n    throw db.validationError(errors.length + ' validation error' + (errors.length > 1 ? 's' : '') + ' detected: ' + errors.join('; '))\n\n  if (custom) {\n    msg = custom(data, store)\n    if (msg) throw db.validationError(msg)\n  }\n}\n\nvalidateFns.notNull = function (parent, key, val, data, errors) {\n  validate(data != null, 'Member must not be null', data, parent, key, errors)\n}\nvalidateFns.greaterThanOrEqual = function (parent, key, val, data, errors) {\n  validate(data >= val, 'Member must have value greater than or equal to ' + val, data, parent, key, errors)\n}\nvalidateFns.lessThanOrEqual = function (parent, key, val, data, errors) {\n  validate(data <= val, 'Member must have value less than or equal to ' + val, data, parent, key, errors)\n}\nvalidateFns.regex = function (parent, key, pattern, data, errors) {\n  validate(RegExp('^' + pattern + '$').test(data), 'Member must satisfy regular expression pattern: ' + pattern, data, parent, key, errors)\n}\nvalidateFns.lengthGreaterThanOrEqual = function (parent, key, val, data, errors) {\n  var length = (typeof data == 'object' && !Array.isArray(data)) ? Object.keys(data).length : data.length\n  validate(length >= val, 'Member must have length greater than or equal to ' + val, data, parent, key, errors)\n}\nvalidateFns.lengthLessThanOrEqual = function (parent, key, val, data, errors) {\n  var length = (typeof data == 'object' && !Array.isArray(data)) ? Object.keys(data).length : data.length\n  validate(length <= val, 'Member must have length less than or equal to ' + val, data, parent, key, errors)\n}\nvalidateFns.enum = function (parent, key, val, data, errors) {\n  validate(~val.indexOf(data), 'Member must satisfy enum value set: [' + val.join(', ') + ']', data, parent, key, errors)\n}\nvalidateFns.keys = function (parent, key, val, data, errors) {\n  Object.keys(data).forEach(function (mapKey) {\n    try {\n      Object.keys(val).forEach(function (validation) {\n        validateFns[validation]('', '', val[validation], mapKey, [])\n      })\n    }\n    catch {\n      var msgs = Object.keys(val).map(function (validation) {\n        if (validation == 'lengthGreaterThanOrEqual')\n          return 'Member must have length greater than or equal to ' + val[validation]\n        if (validation == 'lengthLessThanOrEqual')\n          return 'Member must have length less than or equal to ' + val[validation]\n        if (validation == 'regex')\n          return 'Member must satisfy regular expression pattern: ' + val[validation]\n      })\n      validate(false, 'Map keys must satisfy constraint: [' + msgs.join(', ') + ']', data, parent, key, errors)\n    }\n  })\n}\nvalidateFns.values = function (parent, key, val, data, errors) {\n  Object.keys(data).forEach(function (mapKey) {\n    try {\n      Object.keys(val).forEach(function (validation) {\n        validateFns[validation]('', '', val[validation], data[mapKey], [])\n      })\n    }\n    catch {\n      var msgs = Object.keys(val).map(function (validation) {\n        if (validation == 'lengthGreaterThanOrEqual')\n          return 'Member must have length greater than or equal to ' + val[validation]\n        if (validation == 'lengthLessThanOrEqual')\n          return 'Member must have length less than or equal to ' + val[validation]\n      })\n      validate(false, 'Map value must satisfy constraint: [' + msgs.join(', ') + ']', data, parent, key, errors)\n    }\n  })\n}\n\nfunction validate (predicate, msg, data, parent, key, errors) {\n  if (predicate) return\n  var value = valueStr(data)\n  if (value != 'null') value = '\\'' + value + '\\''\n  parent = parent ? parent + '.' : ''\n  errors.push('Value ' + value + ' at \\'' + parent + toLowerFirst(key) + '\\' failed to satisfy constraint: ' + msg)\n}\n\nfunction validateTableName (key, val) {\n  if (val == null) return null\n  if (val.length < 3 || val.length > 255)\n    return key + ' must be at least 3 characters long and at most 255 characters long'\n}\n\nfunction toLowerFirst (str) {\n  return str[0].toLowerCase() + str.slice(1)\n}\n\nfunction validateAttributeValue (value) {\n  var types = Object.keys(value), msg, i, attr\n  if (!types.length)\n    return 'Supplied AttributeValue is empty, must contain exactly one of the supported datatypes'\n\n  for (var type in value) {\n    if (type == 'N') {\n      msg = checkNum(type, value)\n      if (msg) return msg\n    }\n\n    if (type == 'NULL' && !value[type])\n      return 'One or more parameter values were invalid: Null attribute value types must have the value of true'\n\n    if (type == 'SS' && !value[type].length)\n      return 'One or more parameter values were invalid: An string set  may not be empty'\n\n    if (type == 'NS' && !value[type].length)\n      return 'One or more parameter values were invalid: An number set  may not be empty'\n\n    if (type == 'BS' && !value[type].length)\n      return 'One or more parameter values were invalid: Binary sets should not be empty'\n\n    if (type == 'NS') {\n      for (i = 0; i < value[type].length; i++) {\n        msg = checkNum(i, value[type])\n        if (msg) return msg\n      }\n    }\n\n    if (type == 'SS' && findDuplicate(value[type]))\n      return 'One or more parameter values were invalid: Input collection ' + valueStr(value[type]) + ' contains duplicates.'\n\n    if (type == 'NS' && findDuplicate(value[type]))\n      return 'Input collection contains duplicates'\n\n    if (type == 'BS' && findDuplicate(value[type]))\n      return 'One or more parameter values were invalid: Input collection ' + valueStr(value[type]) + 'of type BS contains duplicates.'\n\n    if (type == 'M') {\n      for (attr in value[type]) {\n        msg = validateAttributeValue(value[type][attr])\n        if (msg) return msg\n      }\n    }\n\n    if (type == 'L') {\n      for (i = 0; i < value[type].length; i++) {\n        msg = validateAttributeValue(value[type][i])\n        if (msg) return msg\n      }\n    }\n  }\n\n  if (types.length > 1)\n    return 'Supplied AttributeValue has more than one datatypes set, must contain exactly one of the supported datatypes'\n}\n\nfunction checkNum (attr, obj) {\n  if (!obj[attr])\n    return 'The parameter cannot be converted to a numeric value'\n\n  var bigNum\n  try {\n    bigNum = new Big(obj[attr])\n  }\n  catch {\n    return 'The parameter cannot be converted to a numeric value: ' + obj[attr]\n  }\n  if (bigNum.e > 125)\n    return 'Number overflow. Attempting to store a number with magnitude larger than supported range'\n  else if (bigNum.e < -130)\n    return 'Number underflow. Attempting to store a number with magnitude smaller than supported range'\n  else if (bigNum.c.length > 38)\n    return 'Attempting to store more than 38 significant digits in a Number'\n\n  obj[attr] = bigNum.toFixed()\n}\n\nfunction valueStr (data) {\n  return data == null ? 'null' : Array.isArray(data) ? '[' + data.map(valueStr).join(', ') + ']' :\n    typeof data == 'object' ? JSON.stringify(data) : data\n}\n\nfunction findDuplicate (arr) {\n  if (!arr) return null\n  var vals = Object.create(null)\n  for (var i = 0; i < arr.length; i++) {\n    if (vals[arr[i]]) return arr[i]\n    vals[arr[i]] = true\n  }\n}\n\nfunction validateAttributeConditions (data) {\n  for (var key in data.Expected) {\n    var condition = data.Expected[key]\n\n    if ('AttributeValueList' in condition && 'Value' in condition)\n      return 'One or more parameter values were invalid: ' +\n        'Value and AttributeValueList cannot be used together for Attribute: ' + key\n\n    if ('ComparisonOperator' in condition) {\n      if ('Exists' in condition)\n        return 'One or more parameter values were invalid: ' +\n          'Exists and ComparisonOperator cannot be used together for Attribute: ' + key\n\n      if (condition.ComparisonOperator != 'NULL' && condition.ComparisonOperator != 'NOT_NULL' &&\n          !('AttributeValueList' in condition) && !('Value' in condition))\n        return 'One or more parameter values were invalid: ' +\n          'Value or AttributeValueList must be used with ComparisonOperator: ' + condition.ComparisonOperator +\n          ' for Attribute: ' + key\n\n      var values = condition.AttributeValueList ?\n        condition.AttributeValueList.length : condition.Value ? 1 : 0\n      var validAttrCount = false\n\n      switch (condition.ComparisonOperator) {\n      case 'EQ':\n      case 'NE':\n      case 'LE':\n      case 'LT':\n      case 'GE':\n      case 'GT':\n      case 'CONTAINS':\n      case 'NOT_CONTAINS':\n      case 'BEGINS_WITH':\n        if (values === 1) validAttrCount = true\n        break\n      case 'NOT_NULL':\n      case 'NULL':\n        if (values === 0) validAttrCount = true\n        break\n      case 'IN':\n        if (values > 0) validAttrCount = true\n        break\n      case 'BETWEEN':\n        if (values === 2) validAttrCount = true\n        break\n      }\n      if (!validAttrCount)\n        return 'One or more parameter values were invalid: ' +\n          'Invalid number of argument(s) for the ' + condition.ComparisonOperator + ' ComparisonOperator'\n\n      if (condition.AttributeValueList && condition.AttributeValueList.length) {\n        var type = Object.keys(condition.AttributeValueList[0])[0]\n        if (condition.AttributeValueList.some(function (attr) { return Object.keys(attr)[0] != type })) {\n          return 'One or more parameter values were invalid: AttributeValues inside AttributeValueList must be of same type'\n        }\n        if (condition.ComparisonOperator == 'BETWEEN' && db.compare('GT', condition.AttributeValueList[0], condition.AttributeValueList[1])) {\n          return 'The BETWEEN condition was provided a range where the lower bound is greater than the upper bound'\n        }\n      }\n    }\n    else if ('AttributeValueList' in condition) {\n      return 'One or more parameter values were invalid: ' +\n        'AttributeValueList can only be used with a ComparisonOperator for Attribute: ' + key\n    }\n    else {\n      var exists = condition.Exists == null || condition.Exists\n      if (exists && condition.Value == null)\n        return 'One or more parameter values were invalid: ' +\n          'Value must be provided when Exists is ' +\n          (condition.Exists == null ? 'null' : condition.Exists) +\n          ' for Attribute: ' + key\n      else if (!exists && condition.Value != null)\n        return 'One or more parameter values were invalid: ' +\n          'Value cannot be used when Exists is false for Attribute: ' + key\n      if (condition.Value != null) {\n        var msg = validateAttributeValue(condition.Value)\n        if (msg) return msg\n      }\n    }\n  }\n}\n\nfunction validateConditions (conditions) {\n  var lengths = {\n    NULL: 0,\n    NOT_NULL: 0,\n    EQ: 1,\n    NE: 1,\n    LE: 1,\n    LT: 1,\n    GE: 1,\n    GT: 1,\n    CONTAINS: 1,\n    NOT_CONTAINS: 1,\n    BEGINS_WITH: 1,\n    IN: [ 1 ],\n    BETWEEN: 2,\n  }\n  var types = {\n    EQ: [ 'S', 'N', 'B', 'SS', 'NS', 'BS' ],\n    NE: [ 'S', 'N', 'B', 'SS', 'NS', 'BS' ],\n    LE: [ 'S', 'N', 'B' ],\n    LT: [ 'S', 'N', 'B' ],\n    GE: [ 'S', 'N', 'B' ],\n    GT: [ 'S', 'N', 'B' ],\n    CONTAINS: [ 'S', 'N', 'B' ],\n    NOT_CONTAINS: [ 'S', 'N', 'B' ],\n    BEGINS_WITH: [ 'S', 'B' ],\n    IN: [ 'S', 'N', 'B' ],\n    BETWEEN: [ 'S', 'N', 'B' ],\n  }\n  for (var key in conditions) {\n    var comparisonOperator = conditions[key].ComparisonOperator\n    var attrValList = conditions[key].AttributeValueList || []\n    for (var i = 0; i < attrValList.length; i++) {\n      var msg = validateAttributeValue(attrValList[i])\n      if (msg) return msg\n    }\n\n    if ((typeof lengths[comparisonOperator] == 'number' && attrValList.length != lengths[comparisonOperator]) ||\n        (attrValList.length < lengths[comparisonOperator][0] || attrValList.length > lengths[comparisonOperator][1]))\n      return 'One or more parameter values were invalid: Invalid number of argument(s) for the ' +\n        comparisonOperator + ' ComparisonOperator'\n\n    if (attrValList.length) {\n      var type = Object.keys(attrValList[0])[0]\n      if (attrValList.some(function (attr) { return Object.keys(attr)[0] != type })) {\n        return 'One or more parameter values were invalid: AttributeValues inside AttributeValueList must be of same type'\n      }\n    }\n\n    if (types[comparisonOperator]) {\n      for (i = 0; i < attrValList.length; i++) {\n        if (!~types[comparisonOperator].indexOf(Object.keys(attrValList[i])[0]))\n          return 'One or more parameter values were invalid: ComparisonOperator ' + comparisonOperator +\n            ' is not valid for ' + Object.keys(attrValList[i])[0] + ' AttributeValue type'\n      }\n    }\n\n    if (comparisonOperator == 'BETWEEN' && db.compare('GT', attrValList[0], attrValList[1])) {\n      return 'The BETWEEN condition was provided a range where the lower bound is greater than the upper bound'\n    }\n  }\n}\n\nfunction validateExpressionParams (data, expressions, nonExpressions) {\n  var exprParams = expressions.filter(function (expr) { return data[expr] != null })\n\n  if (exprParams.length) {\n    // Special case for KeyConditions and KeyConditionExpression\n    if (data.KeyConditions != null && data.KeyConditionExpression == null) {\n      nonExpressions.splice(nonExpressions.indexOf('KeyConditions'), 1)\n    }\n    var nonExprParams = nonExpressions.filter(function (expr) { return data[expr] != null })\n    if (nonExprParams.length) {\n      return 'Can not use both expression and non-expression parameters in the same request: ' +\n        'Non-expression parameters: {' + nonExprParams.join(', ') + '} ' +\n        'Expression parameters: {' + exprParams.join(', ') + '}'\n    }\n  }\n\n  if (data.ExpressionAttributeNames != null && !exprParams.length) {\n    return 'ExpressionAttributeNames can only be specified when using expressions'\n  }\n\n  var valExprs = expressions.filter(function (expr) { return expr != 'ProjectionExpression' })\n  if (valExprs.length && data.ExpressionAttributeValues != null &&\n      valExprs.every(function (expr) { return data[expr] == null })) {\n    return 'ExpressionAttributeValues can only be specified when using expressions: ' +\n      valExprs.join(' and ') + ' ' + (valExprs.length > 1 ? 'are' : 'is') + ' null'\n  }\n}\n\nfunction validateExpressions (data) {\n  var key, msg, result, context = {\n    attrNames: data.ExpressionAttributeNames,\n    attrVals: data.ExpressionAttributeValues,\n    unusedAttrNames: {},\n    unusedAttrVals: {},\n  }\n\n  if (data.ExpressionAttributeNames != null) {\n    if (!Object.keys(data.ExpressionAttributeNames).length)\n      return 'ExpressionAttributeNames must not be empty'\n    for (key in data.ExpressionAttributeNames) {\n      if (!/^#[0-9a-zA-Z_]+$/.test(key)) {\n        return 'ExpressionAttributeNames contains invalid key: Syntax error; key: \"' + key + '\"'\n      }\n      context.unusedAttrNames[key] = true\n    }\n  }\n\n  if (data.ExpressionAttributeValues != null) {\n    if (!Object.keys(data.ExpressionAttributeValues).length)\n      return 'ExpressionAttributeValues must not be empty'\n    for (key in data.ExpressionAttributeValues) {\n      if (!/^:[0-9a-zA-Z_]+$/.test(key)) {\n        return 'ExpressionAttributeValues contains invalid key: Syntax error; key: \"' + key + '\"'\n      }\n      context.unusedAttrVals[key] = true\n    }\n    for (key in data.ExpressionAttributeValues) {\n      msg = validateAttributeValue(data.ExpressionAttributeValues[key])\n      if (msg) {\n        msg = 'ExpressionAttributeValues contains invalid value: ' + msg + ' for key ' + key\n        return msg\n      }\n    }\n  }\n\n  if (data.UpdateExpression != null) {\n    result = parse(data.UpdateExpression, updateParser, context)\n    if (typeof result == 'string') {\n      return 'Invalid UpdateExpression: ' + result\n    }\n    data._updates = result\n  }\n\n  if (data.ConditionExpression != null) {\n    result = parse(data.ConditionExpression, conditionParser, context)\n    if (typeof result == 'string') {\n      return 'Invalid ConditionExpression: ' + result\n    }\n    data._condition = result\n  }\n\n  if (data.KeyConditionExpression != null) {\n    context.isKeyCondition = true\n    result = parse(data.KeyConditionExpression, conditionParser, context)\n    if (typeof result == 'string') {\n      return 'Invalid KeyConditionExpression: ' + result\n    }\n    data._keyCondition = result\n  }\n\n  if (data.FilterExpression != null) {\n    result = parse(data.FilterExpression, conditionParser, context)\n    if (typeof result == 'string') {\n      return 'Invalid FilterExpression: ' + result\n    }\n    data._filter = result\n  }\n\n  if (data.ProjectionExpression != null) {\n    result = parse(data.ProjectionExpression, projectionParser, context)\n    if (typeof result == 'string') {\n      return 'Invalid ProjectionExpression: ' + result\n    }\n    data._projection = result\n  }\n\n  if (Object.keys(context.unusedAttrNames).length) {\n    return 'Value provided in ExpressionAttributeNames unused in expressions: ' +\n      'keys: {' + Object.keys(context.unusedAttrNames).join(', ') + '}'\n  }\n\n  if (Object.keys(context.unusedAttrVals).length) {\n    return 'Value provided in ExpressionAttributeValues unused in expressions: ' +\n      'keys: {' + Object.keys(context.unusedAttrVals).join(', ') + '}'\n  }\n}\n\nfunction parse (str, parser, context) {\n  if (str == '') return 'The expression can not be empty;'\n  context.isReserved = isReserved\n  context.compare = db.compare\n  try {\n    return parser.parse(str, { context: context })\n  }\n  catch (e) {\n    return e.name == 'SyntaxError' ? 'Syntax error; ' + e.message : e.message\n  }\n}\n\nfunction convertKeyCondition (expression) {\n  var keyConds = Object.create(null)\n  return checkExpr(expression, keyConds) || keyConds\n}\n\nfunction checkExpr (expr, keyConds) {\n  if (!expr || !expr.type) return\n  if (~[ 'or', 'not', 'in', '<>' ].indexOf(expr.type)) {\n    return 'Invalid operator used in KeyConditionExpression: ' + expr.type.toUpperCase()\n  }\n  if (expr.type == 'function' && ~[ 'attribute_exists', 'attribute_not_exists', 'attribute_type', 'contains' ].indexOf(expr.name)) {\n    return 'Invalid operator used in KeyConditionExpression: ' + expr.name\n  }\n  if (expr.type == 'function' && expr.name == 'size') {\n    return 'KeyConditionExpressions cannot contain nested operations'\n  }\n  if (expr.type == 'between' && !Array.isArray(expr.args[0])) {\n    return 'Invalid condition in KeyConditionExpression: ' + expr.type.toUpperCase() + ' operator must have the key attribute as its first operand'\n  }\n  if (expr.type == 'function' && expr.name == 'begins_with' && !Array.isArray(expr.args[0])) {\n    return 'Invalid condition in KeyConditionExpression: ' + expr.name + ' operator must have the key attribute as its first operand'\n  }\n  if (expr.args) {\n    var attrName = '', attrIx = 0\n    for (var i = 0; i < expr.args.length; i++) {\n      if (Array.isArray(expr.args[i])) {\n        if (attrName) {\n          return 'Invalid condition in KeyConditionExpression: Multiple attribute names used in one condition'\n        }\n        if (expr.args[i].length > 1) {\n          return 'KeyConditionExpressions cannot have conditions on nested attributes'\n        }\n        attrName = expr.args[i][0]\n        attrIx = i\n      }\n      else if (expr.args[i].type) {\n        var result = checkExpr(expr.args[i], keyConds)\n        if (result) return result\n      }\n    }\n    if (expr.type != 'and') {\n      if (!attrName) {\n        return 'Invalid condition in KeyConditionExpression: No key attribute specified'\n      }\n      if (keyConds[attrName]) {\n        return 'KeyConditionExpressions must only contain one condition per key'\n      }\n      if (attrIx != 0) {\n        expr.type = {\n          '=': '=',\n          '<': '>',\n          '<=': '>=',\n          '>': '<',\n          '>=': '<=',\n        }[expr.type]\n        expr.args[1] = expr.args[0]\n      }\n      keyConds[attrName] = {\n        ComparisonOperator: {\n          '=': 'EQ',\n          '<': 'LT',\n          '<=': 'LE',\n          '>': 'GT',\n          '>=': 'GE',\n          'between': 'BETWEEN',\n          'function': 'BEGINS_WITH',\n        }[expr.type],\n        AttributeValueList: expr.args.slice(1),\n      }\n    }\n  }\n}\n\n// http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html\nvar RESERVED_WORDS = {\n  ABORT: true,\n  ABSOLUTE: true,\n  ACTION: true,\n  ADD: true,\n  AFTER: true,\n  AGENT: true,\n  AGGREGATE: true,\n  ALL: true,\n  ALLOCATE: true,\n  ALTER: true,\n  ANALYZE: true,\n  AND: true,\n  ANY: true,\n  ARCHIVE: true,\n  ARE: true,\n  ARRAY: true,\n  AS: true,\n  ASC: true,\n  ASCII: true,\n  ASENSITIVE: true,\n  ASSERTION: true,\n  ASYMMETRIC: true,\n  AT: true,\n  ATOMIC: true,\n  ATTACH: true,\n  ATTRIBUTE: true,\n  AUTH: true,\n  AUTHORIZATION: true,\n  AUTHORIZE: true,\n  AUTO: true,\n  AVG: true,\n  BACK: true,\n  BACKUP: true,\n  BASE: true,\n  BATCH: true,\n  BEFORE: true,\n  BEGIN: true,\n  BETWEEN: true,\n  BIGINT: true,\n  BINARY: true,\n  BIT: true,\n  BLOB: true,\n  BLOCK: true,\n  BOOLEAN: true,\n  BOTH: true,\n  BREADTH: true,\n  BUCKET: true,\n  BULK: true,\n  BY: true,\n  BYTE: true,\n  CALL: true,\n  CALLED: true,\n  CALLING: true,\n  CAPACITY: true,\n  CASCADE: true,\n  CASCADED: true,\n  CASE: true,\n  CAST: true,\n  CATALOG: true,\n  CHAR: true,\n  CHARACTER: true,\n  CHECK: true,\n  CLASS: true,\n  CLOB: true,\n  CLOSE: true,\n  CLUSTER: true,\n  CLUSTERED: true,\n  CLUSTERING: true,\n  CLUSTERS: true,\n  COALESCE: true,\n  COLLATE: true,\n  COLLATION: true,\n  COLLECTION: true,\n  COLUMN: true,\n  COLUMNS: true,\n  COMBINE: true,\n  COMMENT: true,\n  COMMIT: true,\n  COMPACT: true,\n  COMPILE: true,\n  COMPRESS: true,\n  CONDITION: true,\n  CONFLICT: true,\n  CONNECT: true,\n  CONNECTION: true,\n  CONSISTENCY: true,\n  CONSISTENT: true,\n  CONSTRAINT: true,\n  CONSTRAINTS: true,\n  CONSTRUCTOR: true,\n  CONSUMED: true,\n  CONTINUE: true,\n  CONVERT: true,\n  COPY: true,\n  CORRESPONDING: true,\n  COUNT: true,\n  COUNTER: true,\n  CREATE: true,\n  CROSS: true,\n  CUBE: true,\n  CURRENT: true,\n  CURSOR: true,\n  CYCLE: true,\n  DATA: true,\n  DATABASE: true,\n  DATE: true,\n  DATETIME: true,\n  DAY: true,\n  DEALLOCATE: true,\n  DEC: true,\n  DECIMAL: true,\n  DECLARE: true,\n  DEFAULT: true,\n  DEFERRABLE: true,\n  DEFERRED: true,\n  DEFINE: true,\n  DEFINED: true,\n  DEFINITION: true,\n  DELETE: true,\n  DELIMITED: true,\n  DEPTH: true,\n  DEREF: true,\n  DESC: true,\n  DESCRIBE: true,\n  DESCRIPTOR: true,\n  DETACH: true,\n  DETERMINISTIC: true,\n  DIAGNOSTICS: true,\n  DIRECTORIES: true,\n  DISABLE: true,\n  DISCONNECT: true,\n  DISTINCT: true,\n  DISTRIBUTE: true,\n  DO: true,\n  DOMAIN: true,\n  DOUBLE: true,\n  DROP: true,\n  DUMP: true,\n  DURATION: true,\n  DYNAMIC: true,\n  EACH: true,\n  ELEMENT: true,\n  ELSE: true,\n  ELSEIF: true,\n  EMPTY: true,\n  ENABLE: true,\n  END: true,\n  EQUAL: true,\n  EQUALS: true,\n  ERROR: true,\n  ESCAPE: true,\n  ESCAPED: true,\n  EVAL: true,\n  EVALUATE: true,\n  EXCEEDED: true,\n  EXCEPT: true,\n  EXCEPTION: true,\n  EXCEPTIONS: true,\n  EXCLUSIVE: true,\n  EXEC: true,\n  EXECUTE: true,\n  EXISTS: true,\n  EXIT: true,\n  EXPLAIN: true,\n  EXPLODE: true,\n  EXPORT: true,\n  EXPRESSION: true,\n  EXTENDED: true,\n  EXTERNAL: true,\n  EXTRACT: true,\n  FAIL: true,\n  FALSE: true,\n  FAMILY: true,\n  FETCH: true,\n  FIELDS: true,\n  FILE: true,\n  FILTER: true,\n  FILTERING: true,\n  FINAL: true,\n  FINISH: true,\n  FIRST: true,\n  FIXED: true,\n  FLATTERN: true,\n  FLOAT: true,\n  FOR: true,\n  FORCE: true,\n  FOREIGN: true,\n  FORMAT: true,\n  FORWARD: true,\n  FOUND: true,\n  FREE: true,\n  FROM: true,\n  FULL: true,\n  FUNCTION: true,\n  FUNCTIONS: true,\n  GENERAL: true,\n  GENERATE: true,\n  GET: true,\n  GLOB: true,\n  GLOBAL: true,\n  GO: true,\n  GOTO: true,\n  GRANT: true,\n  GREATER: true,\n  GROUP: true,\n  GROUPING: true,\n  HANDLER: true,\n  HASH: true,\n  HAVE: true,\n  HAVING: true,\n  HEAP: true,\n  HIDDEN: true,\n  HOLD: true,\n  HOUR: true,\n  IDENTIFIED: true,\n  IDENTITY: true,\n  IF: true,\n  IGNORE: true,\n  IMMEDIATE: true,\n  IMPORT: true,\n  IN: true,\n  INCLUDING: true,\n  INCLUSIVE: true,\n  INCREMENT: true,\n  INCREMENTAL: true,\n  INDEX: true,\n  INDEXED: true,\n  INDEXES: true,\n  INDICATOR: true,\n  INFINITE: true,\n  INITIALLY: true,\n  INLINE: true,\n  INNER: true,\n  INNTER: true,\n  INOUT: true,\n  INPUT: true,\n  INSENSITIVE: true,\n  INSERT: true,\n  INSTEAD: true,\n  INT: true,\n  INTEGER: true,\n  INTERSECT: true,\n  INTERVAL: true,\n  INTO: true,\n  INVALIDATE: true,\n  IS: true,\n  ISOLATION: true,\n  ITEM: true,\n  ITEMS: true,\n  ITERATE: true,\n  JOIN: true,\n  KEY: true,\n  KEYS: true,\n  LAG: true,\n  LANGUAGE: true,\n  LARGE: true,\n  LAST: true,\n  LATERAL: true,\n  LEAD: true,\n  LEADING: true,\n  LEAVE: true,\n  LEFT: true,\n  LENGTH: true,\n  LESS: true,\n  LEVEL: true,\n  LIKE: true,\n  LIMIT: true,\n  LIMITED: true,\n  LINES: true,\n  LIST: true,\n  LOAD: true,\n  LOCAL: true,\n  LOCALTIME: true,\n  LOCALTIMESTAMP: true,\n  LOCATION: true,\n  LOCATOR: true,\n  LOCK: true,\n  LOCKS: true,\n  LOG: true,\n  LOGED: true,\n  LONG: true,\n  LOOP: true,\n  LOWER: true,\n  MAP: true,\n  MATCH: true,\n  MATERIALIZED: true,\n  MAX: true,\n  MAXLEN: true,\n  MEMBER: true,\n  MERGE: true,\n  METHOD: true,\n  METRICS: true,\n  MIN: true,\n  MINUS: true,\n  MINUTE: true,\n  MISSING: true,\n  MOD: true,\n  MODE: true,\n  MODIFIES: true,\n  MODIFY: true,\n  MODULE: true,\n  MONTH: true,\n  MULTI: true,\n  MULTISET: true,\n  NAME: true,\n  NAMES: true,\n  NATIONAL: true,\n  NATURAL: true,\n  NCHAR: true,\n  NCLOB: true,\n  NEW: true,\n  NEXT: true,\n  NO: true,\n  NONE: true,\n  NOT: true,\n  NULL: true,\n  NULLIF: true,\n  NUMBER: true,\n  NUMERIC: true,\n  OBJECT: true,\n  OF: true,\n  OFFLINE: true,\n  OFFSET: true,\n  OLD: true,\n  ON: true,\n  ONLINE: true,\n  ONLY: true,\n  OPAQUE: true,\n  OPEN: true,\n  OPERATOR: true,\n  OPTION: true,\n  OR: true,\n  ORDER: true,\n  ORDINALITY: true,\n  OTHER: true,\n  OTHERS: true,\n  OUT: true,\n  OUTER: true,\n  OUTPUT: true,\n  OVER: true,\n  OVERLAPS: true,\n  OVERRIDE: true,\n  OWNER: true,\n  PAD: true,\n  PARALLEL: true,\n  PARAMETER: true,\n  PARAMETERS: true,\n  PARTIAL: true,\n  PARTITION: true,\n  PARTITIONED: true,\n  PARTITIONS: true,\n  PATH: true,\n  PERCENT: true,\n  PERCENTILE: true,\n  PERMISSION: true,\n  PERMISSIONS: true,\n  PIPE: true,\n  PIPELINED: true,\n  PLAN: true,\n  POOL: true,\n  POSITION: true,\n  PRECISION: true,\n  PREPARE: true,\n  PRESERVE: true,\n  PRIMARY: true,\n  PRIOR: true,\n  PRIVATE: true,\n  PRIVILEGES: true,\n  PROCEDURE: true,\n  PROCESSED: true,\n  PROJECT: true,\n  PROJECTION: true,\n  PROPERTY: true,\n  PROVISIONING: true,\n  PUBLIC: true,\n  PUT: true,\n  QUERY: true,\n  QUIT: true,\n  QUORUM: true,\n  RAISE: true,\n  RANDOM: true,\n  RANGE: true,\n  RANK: true,\n  RAW: true,\n  READ: true,\n  READS: true,\n  REAL: true,\n  REBUILD: true,\n  RECORD: true,\n  RECURSIVE: true,\n  REDUCE: true,\n  REF: true,\n  REFERENCE: true,\n  REFERENCES: true,\n  REFERENCING: true,\n  REGEXP: true,\n  REGION: true,\n  REINDEX: true,\n  RELATIVE: true,\n  RELEASE: true,\n  REMAINDER: true,\n  RENAME: true,\n  REPEAT: true,\n  REPLACE: true,\n  REQUEST: true,\n  RESET: true,\n  RESIGNAL: true,\n  RESOURCE: true,\n  RESPONSE: true,\n  RESTORE: true,\n  RESTRICT: true,\n  RESULT: true,\n  RETURN: true,\n  RETURNING: true,\n  RETURNS: true,\n  REVERSE: true,\n  REVOKE: true,\n  RIGHT: true,\n  ROLE: true,\n  ROLES: true,\n  ROLLBACK: true,\n  ROLLUP: true,\n  ROUTINE: true,\n  ROW: true,\n  ROWS: true,\n  RULE: true,\n  RULES: true,\n  SAMPLE: true,\n  SATISFIES: true,\n  SAVE: true,\n  SAVEPOINT: true,\n  SCAN: true,\n  SCHEMA: true,\n  SCOPE: true,\n  SCROLL: true,\n  SEARCH: true,\n  SECOND: true,\n  SECTION: true,\n  SEGMENT: true,\n  SEGMENTS: true,\n  SELECT: true,\n  SELF: true,\n  SEMI: true,\n  SENSITIVE: true,\n  SEPARATE: true,\n  SEQUENCE: true,\n  SERIALIZABLE: true,\n  SESSION: true,\n  SET: true,\n  SETS: true,\n  SHARD: true,\n  SHARE: true,\n  SHARED: true,\n  SHORT: true,\n  SHOW: true,\n  SIGNAL: true,\n  SIMILAR: true,\n  SIZE: true,\n  SKEWED: true,\n  SMALLINT: true,\n  SNAPSHOT: true,\n  SOME: true,\n  SOURCE: true,\n  SPACE: true,\n  SPACES: true,\n  SPARSE: true,\n  SPECIFIC: true,\n  SPECIFICTYPE: true,\n  SPLIT: true,\n  SQL: true,\n  SQLCODE: true,\n  SQLERROR: true,\n  SQLEXCEPTION: true,\n  SQLSTATE: true,\n  SQLWARNING: true,\n  START: true,\n  STATE: true,\n  STATIC: true,\n  STATUS: true,\n  STORAGE: true,\n  STORE: true,\n  STORED: true,\n  STREAM: true,\n  STRING: true,\n  STRUCT: true,\n  STYLE: true,\n  SUB: true,\n  SUBMULTISET: true,\n  SUBPARTITION: true,\n  SUBSTRING: true,\n  SUBTYPE: true,\n  SUM: true,\n  SUPER: true,\n  SYMMETRIC: true,\n  SYNONYM: true,\n  SYSTEM: true,\n  TABLE: true,\n  TABLESAMPLE: true,\n  TEMP: true,\n  TEMPORARY: true,\n  TERMINATED: true,\n  TEXT: true,\n  THAN: true,\n  THEN: true,\n  THROUGHPUT: true,\n  TIME: true,\n  TIMESTAMP: true,\n  TIMEZONE: true,\n  TINYINT: true,\n  TO: true,\n  TOKEN: true,\n  TOTAL: true,\n  TOUCH: true,\n  TRAILING: true,\n  TRANSACTION: true,\n  TRANSFORM: true,\n  TRANSLATE: true,\n  TRANSLATION: true,\n  TREAT: true,\n  TRIGGER: true,\n  TRIM: true,\n  TRUE: true,\n  TRUNCATE: true,\n  TTL: true,\n  TUPLE: true,\n  TYPE: true,\n  UNDER: true,\n  UNDO: true,\n  UNION: true,\n  UNIQUE: true,\n  UNIT: true,\n  UNKNOWN: true,\n  UNLOGGED: true,\n  UNNEST: true,\n  UNPROCESSED: true,\n  UNSIGNED: true,\n  UNTIL: true,\n  UPDATE: true,\n  UPPER: true,\n  URL: true,\n  USAGE: true,\n  USE: true,\n  USER: true,\n  USERS: true,\n  USING: true,\n  UUID: true,\n  VACUUM: true,\n  VALUE: true,\n  VALUED: true,\n  VALUES: true,\n  VARCHAR: true,\n  VARIABLE: true,\n  VARIANCE: true,\n  VARINT: true,\n  VARYING: true,\n  VIEW: true,\n  VIEWS: true,\n  VIRTUAL: true,\n  VOID: true,\n  WAIT: true,\n  WHEN: true,\n  WHENEVER: true,\n  WHERE: true,\n  WHILE: true,\n  WINDOW: true,\n  WITH: true,\n  WITHIN: true,\n  WITHOUT: true,\n  WORK: true,\n  WRAPPED: true,\n  WRITE: true,\n  YEAR: true,\n  ZONE: true,\n}\n\nfunction isReserved (name) {\n  return RESERVED_WORDS[name.toUpperCase()] != null\n}\n","var db = require('../db')\n\nmodule.exports = function getItem (store, data, cb) {\n\n  store.getTable(data.TableName, function (err, table) {\n    if (err) return cb(err)\n\n    let invalidKey = db.validateKey(data.Key, table)\n    if (invalidKey != null) return cb(invalidKey)\n\n    let invalidKeyPath = db.validateKeyPaths((data._projection || {}).nestedPaths, table)\n    if (invalidKeyPath != null) return cb(invalidKeyPath)\n\n    var itemDb = store.getItemDb(data.TableName), key = db.createKey(data.Key, table)\n\n    itemDb.get(key, function (err, item) {\n      if (err && err.name != 'NotFoundError') return cb(err)\n\n      var returnObj = {}, paths = data._projection ? data._projection.paths : data.AttributesToGet\n\n      if (item) {\n        returnObj.Item = paths ? db.mapPaths(paths, item) : item\n      }\n\n      returnObj.ConsumedCapacity = db.addConsumedCapacity(data, true, item)\n\n      cb(null, returnObj)\n    })\n  })\n}\n","var async = require('async'),\n  getItem = require('./getItem'),\n  db = require('../db')\n\nmodule.exports = function batchGetItem (store, data, cb) {\n  var requests = {}\n\n  async.series([\n    async.each.bind(async, Object.keys(data.RequestItems), addTableRequests),\n    async.parallel.bind(async, requests),\n  ], function (err, responses) {\n    if (err) return cb(err)\n    var res = { Responses: {}, UnprocessedKeys: {} }, table, tableResponses = responses[1], totalSize = 0, capacities = {}\n\n    for (table in tableResponses) {\n      // Order is pretty random\n      // Assign keys before we shuffle\n      tableResponses[table].forEach(function (tableRes, ix) { tableRes._key = data.RequestItems[table].Keys[ix] })\n      shuffle(tableResponses[table])\n      res.Responses[table] = tableResponses[table].map(function (tableRes) {\n        if (tableRes.Item) {\n          // TODO: This is totally inefficient - should fix this\n          var newSize = totalSize + db.itemSize(tableRes.Item)\n          if (newSize > ((1024 * 1024) + store.options.maxItemSize - 3)) {\n            if (!res.UnprocessedKeys[table]) {\n              res.UnprocessedKeys[table] = { Keys: [] }\n              if (data.RequestItems[table].AttributesToGet)\n                res.UnprocessedKeys[table].AttributesToGet = data.RequestItems[table].AttributesToGet\n              if (data.RequestItems[table].ConsistentRead)\n                res.UnprocessedKeys[table].ConsistentRead = data.RequestItems[table].ConsistentRead\n            }\n            if (!capacities[table]) capacities[table] = 0\n            capacities[table] += 1\n            res.UnprocessedKeys[table].Keys.push(tableRes._key)\n            return null\n          }\n          totalSize = newSize\n        }\n        if (tableRes.ConsumedCapacity) {\n          if (!capacities[table]) capacities[table] = 0\n          capacities[table] += tableRes.ConsumedCapacity.CapacityUnits\n        }\n        return tableRes.Item\n      }).filter(Boolean)\n    }\n\n    if (~[ 'TOTAL', 'INDEXES' ].indexOf(data.ReturnConsumedCapacity)) {\n      res.ConsumedCapacity = Object.keys(tableResponses).map(function (table) {\n        return {\n          CapacityUnits: capacities[table],\n          TableName: table,\n          Table: data.ReturnConsumedCapacity == 'INDEXES' ? { CapacityUnits: capacities[table] } : undefined,\n        }\n      })\n    }\n\n    cb(null, res)\n  })\n\n  function addTableRequests (tableName, cb) {\n    store.getTable(tableName, function (err, table) {\n      if (err) return cb(err)\n\n      var req = data.RequestItems[tableName], i, key, options, gets = []\n\n      for (i = 0; i < req.Keys.length; i++) {\n        key = req.Keys[i]\n\n        let invalid = db.validateKey(key, table)\n        if (invalid != null) return cb(invalid)\n\n        options = { TableName: tableName, Key: key }\n        if (req._projection) options._projection = req._projection\n        if (req.AttributesToGet) options.AttributesToGet = req.AttributesToGet\n        if (req.ConsistentRead) options.ConsistentRead = req.ConsistentRead\n        if (data.ReturnConsumedCapacity) options.ReturnConsumedCapacity = data.ReturnConsumedCapacity\n        gets.push(options)\n      }\n\n      requests[tableName] = async.map.bind(async, gets, function (data, cb) { return getItem(store, data, cb) })\n\n      cb()\n    })\n  }\n}\n\nfunction shuffle (arr) {\n  var i, j, temp\n  for (i = arr.length - 1; i >= 1; i--) {\n    j = Math.floor(Math.random() * (i + 1))\n    temp = arr[i]\n    arr[i] = arr[j]\n    arr[j] = temp\n  }\n}\n","var db = require('../db')\n\nmodule.exports = function putItem (store, data, cb) {\n\n  store.getTable(data.TableName, function (err, table) {\n    if (err) return cb(err)\n\n    let invalid = db.validateItem(data.Item, table)\n    if (invalid != null) return cb(invalid)\n\n    var itemDb = store.getItemDb(data.TableName), key = db.createKey(data.Item, table)\n\n    itemDb.lock(key, function (release) {\n      cb = release(cb)\n\n      itemDb.get(key, function (err, existingItem) {\n        if (err && err.name != 'NotFoundError') return cb(err)\n\n        let invalid = db.checkConditional(data, existingItem)\n        if (invalid != null) return cb(invalid)\n\n        var returnObj = {}\n\n        if (existingItem && data.ReturnValues == 'ALL_OLD')\n          returnObj.Attributes = existingItem\n\n        returnObj.ConsumedCapacity = db.addConsumedCapacity(data, false, existingItem, data.Item)\n\n        db.updateIndexes(store, table, existingItem, data.Item, function (err) {\n          if (err) return cb(err)\n\n          itemDb.put(key, data.Item, function (err) {\n            if (err) return cb(err)\n            cb(null, returnObj)\n          })\n        })\n      })\n    })\n  })\n}\n","var db = require('../db')\n\nmodule.exports = function deleteItem (store, data, cb) {\n\n  store.getTable(data.TableName, function (err, table) {\n    if (err) return cb(err)\n\n    let invalid = db.validateKey(data.Key, table)\n    if (invalid != null) return cb(invalid)\n\n    var itemDb = store.getItemDb(data.TableName), key = db.createKey(data.Key, table)\n\n    itemDb.lock(key, function (release) {\n      cb = release(cb)\n\n      itemDb.get(key, function (err, existingItem) {\n        if (err && err.name != 'NotFoundError') return cb(err)\n\n        let invalid =  db.checkConditional(data, existingItem)\n        if (invalid != null) return cb(invalid)\n\n        var returnObj = {}\n\n        if (existingItem && data.ReturnValues == 'ALL_OLD')\n          returnObj.Attributes = existingItem\n\n        returnObj.ConsumedCapacity = db.addConsumedCapacity(data, false, existingItem)\n\n        db.updateIndexes(store, table, existingItem, null, function (err) {\n          if (err) return cb(err)\n\n          itemDb.del(key, function (err) {\n            if (err) return cb(err)\n            cb(null, returnObj)\n          })\n        })\n      })\n    })\n  })\n}\n","var async = require('async'),\n  putItem = require('./putItem'),\n  deleteItem = require('./deleteItem'),\n  db = require('../db')\n\nmodule.exports = function batchWriteItem (store, data, cb) {\n  var actions = []\n\n  async.series([\n    async.each.bind(async, Object.keys(data.RequestItems), addTableActions),\n    async.parallel.bind(async, actions),\n  ], function (err, responses) {\n    if (err) {\n      if (err.body && (/Missing the key/.test(err.body.message) || /Type mismatch for key/.test(err.body.message)))\n        err.body.message = 'The provided key element does not match the schema'\n      return cb(err)\n    }\n    var res = { UnprocessedItems: {} }, tableUnits = {}\n\n    if (~[ 'TOTAL', 'INDEXES' ].indexOf(data.ReturnConsumedCapacity)) {\n      responses[1].forEach(function (action) {\n        var table = action.ConsumedCapacity.TableName\n        if (!tableUnits[table]) tableUnits[table] = 0\n        tableUnits[table] += action.ConsumedCapacity.CapacityUnits\n      })\n      res.ConsumedCapacity = Object.keys(tableUnits).map(function (table) {\n        return {\n          CapacityUnits: tableUnits[table],\n          TableName: table,\n          Table: data.ReturnConsumedCapacity == 'INDEXES' ? { CapacityUnits: tableUnits[table] } : undefined,\n        }\n      })\n    }\n\n    cb(null, res)\n  })\n\n  function addTableActions (tableName, cb) {\n    store.getTable(tableName, function (err, table) {\n      if (err) return cb(err)\n\n      var reqs = data.RequestItems[tableName], i, req, key, seenKeys = {}, options\n\n      for (i = 0; i < reqs.length; i++) {\n        req = reqs[i]\n\n        options = { TableName: tableName }\n        if (data.ReturnConsumedCapacity) options.ReturnConsumedCapacity = data.ReturnConsumedCapacity\n\n        if (req.PutRequest) {\n\n          let invalid = db.validateItem(req.PutRequest.Item, table)\n          if (invalid != null) return cb(invalid)\n\n          options.Item = req.PutRequest.Item\n          actions.push(putItem.bind(null, store, options))\n\n          key = db.createKey(options.Item, table)\n\n        }\n        else if (req.DeleteRequest) {\n\n          let invalid = db.validateKey(req.DeleteRequest.Key, table)\n          if (invalid != null) return cb(invalid)\n\n          options.Key = req.DeleteRequest.Key\n          actions.push(deleteItem.bind(null, store, options))\n\n          key = db.createKey(options.Key, table)\n        }\n        if (seenKeys[key])\n          return cb(db.validationError('Provided list of item keys contains duplicates'))\n        seenKeys[key] = true\n      }\n\n      cb()\n    })\n  }\n}\n","var crypto = require('crypto')\n\nmodule.exports = function createTable (store, data, cb) {\n\n  var key = data.TableName, tableDb = store.tableDb\n\n  tableDb.lock(key, function (release) {\n    cb = release(cb)\n\n    tableDb.get(key, function (err, existingTable) {\n      if (err && err.name != 'NotFoundError') return cb(err)\n\n      // Check if table exists and is valid\n      if (!err && existingTable && typeof existingTable === 'object' && existingTable.TableStatus) {\n        err = new Error\n        err.statusCode = 400\n        err.body = {\n          __type: 'com.amazonaws.dynamodb.v20120810#ResourceInUseException',\n          message: '',\n        }\n        return cb(err)\n      }\n\n      // If table exists but is corrupted, delete it first\n      if (!err && existingTable && (!existingTable.TableStatus || typeof existingTable !== 'object')) {\n        tableDb.del(key, function () {\n          // Ignore deletion errors and proceed with creation\n          createNewTable()\n        })\n        return\n      }\n\n      // Table doesn't exist, create it\n      createNewTable()\n\n      function createNewTable () {\n        data.TableArn = 'arn:aws:dynamodb:' + tableDb.awsRegion + ':' + tableDb.awsAccountId + ':table/' + data.TableName\n        data.TableId = uuidV4()\n        data.CreationDateTime = Date.now() / 1000\n        data.ItemCount = 0\n        if (!data.ProvisionedThroughput) {\n          data.ProvisionedThroughput = { ReadCapacityUnits: 0, WriteCapacityUnits: 0 }\n        }\n        data.ProvisionedThroughput.NumberOfDecreasesToday = 0\n        data.TableSizeBytes = 0\n        data.TableStatus = 'CREATING'\n        if (data.BillingMode == 'PAY_PER_REQUEST') {\n          data.BillingModeSummary = { BillingMode: 'PAY_PER_REQUEST' }\n          data.TableThroughputModeSummary = { TableThroughputMode: 'PAY_PER_REQUEST' }\n          delete data.BillingMode\n        }\n        if (data.LocalSecondaryIndexes) {\n          data.LocalSecondaryIndexes.forEach(function (index) {\n            index.IndexArn = 'arn:aws:dynamodb:' + tableDb.awsRegion + ':' + tableDb.awsAccountId + ':table/' +\n            data.TableName + '/index/' + index.IndexName\n            index.IndexSizeBytes = 0\n            index.ItemCount = 0\n          })\n        }\n        if (data.GlobalSecondaryIndexes) {\n          data.GlobalSecondaryIndexes.forEach(function (index) {\n            index.IndexArn = 'arn:aws:dynamodb:' + tableDb.awsRegion + ':' + tableDb.awsAccountId + ':table/' +\n            data.TableName + '/index/' + index.IndexName\n            index.IndexSizeBytes = 0\n            index.ItemCount = 0\n            index.IndexStatus = 'CREATING'\n            if (!index.ProvisionedThroughput) {\n              index.ProvisionedThroughput = { ReadCapacityUnits: 0, WriteCapacityUnits: 0 }\n            }\n            index.ProvisionedThroughput.NumberOfDecreasesToday = 0\n          })\n        }\n\n        tableDb.put(key, data, function (err) {\n          if (err) return cb(err)\n\n          setTimeout(function () {\n\n            // Shouldn't need to lock/fetch as nothing should have changed\n            data.TableStatus = 'ACTIVE'\n            if (data.GlobalSecondaryIndexes) {\n              data.GlobalSecondaryIndexes.forEach(function (index) {\n                index.IndexStatus = 'ACTIVE'\n              })\n            }\n\n            if (data.BillingModeSummary) {\n              data.BillingModeSummary.LastUpdateToPayPerRequestDateTime = data.CreationDateTime\n            }\n\n            tableDb.put(key, data, function (err) {\n\n              if (err && !/Database is (not open|closed)/.test(err)) console.error(err.stack || err)\n            })\n\n          }, store.options.createTableMs)\n\n          cb(null, { TableDescription: data })\n        })\n      }\n    })\n  })\n\n}\n\nfunction uuidV4 () {\n  var bytes = crypto.randomBytes(14).toString('hex')\n  return bytes.slice(0, 8) + '-' + bytes.slice(8, 12) + '-4' + bytes.slice(13, 16) + '-' +\n    bytes.slice(16, 20) + '-' + bytes.slice(20, 28)\n}\n","var async = require('async')\n\nmodule.exports = function deleteTable (store, data, cb) {\n\n  var key = data.TableName, tableDb = store.tableDb\n\n  store.getTable(key, false, function (err, table) {\n    if (err) return cb(err)\n\n    // Handle corrupted table entries\n    if (!table || typeof table !== 'object') {\n      // Table entry is corrupted, treat as if table doesn't exist\n      err = new Error\n      err.statusCode = 400\n      err.body = {\n        __type: 'com.amazonaws.dynamodb.v20120810#ResourceNotFoundException',\n        message: 'Requested resource not found: Table: ' + key + ' not found',\n      }\n      return cb(err)\n    }\n\n    // Check if table is ACTIVE or not?\n    if (table.TableStatus == 'CREATING') {\n      err = new Error\n      err.statusCode = 400\n      err.body = {\n        __type: 'com.amazonaws.dynamodb.v20120810#ResourceInUseException',\n        message: 'Attempt to change a resource which is still in use: Table is being created: ' + key,\n      }\n      return cb(err)\n    }\n\n    table.TableStatus = 'DELETING'\n\n    var deletes = [ store.deleteItemDb.bind(store, key), store.deleteTagDb.bind(store, key) ]\n    ;[ 'Local', 'Global' ].forEach(function (indexType) {\n      var indexes = table[indexType + 'SecondaryIndexes'] || []\n      deletes = deletes.concat(indexes.map(function (index) {\n        return store.deleteIndexDb.bind(store, indexType, table.TableName, index.IndexName)\n      }))\n    })\n\n    delete table.GlobalSecondaryIndexes\n\n    tableDb.put(key, table, function (err) {\n      if (err) return cb(err)\n\n      async.parallel(deletes, function (err) {\n        if (err) return cb(err)\n\n        setTimeout(function () {\n          tableDb.del(key, function (err) {\n\n            if (err && !/Database is (not open|closed)/.test(err)) console.error(err.stack || err)\n          })\n        }, store.options.deleteTableMs)\n\n        cb(null, { TableDescription: table })\n      })\n    })\n  })\n\n}\n","\nmodule.exports = function describeTable (store, data, cb) {\n\n  store.getTable(data.TableName, false, function (err, table) {\n    if (err) return cb(err)\n\n    cb(null, { Table: table })\n  })\n}\n\n\n","\nmodule.exports = function describeTimeToLive (store, data, cb) {\n  store.getTable(data.TableName, false, function (err) {\n    if (err) return cb(err)\n\n    cb(null, { TimeToLiveDescription: { TimeToLiveStatus: 'DISABLED' } })\n  })\n}\n","var once = require('once'),\n  db = require('../db')\n\nmodule.exports = function listTables (store, data, cb) {\n  cb = once(cb)\n  var opts = {}, limit = data.Limit || 100\n\n  // Don't use opts.gt since it doesn't work in this LevelDB implementation\n  // We'll filter manually after getting all results\n\n  db.lazy(store.tableDb.createKeyStream(opts), cb)\n    .take(Infinity) // Take all items since we need to filter manually\n    .join(function (names) {\n      // Filter to implement proper ExclusiveStartTableName behavior\n      // LevelDB's gt option doesn't work properly in this implementation\n      if (data.ExclusiveStartTableName) {\n        names = names.filter(function (name) {\n          return name > data.ExclusiveStartTableName\n        })\n      }\n\n      // Apply limit after filtering\n      var result = {}\n      if (names.length > limit) {\n        names = names.slice(0, limit)\n        result.LastEvaluatedTableName = names[names.length - 1]\n      }\n      result.TableNames = names\n      cb(null, result)\n    })\n}\n","var once = require('once'),\n  db = require('../db')\n\nmodule.exports = function listTagsOfResource (store, data, cb) {\n  cb = once(cb)\n\n  var tableName = data.ResourceArn.split('/').pop()\n\n  store.getTable(tableName, false, function (err) {\n    if (err && err.name == 'NotFoundError') {\n      err.body.message = 'Requested resource not found: ResourcArn: ' + data.ResourceArn + ' not found'\n    }\n    if (err) return cb(err)\n\n    // Get both keys and values from the tag database\n    var tagDb = store.getTagDb(tableName)\n    var keys = []\n    var values = []\n\n    db.lazy(tagDb.createKeyStream(), cb).join(function (tagKeys) {\n      keys = tagKeys\n      db.lazy(tagDb.createValueStream(), cb).join(function (tagValues) {\n        values = tagValues\n\n        // Combine keys and values into tag objects\n        var tags = keys.map(function (key, index) {\n          return { Key: key, Value: values[index] }\n        })\n\n        cb(null, { Tags: tags })\n      })\n    })\n  })\n}\n\n","var once = require('once'),\n  db = require('../db')\n\nmodule.exports = function query (store, data, cb) {\n  cb = once(cb)\n\n  store.getTable(data.TableName, function (err, table) {\n    if (err) return cb(err)\n\n    var keySchema = table.KeySchema, startKeyNames = keySchema.map(function (key) { return key.AttributeName }),\n      hashKey = startKeyNames[0], rangeKey = startKeyNames[1], fetchFromItemDb = false, isLocal\n\n    if (data.IndexName) {\n      var index = db.traverseIndexes(table, function (attr, type, index, isGlobal) {\n        if (index.IndexName == data.IndexName) {\n          isLocal = !isGlobal\n          return index\n        }\n      })\n      if (index == null) {\n        return cb(db.validationError('The table does not have the specified index: ' + data.IndexName))\n      }\n      if (!isLocal && data.ConsistentRead) {\n        return cb(db.validationError('Consistent reads are not supported on global secondary indexes'))\n      }\n      keySchema = index.KeySchema\n      fetchFromItemDb = data.Select == 'ALL_ATTRIBUTES' && index.Projection.ProjectionType != 'ALL'\n      keySchema.forEach(function (key) { if (!~startKeyNames.indexOf(key.AttributeName)) startKeyNames.push(key.AttributeName) })\n      hashKey = keySchema[0].AttributeName\n      rangeKey = keySchema[1] && keySchema[1].AttributeName\n    }\n\n    if (data.ExclusiveStartKey && Object.keys(data.ExclusiveStartKey).length != startKeyNames.length) {\n      return cb(db.validationError('The provided starting key is invalid'))\n    }\n\n    err = db.traverseKey(table, keySchema, function (attr, type, isHash) {\n      if (data.ExclusiveStartKey) {\n        if (!data.ExclusiveStartKey[attr]) {\n          return db.validationError('The provided starting key is invalid')\n        }\n        err = db.validateKeyPiece(data.ExclusiveStartKey, attr, type, isHash)\n        if (err) return err\n      }\n\n      if (isHash && keySchema.length == 1 && Object.keys(data.KeyConditions).length > 1) {\n        return db.validationError('Query key condition not supported')\n      }\n\n      if (!data.KeyConditions[attr]) {\n        if (isHash || Object.keys(data.KeyConditions).length > 1) {\n          return db.validationError('Query condition missed key schema element: ' + attr)\n        }\n        return\n      }\n\n      var comparisonOperator = data.KeyConditions[attr].ComparisonOperator\n\n      if (~[ 'NULL', 'NOT_NULL', 'NE', 'CONTAINS', 'NOT_CONTAINS', 'IN' ].indexOf(comparisonOperator)) {\n        return db.validationError('Attempted conditional constraint is not an indexable operation')\n      }\n\n      if (data.KeyConditions[attr].AttributeValueList.some(function (attrVal) { return attrVal[type] == null })) {\n        return db.validationError('One or more parameter values were invalid: Condition parameter type does not match schema type')\n      }\n\n      if (isHash && comparisonOperator != 'EQ') {\n        return db.validationError('Query key condition not supported')\n      }\n    })\n    if (err) return cb(err)\n\n    var hashType = Object.keys(data.KeyConditions[hashKey].AttributeValueList[0])[0]\n    var hashVal = data.KeyConditions[hashKey].AttributeValueList[0][hashType]\n\n    if (data.ExclusiveStartKey) {\n      var tableStartKey = table.KeySchema.reduce(function (obj, attr) {\n        obj[attr.AttributeName] = data.ExclusiveStartKey[attr.AttributeName]\n        return obj\n      }, {})\n      let invalid = db.validateKey(tableStartKey, table)\n      if (invalid != null) return cb(db.validationError('The provided starting key is invalid: ' + invalid.message))\n\n      if (!rangeKey || !data.KeyConditions[rangeKey]) {\n        if (data.ExclusiveStartKey[hashKey][hashType] != hashVal) {\n          return cb(db.validationError('The provided starting key is outside query boundaries based on provided conditions'))\n        }\n      }\n      else {\n        var matchesRange = db.compare(data.KeyConditions[rangeKey].ComparisonOperator,\n          data.ExclusiveStartKey[rangeKey], data.KeyConditions[rangeKey].AttributeValueList)\n        if (!matchesRange) {\n          return cb(db.validationError('The provided starting key does not match the range key predicate'))\n        }\n        if (data.ExclusiveStartKey[hashKey][hashType] != hashVal) {\n          return cb(db.validationError('The query can return at most one row and cannot be restarted'))\n        }\n      }\n    }\n\n    let invalid\n    invalid = db.validateKeyPaths((data._projection || {}).nestedPaths, table)\n    if (invalid != null) return cb(invalid)\n\n    if (data.QueryFilter || data._filter) {\n      var pathHeads = data.QueryFilter ? data.QueryFilter : data._filter.pathHeads\n      var propertyName = data.QueryFilter ? 'QueryFilter' : 'Filter Expression'\n      err = db.traverseKey(table, keySchema, function (attr) {\n        if (pathHeads[attr]) {\n          return db.validationError(propertyName + ' can only contain non-primary key attributes: ' +\n            'Primary key attribute: ' + attr)\n        }\n      })\n      if (err) return cb(err)\n    }\n\n    if (fetchFromItemDb && !isLocal) {\n      return cb(db.validationError('One or more parameter values were invalid: ' +\n        'Select type ALL_ATTRIBUTES is not supported for global secondary index ' +\n        data.IndexName + ' because its projection type is not ALL'))\n    }\n\n    invalid = db.validateKeyPaths((data._filter || {}).nestedPaths, table)\n    if (invalid != null) return cb(invalid)\n\n    var opts = { reverse: data.ScanIndexForward === false, limit: data.Limit ? data.Limit + 1 : -1 }\n\n    opts.gte = db.hashPrefix(hashVal, hashType) + '/' + db.toRangeStr(hashVal, hashType) + '/'\n    opts.lt = opts.gte + '~'\n\n    if (data.KeyConditions[rangeKey]) {\n      var rangeStrPrefix = db.toRangeStr(data.KeyConditions[rangeKey].AttributeValueList[0])\n      var rangeStr = rangeStrPrefix + '/'\n      var comp = data.KeyConditions[rangeKey].ComparisonOperator\n      if (comp == 'EQ') {\n        opts.gte += rangeStr\n        opts.lte = opts.gte + '~'\n        delete opts.lt\n      }\n      else if (comp == 'LT') {\n        opts.lt = opts.gte + rangeStr\n      }\n      else if (comp == 'LE') {\n        opts.lte = opts.gte + rangeStr + '~'\n        delete opts.lt\n      }\n      else if (comp == 'GT') {\n        opts.gt = opts.gte + rangeStr + '~'\n        delete opts.gte\n      }\n      else if (comp == 'GE') {\n        opts.gte += rangeStr\n      }\n      else if (comp == 'BEGINS_WITH') {\n        opts.lt = opts.gte + rangeStrPrefix + '~'\n        opts.gte += rangeStr\n      }\n      else if (comp == 'BETWEEN') {\n        opts.lte = opts.gte + db.toRangeStr(data.KeyConditions[rangeKey].AttributeValueList[1]) + '/~'\n        opts.gte += rangeStr\n        delete opts.lt\n      }\n    }\n\n    if (data.ExclusiveStartKey) {\n      var createKey = data.IndexName ? db.createIndexKey : db.createKey\n      var startKey = createKey(data.ExclusiveStartKey, table, keySchema)\n\n      if (data.ScanIndexForward === false) {\n        opts.lt = startKey\n        delete opts.lte\n      }\n      else {\n        opts.gt = startKey\n        delete opts.gte\n      }\n    }\n\n    db.queryTable(store, table, data, opts, isLocal, fetchFromItemDb, startKeyNames, cb)\n  })\n}\n","var once = require('once'),\n  db = require('../db')\n\nmodule.exports = function scan (store, data, cb) {\n  cb = once(cb)\n\n  store.getTable(data.TableName, function (err, table) {\n    if (err) return cb(err)\n\n    var keySchema = table.KeySchema, startKeyNames = keySchema.map(function (key) { return key.AttributeName }),\n      fetchFromItemDb = false, isLocal\n\n    if (data.IndexName) {\n      var index = db.traverseIndexes(table, function (attr, type, index, isGlobal) {\n        if (index.IndexName == data.IndexName) {\n          isLocal = !isGlobal\n          return index\n        }\n      })\n      if (index == null) {\n        return cb(db.validationError('The table does not have the specified index: ' + data.IndexName))\n      }\n      if (!isLocal && data.ConsistentRead) {\n        return cb(db.validationError('Consistent reads are not supported on global secondary indexes'))\n      }\n      keySchema = index.KeySchema\n      fetchFromItemDb = data.Select == 'ALL_ATTRIBUTES' && index.Projection.ProjectionType != 'ALL'\n      keySchema.forEach(function (key) { if (!~startKeyNames.indexOf(key.AttributeName)) startKeyNames.push(key.AttributeName) })\n    }\n\n    if (data.ExclusiveStartKey && Object.keys(data.ExclusiveStartKey).length != startKeyNames.length) {\n      return data.IndexName ? cb(db.validationError('The provided starting key is invalid')) :\n        cb(db.validationError('The provided starting key is invalid: The provided key element does not match the schema'))\n    }\n\n    if (data.IndexName && data.ExclusiveStartKey) {\n      err = db.traverseKey(table, keySchema, function (attr, type, isHash) {\n        if (!data.ExclusiveStartKey[attr]) {\n          return db.validationError('The provided starting key is invalid')\n        }\n        return db.validateKeyPiece(data.ExclusiveStartKey, attr, type, isHash)\n      })\n      if (err) return cb(err)\n    }\n\n    if (fetchFromItemDb && !isLocal) {\n      return cb(db.validationError('One or more parameter values were invalid: ' +\n        'Select type ALL_ATTRIBUTES is not supported for global secondary index ' +\n        data.IndexName + ' because its projection type is not ALL'))\n    }\n\n    if (data.ExclusiveStartKey) {\n      var tableStartKey = table.KeySchema.reduce(function (obj, attr) {\n        obj[attr.AttributeName] = data.ExclusiveStartKey[attr.AttributeName]\n        return obj\n      }, {})\n      let invalid = db.validateKey(tableStartKey, table)\n      if (invalid != null) return cb(db.validationError('The provided starting key is invalid: ' + invalid.message))\n    }\n\n    if (data.TotalSegments > 1) {\n      if (data.Segment > 0)\n        var hashStart = ('00' + Math.ceil(4096 * data.Segment / data.TotalSegments).toString(16)).slice(-3)\n      var hashEnd = ('00' + (Math.ceil(4096 * (data.Segment + 1) / data.TotalSegments) - 1).toString(16)).slice(-3) + '~'\n    }\n\n    if (data.ExclusiveStartKey) {\n      var startKey = db.createIndexKey(data.ExclusiveStartKey, table, keySchema)\n\n      if (data.TotalSegments > 1 && (startKey < hashStart || startKey > hashEnd)) {\n        return cb(db.validationError('The provided starting key is invalid: Invalid ExclusiveStartKey. ' +\n          'Please use ExclusiveStartKey with correct Segment. ' +\n          'TotalSegments: ' + data.TotalSegments + ' Segment: ' + data.Segment))\n      }\n\n      hashStart = startKey\n    }\n\n    let invalid\n    invalid = db.validateKeyPaths((data._projection || {}).nestedPaths, table)\n    if (invalid != null) return cb(invalid)\n\n    invalid = db.validateKeyPaths((data._filter || {}).nestedPaths, table)\n    if (invalid != null) return cb(invalid)\n\n    var opts = { limit: data.Limit ? data.Limit + 1 : -1 }\n\n    if (hashStart != null) {\n      opts.gt = hashStart\n    }\n    if (hashEnd != null) {\n      opts.lt = hashEnd\n    }\n\n    db.queryTable(store, table, data, opts, isLocal, fetchFromItemDb, startKeyNames, cb)\n  })\n}\n","var once = require('once')\n\nmodule.exports = function tagResource (store, data, cb) {\n  cb = once(cb)\n\n  var tableName = data.ResourceArn.split('/').pop()\n\n  store.getTable(tableName, false, function (err) {\n    if (err && err.name == 'NotFoundError') {\n      err.body.message = 'Requested resource not found: ResourcArn: ' + data.ResourceArn + ' not found'\n    }\n    if (err) return cb(err)\n\n    var batchPuts = data.Tags.map(function (tag) { return { type: 'put', key: tag.Key, value: tag.Value } })\n    store.getTagDb(tableName).batch(batchPuts, function (err) {\n      if (err) return cb(err)\n      cb(null, '')\n    })\n  })\n}\n","var once = require('once')\n\nmodule.exports = function untagResource (store, data, cb) {\n  cb = once(cb)\n\n  var tableName = data.ResourceArn.split('/').pop()\n\n  store.getTable(tableName, false, function (err) {\n    if (err && err.name == 'NotFoundError') {\n      err.body.message = 'Requested resource not found'\n    }\n    if (err) return cb(err)\n\n    var batchDeletes = data.TagKeys.map(function (key) { return { type: 'del', key: key } })\n    store.getTagDb(tableName).batch(batchDeletes, function (err) {\n      if (err) return cb(err)\n      cb(null, '')\n    })\n  })\n}\n\n","var Big = require('big.js'),\n  db = require('../db')\n\nmodule.exports = function updateItem (store, data, cb) {\n\n  store.getTable(data.TableName, function (err, table) {\n    if (err) return cb(err)\n\n    let invalidKey = db.validateKey(data.Key, table)\n    if (invalidKey != null) return cb(invalidKey)\n\n    let invalidUpdate = db.validateUpdates(data.AttributeUpdates, data._updates, table)\n    if (invalidUpdate != null) return cb(invalidUpdate)\n\n    var itemDb = store.getItemDb(data.TableName), key = db.createKey(data.Key, table)\n\n    itemDb.lock(key, function (release) {\n      cb = release(cb)\n\n      itemDb.get(key, function (err, oldItem) {\n        if (err && err.name != 'NotFoundError') return cb(err)\n\n        let invalid = db.checkConditional(data, oldItem)\n        if (invalid != null) return cb(invalid)\n\n        var returnObj = {}, item = data.Key,\n          paths = data._updates ? data._updates.paths : Object.keys(data.AttributeUpdates || {})\n\n        if (oldItem) {\n          item = deepClone(oldItem)\n          if (data.ReturnValues == 'ALL_OLD') {\n            returnObj.Attributes = oldItem\n          }\n          else if (data.ReturnValues == 'UPDATED_OLD') {\n            returnObj.Attributes = db.mapPaths(paths, oldItem)\n          }\n        }\n\n        err = data._updates ? applyUpdateExpression(data._updates.sections, table, item) :\n          applyAttributeUpdates(data.AttributeUpdates, table, item)\n        if (err) return cb(err)\n\n        if (db.itemSize(item) > store.options.maxItemSize)\n          return cb(db.validationError('Item size to update has exceeded the maximum allowed size'))\n\n        if (data.ReturnValues == 'ALL_NEW') {\n          returnObj.Attributes = item\n        }\n        else if (data.ReturnValues == 'UPDATED_NEW') {\n          returnObj.Attributes = db.mapPaths(paths, item)\n        }\n\n        returnObj.ConsumedCapacity = db.addConsumedCapacity(data, false, oldItem, item)\n\n        db.updateIndexes(store, table, oldItem, item, function (err) {\n          if (err) return cb(err)\n\n          itemDb.put(key, item, function (err) {\n            if (err) return cb(err)\n            cb(null, returnObj)\n          })\n        })\n      })\n    })\n  })\n}\n\n// Relatively fast deep clone of simple objects/arrays\nfunction deepClone (obj) {\n  if (typeof obj != 'object' || obj == null) return obj\n  var result\n  if (Array.isArray(obj)) {\n    result = new Array(obj.length)\n    for (var i = 0; i < obj.length; i++) {\n      result[i] = deepClone(obj[i])\n    }\n  }\n  else {\n    result = Object.create(null)\n    for (var attr in obj) {\n      result[attr] = deepClone(obj[attr])\n    }\n  }\n  return result\n}\n\nfunction applyAttributeUpdates (updates, table, item) {\n  for (var attr in updates) {\n    var update = updates[attr]\n    if (update.Action == 'PUT' || update.Action == null) {\n      item[attr] = update.Value\n    }\n    else if (update.Action == 'ADD') {\n      if (update.Value.N) {\n        if (item[attr] && !item[attr].N)\n          return db.validationError('Type mismatch for attribute to update')\n        if (!item[attr]) item[attr] = { N: '0' }\n        item[attr].N = new Big(item[attr].N).plus(update.Value.N).toFixed()\n      }\n      else {\n        var type = Object.keys(update.Value)[0]\n        if (item[attr] && !item[attr][type])\n          return db.validationError('Type mismatch for attribute to update')\n        if (!item[attr]) item[attr] = {}\n        if (!item[attr][type]) item[attr][type] = []\n        var val = type == 'L' ? update.Value[type] : update.Value[type].filter(function (a) {\n          return !~item[attr][type].indexOf(a)\n        })\n        item[attr][type] = item[attr][type].concat(val)\n      }\n    }\n    else if (update.Action == 'DELETE') {\n      if (update.Value) {\n        type = Object.keys(update.Value)[0]\n        if (item[attr] && !item[attr][type])\n          return db.validationError('Type mismatch for attribute to update')\n        if (item[attr] && item[attr][type]) {\n          item[attr][type] = item[attr][type].filter(function (val) {\n            return !~update.Value[type].indexOf(val)\n          })\n          if (!item[attr][type].length) delete item[attr]\n        }\n      }\n      else {\n        delete item[attr]\n      }\n    }\n  }\n}\n\nfunction applyUpdateExpression (sections, table, item) {\n  var toSquash = []\n  for (var i = 0; i < sections.length; i++) {\n    var section = sections[i]\n    if (section.type == 'set') {\n      section.val = resolveValue(section.val, item)\n      if (typeof section.val == 'string') {\n        return db.validationError(section.val)\n      }\n    }\n  }\n  for (i = 0; i < sections.length; i++) {\n    section = sections[i]\n    var parent = db.mapPath(section.path.slice(0, -1), item)\n    var attr = section.path[section.path.length - 1]\n    if (parent == null || (typeof attr == 'number' ? parent.L : parent.M) == null) {\n      return db.validationError('The document path provided in the update expression is invalid for update')\n    }\n    var existing = parent.M ? parent.M[attr] : parent.L[attr]\n    var alreadyExists = existing != null\n    if (section.type == 'remove') {\n      deleteFromParent(parent, attr)\n    }\n    else if (section.type == 'delete') {\n      if (alreadyExists && Object.keys(existing)[0] != section.attrType) {\n        return db.validationError('An operand in the update expression has an incorrect data type')\n      }\n      if (alreadyExists) {\n        existing[section.attrType] = existing[section.attrType].filter(function (val) {\n          return !~section.val[section.attrType].indexOf(val)\n        })\n        if (!existing[section.attrType].length) {\n          deleteFromParent(parent, attr)\n        }\n      }\n    }\n    else if (section.type == 'add') {\n      if (alreadyExists && Object.keys(existing)[0] != section.attrType) {\n        return db.validationError('An operand in the update expression has an incorrect data type')\n      }\n      if (section.attrType == 'N') {\n        if (!existing) existing = { N: '0' }\n        existing.N = new Big(existing.N).plus(section.val.N).toFixed()\n      }\n      else {\n        if (!existing) existing = {}\n        if (!existing[section.attrType]) existing[section.attrType] = []\n        existing[section.attrType] = existing[section.attrType].concat(section.val[section.attrType].filter(function (a) {\n          return !~existing[section.attrType].indexOf(a)\n        }))\n      }\n      if (!alreadyExists) {\n        addToParent(parent, attr, existing, toSquash)\n      }\n    }\n    else if (section.type == 'set') {\n      if (section.path.length == 1) {\n        var err = db.traverseIndexes(table, function (attr, type) {\n          if (section.path[0] == attr && section.val[type] == null) {\n            return db.validationError('The update expression attempted to update the secondary index key to unsupported type')\n          }\n        })\n        if (err) return err\n      }\n      addToParent(parent, attr, section.val, toSquash)\n    }\n  }\n  toSquash.forEach(function (obj) { obj.L = obj.L.filter(Boolean) })\n}\n\nfunction resolveValue (val, item) {\n  if (Array.isArray(val)) {\n    val = db.mapPath(val, item)\n  }\n  else if (val.type == 'add' || val.type == 'subtract') {\n    var val1 = resolveValue(val.args[0], item)\n    if (typeof val1 == 'string') return val1\n    if (val1.N == null) {\n      return 'An operand in the update expression has an incorrect data type'\n    }\n    var val2 = resolveValue(val.args[1], item)\n    if (typeof val2 == 'string') return val2\n    if (val2.N == null) {\n      return 'An operand in the update expression has an incorrect data type'\n    }\n    val = { N: new Big(val1.N)[val.type == 'add' ? 'plus' : 'minus'](val2.N).toFixed() }\n  }\n  else if (val.type == 'function' && val.name == 'if_not_exists') {\n    val = db.mapPath(val.args[0], item) || resolveValue(val.args[1], item)\n  }\n  else if (val.type == 'function' && val.name == 'list_append') {\n    val1 = resolveValue(val.args[0], item)\n    if (typeof val1 == 'string') return val1\n    if (val1.L == null) {\n      return 'An operand in the update expression has an incorrect data type'\n    }\n    val2 = resolveValue(val.args[1], item)\n    if (typeof val2 == 'string') return val2\n    if (val2.L == null) {\n      return 'An operand in the update expression has an incorrect data type'\n    }\n    return { L: val1.L.concat(val2.L) }\n  }\n  return val || 'The provided expression refers to an attribute that does not exist in the item'\n}\n\nfunction deleteFromParent (parent, attr) {\n  if (parent.M) {\n    delete parent.M[attr]\n  }\n  else if (parent.L) {\n    parent.L.splice(attr, 1)\n  }\n}\n\nfunction addToParent (parent, attr, val, toSquash) {\n  if (parent.M) {\n    parent.M[attr] = val\n  }\n  else if (parent.L) {\n    if (attr > parent.L.length && !~toSquash.indexOf(parent)) {\n      toSquash.push(parent)\n    }\n    parent.L[attr] = val\n  }\n}\n","var db = require('../db')\n\nmodule.exports = function updateTable (store, data, cb) {\n\n  var key = data.TableName, tableDb = store.tableDb\n\n  tableDb.lock(key, function (release) {\n    cb = release(cb)\n\n    store.getTable(key, false, function (err, table) {\n      if (err) return cb(err)\n\n      var tableBillingMode = (table.BillingModeSummary || {}).BillingMode || 'PROVISIONED'\n\n      if (data.ProvisionedThroughput && (data.BillingMode || tableBillingMode) == 'PAY_PER_REQUEST') {\n        return cb(db.validationError('One or more parameter values were invalid: ' +\n          'Neither ReadCapacityUnits nor WriteCapacityUnits can be specified when BillingMode is PAY_PER_REQUEST'))\n      }\n\n      var updates, i, update, dataThroughput, tableThroughput, readDiff, writeDiff\n\n      try {\n        updates = getThroughputUpdates(data, table)\n      }\n      catch (err) {\n        return cb(err)\n      }\n\n      for (i = 0; i < updates.length; i++) {\n        update = updates[i]\n        dataThroughput = update.dataThroughput\n        tableThroughput = update.tableThroughput\n        readDiff = dataThroughput.ReadCapacityUnits - tableThroughput.ReadCapacityUnits\n        writeDiff = dataThroughput.WriteCapacityUnits - tableThroughput.WriteCapacityUnits\n\n        if (!readDiff && !writeDiff)\n          return cb(db.validationError(\n            'The provisioned throughput for the table will not change. The requested value equals the current value. ' +\n            'Current ReadCapacityUnits provisioned for the table: ' + tableThroughput.ReadCapacityUnits +\n            '. Requested ReadCapacityUnits: ' + dataThroughput.ReadCapacityUnits + '. ' +\n            'Current WriteCapacityUnits provisioned for the table: ' + tableThroughput.WriteCapacityUnits +\n            '. Requested WriteCapacityUnits: ' + dataThroughput.WriteCapacityUnits + '. ' +\n            'Refer to the Amazon DynamoDB Developer Guide for current limits and how to request higher limits.'))\n\n        update.setStatus('UPDATING')\n\n        if (readDiff > 0 || writeDiff > 0) tableThroughput.LastIncreaseDateTime = Date.now() / 1000\n        if (readDiff < 0 || writeDiff < 0) tableThroughput.LastDecreaseDateTime = Date.now() / 1000\n\n        update.readDiff = readDiff\n        update.writeDiff = writeDiff\n\n        if (data.BillingMode == 'PROVISIONED' && tableBillingMode != 'PROVISIONED') {\n          tableThroughput.ReadCapacityUnits = dataThroughput.ReadCapacityUnits\n          tableThroughput.WriteCapacityUnits = dataThroughput.WriteCapacityUnits\n        }\n      }\n\n      if (data.BillingMode == 'PAY_PER_REQUEST' && tableBillingMode != 'PAY_PER_REQUEST') {\n        table.TableStatus = 'UPDATING'\n        table.BillingModeSummary = table.BillingModeSummary || {}\n        table.BillingModeSummary.BillingMode = 'PAY_PER_REQUEST'\n        table.TableThroughputModeSummary = table.TableThroughputModeSummary || {}\n        table.TableThroughputModeSummary.TableThroughputMode = 'PAY_PER_REQUEST'\n        table.ProvisionedThroughput = table.ProvisionedThroughput || {}\n        table.ProvisionedThroughput.LastDecreaseDateTime = Date.now() / 1000\n        table.ProvisionedThroughput.NumberOfDecreasesToday = table.ProvisionedThroughput.NumberOfDecreasesToday || 0\n        table.ProvisionedThroughput.ReadCapacityUnits = 0\n        table.ProvisionedThroughput.WriteCapacityUnits = 0\n        if (table.GlobalSecondaryIndexes) {\n          table.GlobalSecondaryIndexes.forEach(function (index) {\n            index.IndexStatus = 'UPDATING'\n            index.ProvisionedThroughput = index.ProvisionedThroughput || {}\n            index.ProvisionedThroughput.NumberOfDecreasesToday = index.ProvisionedThroughput.NumberOfDecreasesToday || 0\n            index.ProvisionedThroughput.ReadCapacityUnits = 0\n            index.ProvisionedThroughput.WriteCapacityUnits = 0\n          })\n        }\n      }\n      else if (data.BillingMode == 'PROVISIONED' && tableBillingMode != 'PROVISIONED') {\n        table.BillingModeSummary = table.BillingModeSummary || {}\n        table.BillingModeSummary.BillingMode = 'PROVISIONED'\n        table.TableThroughputModeSummary = table.TableThroughputModeSummary || {}\n        table.TableThroughputModeSummary.TableThroughputMode = 'PROVISIONED'\n      }\n\n      tableDb.put(key, table, function (err) {\n        if (err) return cb(err)\n\n        setTimeout(function () {\n\n          // Shouldn't need to lock/fetch as nothing should have changed\n          updates.forEach(function (update) {\n            dataThroughput = update.dataThroughput\n            tableThroughput = update.tableThroughput\n\n            update.setStatus('ACTIVE')\n\n            if (update.readDiff > 0 || update.writeDiff > 0) {\n              tableThroughput.LastIncreaseDateTime = Date.now() / 1000\n            }\n            else if (update.readDiff < 0 || update.writeDiff < 0) {\n              tableThroughput.LastDecreaseDateTime = Date.now() / 1000\n              tableThroughput.NumberOfDecreasesToday++\n            }\n\n            tableThroughput.ReadCapacityUnits = dataThroughput.ReadCapacityUnits\n            tableThroughput.WriteCapacityUnits = dataThroughput.WriteCapacityUnits\n          })\n\n          if (data.BillingMode == 'PAY_PER_REQUEST' && tableBillingMode != 'PAY_PER_REQUEST') {\n            table.TableStatus = 'ACTIVE'\n            table.BillingModeSummary.LastUpdateToPayPerRequestDateTime = Date.now() / 1000\n            table.TableThroughputModeSummary.LastUpdateToPayPerRequestDateTime = Date.now() / 1000\n            delete table.ProvisionedThroughput.LastDecreaseDateTime\n            if (table.GlobalSecondaryIndexes) {\n              table.GlobalSecondaryIndexes.forEach(function (index) {\n                index.IndexStatus = 'ACTIVE'\n                index.ProvisionedThroughput.NumberOfDecreasesToday++\n                index.ProvisionedThroughput.LastDecreaseDateTime = Date.now() / 1000\n              })\n            }\n          }\n\n          tableDb.put(key, table, function (err) {\n\n            if (err && !/Database is (not open|closed)/.test(err)) console.error(err.stack || err)\n          })\n\n        }, store.options.updateTableMs)\n\n        cb(null, { TableDescription: table })\n      })\n    })\n  })\n\n}\n\nfunction getThroughputUpdates (data, table) {\n  var tableBillingMode = (table.BillingModeSummary || {}).BillingMode || 'PROVISIONED'\n  var remainingIndexes = (table.GlobalSecondaryIndexes || []).reduce(function (map, index) {\n    map[index.IndexName] = true\n    return map\n  }, Object.create(null))\n  var updates = []\n  if (data.ProvisionedThroughput) {\n    updates.push({\n      dataThroughput: data.ProvisionedThroughput,\n      tableThroughput: table.ProvisionedThroughput,\n      setStatus: function (status) { table.TableStatus = status },\n    })\n  }\n  var globalUpdates = data.GlobalSecondaryIndexUpdates || []\n  if (globalUpdates.length > 5) throw db.limitError('Subscriber limit exceeded: Only 1 online index can be created or deleted simultaneously per table')\n  globalUpdates.forEach(function (update) {\n    var dataThroughput = update.Update && update.Update.ProvisionedThroughput\n    if (!dataThroughput) {\n      return\n    }\n    if (dataThroughput.ReadCapacityUnits > 1000000000000 || dataThroughput.WriteCapacityUnits > 1000000000000) {\n      throw db.validationError('This operation cannot be performed with given input values. Please contact DynamoDB service team for more info: Action Blocked: IndexUpdate')\n    }\n    (table.GlobalSecondaryIndexes || []).forEach(function (index) {\n      if (index.IndexName == update.Update.IndexName) {\n        delete remainingIndexes[index.IndexName]\n        updates.push({\n          dataThroughput: dataThroughput,\n          tableThroughput: index.ProvisionedThroughput,\n          setStatus: function (status) { index.IndexStatus = status },\n        })\n      }\n    })\n  })\n  if (data.BillingMode == 'PROVISIONED' && tableBillingMode != 'PROVISIONED' && Object.keys(remainingIndexes).length) {\n    throw db.validationError('One or more parameter values were invalid: ' +\n      'ProvisionedThroughput must be specified for index: ' + Object.keys(remainingIndexes).join(','))\n  }\n  return updates\n}\n","import BatchGetItem from \"dynalite/actions/batchGetItem\";\nimport BatchWriteItem from \"dynalite/actions/batchWriteItem\";\nimport CreateTable from \"dynalite/actions/createTable\";\nimport DeleteItem from \"dynalite/actions/deleteItem\";\nimport DeleteTable from \"dynalite/actions/deleteTable\";\nimport DescribeTable from \"dynalite/actions/describeTable\";\nimport DescribeTimeToLive from \"dynalite/actions/describeTimeToLive\";\nimport GetItem from \"dynalite/actions/getItem\";\nimport ListTables from \"dynalite/actions/listTables\";\nimport ListTagsOfResource from \"dynalite/actions/listTagsOfResource\";\nimport PutItem from \"dynalite/actions/putItem\";\nimport Query from \"dynalite/actions/query\";\nimport Scan from \"dynalite/actions/scan\";\nimport TagResource from \"dynalite/actions/tagResource\";\nimport UntagResource from \"dynalite/actions/untagResource\";\nimport UpdateItem from \"dynalite/actions/updateItem\";\nimport UpdateTable from \"dynalite/actions/updateTable\";\n\nexport type ActionType = keyof typeof actions;\n\nexport const actions = {\n\tBatchGetItem,\n\tBatchWriteItem,\n\tCreateTable,\n\tDeleteItem,\n\tDeleteTable,\n\tDescribeTable,\n\tDescribeTimeToLive,\n\tGetItem,\n\tListTables,\n\tPutItem,\n\tQuery,\n\tScan,\n\tTagResource,\n\tUntagResource,\n\tListTagsOfResource,\n\tUpdateItem,\n\tUpdateTable,\n};\n","export const parseAuthHeader = (header: string) => {\n\tconst m = header.match(/Credential=([^,]+)/);\n\tif (!m) {\n\t\tthrow new Error(\"Invalid auth header\");\n\t}\n\n\treturn {\n\t\tcredentials: {\n\t\t\taccessKeyId: m[1].split(\"/\")[0],\n\t\t},\n\t};\n};\n","var validations = require('./index'),\n  db = require('../db')\n\nexports.types = {\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  RequestItems: {\n    type: 'Map<KeysAndAttributes>',\n    notNull: true,\n    lengthGreaterThanOrEqual: 1,\n    keys: {\n      lengthLessThanOrEqual: 255,\n      lengthGreaterThanOrEqual: 3,\n      regex: '[a-zA-Z0-9_.-]+',\n    },\n    children: {\n      type: 'ValueStruct<KeysAndAttributes>',\n      children: {\n        Keys: {\n          type: 'List',\n          notNull: true,\n          lengthGreaterThanOrEqual: 1,\n          lengthLessThanOrEqual: 100,\n          children: {\n            type: 'ParameterizedMap',\n            children: 'AttrStruct<ValueStruct>',\n          },\n        },\n        AttributesToGet: {\n          type: 'List',\n          lengthGreaterThanOrEqual: 1,\n          lengthLessThanOrEqual: 255,\n          children: 'String',\n        },\n        ConsistentRead: 'Boolean',\n        ProjectionExpression: {\n          type: 'String',\n        },\n        ExpressionAttributeNames: {\n          type: 'Map<java.lang.String>',\n          children: 'String',\n        },\n      },\n    },\n  },\n}\n\nexports.custom = function (data) {\n  var numReqs = 0\n\n  for (var table in data.RequestItems) {\n    var tableData = data.RequestItems[table]\n\n    var msg = validations.validateExpressionParams(tableData, [ 'ProjectionExpression' ], [ 'AttributesToGet' ])\n    if (msg) return msg\n\n    if (tableData.AttributesToGet) {\n      msg = validations.findDuplicate(tableData.AttributesToGet)\n      if (msg) return 'One or more parameter values were invalid: Duplicate value in attribute name: ' + msg\n    }\n\n    msg = validations.validateExpressions(tableData)\n    if (msg) return msg\n\n    var seenKeys = Object.create(null)\n    for (var i = 0; i < tableData.Keys.length; i++) {\n      var key = tableData.Keys[i]\n\n      for (var attr in key) {\n        msg = validations.validateAttributeValue(key[attr])\n        if (msg) return msg\n      }\n\n      // TODO: this is unnecessarily expensive\n      var keyStr = Object.keys(key).sort().map(function (attr) { return db.toRangeStr(key[attr]) }).join('/')\n      if (seenKeys[keyStr])\n        return 'Provided list of item keys contains duplicates'\n      seenKeys[keyStr] = true\n\n      numReqs++\n      if (numReqs > 100)\n        return 'Too many items requested for the BatchGetItem call'\n    }\n  }\n}\n","var validations = require('./index'),\n  db = require('../db')\n\nexports.types = {\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  ReturnItemCollectionMetrics: {\n    type: 'String',\n    enum: [ 'SIZE', 'NONE' ],\n  },\n  RequestItems: {\n    type: 'Map<java.util.List<com.amazonaws.dynamodb.v20120810.WriteRequest>>',\n    notNull: true,\n    lengthGreaterThanOrEqual: 1,\n    keys: {\n      lengthLessThanOrEqual: 255,\n      lengthGreaterThanOrEqual: 3,\n      regex: '[a-zA-Z0-9_.-]+',\n    },\n    values: {\n      lengthLessThanOrEqual: 25,\n      lengthGreaterThanOrEqual: 1,\n    },\n    children: {\n      type: 'ParameterizedList',\n      children: {\n        type: 'ValueStruct<WriteRequest>',\n        children: {\n          DeleteRequest: {\n            type: 'FieldStruct<DeleteRequest>',\n            children: {\n              Key: {\n                type: 'Map<AttributeValue>',\n                notNull: true,\n                children: 'AttrStruct<ValueStruct>',\n              },\n            },\n          },\n          PutRequest: {\n            type: 'FieldStruct<PutRequest>',\n            children: {\n              Item: {\n                type: 'Map<AttributeValue>',\n                notNull: true,\n                children: 'AttrStruct<ValueStruct>',\n              },\n            },\n          },\n        },\n      },\n    },\n  },\n}\n\nexports.custom = function (data, store) {\n  var table, i, request, key, msg\n  for (table in data.RequestItems) {\n    if (data.RequestItems[table].some(function (item) { return !Object.keys(item).length }))\n      return 'Supplied AttributeValue has more than one datatypes set, ' +\n        'must contain exactly one of the supported datatypes'\n    for (i = 0; i < data.RequestItems[table].length; i++) {\n      request = data.RequestItems[table][i]\n      if (request.PutRequest) {\n        for (key in request.PutRequest.Item) {\n          msg = validations.validateAttributeValue(request.PutRequest.Item[key])\n          if (msg) return msg\n        }\n        if (db.itemSize(request.PutRequest.Item) > store.options.maxItemSize)\n          return 'Item size has exceeded the maximum allowed size'\n      }\n      else if (request.DeleteRequest) {\n        for (key in request.DeleteRequest.Key) {\n          msg = validations.validateAttributeValue(request.DeleteRequest.Key[key])\n          if (msg) return msg\n        }\n      }\n    }\n  }\n}\n","exports.types = {\n  AttributeDefinitions: {\n    type: 'List',\n    notNull: true,\n    children: {\n      type: 'ValueStruct<AttributeDefinition>',\n      children: {\n        AttributeName: {\n          type: 'String',\n          notNull: true,\n        },\n        AttributeType: {\n          type: 'String',\n          notNull: true,\n          enum: [ 'B', 'N', 'S' ],\n        },\n      },\n    },\n  },\n  TableName: {\n    type: 'String',\n    required: true,\n    tableName: true,\n    regex: '[a-zA-Z0-9_.-]+',\n  },\n  BillingMode: {\n    type: 'String',\n    enum: [ 'PROVISIONED', 'PAY_PER_REQUEST' ],\n  },\n  ProvisionedThroughput: {\n    type: 'FieldStruct<ProvisionedThroughput>',\n    children: {\n      WriteCapacityUnits: {\n        type: 'Long',\n        notNull: true,\n        greaterThanOrEqual: 1,\n      },\n      ReadCapacityUnits: {\n        type: 'Long',\n        notNull: true,\n        greaterThanOrEqual: 1,\n      },\n    },\n  },\n  KeySchema: {\n    type: 'List',\n    notNull: true,\n    lengthGreaterThanOrEqual: 1,\n    lengthLessThanOrEqual: 2,\n    children: {\n      type: 'ValueStruct<KeySchemaElement>',\n      children: {\n        AttributeName: {\n          type: 'String',\n          notNull: true,\n        },\n        KeyType: {\n          type: 'String',\n          notNull: true,\n          enum: [ 'HASH', 'RANGE' ],\n        },\n      },\n    },\n  },\n  LocalSecondaryIndexes: {\n    type: 'List',\n    children: {\n      type: 'ValueStruct<LocalSecondaryIndex>',\n      children: {\n        IndexName: {\n          type: 'String',\n          notNull: true,\n          regex: '[a-zA-Z0-9_.-]+',\n          lengthGreaterThanOrEqual: 3,\n          lengthLessThanOrEqual: 255,\n        },\n        KeySchema: {\n          type: 'List',\n          notNull: true,\n          lengthGreaterThanOrEqual: 1,\n          lengthLessThanOrEqual: 2,\n          children: {\n            type: 'ValueStruct<KeySchemaElement>',\n            children: {\n              AttributeName: {\n                type: 'String',\n                notNull: true,\n              },\n              KeyType: {\n                type: 'String',\n                notNull: true,\n              },\n            },\n          },\n        },\n        Projection: {\n          type: 'FieldStruct<Projection>',\n          notNull: true,\n          children: {\n            ProjectionType: {\n              type: 'String',\n              enum: [ 'ALL', 'INCLUDE', 'KEYS_ONLY' ],\n            },\n            NonKeyAttributes: {\n              type: 'List',\n              lengthGreaterThanOrEqual: 1,\n              children: 'String',\n            },\n          },\n        },\n      },\n    },\n  },\n  GlobalSecondaryIndexes: {\n    type: 'List',\n    children: {\n      type: 'ValueStruct<GlobalSecondaryIndex>',\n      children: {\n        IndexName: {\n          type: 'String',\n          notNull: true,\n          regex: '[a-zA-Z0-9_.-]+',\n          lengthGreaterThanOrEqual: 3,\n          lengthLessThanOrEqual: 255,\n        },\n        KeySchema: {\n          type: 'List',\n          notNull: true,\n          lengthGreaterThanOrEqual: 1,\n          lengthLessThanOrEqual: 2,\n          children: {\n            type: 'ValueStruct<KeySchemaElement>',\n            children: {\n              AttributeName: {\n                type: 'String',\n                notNull: true,\n              },\n              KeyType: {\n                type: 'String',\n                notNull: true,\n              },\n            },\n          },\n        },\n        Projection: {\n          type: 'FieldStruct<Projection>',\n          notNull: true,\n          children: {\n            ProjectionType: {\n              type: 'String',\n              enum: [ 'ALL', 'INCLUDE', 'KEYS_ONLY' ],\n            },\n            NonKeyAttributes: {\n              type: 'List',\n              lengthGreaterThanOrEqual: 1,\n              children: 'String',\n            },\n          },\n        },\n        ProvisionedThroughput: {\n          type: 'FieldStruct<ProvisionedThroughput>',\n          children: {\n            WriteCapacityUnits: {\n              type: 'Long',\n              notNull: true,\n              greaterThanOrEqual: 1,\n            },\n            ReadCapacityUnits: {\n              type: 'Long',\n              notNull: true,\n              greaterThanOrEqual: 1,\n            },\n          },\n        },\n      },\n    },\n  },\n}\n\nexports.custom = function (data) {\n\n  if (data.BillingMode == 'PAY_PER_REQUEST') {\n    if (data.ProvisionedThroughput) {\n      return 'One or more parameter values were invalid: ' +\n        'Neither ReadCapacityUnits nor WriteCapacityUnits can be specified when BillingMode is PAY_PER_REQUEST'\n    }\n  }\n  else {\n    if (data.BillingMode != 'PAY_PER_REQUEST' &&\n        (!data.ProvisionedThroughput || !data.ProvisionedThroughput.ReadCapacityUnits || !data.ProvisionedThroughput.WriteCapacityUnits)) {\n      return 'One or more parameter values were invalid: ' +\n        'ReadCapacityUnits and WriteCapacityUnits must both be specified when BillingMode is PROVISIONED'\n    }\n\n    if (data.ProvisionedThroughput.ReadCapacityUnits > 1000000000000)\n      return 'Given value ' + data.ProvisionedThroughput.ReadCapacityUnits + ' for ReadCapacityUnits is out of bounds'\n    if (data.ProvisionedThroughput.WriteCapacityUnits > 1000000000000)\n      return 'Given value ' + data.ProvisionedThroughput.WriteCapacityUnits + ' for WriteCapacityUnits is out of bounds'\n  }\n\n  var defns = data.AttributeDefinitions.map(function (key) { return key.AttributeName })\n  var keys = data.KeySchema.map(function (key) { return key.AttributeName })\n\n  if (keys.length > defns.length)\n    return 'Invalid KeySchema: Some index key attribute have no definition'\n\n  if (keys.some(function (key) { return !~defns.indexOf(key) }))\n    return 'One or more parameter values were invalid: Some index key attributes are not defined in ' +\n      'AttributeDefinitions. Keys: [' + keys.join(', ') + '], AttributeDefinitions: [' + defns.join(', ') + ']'\n\n  if (keys[0] == keys[1])\n    return 'Both the Hash Key and the Range Key element in the KeySchema have the same name'\n\n  if (data.KeySchema[0].KeyType != 'HASH')\n    return 'Invalid KeySchema: The first KeySchemaElement is not a HASH key type'\n\n  if (data.KeySchema[1] && data.KeySchema[1].KeyType != 'RANGE')\n    return 'Invalid KeySchema: The second KeySchemaElement is not a RANGE key type'\n\n  // TODO: Clean this up!\n  if (!data.LocalSecondaryIndexes && !data.GlobalSecondaryIndexes && data.KeySchema.length != data.AttributeDefinitions.length)\n    return 'One or more parameter values were invalid: Number of attributes in KeySchema does not ' +\n      'exactly match number of attributes defined in AttributeDefinitions'\n\n  var indexNames = Object.create(null), indexKeys, tableHash, i, indexName, indexHash, projectionType\n\n  if (data.LocalSecondaryIndexes) {\n    tableHash = data.KeySchema[0].AttributeName\n\n    if (!data.LocalSecondaryIndexes.length)\n      return 'One or more parameter values were invalid: List of LocalSecondaryIndexes is empty'\n\n    if (data.KeySchema.length != 2)\n      return 'One or more parameter values were invalid: Table KeySchema does not have a range key, ' +\n        'which is required when specifying a LocalSecondaryIndex'\n\n    for (i = 0; i < data.LocalSecondaryIndexes.length; i++) {\n      indexName = data.LocalSecondaryIndexes[i].IndexName\n      indexKeys = data.LocalSecondaryIndexes[i].KeySchema.map(function (key) { return key.AttributeName })\n      if (indexKeys.some(function (key) { return !~defns.indexOf(key) }))\n        return 'One or more parameter values were invalid: ' +\n          'Some index key attributes are not defined in AttributeDefinitions. ' +\n          'Keys: [' + indexKeys.join(', ') + '], AttributeDefinitions: [' + defns.join(', ') + ']'\n\n      if (data.LocalSecondaryIndexes[i].KeySchema[1] &&\n          data.LocalSecondaryIndexes[i].KeySchema[0].AttributeName ==\n          data.LocalSecondaryIndexes[i].KeySchema[1].AttributeName)\n        return 'Both the Hash Key and the Range Key element in the KeySchema have the same name'\n\n      if (data.LocalSecondaryIndexes[i].KeySchema[0].KeyType != 'HASH')\n        return 'Invalid KeySchema: The first KeySchemaElement is not a HASH key type'\n      if (data.LocalSecondaryIndexes[i].KeySchema[1] &&\n          data.LocalSecondaryIndexes[i].KeySchema[1].KeyType != 'RANGE')\n        return 'Invalid KeySchema: The second KeySchemaElement is not a RANGE key type'\n\n      if (data.LocalSecondaryIndexes[i].KeySchema.length != 2)\n        return 'One or more parameter values were invalid: Index KeySchema does not have a range key for index: ' +\n          data.LocalSecondaryIndexes[i].IndexName\n\n      indexHash = data.LocalSecondaryIndexes[i].KeySchema[0].AttributeName\n      if (indexHash != tableHash)\n        return 'One or more parameter values were invalid: ' +\n          'Index KeySchema does not have the same leading hash key as table KeySchema for index: ' +\n          data.LocalSecondaryIndexes[i].IndexName + '. index hash key: ' + indexHash +\n          ', table hash key: ' + tableHash\n\n      if (data.LocalSecondaryIndexes[i].Projection.ProjectionType == null)\n        return 'One or more parameter values were invalid: Unknown ProjectionType: null'\n\n      projectionType = data.LocalSecondaryIndexes[i].Projection.ProjectionType\n      if (data.LocalSecondaryIndexes[i].Projection.NonKeyAttributes && projectionType != 'INCLUDE')\n        return 'One or more parameter values were invalid: ' +\n          'ProjectionType is ' + projectionType + ', but NonKeyAttributes is specified'\n\n      if (indexNames[indexName])\n        return 'One or more parameter values were invalid: Duplicate index name: ' + indexName\n      indexNames[indexName] = true\n    }\n\n    if (data.LocalSecondaryIndexes.length > 5)\n      return 'One or more parameter values were invalid: Number of LocalSecondaryIndexes exceeds per-table limit of 5'\n  }\n\n  if (data.GlobalSecondaryIndexes) {\n    if (!data.GlobalSecondaryIndexes.length)\n      return 'One or more parameter values were invalid: List of GlobalSecondaryIndexes is empty'\n\n    for (i = 0; i < data.GlobalSecondaryIndexes.length; i++) {\n      indexName = data.GlobalSecondaryIndexes[i].IndexName\n      indexKeys = data.GlobalSecondaryIndexes[i].KeySchema.map(function (key) { return key.AttributeName })\n      if (indexKeys.some(function (key) { return !~defns.indexOf(key) }))\n        return 'One or more parameter values were invalid: ' +\n          'Some index key attributes are not defined in AttributeDefinitions. ' +\n          'Keys: [' + indexKeys.join(', ') + '], AttributeDefinitions: [' + defns.join(', ') + ']'\n\n      if (data.GlobalSecondaryIndexes[i].KeySchema[1] &&\n          data.GlobalSecondaryIndexes[i].KeySchema[0].AttributeName ==\n          data.GlobalSecondaryIndexes[i].KeySchema[1].AttributeName)\n        return 'Both the Hash Key and the Range Key element in the KeySchema have the same name'\n\n      if (data.GlobalSecondaryIndexes[i].KeySchema[0].KeyType != 'HASH')\n        return 'Invalid KeySchema: The first KeySchemaElement is not a HASH key type'\n      if (data.GlobalSecondaryIndexes[i].KeySchema[1] &&\n          data.GlobalSecondaryIndexes[i].KeySchema[1].KeyType != 'RANGE')\n        return 'Invalid KeySchema: The second KeySchemaElement is not a RANGE key type'\n\n      if (data.GlobalSecondaryIndexes[i].Projection.ProjectionType == null)\n        return 'One or more parameter values were invalid: Unknown ProjectionType: null'\n\n      projectionType = data.GlobalSecondaryIndexes[i].Projection.ProjectionType\n      if (data.GlobalSecondaryIndexes[i].Projection.NonKeyAttributes && projectionType != 'INCLUDE')\n        return 'One or more parameter values were invalid: ' +\n          'ProjectionType is ' + projectionType + ', but NonKeyAttributes is specified'\n\n      if (data.BillingMode == 'PAY_PER_REQUEST' && data.GlobalSecondaryIndexes[i].ProvisionedThroughput) {\n        return 'One or more parameter values were invalid: ' +\n          'ProvisionedThroughput should not be specified for index: ' + indexName + ' when BillingMode is PAY_PER_REQUEST'\n      }\n\n      if (indexNames[indexName])\n        return 'One or more parameter values were invalid: Duplicate index name: ' + indexName\n      indexNames[indexName] = true\n    }\n\n    if (data.GlobalSecondaryIndexes.length > 20)\n      return 'One or more parameter values were invalid: GlobalSecondaryIndex count exceeds the per-table limit of 20'\n  }\n}\n\n","var validations = require('./index')\n\nexports.types = {\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  TableName: {\n    type: 'String',\n    notNull: true,\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  ReturnValues: {\n    type: 'String',\n    enum: [ 'ALL_NEW', 'UPDATED_OLD', 'ALL_OLD', 'NONE', 'UPDATED_NEW' ],\n  },\n  ReturnItemCollectionMetrics: {\n    type: 'String',\n    enum: [ 'SIZE', 'NONE' ],\n  },\n  Key: {\n    type: 'Map<AttributeValue>',\n    notNull: true,\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ConditionalOperator: {\n    type: 'String',\n    enum: [ 'OR', 'AND' ],\n  },\n  Expected: {\n    type: 'Map<ExpectedAttributeValue>',\n    children: {\n      type: 'ValueStruct<ExpectedAttributeValue>',\n      children: {\n        AttributeValueList: {\n          type: 'List',\n          children: 'AttrStruct<ValueStruct>',\n        },\n        ComparisonOperator: {\n          type: 'String',\n          enum: [ 'IN', 'NULL', 'BETWEEN', 'LT', 'NOT_CONTAINS', 'EQ', 'GT', 'NOT_NULL', 'NE', 'LE', 'BEGINS_WITH', 'GE', 'CONTAINS' ],\n        },\n        Exists: 'Boolean',\n        Value: 'AttrStruct<FieldStruct>',\n      },\n    },\n  },\n  ConditionExpression: {\n    type: 'String',\n  },\n  ExpressionAttributeValues: {\n    type: 'Map<AttributeValue>',\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ExpressionAttributeNames: {\n    type: 'Map<java.lang.String>',\n    children: 'String',\n  },\n}\n\nexports.custom = function (data) {\n\n  var msg = validations.validateExpressionParams(data, [ 'ConditionExpression' ], [ 'Expected' ])\n  if (msg) return msg\n\n  for (var key in data.Key) {\n    msg = validations.validateAttributeValue(data.Key[key])\n    if (msg) return msg\n  }\n\n  msg = validations.validateAttributeConditions(data)\n  if (msg) return msg\n\n  msg = validations.validateExpressions(data)\n  if (msg) return msg\n}\n","exports.types = {\n  TableName: {\n    type: 'String',\n    required: true,\n    tableName: true,\n    regex: '[a-zA-Z0-9_.-]+',\n  },\n}\n\n","exports.types = {\n  TableName: {\n    type: 'String',\n    required: true,\n    tableName: true,\n    regex: '[a-zA-Z0-9_.-]+',\n  },\n}\n\n","exports.types = {\n  TableName: {\n    type: 'String',\n    required: true,\n    tableName: true,\n    regex: '[a-zA-Z0-9_.-]+',\n  },\n}\n","var validations = require('./index')\n\nexports.types = {\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  AttributesToGet: {\n    type: 'List',\n    lengthGreaterThanOrEqual: 1,\n    lengthLessThanOrEqual: 255,\n    children: 'String',\n  },\n  TableName: {\n    type: 'String',\n    notNull: true,\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  Key: {\n    type: 'Map<AttributeValue>',\n    notNull: true,\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ConsistentRead: 'Boolean',\n  ProjectionExpression: {\n    type: 'String',\n  },\n  ExpressionAttributeNames: {\n    type: 'Map<java.lang.String>',\n    children: 'String',\n  },\n}\n\nexports.custom = function (data) {\n\n  var msg = validations.validateExpressionParams(data, [ 'ProjectionExpression' ], [ 'AttributesToGet' ])\n  if (msg) return msg\n\n  for (var key in data.Key) {\n    msg = validations.validateAttributeValue(data.Key[key])\n    if (msg) return msg\n  }\n  if (data.AttributesToGet) {\n    msg = validations.findDuplicate(data.AttributesToGet)\n    if (msg) return 'One or more parameter values were invalid: Duplicate value in attribute name: ' + msg\n  }\n  msg = validations.validateExpressions(data)\n  if (msg) return msg\n}\n","exports.types = {\n  Limit: {\n    type: 'Integer',\n    greaterThanOrEqual: 1,\n    lessThanOrEqual: 100,\n  },\n  ExclusiveStartTableName: {\n    type: 'String',\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n}\n\n","exports.types = {\n  ResourceArn: {\n    type: 'String',\n  },\n}\n\nexports.custom = function (data, store) {\n  if (data.ResourceArn == null) {\n    return 'Invalid TableArn'\n  }\n\n  if (!/^.+:.+:.+:.+:.+:.+\\/.+$/.test(data.ResourceArn)) {\n    var username = 'dynalite'\n\n    var accessDeniedError = new Error\n    accessDeniedError.statusCode = 400\n    accessDeniedError.body = {\n      __type: 'com.amazon.coral.service#AccessDeniedException',\n      Message: 'User: arn:aws:iam::' + store.tableDb.awsAccountId + ':' + username + ' is not authorized to perform: ' +\n        'dynamodb:ListTagsOfResource on resource: ' + (data.ResourceArn || '*'),\n    }\n    throw accessDeniedError\n  }\n\n  if (!/^arn:aws:dynamodb:.+:\\d+:table\\/[^/]{2}[^/]+$/.test(data.ResourceArn)) {\n    return 'Invalid TableArn: Invalid ResourceArn provided as input ' + data.ResourceArn\n  }\n}\n","var validations = require('./index'),\n  db = require('../db')\n\nexports.types = {\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  TableName: {\n    type: 'String',\n    notNull: true,\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  Item: {\n    type: 'Map<AttributeValue>',\n    notNull: true,\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ConditionalOperator: {\n    type: 'String',\n    enum: [ 'OR', 'AND' ],\n  },\n  Expected: {\n    type: 'Map<ExpectedAttributeValue>',\n    children: {\n      type: 'ValueStruct<ExpectedAttributeValue>',\n      children: {\n        AttributeValueList: {\n          type: 'List',\n          children: 'AttrStruct<ValueStruct>',\n        },\n        ComparisonOperator: {\n          type: 'String',\n          enum: [ 'IN', 'NULL', 'BETWEEN', 'LT', 'NOT_CONTAINS', 'EQ', 'GT', 'NOT_NULL', 'NE', 'LE', 'BEGINS_WITH', 'GE', 'CONTAINS' ],\n        },\n        Exists: 'Boolean',\n        Value: 'AttrStruct<FieldStruct>',\n      },\n    },\n  },\n  ReturnValues: {\n    type: 'String',\n    enum: [ 'ALL_NEW', 'UPDATED_OLD', 'ALL_OLD', 'NONE', 'UPDATED_NEW' ],\n  },\n  ReturnItemCollectionMetrics: {\n    type: 'String',\n    enum: [ 'SIZE', 'NONE' ],\n  },\n  ConditionExpression: {\n    type: 'String',\n  },\n  ExpressionAttributeValues: {\n    type: 'Map<AttributeValue>',\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ExpressionAttributeNames: {\n    type: 'Map<java.lang.String>',\n    children: 'String',\n  },\n}\n\nexports.custom = function (data, store) {\n\n  var msg = validations.validateExpressionParams(data, [ 'ConditionExpression' ], [ 'Expected' ])\n  if (msg) return msg\n\n  for (var key in data.Item) {\n    msg = validations.validateAttributeValue(data.Item[key])\n    if (msg) return msg\n  }\n\n  if (data.ReturnValues && data.ReturnValues != 'ALL_OLD' && data.ReturnValues != 'NONE')\n    return 'ReturnValues can only be ALL_OLD or NONE'\n\n  if (db.itemSize(data.Item) > store.options.maxItemSize)\n    return 'Item size has exceeded the maximum allowed size'\n\n  msg = validations.validateAttributeConditions(data)\n  if (msg) return msg\n\n  msg = validations.validateExpressions(data)\n  if (msg) return msg\n}\n","var validations = require('./index')\n\nexports.types = {\n  Select: {\n    type: 'String',\n    enum: [ 'SPECIFIC_ATTRIBUTES', 'COUNT', 'ALL_ATTRIBUTES', 'ALL_PROJECTED_ATTRIBUTES' ],\n  },\n  IndexName: {\n    type: 'String',\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  QueryFilter: {\n    type: 'Map<Condition>',\n    children: {\n      type: 'ValueStruct<Condition>',\n      children: {\n        AttributeValueList: {\n          type: 'List',\n          children: 'AttrStruct<ValueStruct>',\n        },\n        ComparisonOperator: {\n          type: 'String',\n          notNull: true,\n          enum: [ 'IN', 'NULL', 'BETWEEN', 'LT', 'NOT_CONTAINS', 'EQ', 'GT', 'NOT_NULL', 'NE', 'LE', 'BEGINS_WITH', 'GE', 'CONTAINS' ],\n        },\n      },\n    },\n  },\n  TableName: {\n    type: 'String',\n    notNull: true,\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  ConditionalOperator: {\n    type: 'String',\n    enum: [ 'OR', 'AND' ],\n  },\n  AttributesToGet: {\n    type: 'List',\n    lengthGreaterThanOrEqual: 1,\n    lengthLessThanOrEqual: 255,\n    children: 'String',\n  },\n  Limit: {\n    type: 'Integer',\n    greaterThanOrEqual: 1,\n  },\n  KeyConditions: {\n    type: 'Map<Condition>',\n    children: {\n      type: 'ValueStruct<Condition>',\n      children: {\n        ComparisonOperator: {\n          type: 'String',\n          notNull: true,\n          enum: [ 'IN', 'NULL', 'BETWEEN', 'LT', 'NOT_CONTAINS', 'EQ', 'GT', 'NOT_NULL', 'NE', 'LE', 'BEGINS_WITH', 'GE', 'CONTAINS' ],\n        },\n        AttributeValueList: {\n          type: 'List',\n          children: 'AttrStruct<ValueStruct>',\n        },\n      },\n    },\n  },\n  ExclusiveStartKey: {\n    type: 'Map<AttributeValue>',\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ConsistentRead: 'Boolean',\n  ScanIndexForward: 'Boolean',\n  KeyConditionExpression: {\n    type: 'String',\n  },\n  FilterExpression: {\n    type: 'String',\n  },\n  ProjectionExpression: {\n    type: 'String',\n  },\n  ExpressionAttributeValues: {\n    type: 'Map<AttributeValue>',\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ExpressionAttributeNames: {\n    type: 'Map<java.lang.String>',\n    children: 'String',\n  },\n}\n\nexports.custom = function (data) {\n\n  var msg = validations.validateExpressionParams(data,\n    [ 'ProjectionExpression', 'FilterExpression', 'KeyConditionExpression' ],\n    [ 'AttributesToGet', 'QueryFilter', 'ConditionalOperator', 'KeyConditions' ])\n  if (msg) return msg\n\n  var key\n  msg = validations.validateConditions(data.QueryFilter)\n  if (msg) return msg\n\n  if (data.AttributesToGet) {\n    msg = validations.findDuplicate(data.AttributesToGet)\n    if (msg) return 'One or more parameter values were invalid: Duplicate value in attribute name: ' + msg\n  }\n\n  for (key in data.ExclusiveStartKey) {\n    msg = validations.validateAttributeValue(data.ExclusiveStartKey[key])\n    // For some reason this message is only added to some messages...?\n    var prepend = /contains duplicates|number set|numeric value|significant digits|number with magnitude/.test(msg) ? '' : 'The provided starting key is invalid: '\n    if (msg) return prepend + msg\n  }\n\n  if (data.KeyConditions == null && data.KeyConditionExpression == null) {\n    return 'Either the KeyConditions or KeyConditionExpression parameter must be specified in the request.'\n  }\n\n  msg = validations.validateExpressions(data)\n  if (msg) return msg\n\n  if (data._keyCondition != null) {\n    data.KeyConditions = validations.convertKeyCondition(data._keyCondition.expression)\n    if (typeof data.KeyConditions == 'string') {\n      return data.KeyConditions\n    }\n  }\n\n  msg = validations.validateConditions(data.KeyConditions)\n  if (msg) return msg\n\n  var numConditions = Object.keys(data.KeyConditions || {}).length\n  if (numConditions != 1 && numConditions != 2) {\n    return 'Conditions can be of length 1 or 2 only'\n  }\n}\n","var validations = require('./index')\n\nexports.types = {\n  Select: {\n    type: 'String',\n    enum: [ 'SPECIFIC_ATTRIBUTES', 'COUNT', 'ALL_ATTRIBUTES', 'ALL_PROJECTED_ATTRIBUTES' ],\n  },\n  IndexName: {\n    type: 'String',\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  TotalSegments: {\n    type: 'Integer',\n    greaterThanOrEqual: 1,\n  },\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  TableName: {\n    type: 'String',\n    notNull: true,\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  ConditionalOperator: {\n    type: 'String',\n    enum: [ 'OR', 'AND' ],\n  },\n  ScanFilter: {\n    type: 'Map<Condition>',\n    children: {\n      type: 'ValueStruct<Condition>',\n      children: {\n        AttributeValueList: {\n          type: 'List',\n          children: 'AttrStruct<ValueStruct>',\n        },\n        ComparisonOperator: {\n          type: 'String',\n          notNull: true,\n          enum: [ 'IN', 'NULL', 'BETWEEN', 'LT', 'NOT_CONTAINS', 'EQ', 'GT', 'NOT_NULL', 'NE', 'LE', 'BEGINS_WITH', 'GE', 'CONTAINS' ],\n        },\n      },\n    },\n  },\n  Segment: {\n    type: 'Integer',\n    greaterThanOrEqual: 0,\n  },\n  Limit: {\n    type: 'Integer',\n    greaterThanOrEqual: 1,\n  },\n  AttributesToGet: {\n    type: 'List',\n    lengthGreaterThanOrEqual: 1,\n    lengthLessThanOrEqual: 255,\n    children: 'String',\n  },\n  ExclusiveStartKey: {\n    type: 'Map<AttributeValue>',\n    children: 'AttrStruct<ValueStruct>',\n  },\n  FilterExpression: {\n    type: 'String',\n  },\n  ProjectionExpression: {\n    type: 'String',\n  },\n  ExpressionAttributeValues: {\n    type: 'Map<AttributeValue>',\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ExpressionAttributeNames: {\n    type: 'Map<java.lang.String>',\n    children: 'String',\n  },\n}\n\nexports.custom = function (data) {\n\n  var msg = validations.validateExpressionParams(data,\n    [ 'ProjectionExpression', 'FilterExpression' ],\n    [ 'AttributesToGet', 'ScanFilter', 'ConditionalOperator' ])\n  if (msg) return msg\n\n  if (data.AttributesToGet) {\n    msg = validations.findDuplicate(data.AttributesToGet)\n    if (msg) return 'One or more parameter values were invalid: Duplicate value in attribute name: ' + msg\n  }\n\n  msg = validations.validateConditions(data.ScanFilter)\n  if (msg) return msg\n\n  for (var key in data.ExclusiveStartKey) {\n    msg = validations.validateAttributeValue(data.ExclusiveStartKey[key])\n    // For some reason this message is only added to some messages...?\n    var prepend = /contains duplicates|number set|numeric value|significant digits|number with magnitude/.test(msg) ? '' : 'The provided starting key is invalid: '\n    if (msg) return prepend + msg\n  }\n\n  if (data.Segment && data.TotalSegments == null) {\n    return 'The TotalSegments parameter is required but was not present in the request when Segment parameter is present'\n  }\n\n  if (data.TotalSegments) {\n    if (data.Segment == null) {\n      return 'The Segment parameter is required but was not present in the request when parameter TotalSegments is present'\n    }\n    if (data.Segment >= data.TotalSegments) {\n      return 'The Segment parameter is zero-based and must be less than parameter TotalSegments: ' +\n        'Segment: ' + data.Segment + ' is not less than TotalSegments: ' + data.TotalSegments\n    }\n  }\n\n  msg = validations.validateExpressions(data, [ 'ProjectionExpression', 'FilterExpression' ])\n  if (msg) return msg\n}\n","exports.types = {\n  ResourceArn: {\n    type: 'String',\n  },\n  Tags: {\n    type: 'List',\n    children: {\n      type: 'ValueStruct<Tag>',\n      children: {\n        Key: 'String',\n        Value: 'String',\n      },\n    },\n  },\n}\n\nexports.custom = function (data, store) {\n  if (data.ResourceArn == null) {\n    return 'Invalid TableArn'\n  }\n\n  if (!/^.+:.+:.+:.+:.+:.+\\/.+$/.test(data.ResourceArn)) {\n    var username = 'dynalite'\n\n    var accessDeniedError = new Error\n    accessDeniedError.statusCode = 400\n    accessDeniedError.body = {\n      __type: 'com.amazon.coral.service#AccessDeniedException',\n      Message: 'User: arn:aws:iam::' + store.tableDb.awsAccountId + ':' + username + ' is not authorized to perform: ' +\n        'dynamodb:TagResource on resource: ' + (data.ResourceArn || '*'),\n    }\n    throw accessDeniedError\n  }\n\n  if (data.Tags == null) {\n    return '1 validation error detected: Value null at \\'tags\\' failed to satisfy constraint: Member must not be null'\n  }\n\n  if (!/^arn:aws:dynamodb:.+:\\d+:table\\/[^/]{2}[^/]+$/.test(data.ResourceArn)) {\n    return 'Invalid TableArn: Invalid ResourceArn provided as input ' + data.ResourceArn\n  }\n\n  if (!data.Tags.length) {\n    return 'Atleast one Tag needs to be provided as Input.'\n  }\n}\n","exports.types = {\n  ResourceArn: {\n    type: 'String',\n  },\n  TagKeys: {\n    type: 'List',\n    children: 'String',\n  },\n}\n\nexports.custom = function (data, store) {\n  if (data.ResourceArn == null) {\n    return 'Invalid TableArn'\n  }\n\n  if (!/^.+:.+:.+:.+:.+:.+\\/.+$/.test(data.ResourceArn)) {\n    var username = 'dynalite'\n\n    var accessDeniedError = new Error\n    accessDeniedError.statusCode = 400\n    accessDeniedError.body = {\n      __type: 'com.amazon.coral.service#AccessDeniedException',\n      Message: 'User: arn:aws:iam::' + store.tableDb.awsAccountId + ':' + username + ' is not authorized to perform: ' +\n        'dynamodb:UntagResource on resource: ' + (data.ResourceArn || '*'),\n    }\n    throw accessDeniedError\n  }\n\n  if (data.TagKeys == null) {\n    return '1 validation error detected: Value null at \\'tagKeys\\' failed to satisfy constraint: Member must not be null'\n  }\n\n  if (!/^arn:aws:dynamodb:.+:\\d+:table\\/[^/]{2}[^/]+$/.test(data.ResourceArn)) {\n    return 'Invalid TableArn: Invalid ResourceArn provided as input ' + data.ResourceArn\n  }\n\n  if (!data.TagKeys.length) {\n    return 'Atleast one Tag Key needs to be provided as Input.'\n  }\n}\n","var validations = require('./index')\n\nexports.types = {\n  ReturnConsumedCapacity: {\n    type: 'String',\n    enum: [ 'INDEXES', 'TOTAL', 'NONE' ],\n  },\n  TableName: {\n    type: 'String',\n    notNull: true,\n    regex: '[a-zA-Z0-9_.-]+',\n    lengthGreaterThanOrEqual: 3,\n    lengthLessThanOrEqual: 255,\n  },\n  ReturnItemCollectionMetrics: {\n    type: 'String',\n    enum: [ 'SIZE', 'NONE' ],\n  },\n  ReturnValues: {\n    type: 'String',\n    enum: [ 'ALL_NEW', 'UPDATED_OLD', 'ALL_OLD', 'NONE', 'UPDATED_NEW' ],\n  },\n  Key: {\n    type: 'Map<AttributeValue>',\n    notNull: true,\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ConditionalOperator: {\n    type: 'String',\n    enum: [ 'OR', 'AND' ],\n  },\n  Expected: {\n    type: 'Map<ExpectedAttributeValue>',\n    children: {\n      type: 'ValueStruct<ExpectedAttributeValue>',\n      children: {\n        AttributeValueList: {\n          type: 'List',\n          children: 'AttrStruct<ValueStruct>',\n        },\n        ComparisonOperator: {\n          type: 'String',\n          enum: [ 'IN', 'NULL', 'BETWEEN', 'LT', 'NOT_CONTAINS', 'EQ', 'GT', 'NOT_NULL', 'NE', 'LE', 'BEGINS_WITH', 'GE', 'CONTAINS' ],\n        },\n        Exists: 'Boolean',\n        Value: 'AttrStruct<FieldStruct>',\n      },\n    },\n  },\n  AttributeUpdates: {\n    type: 'Map<AttributeValueUpdate>',\n    children: {\n      type: 'ValueStruct<AttributeValueUpdate>',\n      children: {\n        Action: 'String',\n        Value: 'AttrStruct<FieldStruct>',\n      },\n    },\n  },\n  ConditionExpression: {\n    type: 'String',\n  },\n  UpdateExpression: {\n    type: 'String',\n  },\n  ExpressionAttributeValues: {\n    type: 'Map<AttributeValue>',\n    children: 'AttrStruct<ValueStruct>',\n  },\n  ExpressionAttributeNames: {\n    type: 'Map<java.lang.String>',\n    children: 'String',\n  },\n}\n\nexports.custom = function (data) {\n\n  var msg = validations.validateExpressionParams(data,\n    [ 'UpdateExpression', 'ConditionExpression' ],\n    [ 'AttributeUpdates', 'Expected' ])\n  if (msg) return msg\n\n  for (var key in data.Key) {\n    msg = validations.validateAttributeValue(data.Key[key])\n    if (msg) return msg\n  }\n\n  for (key in data.AttributeUpdates) {\n    if (data.AttributeUpdates[key].Value != null) {\n      msg = validations.validateAttributeValue(data.AttributeUpdates[key].Value)\n      if (msg) return msg\n    }\n    if (data.AttributeUpdates[key].Value == null && data.AttributeUpdates[key].Action != 'DELETE')\n      return 'One or more parameter values were invalid: ' +\n        'Only DELETE action is allowed when no attribute value is specified'\n    if (data.AttributeUpdates[key].Value != null && data.AttributeUpdates[key].Action == 'DELETE') {\n      var type = Object.keys(data.AttributeUpdates[key].Value)[0]\n      if (type != 'SS' && type != 'NS' && type != 'BS')\n        return 'One or more parameter values were invalid: ' +\n          'DELETE action with value is not supported for the type ' + type\n    }\n    if (data.AttributeUpdates[key].Value != null && data.AttributeUpdates[key].Action == 'ADD') {\n      type = Object.keys(data.AttributeUpdates[key].Value)[0]\n      if (type != 'L' && type != 'SS' && type != 'NS' && type != 'BS' && type != 'N')\n        return 'One or more parameter values were invalid: ' +\n          'ADD action is not supported for the type ' + type\n    }\n  }\n\n  msg = validations.validateAttributeConditions(data)\n  if (msg) return msg\n\n  msg = validations.validateExpressions(data)\n  if (msg) return msg\n}\n","exports.types = {\n  TableName: {\n    type: 'String',\n    required: true,\n    tableName: true,\n    regex: '[a-zA-Z0-9_.-]+',\n  },\n  ProvisionedThroughput: {\n    type: 'FieldStruct<ProvisionedThroughput>',\n    children: {\n      WriteCapacityUnits: {\n        type: 'Long',\n        notNull: true,\n        greaterThanOrEqual: 1,\n      },\n      ReadCapacityUnits: {\n        type: 'Long',\n        notNull: true,\n        greaterThanOrEqual: 1,\n      },\n    },\n  },\n  BillingMode: {\n    type: 'String',\n    enum: [ 'PROVISIONED', 'PAY_PER_REQUEST' ],\n  },\n  GlobalSecondaryIndexUpdates: {\n    type: 'List',\n    children: {\n      type: 'ValueStruct<GlobalSecondaryIndexUpdate>',\n      children: {\n        Update: {\n          type: 'FieldStruct<UpdateGlobalSecondaryIndexAction>',\n          children: {\n            IndexName: {\n              type: 'String',\n              notNull: true,\n              regex: '[a-zA-Z0-9_.-]+',\n              lengthGreaterThanOrEqual: 3,\n              lengthLessThanOrEqual: 255,\n            },\n            ProvisionedThroughput: {\n              type: 'FieldStruct<ProvisionedThroughput>',\n              notNull: true,\n              children: {\n                WriteCapacityUnits: {\n                  type: 'Long',\n                  notNull: true,\n                  greaterThanOrEqual: 1,\n                },\n                ReadCapacityUnits: {\n                  type: 'Long',\n                  notNull: true,\n                  greaterThanOrEqual: 1,\n                },\n              },\n            },\n          },\n        },\n        Create: {\n          type: 'FieldStruct<CreateGlobalSecondaryIndexAction>',\n          children: {\n            Projection: {\n              type: 'FieldStruct<Projection>',\n              notNull: true,\n              children: {\n                ProjectionType: {\n                  type: 'String',\n                  enum: [ 'ALL', 'INCLUDE', 'KEYS_ONLY' ],\n                },\n                NonKeyAttributes: {\n                  type: 'List',\n                  lengthGreaterThanOrEqual: 1,\n                  children: 'String',\n                },\n              },\n            },\n            IndexName: {\n              type: 'String',\n              notNull: true,\n              regex: '[a-zA-Z0-9_.-]+',\n              lengthGreaterThanOrEqual: 3,\n              lengthLessThanOrEqual: 255,\n            },\n            ProvisionedThroughput: {\n              type: 'FieldStruct<ProvisionedThroughput>',\n              notNull: true,\n              children: {\n                WriteCapacityUnits: {\n                  type: 'Long',\n                  notNull: true,\n                  greaterThanOrEqual: 1,\n                },\n                ReadCapacityUnits: {\n                  type: 'Long',\n                  notNull: true,\n                  greaterThanOrEqual: 1,\n                },\n              },\n            },\n            KeySchema: {\n              type: 'List',\n              notNull: true,\n              lengthGreaterThanOrEqual: 1,\n              lengthLessThanOrEqual: 2,\n              children: {\n                type: 'ValueStruct<KeySchemaElement>',\n                children: {\n                  AttributeName: {\n                    type: 'String',\n                    notNull: true,\n                  },\n                  KeyType: {\n                    type: 'String',\n                    notNull: true,\n                  },\n                },\n              },\n            },\n          },\n        },\n        Delete: {\n          type: 'FieldStruct<DeleteGlobalSecondaryIndexAction>',\n          children: {\n            IndexName: {\n              type: 'String',\n              notNull: true,\n              regex: '[a-zA-Z0-9_.-]+',\n              lengthGreaterThanOrEqual: 3,\n              lengthLessThanOrEqual: 255,\n            },\n          },\n        },\n      },\n    },\n  },\n}\n\nexports.custom = function (data) {\n\n  if (!data.ProvisionedThroughput && !data.BillingMode && !data.UpdateStreamEnabled &&\n      (!data.GlobalSecondaryIndexUpdates || !data.GlobalSecondaryIndexUpdates.length) && !data.SSESpecification) {\n    return 'At least one of ProvisionedThroughput, BillingMode, UpdateStreamEnabled, GlobalSecondaryIndexUpdates or SSESpecification or ReplicaUpdates is required'\n  }\n\n  if (data.BillingMode == 'PROVISIONED' && !data.ProvisionedThroughput) {\n    return 'One or more parameter values were invalid: ' +\n      'ProvisionedThroughput must be specified when BillingMode is PROVISIONED'\n  }\n\n  if (data.ProvisionedThroughput) {\n    if (data.ProvisionedThroughput.ReadCapacityUnits > 1000000000000)\n      return 'Given value ' + data.ProvisionedThroughput.ReadCapacityUnits + ' for ReadCapacityUnits is out of bounds'\n    if (data.ProvisionedThroughput.WriteCapacityUnits > 1000000000000)\n      return 'Given value ' + data.ProvisionedThroughput.WriteCapacityUnits + ' for WriteCapacityUnits is out of bounds'\n  }\n\n  if (data.GlobalSecondaryIndexUpdates) {\n    var length = data.GlobalSecondaryIndexUpdates.length\n    var indexNames = Object.create(null)\n    for (var i = 0; i < length; i++) {\n      var update = data.GlobalSecondaryIndexUpdates[i]\n      if (!update.Update && !update.Create && !update.Delete) {\n        return 'One or more parameter values were invalid: ' +\n          'One of GlobalSecondaryIndexUpdate.Update, GlobalSecondaryIndexUpdate.Create, ' +\n          'GlobalSecondaryIndexUpdate.Delete must not be null'\n      }\n      var indexName = (update.Update && update.Update.IndexName) ||\n        (update.Create && update.Create.IndexName) ||\n        (update.Delete && update.Delete.IndexName)\n      if (indexNames[indexName]) {\n        return 'One or more parameter values were invalid: ' +\n          'Only one global secondary index update per index is allowed simultaneously. Index: ' + indexName\n      }\n      indexNames[indexName] = true\n    }\n  }\n}\n","import BatchGetItem from \"dynalite/validations/batchGetItem\";\nimport BatchWriteItem from \"dynalite/validations/batchWriteItem\";\nimport CreateTable from \"dynalite/validations/createTable\";\nimport DeleteItem from \"dynalite/validations/deleteItem\";\nimport DeleteTable from \"dynalite/validations/deleteTable\";\nimport DescribeTable from \"dynalite/validations/describeTable\";\nimport DescribeTimeToLive from \"dynalite/validations/describeTimeToLive\";\nimport GetItem from \"dynalite/validations/getItem\";\nimport ListTables from \"dynalite/validations/listTables\";\nimport ListTagsOfResource from \"dynalite/validations/listTagsOfResource\";\nimport PutItem from \"dynalite/validations/putItem\";\nimport Query from \"dynalite/validations/query\";\nimport Scan from \"dynalite/validations/scan\";\nimport TagResource from \"dynalite/validations/tagResource\";\nimport UntagResource from \"dynalite/validations/untagResource\";\nimport UpdateItem from \"dynalite/validations/updateItem\";\nimport UpdateTable from \"dynalite/validations/updateTable\";\n\nimport type { ActionType } from \"./actions.js\";\n\nexport const actionValidations: Record<ActionType, any> = {\n\tBatchGetItem,\n\tBatchWriteItem,\n\tCreateTable,\n\tDeleteItem,\n\tDeleteTable,\n\tDescribeTable,\n\tDescribeTimeToLive,\n\tGetItem,\n\tListTables,\n\tPutItem,\n\tQuery,\n\tScan,\n\tTagResource,\n\tUntagResource,\n\tListTagsOfResource,\n\tUpdateItem,\n\tUpdateTable,\n};\n","import db, { type Store } from \"dynalite/db\";\nimport validations from \"dynalite/validations\";\nimport nock, { type ReplyFnContext } from \"nock\";\nimport { type ActionType, actions } from \"./actions.js\";\nimport { parseAuthHeader } from \"./auth.js\";\nimport { actionValidations } from \"./validations.js\";\n\ntype Response = {\n\tstatusCode: number;\n\tbody: any;\n};\n\nconst handler = async (\n\treq: ReplyFnContext[\"req\"],\n\tbody: string,\n\tstore: Store,\n): Promise<Response> => {\n\tconst target = (req.headers[\"x-amz-target\"] || \"\").split(\".\");\n\tconst action = target[1] as ActionType;\n\tlet data = JSON.parse(body as string);\n\n\tconst actionValidation = actionValidations[action];\n\ttry {\n\t\tdata = validations.checkTypes(data, actionValidation.types);\n\t\tvalidations.checkValidations(\n\t\t\tdata,\n\t\t\tactionValidation.types,\n\t\t\tactionValidation.custom,\n\t\t\tstore,\n\t\t);\n\t} catch (err: any) {\n\t\tif (err.statusCode) {\n\t\t\treturn {\n\t\t\t\tstatusCode: err.statusCode,\n\t\t\t\tbody: err.body,\n\t\t\t};\n\t\t}\n\t\tthrow err;\n\t}\n\n\tconst p = new Promise((resolve, reject) => {\n\t\tactions[action](store, data, (err: any, data: any) => {\n\t\t\tif (err) {\n\t\t\t\treject(err);\n\t\t\t}\n\t\t\tresolve(data);\n\t\t});\n\t});\n\n\treturn await p\n\t\t.then((data) => ({\n\t\t\tstatusCode: 200,\n\t\t\tbody: data,\n\t\t}))\n\t\t.catch((err) => {\n\t\t\tif (err.statusCode) {\n\t\t\t\treturn {\n\t\t\t\t\tstatusCode: err.statusCode,\n\t\t\t\t\tbody: err.body,\n\t\t\t\t};\n\t\t\t}\n\t\t\tthrow err;\n\t\t});\n};\n\ntype Options = {\n\tendpoint: string;\n};\n\nexport class MockDynamoDB {\n\tprivate stores: Record<string, Store> = {};\n\tprivate options: Options;\n\tprivate isStarted = false;\n\n\tconstructor(options: Options) {\n\t\tthis.options = options;\n\t}\n\n\tprivate getStore(accessKeyId: string) {\n\t\tif (!this.stores[accessKeyId]) {\n\t\t\tthis.stores[accessKeyId] = db.create({\n\t\t\t\tcreateTableMs: 0,\n\t\t\t\tdeleteTableMs: 0,\n\t\t\t\tupdateTableMs: 0,\n\t\t\t});\n\t\t}\n\t\treturn this.stores[accessKeyId];\n\t}\n\n\tstart() {\n\t\tconst self = this;\n\t\tif (this.isStarted) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isStarted = true;\n\t\tnock(this.options.endpoint)\n\t\t\t.persist()\n\t\t\t.post(\"/\")\n\t\t\t.reply(async function (_uri, body) {\n\t\t\t\tconst auth = parseAuthHeader(this.req.headers.authorization);\n\t\t\t\tconst store = self.getStore(auth.credentials.accessKeyId);\n\t\t\t\tconst data = await handler(this.req, body as string, store);\n\t\t\t\treturn [data.statusCode, data.body];\n\t\t\t});\n\t}\n\n\treset() {\n\t\tfor (const store of Object.values(this.stores)) {\n\t\t\tstore.recreate();\n\t\t}\n\t}\n\n\tstop() {\n\t\tnock.cleanAll();\n\t\tthis.isStarted = false;\n\t}\n}\n\nexport const mockDynamoDB = (options: Options) => {\n\tconst m = new MockDynamoDB(options);\n\tm.start();\n\treturn m;\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,EAAC,SAAU,QAAQ,SAAS;AAC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AAM;IACN,UAAU;KACR,eAAe;MACb,MAAM;MACN,SAAS;MACV;KACD,eAAe;MACb,MAAM;MACN,SAAS;MACT,MAAM;OAAE;OAAK;OAAK;OAAK;MACxB;KACF;IACF;GACF;EACD,WAAW;GACT,MAAM;GACN,UAAU;GACV,WAAW;GACX,OAAO;GACR;EACD,aAAa;GACX,MAAM;GACN,MAAM,CAAE,eAAe,kBAAmB;GAC3C;EACD,uBAAuB;GACrB,MAAM;GACN,UAAU;IACR,oBAAoB;KAClB,MAAM;KACN,SAAS;KACT,oBAAoB;KACrB;IACD,mBAAmB;KACjB,MAAM;KACN,SAAS;KACT,oBAAoB;KACrB;IACF;GACF;EACD,WAAW;GACT,MAAM;GACN,SAAS;GACT,0BAA0B;GAC1B,uBAAuB;GACvB,UAAU;IACR,MAAM;IACN,UAAU;KACR,eAAe;MACb,MAAM;MACN,SAAS;MACV;KACD,SAAS;MACP,MAAM;MACN,SAAS;MACT,MAAM,CAAE,QAAQ,QAAS;MAC1B;KACF;IACF;GACF;EACD,uBAAuB;GACrB,MAAM;GACN,UAAU;IACR,MAAM;IACN,UAAU;KACR,WAAW;MACT,MAAM;MACN,SAAS;MACT,OAAO;MACP,0BAA0B;MAC1B,uBAAuB;MACxB;KACD,WAAW;MACT,MAAM;MACN,SAAS;MACT,0BAA0B;MAC1B,uBAAuB;MACvB,UAAU;OACR,MAAM;OACN,UAAU;QACR,eAAe;SACb,MAAM;SACN,SAAS;SACV;QACD,SAAS;SACP,MAAM;SACN,SAAS;SACV;QACF;OACF;MACF;KACD,YAAY;MACV,MAAM;MACN,SAAS;MACT,UAAU;OACR,gBAAgB;QACd,MAAM;QACN,MAAM;SAAE;SAAO;SAAW;SAAa;QACxC;OACD,kBAAkB;QAChB,MAAM;QACN,0BAA0B;QAC1B,UAAU;QACX;OACF;MACF;KACF;IACF;GACF;EACD,wBAAwB;GACtB,MAAM;GACN,UAAU;IACR,MAAM;IACN,UAAU;KACR,WAAW;MACT,MAAM;MACN,SAAS;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