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sBAAuB,KAAK,KAAK,SAC9D,MAEP,GAAI,OAAO,SAAS,GAChB,OAAO,EAEN,MAAI,aAAkB,MACjB,EAGA,IAAI,MAAM,8CAAgD,KAAK,UAAU,GAEvF,CAmBA,cAAA,CAAe,EAAW,EAAY,GAClC,OAAO,KAAK,aAAY,IAAM,qBAAqB,mBAAmB,IAAI,EAAW,EAAY,CAC7F,sBAAsB,KACnB,uBAAuB,KAAM,sBAAuB,KAAK,KAAK,SAC9D,KAEX,CAQA,GAAA,CAAI,GAAa,GACb,OAAO,KAAK,aAAa,IAAI,GAAY,OAC7C,CAIA,SAAI,GACA,OAAO,KAAK,aAAa,KAC7B,CASA,WAAA,CAAY,EAAM,GAAY,GAC1B,MAAM,EAAI,gBACA,uBAAuB,KAAM,uBAAwB,KAAK,KAAK,MAC9D,KAAK,aAAa,YAAY,MAEzC,OAAO,GAAY,EAAI,aAAa,eAAe,EAAG,KAAK,QAAQ,aAAe,GACtF,CAOA,QAAI,GACA,OAAO,KAAK,aAAa,MAC7B,CAIA,gBAAI,GACA,OAAO,KAAK,aAAa,gBAC7B,CAIA,gBAAI,GACA,OAAO,KAAK,aAAa,gBAC7B,CAIA,aAAI,GACA,OAAO,KAAK,aAAa,aAC7B,CAIA,cAAA,GACI,OAAO,KAAK,aAAa,cAC7B,CAKA,mBAAA,CAAoB,GAAa,GAC7B,OAAO,KAAK,aAAa,oBAAoB,EACjD,EAEJ,QAAQ,SAAW,SACnB,sBAAwB,IAAI,QAAW,uBAAyB,IAAI,QAkBpE,QAAQ,SAAW,IAAI","file":"/npm/exiftool-vendored@28.3.1/dist/ExifTool.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/exiftool-vendored@28.3.1/dist/ExifTool.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _ExifTool_taskOptions, _ExifTool_checkForPerl;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exiftool = exports.ExifTool = exports.DefaultWriteTaskOptions = exports.offsetMinutesToZoneName = exports.defaultVideosToUTC = exports.UnsetZoneOffsetMinutes = exports.UnsetZoneName = exports.UnsetZone = exports.DefaultReadTaskOptions = exports.parseJSON = exports.isGeolocationTag = exports.exiftoolPath = exports.ExifToolTask = exports.ExifTime = exports.ExifDateTime = exports.ExifDate = exports.DefaultMaxProcs = exports.DefaultExiftoolArgs = exports.DefaultExifToolOptions = exports.CapturedAtTagNames = exports.BinaryField = void 0;\nconst bc = __importStar(require(\"batch-cluster\"));\nconst _cp = __importStar(require(\"node:child_process\"));\nconst _fs = __importStar(require(\"node:fs\"));\nconst node_process_1 = __importDefault(require(\"node:process\"));\nconst Array_1 = require(\"./Array\");\nconst AsyncRetry_1 = require(\"./AsyncRetry\");\nconst BinaryExtractionTask_1 = require(\"./BinaryExtractionTask\");\nconst BinaryToBufferTask_1 = require(\"./BinaryToBufferTask\");\nconst DefaultExifToolOptions_1 = require(\"./DefaultExifToolOptions\");\nconst DeleteAllTagsArgs_1 = require(\"./DeleteAllTagsArgs\");\nconst ExifToolOptions_1 = require(\"./ExifToolOptions\");\nconst ExiftoolPath_1 = require(\"./ExiftoolPath\");\nconst IsWin32_1 = require(\"./IsWin32\");\nconst Lazy_1 = require(\"./Lazy\");\nconst Object_1 = require(\"./Object\");\nconst Pick_1 = require(\"./Pick\");\nconst ReadRawTask_1 = require(\"./ReadRawTask\");\nconst ReadTask_1 = require(\"./ReadTask\");\nconst RewriteAllTagsTask_1 = require(\"./RewriteAllTagsTask\");\nconst String_1 = require(\"./String\");\nconst VersionTask_1 = require(\"./VersionTask\");\nconst Which_1 = require(\"./Which\");\nconst WriteTask_1 = require(\"./WriteTask\");\nvar BinaryField_1 = require(\"./BinaryField\");\nObject.defineProperty(exports, \"BinaryField\", { enumerable: true, get: function () { return BinaryField_1.BinaryField; } });\nvar CapturedAtTagNames_1 = require(\"./CapturedAtTagNames\");\nObject.defineProperty(exports, \"CapturedAtTagNames\", { enumerable: true, get: function () { return CapturedAtTagNames_1.CapturedAtTagNames; } });\nvar DefaultExifToolOptions_2 = require(\"./DefaultExifToolOptions\");\nObject.defineProperty(exports, \"DefaultExifToolOptions\", { enumerable: true, get: function () { return DefaultExifToolOptions_2.DefaultExifToolOptions; } });\nvar DefaultExiftoolArgs_1 = require(\"./DefaultExiftoolArgs\");\nObject.defineProperty(exports, \"DefaultExiftoolArgs\", { enumerable: true, get: function () { return DefaultExiftoolArgs_1.DefaultExiftoolArgs; } });\nvar DefaultMaxProcs_1 = require(\"./DefaultMaxProcs\");\nObject.defineProperty(exports, \"DefaultMaxProcs\", { enumerable: true, get: function () { return DefaultMaxProcs_1.DefaultMaxProcs; } });\nvar ExifDate_1 = require(\"./ExifDate\");\nObject.defineProperty(exports, \"ExifDate\", { enumerable: true, get: function () { return ExifDate_1.ExifDate; } });\nvar ExifDateTime_1 = require(\"./ExifDateTime\");\nObject.defineProperty(exports, \"ExifDateTime\", { enumerable: true, get: function () { return ExifDateTime_1.ExifDateTime; } });\nvar ExifTime_1 = require(\"./ExifTime\");\nObject.defineProperty(exports, \"ExifTime\", { enumerable: true, get: function () { return ExifTime_1.ExifTime; } });\nvar ExifToolTask_1 = require(\"./ExifToolTask\");\nObject.defineProperty(exports, \"ExifToolTask\", { enumerable: true, get: function () { return ExifToolTask_1.ExifToolTask; } });\nvar ExiftoolPath_2 = require(\"./ExiftoolPath\");\nObject.defineProperty(exports, \"exiftoolPath\", { enumerable: true, get: function () { return ExiftoolPath_2.exiftoolPath; } });\nvar GeolocationTags_1 = require(\"./GeolocationTags\");\nObject.defineProperty(exports, \"isGeolocationTag\", { enumerable: true, get: function () { return GeolocationTags_1.isGeolocationTag; } });\nvar JSON_1 = require(\"./JSON\");\nObject.defineProperty(exports, \"parseJSON\", { enumerable: true, get: function () { return JSON_1.parseJSON; } });\nvar ReadTask_2 = require(\"./ReadTask\");\nObject.defineProperty(exports, \"DefaultReadTaskOptions\", { enumerable: true, get: function () { return ReadTask_2.DefaultReadTaskOptions; } });\nvar Timezones_1 = require(\"./Timezones\");\nObject.defineProperty(exports, \"UnsetZone\", { enumerable: true, get: function () { return Timezones_1.UnsetZone; } });\nObject.defineProperty(exports, \"UnsetZoneName\", { enumerable: true, get: function () { return Timezones_1.UnsetZoneName; } });\nObject.defineProperty(exports, \"UnsetZoneOffsetMinutes\", { enumerable: true, get: function () { return Timezones_1.UnsetZoneOffsetMinutes; } });\nObject.defineProperty(exports, \"defaultVideosToUTC\", { enumerable: true, get: function () { return Timezones_1.defaultVideosToUTC; } });\nObject.defineProperty(exports, \"offsetMinutesToZoneName\", { enumerable: true, get: function () { return Timezones_1.offsetMinutesToZoneName; } });\nvar WriteTask_2 = require(\"./WriteTask\");\nObject.defineProperty(exports, \"DefaultWriteTaskOptions\", { enumerable: true, get: function () { return WriteTask_2.DefaultWriteTaskOptions; } });\n/**\n * This is the hardcoded path in the exiftool shebang line\n */\nconst PERL = \"/usr/bin/perl\";\n/**\n * Is the #!/usr/bin/perl shebang line in exiftool-vendored.pl going to fail? If\n * so, we need to find `perl` ourselves, and ignore the shebang line.\n */\nconst _ignoreShebang = (0, Lazy_1.lazy)(() => !(0, IsWin32_1.isWin32)() && !_fs.existsSync(PERL));\nconst whichPerl = (0, Lazy_1.lazy)(async () => {\n    const result = await (0, Which_1.which)(PERL);\n    if (result == null) {\n        throw new Error(\"Perl must be installed. Please add perl to your $PATH and try again.\");\n    }\n    return result;\n});\n/**\n * Manages delegating calls to a cluster of ExifTool child processes.\n *\n * **NOTE: Instances are expensive!**\n *\n * * use either the default exported singleton instance of this class,\n *   {@link exiftool}, or your own singleton\n *\n * * make sure you await {@link ExifTool.end} when you're done with an instance\n *   to clean up subprocesses\n *\n * * review the {@link ExifToolOptions} for configuration options--the default\n *   values are conservative to avoid overwhelming your system.\n *\n * @see https://photostructure.github.io/exiftool-vendored.js/ for more documentation.\n */\nclass ExifTool {\n    constructor(options = {}) {\n        var _a;\n        this.exiftoolPath = (0, Lazy_1.lazy)(async () => {\n            var _a;\n            const o = this.options;\n            return ((_a = (await ((0, Object_1.isFunction)(o.exiftoolPath)\n                ? o.exiftoolPath(this.options.logger())\n                : o.exiftoolPath))) !== null && _a !== void 0 ? _a : (0, ExiftoolPath_1.exiftoolPath)(this.options.logger()));\n        });\n        _ExifTool_taskOptions.set(this, (0, Lazy_1.lazy)(() => (0, Pick_1.pick)(this.options, \"ignoreMinorErrors\"))\n        /**\n         * Register life cycle event listeners. Delegates to BatchProcess.\n         */\n        );\n        /**\n         * Register life cycle event listeners. Delegates to BatchProcess.\n         */\n        this.on = (event, listener) => this.batchCluster.on(event, listener);\n        /**\n         * Unregister life cycle event listeners. Delegates to BatchProcess.\n         */\n        this.off = (event, listener) => this.batchCluster.off(event, listener);\n        // calling whichPerl through this lazy() means we only do that task once per\n        // instance.\n        _ExifTool_checkForPerl.set(this, (0, Lazy_1.lazy)(async () => {\n            if (this.options.checkPerl) {\n                await whichPerl(); // < throws if perl is missing\n            }\n        })\n        /**\n         * Most users will not need to use `enqueueTask` directly. This method\n         * supports submitting custom `BatchCluster` tasks.\n         *\n         * @param task is a thunk to support retries by providing new instances on retries.\n         *\n         * @see BinaryExtractionTask for an example task implementation\n         */\n        );\n        if (options != null && typeof options !== \"object\") {\n            throw new Error(\"Please update caller to the new ExifTool constructor API\");\n        }\n        const o = (0, ExifToolOptions_1.handleDeprecatedOptions)({\n            ...DefaultExifToolOptions_1.DefaultExifToolOptions,\n            ...options,\n        });\n        const ignoreShebang = (_a = o.ignoreShebang) !== null && _a !== void 0 ? _a : _ignoreShebang();\n        const env = { ...o.exiftoolEnv, LANG: \"C\" };\n        if ((0, String_1.notBlank)(node_process_1.default.env.EXIFTOOL_HOME) && (0, String_1.blank)(env.EXIFTOOL_HOME)) {\n            env.EXIFTOOL_HOME = node_process_1.default.env.EXIFTOOL_HOME;\n        }\n        const spawnOpts = {\n            stdio: \"pipe\",\n            shell: false,\n            detached: false, // < no orphaned exiftool procs, please\n            env,\n        };\n        const processFactory = async () => ignoreShebang\n            ? _cp.spawn(await whichPerl(), [await this.exiftoolPath(), ...o.exiftoolArgs], spawnOpts)\n            : _cp.spawn(await this.exiftoolPath(), o.exiftoolArgs, spawnOpts);\n        this.options = {\n            ...o,\n            ignoreShebang,\n            processFactory,\n        };\n        this.batchCluster = new bc.BatchCluster(this.options);\n    }\n    /**\n     * @return a promise holding the version number of the vendored ExifTool\n     */\n    version() {\n        return this.enqueueTask(() => new VersionTask_1.VersionTask(this.options));\n    }\n    read(file, argsOrOptions, options) {\n        var _a, _b;\n        const opts = {\n            ...(0, Pick_1.pick)(this.options, ...ReadTask_1.ReadTaskOptionFields),\n            ...((0, Object_1.isObject)(argsOrOptions) ? argsOrOptions : options),\n        };\n        opts.readArgs =\n            (_b = (_a = (0, Array_1.ifArr)(argsOrOptions)) !== null && _a !== void 0 ? _a : (0, Array_1.ifArr)(opts.readArgs)) !== null && _b !== void 0 ? _b : this.options.readArgs;\n        return this.enqueueTask(() => ReadTask_1.ReadTask.for(file, opts)); // < no way to know at compile time if we're going to get back a T!\n    }\n    /**\n     * Read the tags from `file`, without any post-processing of ExifTool values.\n     *\n     * **You probably want `read`, not this method. READ THE REST OF THIS COMMENT\n     * CAREFULLY.**\n     *\n     * If you want to extract specific tag values from a file, you may want to use\n     * this, but all data validation and inference heuristics provided by `read`\n     * will be skipped.\n     *\n     * Note that performance will be very similar to `read`, and will actually be\n     * worse if you don't include `-fast` or `-fast2` (as the most expensive bit\n     * is the perl interpreter and scanning the file on disk).\n     *\n     * @param args any additional arguments other than the file path. Note that\n     * \"-json\", and the Windows unicode filename handler flags, \"-charset\n     * filename=utf8\", will be added automatically.\n     *\n     * @return Note that the return value will be similar to `Tags`, but with no\n     * date, time, or other rich type parsing that you get from `.read()`. The\n     * field values will be `string | number | string[]`.\n     *\n     * @see https://github.com/photostructure/exiftool-vendored.js/issues/44 for\n     * typing details.\n     */\n    readRaw(file, args = []) {\n        return this.enqueueTask(() => ReadRawTask_1.ReadRawTask.for(file, args, __classPrivateFieldGet(this, _ExifTool_taskOptions, \"f\").call(this)));\n    }\n    write(file, tags, writeArgsOrOptions, options) {\n        var _a, _b;\n        const opts = {\n            ...(0, Pick_1.pick)(this.options, ...WriteTask_1.WriteTaskOptionFields),\n            ...((0, Object_1.isObject)(writeArgsOrOptions) ? writeArgsOrOptions : options),\n        };\n        opts.writeArgs =\n            (_b = (_a = (0, Array_1.ifArr)(writeArgsOrOptions)) !== null && _a !== void 0 ? _a : (0, Array_1.ifArr)(opts.writeArgs)) !== null && _b !== void 0 ? _b : this.options.writeArgs;\n        // don't retry because writes might not be idempotent (e.g. incrementing\n        // timestamps by an hour)\n        const retriable = false;\n        return this.enqueueTask(() => WriteTask_1.WriteTask.for(file, tags, opts), retriable);\n    }\n    /**\n     * This will strip `file` of all metadata tags. The original file (with the\n     * name `${FILENAME}_original`) will be retained. Note that some tags, like\n     * stat information and image dimensions, are intrinsic to the file and will\n     * continue to exist if you re-`read` the file.\n     *\n     * @param {string} file the file to strip of metadata\n     *\n     * @param {(keyof Tags | string)[]} opts.retain optional. If provided, this is\n     * a list of metadata keys to **not** delete.\n     */\n    deleteAllTags(file, opts) {\n        var _a;\n        const args = [...DeleteAllTagsArgs_1.DeleteAllTagsArgs];\n        for (const ea of (_a = opts === null || opts === void 0 ? void 0 : opts.retain) !== null && _a !== void 0 ? _a : []) {\n            args.push(`-${ea}<${ea}`);\n        }\n        return this.write(file, {}, args, (0, Object_1.omit)(opts !== null && opts !== void 0 ? opts : {}, \"retain\"));\n    }\n    /**\n     * Extract the low-resolution thumbnail in `path/to/image.jpg`\n     * and write it to `path/to/thumbnail.jpg`.\n     *\n     * Note that these images can be less than .1 megapixels in size.\n     *\n     * @return a `Promise<void>`. An `Error` is raised if\n     * the file could not be read or the output not written.\n     */\n    extractThumbnail(imageFile, thumbnailFile, opts) {\n        return this.extractBinaryTag(\"ThumbnailImage\", imageFile, thumbnailFile, opts);\n    }\n    /**\n     * Extract the \"preview\" image in `path/to/image.jpg`\n     * and write it to `path/to/preview.jpg`.\n     *\n     * The size of these images varies widely, and is present in dSLR images.\n     * Canon, Fuji, Olympus, and Sony use this tag.\n     *\n     * @return a `Promise<void>`. An `Error` is raised if\n     * the file could not be read or the output not written.\n     */\n    extractPreview(imageFile, previewFile, opts) {\n        return this.extractBinaryTag(\"PreviewImage\", imageFile, previewFile, opts);\n    }\n    /**\n     * Extract the \"JpgFromRaw\" image in `path/to/image.jpg` and write it to\n     * `path/to/fromRaw.jpg`.\n     *\n     * This size of these images varies widely, and is not present in all RAW\n     * images. Nikon and Panasonic use this tag.\n     *\n     * @return a `Promise<void>`. The promise will be rejected if the file could\n     * not be read or the output not written.\n     */\n    extractJpgFromRaw(imageFile, outputFile, opts) {\n        return this.extractBinaryTag(\"JpgFromRaw\", imageFile, outputFile, opts);\n    }\n    /**\n     * Extract a given binary value from \"tagname\" tag associated to\n     * `path/to/image.jpg` and write it to `dest` (which cannot exist and whose\n     * directory must already exist).\n     *\n     * @return a `Promise<void>`. The promise will be rejected if the binary\n     * output not be written to `dest`.\n     */\n    async extractBinaryTag(tagname, src, dest, opts) {\n        // BinaryExtractionTask returns a stringified error if the output indicates\n        // the task should not be retried.\n        const maybeError = await this.enqueueTask(() => BinaryExtractionTask_1.BinaryExtractionTask.for(tagname, src, dest, {\n            ...__classPrivateFieldGet(this, _ExifTool_taskOptions, \"f\").call(this),\n            ...opts,\n        }));\n        if (maybeError != null) {\n            throw new Error(maybeError);\n        }\n    }\n    /**\n     * Extract a given binary value from \"tagname\" tag associated to\n     * `path/to/image.jpg` as a `Buffer`. This has the advantage of not writing to\n     * a file, but if the payload associated to `tagname` is large, this can cause\n     * out-of-memory errors.\n     *\n     * @return a `Promise<Buffer>`. The promise will be rejected if the file or\n     * tag is missing.\n     */\n    async extractBinaryTagToBuffer(tagname, imageFile, opts) {\n        const result = await this.enqueueTask(() => BinaryToBufferTask_1.BinaryToBufferTask.for(tagname, imageFile, {\n            ...__classPrivateFieldGet(this, _ExifTool_taskOptions, \"f\").call(this),\n            ...opts,\n        }));\n        if (Buffer.isBuffer(result)) {\n            return result;\n        }\n        else if (result instanceof Error) {\n            throw result;\n        }\n        else {\n            throw new Error(\"Unexpected result from BinaryToBufferTask: \" + JSON.stringify(result));\n        }\n    }\n    /**\n     * Attempt to fix metadata problems in JPEG images by deleting all metadata\n     * and rebuilding from scratch. After repairing an image you should be able to\n     * write to it without errors, but some metadata from the original image may\n     * be lost in the process.\n     *\n     * This should only be applied as a last resort to images whose metadata is\n     * not readable via {@link ExifTool.read()}.\n     *\n     * @see https://exiftool.org/faq.html#Q20\n     *\n     * @param {string} inputFile the path to the problematic image\n     * @param {string} outputFile the path to write the repaired image\n     * @param {boolean} opts.allowMakerNoteRepair if there are problems with MakerNote\n     * tags, allow ExifTool to apply heuristics to recover corrupt tags. See\n     * exiftool's `-F` flag.\n     * @return {Promise<void>} resolved when outputFile has been written.\n     */\n    rewriteAllTags(inputFile, outputFile, opts) {\n        return this.enqueueTask(() => RewriteAllTagsTask_1.RewriteAllTagsTask.for(inputFile, outputFile, {\n            allowMakerNoteRepair: false,\n            ...__classPrivateFieldGet(this, _ExifTool_taskOptions, \"f\").call(this),\n            ...opts,\n        }));\n    }\n    /**\n     * Shut down running ExifTool child processes. No subsequent requests will be\n     * accepted.\n     *\n     * This may need to be called in `after` or `finally` clauses in tests or\n     * scripts for them to exit cleanly.\n     */\n    end(gracefully = true) {\n        return this.batchCluster.end(gracefully).promise;\n    }\n    /**\n     * @return true if `.end()` has been invoked\n     */\n    get ended() {\n        return this.batchCluster.ended;\n    }\n    /**\n     * Most users will not need to use `enqueueTask` directly. This method\n     * supports submitting custom `BatchCluster` tasks.\n     *\n     * @param task is a thunk to support retries by providing new instances on retries.\n     *\n     * @see BinaryExtractionTask for an example task implementation\n     */\n    enqueueTask(task, retriable = true) {\n        const f = async () => {\n            await __classPrivateFieldGet(this, _ExifTool_checkForPerl, \"f\").call(this);\n            return this.batchCluster.enqueueTask(task());\n        };\n        return retriable ? (0, AsyncRetry_1.retryOnReject)(f, this.options.taskRetries) : f();\n    }\n    /**\n     * @return the currently running ExifTool processes. Note that on Windows,\n     * these are only the process IDs of the directly-spawned ExifTool wrapper,\n     * and not the actual perl vm. This should only really be relevant for\n     * integration tests that verify processes are cleaned up properly.\n     */\n    get pids() {\n        return this.batchCluster.pids();\n    }\n    /**\n     * @return the number of pending (not currently worked on) tasks\n     */\n    get pendingTasks() {\n        return this.batchCluster.pendingTaskCount;\n    }\n    /**\n     * @return the total number of child processes created by this instance\n     */\n    get spawnedProcs() {\n        return this.batchCluster.spawnedProcCount;\n    }\n    /**\n     * @return the current number of child processes currently servicing tasks\n     */\n    get busyProcs() {\n        return this.batchCluster.busyProcCount;\n    }\n    /**\n     * @return report why child processes were recycled\n     */\n    childEndCounts() {\n        return this.batchCluster.childEndCounts;\n    }\n    /**\n     * Shut down any currently-running child processes. New child processes will\n     * be started automatically to handle new tasks.\n     */\n    closeChildProcesses(gracefully = true) {\n        return this.batchCluster.closeChildProcesses(gracefully);\n    }\n}\nexports.ExifTool = ExifTool;\n_ExifTool_taskOptions = new WeakMap(), _ExifTool_checkForPerl = new WeakMap();\n/**\n * Use this singleton rather than instantiating new {@link ExifTool} instances\n * in order to leverage a single running ExifTool process.\n *\n * As of v3.0, its {@link ExifToolOptions.maxProcs} is set to the number of\n * CPUs on the current system; no more than `maxProcs` instances of `exiftool`\n * will be spawned. You may want to experiment with smaller or larger values\n * for `maxProcs`, depending on CPU and disk speed of your system and\n * performance tradeoffs.\n *\n * Note that each child process consumes between 10 and 50 MB of RAM. If you\n * have limited system resources you may want to use a smaller `maxProcs`\n * value.\n *\n * See the source of {@link DefaultExifToolOptions} for more details about how\n * this instance is configured.\n */\nexports.exiftool = new ExifTool();\n"]}