@rushstack/package-extractor 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +24 -0
- package/CHANGELOG.md +13 -1
- package/dist/package-extractor.d.ts +13 -19
- package/dist/scripts/create-links.js +23903 -93
- package/dist/scripts/create-links.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/AssetHandler.d.ts +50 -0
- package/lib/AssetHandler.d.ts.map +1 -0
- package/lib/AssetHandler.js +165 -0
- package/lib/AssetHandler.js.map +1 -0
- package/lib/PackageExtractor.d.ts +12 -19
- package/lib/PackageExtractor.d.ts.map +1 -1
- package/lib/PackageExtractor.js +80 -224
- package/lib/PackageExtractor.js.map +1 -1
- package/lib/Utils.d.ts +20 -0
- package/lib/Utils.d.ts.map +1 -1
- package/lib/Utils.js +36 -1
- package/lib/Utils.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/scripts/create-links.js +84 -110
- package/lib/scripts/create-links.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-links.js","mappings":";;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACyB;AACI;AAC7B,2CAA2C,iCAAiC;AAC5E,2BAA2B,yCAAY;AACvC;AACA;AACA;AACA;AACA,QAAQ,2CAAc;AACtB;AACA;AACA,QAAQ,2CAAc;AACtB;AACA;AACA,QAAQ,2CAAc;AACtB;AACA;AACA,QAAQ,wCAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0CAAa;AACrB;AACA;AACA,uBAAuB,yCAAY;AACnC;AACA;AACA;AACA,IAAI,yCAAY;AAChB;AACA;AACA;AACA;AACA,4BAA4B,sCAAS;AACrC,YAAY,0CAAa;AACzB,YAAY,0CAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sCAAS;AACrC,+BAA+B,sCAAS;AACxC;AACA,qBAAqB,yCAAY;AACjC;AACA;AACA;AACA;AACA,wDAAwD,6BAA6B;AACrF;AACA;AACA;AACA;AACA;AACA,4CAA4C,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,6BAA6B;AACnF;AACA;AACA,oDAAoD,6BAA6B;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C,SAAS,0CAAa;AACtB;AACA;AACA,kCAAkC,4CAAe;AACjD;AACA;AACA,gEAAgE,mBAAmB;AACnF;AACA;AACA;AACA;AACA,gEAAgE,mBAAmB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wC","sources":["webpack://@rushstack/package-extractor/external node-commonjs \"fs\"","webpack://@rushstack/package-extractor/external node-commonjs \"path\"","webpack://@rushstack/package-extractor/webpack/bootstrap","webpack://@rushstack/package-extractor/webpack/runtime/compat get default export","webpack://@rushstack/package-extractor/webpack/runtime/define property getters","webpack://@rushstack/package-extractor/webpack/runtime/hasOwnProperty shorthand","webpack://@rushstack/package-extractor/webpack/runtime/make namespace object","webpack://@rushstack/package-extractor/./lib-esnext/scripts/create-links.js"],"sourcesContent":["module.exports = require(\"fs\");","module.exports = require(\"path\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n// THIS SCRIPT IS GENERATED BY THE \"rush deploy\" COMMAND.\n/* eslint-disable no-console */\nimport * as fs from 'fs';\nimport * as path from 'path';\nconst TARGET_ROOT_SCRIPT_RELATIVE_PATH = '{TARGET_ROOT_SCRIPT_RELATIVE_PATH}';\nconst TARGET_ROOT_FOLDER = path.resolve(__dirname, TARGET_ROOT_SCRIPT_RELATIVE_PATH);\n// API borrowed from @rushstack/node-core-library, since this script avoids using any\n// NPM dependencies.\nclass FileSystem {\n static createSymbolicLinkJunction(options) {\n fs.symlinkSync(options.linkTargetPath, options.newLinkPath, 'junction');\n }\n static createSymbolicLinkFile(options) {\n fs.symlinkSync(options.linkTargetPath, options.newLinkPath, 'file');\n }\n static createSymbolicLinkFolder(options) {\n fs.symlinkSync(options.linkTargetPath, options.newLinkPath, 'dir');\n }\n static createHardLink(options) {\n fs.linkSync(options.linkTargetPath, options.newLinkPath);\n }\n}\nfunction ensureFolder(folderPath) {\n if (!folderPath) {\n return;\n }\n if (fs.existsSync(folderPath)) {\n return;\n }\n const parentPath = path.dirname(folderPath);\n if (parentPath && parentPath !== folderPath) {\n ensureFolder(parentPath);\n }\n fs.mkdirSync(folderPath);\n}\nfunction removeLinks(targetRootFolder, extractorMetadataObject) {\n for (const linkInfo of extractorMetadataObject.links) {\n // Link to the relative path for symlinks\n const newLinkPath = path.join(targetRootFolder, linkInfo.linkPath);\n if (fs.existsSync(newLinkPath)) {\n fs.unlinkSync(newLinkPath);\n }\n }\n}\nfunction createLinks(targetRootFolder, extractorMetadataObject) {\n for (const linkInfo of extractorMetadataObject.links) {\n // Link to the relative path for symlinks\n const newLinkPath = path.join(targetRootFolder, linkInfo.linkPath);\n const linkTargetPath = path.join(targetRootFolder, linkInfo.targetPath);\n // Make sure the containing folder exists\n ensureFolder(path.dirname(newLinkPath));\n // NOTE: This logic is based on NpmLinkManager._createSymlink()\n if (process.platform === 'win32') {\n if (linkInfo.kind === 'folderLink') {\n // For directories, we use a Windows \"junction\". On Unix, this produces a regular symlink.\n FileSystem.createSymbolicLinkJunction({ newLinkPath, linkTargetPath });\n }\n else {\n // For files, we use a Windows \"hard link\", because creating a symbolic link requires\n // administrator permission.\n // NOTE: We cannot use the relative path for hard links\n FileSystem.createHardLink({ newLinkPath, linkTargetPath });\n }\n }\n else {\n // However hard links seem to cause build failures on Mac, so for all other operating systems\n // we use symbolic links for this case.\n if (linkInfo.kind === 'folderLink') {\n FileSystem.createSymbolicLinkFolder({ newLinkPath, linkTargetPath });\n }\n else {\n FileSystem.createSymbolicLinkFile({ newLinkPath, linkTargetPath });\n }\n }\n }\n}\nfunction showUsage() {\n console.log('Usage:');\n console.log(' node create-links.js create');\n console.log(' node create-links.js remove');\n console.log('\\nCreates or removes the symlinks for the output folder created by \"rush deploy\".');\n console.log('The link information is read from \"extractor-metadata.json\" in the same folder.');\n}\nfunction main() {\n // Example: [ \"node.exe\", \"create-links.js\", \"\"create\" ]\n const args = process.argv.slice(2);\n if (args.length !== 1 || (args[0] !== 'create' && args[0] !== 'remove')) {\n showUsage();\n return false;\n }\n const extractorMetadataPath = `${__dirname}/extractor-metadata.json`;\n if (!fs.existsSync(extractorMetadataPath)) {\n throw new Error('Input file not found: ' + extractorMetadataPath);\n }\n const extractorMetadataJson = fs.readFileSync(extractorMetadataPath).toString();\n const extractorMetadataObject = JSON.parse(extractorMetadataJson);\n if (args[0] === 'create') {\n console.log(`\\nCreating links for extraction at path \"${TARGET_ROOT_FOLDER}\"`);\n removeLinks(TARGET_ROOT_FOLDER, extractorMetadataObject);\n createLinks(TARGET_ROOT_FOLDER, extractorMetadataObject);\n }\n else {\n console.log(`\\nRemoving links for extraction at path \"${TARGET_ROOT_FOLDER}\"`);\n removeLinks(TARGET_ROOT_FOLDER, extractorMetadataObject);\n }\n console.log('The operation completed successfully.');\n return true;\n}\ntry {\n process.exitCode = 1;\n if (main()) {\n process.exitCode = 0;\n }\n}\ncatch (error) {\n console.log('ERROR: ' + error);\n}\n//# sourceMappingURL=create-links.js.map"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"create-links.js","mappings":";;;;;;;;;;AAAa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS,GAAG,kBAAkB;AAC/G,eAAe,mBAAO,CAAC,2BAAe;AACtC,iBAAiB,mBAAO,CAAC,iCAAqB;AAC9C,wBAAwB,mBAAO,CAAC,iDAAqC;AACrE,yBAAyB,mBAAO,CAAC,6CAAkC;AACnE;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAe;AACf,aAAa,mBAAO,CAAC,2BAAe;AACpC,8CAA6C,EAAE,qCAAqC,6BAA6B,EAAC;AAClH,aAAa,mBAAO,CAAC,2BAAe;AACpC,qCAAoC,EAAE,qCAAqC,oBAAoB,EAAC;AAChG,uCAAsC,EAAE,qCAAqC,sBAAsB,EAAC;AACpG,6CAA4C,EAAE,qCAAqC,4BAA4B,EAAC;AAChH,uCAAsC,EAAE,qCAAqC,sBAAsB,EAAC;AACpG,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,2CAA0C,EAAE,qCAAqC,0BAA0B,EAAC;AAC5G;;;;;;;;;;;ACjDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,4CAAgC;AACtD;AACA;AACA;AACA;AACA,MAAM,qBAAqB;AAC3B;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,qBAAqB,mBAAO,CAAC,8CAAkC;AAC/D,iBAAiB,mBAAO,CAAC,0CAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACfa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB,mBAAO,CAAC,2BAAe;AAC7C,+BAA+B,mBAAO,CAAC,kCAAwB;AAC/D,qBAAqB,mBAAO,CAAC,yDAA6C;AAC1E,sBAAsB,mBAAO,CAAC,0DAA8C;AAC5E,kBAAkB,mBAAO,CAAC,sDAA0C;AACpE,0BAA0B,mBAAO,CAAC,8DAAkD;AACpF,mBAAmB,mBAAO,CAAC,uDAA2C;AACtE,qBAAqB,mBAAO,CAAC,yDAA6C;AAC1E,sBAAsB,mBAAO,CAAC,0DAA8C;AAC5E,gBAAgB,mBAAO,CAAC,oDAAwC;AAChE,eAAe,mBAAO,CAAC,mDAAuC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kDAAkD;AACxD,MAAM,4CAA4C;AAClD;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;AClCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,2BAAe;AACtC,kBAAkB,mBAAO,CAAC,qCAA0B;AACpD;AACA;AACA;AACA;AACA;AACA,cAAc,wCAAwC;AACtD,cAAc,uCAAuC;AACrD;AACA,KAAK;AACL;AACA;AACA;AACA,cAAc,wCAAwC;AACtD,cAAc,uCAAuC;AACrD;AACA,KAAK;AACL;AACA;AACA,4CAA4C,kBAAkB,EAAE,eAAe;AAC/E,gCAAgC,cAAc,iBAAiB,WAAW,gBAAgB;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC,kCAAkC,MAAM,EAAE,iBAAiB,EAAE,YAAY,WAAW,KAAK;AACzF,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;AC3Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;AACA,+BAA+B,SAAS,wBAAwB,SAAS;AACzE;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AClBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB;AAC/D;AACA,aAAa;AACb;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,cAAc,EAAE,+BAA+B,IAAI,GAAG,EAAE,eAAe,IAAI,GAAG,EAAE,aAAa,IAAI,gBAAgB,IAAI,GAAG,EAAE,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,gBAAgB,IAAI,GAAG,EAAE,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,gBAAgB,IAAI,GAAG,EAAE,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,aAAa,IAAI,iBAAiB,IAAI,GAAG,IAAI,SAAS,IAAI,iBAAiB,IAAI,UAAU,IAAI,uCAAuC,EAAE,gDAAgD,IAAI,GAAG,IAAI,SAAS,IAAI,aAAa,IAAI,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,2CAA2C,8CAA8C,EAAE,0DAA0D,aAAa,EAAE,2CAA2C,eAAe,EAAE,oCAAoC,eAAe,EAAE,iCAAiC,eAAe,EAAE,iCAAiC,eAAe,EAAE,iCAAiC,eAAe,EAAE,qCAAqC,iBAAiB,EAAE,kCAAkC,iBAAiB,EAAE;AACtpC;AACA,iDAAiD,EAAE,YAAY,EAAE,IAAI,MAAM,gCAAgC,EAAE,iBAAiB,IAAI,gCAAgC,EAAE,iBAAiB,IAAI,SAAS;AAClM;AACA;AACA,wEAAwE,IAAI,EAAE,EAAE,iCAAiC,IAAI,EAAE,EAAE,sCAAsC,IAAI,EAAE,EAAE,gDAAgD,IAAI,oBAAoB,EAAE,0DAA0D,KAAK,IAAI,KAAK,eAAe,KAAK,IAAI,KAAK,qBAAqB,KAAK,IAAI,KAAK,eAAe,KAAK,IAAI,KAAK,mBAAmB,KAAK,IAAI,KAAK,EAAE,GAAG,UAAU,IAAI;AAC1c,mCAAmC,EAAE,+BAA+B,EAAE;AACtE,qBAAqB,MAAM,0BAA0B,KAAK,oCAAoC,KAAK;AACnG;AACA,sDAAsD,EAAE;AACxD,wBAAwB,IAAI,GAAG,EAAE,UAAU,IAAI,gBAAgB,IAAI,GAAG,EAAE,WAAW,IAAI,yEAAyE,EAAE,iBAAiB,IAAI,GAAG,EAAE,aAAa,IAAI,EAAE,IAAI,2EAA2E,EAAE,iBAAiB,IAAI,GAAG,EAAE,aAAa,IAAI,EAAE,IAAI,cAAc,IAAI,2EAA2E,EAAE,kBAAkB,IAAI,GAAG,EAAE,aAAa,IAAI,EAAE,IAAI,cAAc,IAAI,EAAE,IAAI,yEAAyE,EAAE,kBAAkB,IAAI,GAAG,EAAE,aAAa,IAAI,EAAE,IAAI,cAAc,IAAI,EAAE,IAAI,yEAAyE,EAAE,kBAAkB,IAAI,GAAG,EAAE,aAAa,IAAI,EAAE,IAAI,cAAc,IAAI,EAAE,IAAI,yEAAyE,EAAE,sBAAsB,IAAI,EAAE,IAAI,cAAc,IAAI,EAAE,IAAI,yEAAyE,EAAE;AACl/B;AACA;AACA,mCAAmC,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG;AACrE;AACA;AACA;AACA,iEAAiE,eAAe,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA,aAAa,yCAAyC;AACtD;AACA,aAAa,0CAA0C;AACvD;AACA,cAAc,0CAA0C;AACxD;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,EAAE,0BAA0B,KAAK,oCAAoC,KAAK;AAC9G;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,cAAc,EAAE,+BAA+B,IAAI,GAAG,EAAE,eAAe,IAAI,GAAG,EAAE,aAAa,IAAI,gBAAgB,IAAI,GAAG,EAAE,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,gBAAgB,IAAI,GAAG,EAAE,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,gBAAgB,IAAI,GAAG,EAAE,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,aAAa,IAAI,iBAAiB,IAAI,GAAG,IAAI,SAAS,IAAI,iBAAiB,IAAI,UAAU,IAAI,uCAAuC,EAAE,gDAAgD,IAAI,GAAG,IAAI,SAAS,IAAI,aAAa,IAAI,gBAAgB,IAAI,GAAG,IAAI,SAAS,IAAI,2CAA2C,8CAA8C,EAAE,yDAAyD,aAAa,EAAE,0CAA0C,eAAe,EAAE,mCAAmC,eAAe,EAAE,gCAAgC,eAAe,EAAE,gCAAgC,eAAe,EAAE,gCAAgC,eAAe,EAAE,mCAAmC,iBAAiB,EAAE,iCAAiC,iBAAiB,EAAE;AACnoC;AACA;AACA;AACA;AACA,gCAAgC,EAAE,mBAAmB,EAAE,iBAAiB,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/Ma;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,uBAAW;AACrC,gBAAgB,mBAAO,CAAC,qBAAS;AACjC,kBAAkB,mBAAO,CAAC,qCAA0B;AACpD;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,KAAK;AAChD;AACA;AACA;AACA;AACA;AACA,+IAA+I,WAAW;AAC1J;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAe;AACf;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,cAAc,mBAAO,CAAC,iBAAK;AAC3B,kBAAkB,mBAAO,CAAC,qCAA0B;AACpD;AACA;AACA,qBAAqB,wCAAwC;AAC7D,qBAAqB,wCAAwC;AAC7D,8BAA8B,uCAAuC;AACrE,8BAA8B,uCAAuC;AACrE;AACA;AACA,gBAAgB,qBAAqB,qCAAqC,qBAAqB,EAAE,WAAW;AAC5G,eAAe,qBAAqB,wBAAwB,cAAc,oBAAoB,WAAW,YAAY;AACrH;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qCAAqC;AACrD,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,6DAA6D,KAAK,GAAG,gBAAgB;AACrF,uEAAuE,KAAK,kCAAkC,KAAK,+CAA+C,IAAI;AACtK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ,aAAa,OAAO;AAChE;AACA;AACA;AACA;AACA,8DAA8D,kBAAkB,EAAE,mCAAmC;AACrH,aAAa;AACb;AACA;AACA;AACA,uCAAuC,IAAI,WAAW,KAAK,IAAI,WAAW,IAAI,oBAAoB;AAClG;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACpEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,uBAAuB,GAAG,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS,GAAG,kBAAkB,GAAG,WAAW;AACjL,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,iBAAiB,mBAAO,CAAC,mCAAuB;AAChD,wBAAwB,mBAAO,CAAC,0CAA8B;AAC9D,yBAAyB,mBAAO,CAAC,8CAAkC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,kBAAkB;AAClB,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAe;AACf,iBAAiB,mBAAO,CAAC,gCAAoB;AAC7C,8CAA6C,EAAE,qCAAqC,iCAAiC,EAAC;AACtH,gBAAgB,mBAAO,CAAC,8BAAmB;AAC3C,qCAAoC,EAAE,qCAAqC,uBAAuB,EAAC;AACnG,uCAAsC,EAAE,qCAAqC,yBAAyB,EAAC;AACvG,6CAA4C,EAAE,qCAAqC,+BAA+B,EAAC;AACnH,uCAAsC,EAAE,qCAAqC,yBAAyB,EAAC;AACvG,wCAAuC,EAAE,qCAAqC,0BAA0B,EAAC;AACzG,2CAA0C,EAAE,qCAAqC,6BAA6B,EAAC;AAC/G,yBAAyB,mBAAO,CAAC,uCAA4B;AAC7D,mDAAkD,EAAE,qCAAqC,sCAAsC,EAAC;AAChI,kBAAkB,mBAAO,CAAC,iCAAqB;AAC/C,mDAAkD,EAAE,qCAAqC,+BAA+B,EAAC;AACzH;;;;;;;;;;;ACjDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,wBAAwB,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB;AAC1Q;AACA;AACA,mBAAmB;AACnB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAA+G,EAAE,EAAE,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAe,EAAE,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA,mBAAmB,EAAE,EAAE,WAAW;AAClC;AACA;AACA;AACA,4DAA4D,GAAG,EAAE,GAAG;AACpE;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,kFAAkF,IAAI,WAAW,IAAI;AACrG;AACA,mBAAmB;AACnB;AACA;AACA;AACA,4BAA4B,IAAI;AAChC;AACA,qDAAqD,IAAI;AACzD;AACA,wBAAwB;AACxB;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;AC1Ja;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,sBAAsB,GAAG,kBAAkB,GAAG,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,WAAW,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS;AACvS,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,gBAAgB,mBAAO,CAAC,qBAAS;AACjC,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,qCAAoC,EAAE,qCAAqC,oBAAoB,EAAC;AAChG,uCAAsC,EAAE,qCAAqC,sBAAsB,EAAC;AACpG,6CAA4C,EAAE,qCAAqC,4BAA4B,EAAC;AAChH,uCAAsC,EAAE,qCAAqC,sBAAsB,EAAC;AACpG,+CAA8C,EAAE,qCAAqC,8BAA8B,EAAC;AACpH,6CAA4C,EAAE,qCAAqC,4BAA4B,EAAC;AAChH,8CAA6C,EAAE,qCAAqC,6BAA6B,EAAC;AAClH,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,cAAc,mBAAO,CAAC,qBAAS;AAC/B,yCAAwC,EAAE,qCAAqC,yBAAyB,EAAC;AACzG,8CAA6C,EAAE,qCAAqC,8BAA8B,EAAC;AACnH,kDAAiD,EAAE,qCAAqC,kCAAkC,EAAC;AAC3H,4CAA2C,EAAE,qCAAqC,4BAA4B,EAAC;AAC/G,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA,wDAAwD,SAAS;AACjE,kBAAkB,SAAS,EAAE,UAAU,EAAE,KAAK;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,kBAAkB,UAAU,IAAI,UAAU;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,IAAI;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,kBAAkB,UAAU,EAAE,QAAQ,IAAI,UAAU;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,uCAAuC,WAAW;AAClD,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,kBAAkB,WAAW;AAC7B;AACA;AACA,kBAAkB,UAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA,iBAAiB,qCAAqC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,sBAAsB,SAAS,EAAE,KAAK,GAAG,OAAO,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO,WAAW,UAAU,GAAG,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,sBAAsB;AACtB;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,IAAI;AAC/D,gDAAgD,IAAI,GAAG,EAAE;AACzD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,IAAI;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,SAAS,KAAK,WAAW;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ,QAAQ,GAAG,QAAQ,YAAY;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG,OAAO;AACvG;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,qFAAqF,QAAQ,EAAE,IAAI,EAAE,OAAO;AAC5G;AACA;AACA,4DAA4D,EAAE;AAC9D;AACA;;;;;;;;;;;ACxrBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,sBAAsB,GAAG,aAAa,GAAG,gBAAgB,GAAG,sBAAsB;AACvG,eAAe,mBAAO,CAAC,oBAAQ;AAC/B;AACA;AACA,qCAAqC,MAAM;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB,sBAAsB,sBAAsB;AAClE,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB,IAAI;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO,EAAE,WAAW;AACtC;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA,wCAAwC,kBAAkB;AAC1D;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,sBAAsB,qBAAqB;AAC3C;AACA,2CAA2C,0BAA0B,GAAG,UAAU;AAClF;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,KAAK;AACvD,oCAAoC,UAAU,EAAE,eAAe;AAC/D,SAAS;AACT;AACA;AACA;AACA;AACA,kDAAkD,KAAK;AACvD;AACA,SAAS;AACT;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,EAAE,aAAa;AACtF;AACA;AACA,4CAA4C,KAAK,EAAE,EAAE,EAAE,aAAa;AACpE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;AC9Ia;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,mBAAmB,GAAG,yBAAyB,GAAG,oBAAoB;AACnJ,kBAAkB,mBAAO,CAAC,sBAAW;AACrC,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,gBAAgB,mBAAO,CAAC,oBAAS;AACjC,oBAAoB;AACpB,gBAAgB,SAAS,sCAAsC,QAAQ;AACvE;AACA,yBAAyB;AACzB,gBAAgB,qBAAqB;AACrC,iCAAiC,QAAQ,oBAAoB,YAAY;AACzE,iCAAiC,QAAQ;AACzC;AACA;AACA,YAAY,KAAK;AACjB,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,mBAAmB;AACnB;AACA,YAAY,KAAK;AACjB,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,+BAA+B,yBAAyB,wEAAwE,wBAAwB;AACxJ;AACA,wBAAwB;AACxB,wBAAwB,iDAAiD;AACzE;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB,GAAG,EAAE;AACxE,mCAAmC,IAAI,mEAAmE,IAAI;AAC9G,uCAAuC,IAAI,oCAAoC,iBAAiB,GAAG,QAAQ;AAC3G;AACA,2CAA2C,IAAI;AAC/C,2CAA2C,IAAI;AAC/C;AACA,KAAK;AACL;AACA,oBAAoB;AACpB;AACA;AACA,+BAA+B,yBAAyB,0EAA0E,IAAI,yBAAyB,wBAAwB,QAAQ,IAAI;AACnM,iCAAiC,uBAAuB;AACxD;AACA;AACA,YAAY,+BAA+B;AAC3C;AACA,0CAA0C,mBAAmB,GAAG,KAAK;AACrE;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA,mCAAmC;AACnC;AACA;AACA,gDAAgD;AAChD,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW,IAAI,cAAc;AAC1D;AACA,gCAAgC,UAAU,EAAE,wDAAwD;AACpG;AACA;AACA;AACA,2BAA2B,eAAe,iBAAiB,IAAI,0BAA0B;AACzF,uEAAuE,cAAc,GAAG,QAAQ;AAChG;AACA,wCAAwC,QAAQ,EAAE,sDAAsD;AACxG;AACA;AACA;AACA,gCAAgC,iBAAiB;AACjD,YAAY,iCAAiC;AAC7C,YAAY,+CAA+C;AAC3D,8HAA8H;AAC9H;AACA;AACA;AACA;AACA,qFAAqF,aAAa,EAAE,WAAW;AAC/G;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1Ha;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB,GAAG,0BAA0B,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,iBAAiB;AACnH,kBAAkB,mBAAO,CAAC,sBAAW;AACrC,2BAA2B,mBAAO,CAAC,wCAA6B;AAChE,gBAAgB,mBAAO,CAAC,oBAAS;AACjC,kBAAkB,mBAAO,CAAC,uBAAW;AACrC,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,mBAAmB,mBAAO,CAAC,wBAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF,YAAY,aAAa;AACzB,YAAY,gBAAgB;AAC5B,oDAAoD,2BAA2B;AAC/E;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qCAAqC,SAAS,aAAa;AACnF;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB,MAAM,sBAAsB;AAC9F;AACA,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F;AAC3F,gBAAgB,WAAW;AAC3B;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA,+BAA+B,gCAAgC;AAC/D;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB,iCAAiC,gCAAgC;AACjE;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjPa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,sBAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;AC3Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,uBAAW;AACrC;AACA;AACA,gDAAgD,KAAK,UAAU,OAAO;AACtE;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACXa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,iBAAiB;AACjI,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,cAAc,mBAAO,CAAC,6BAAiB;AACvC,iBAAiB,mBAAO,CAAC,kCAAsB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA,sBAAsB;AACtB;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D,sCAAsC,OAAO;AAC7C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,IAAI;AAC3C;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;AC1Ja;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,2BAA2B;AAC7C,kBAAkB,2BAA2B;AAC7C,iBAAiB,0BAA0B;AAC3C,kBAAkB,2BAA2B;AAC7C;AACA;AACA,iBAAiB,qDAAqD;AACtE,kBAAkB,WAAW;AAC7B,gBAAgB,WAAW;AAC3B,eAAe;AACf,oBAAoB;AACpB;AACA;AACA,gBAAgB;AAChB;;;;;;;;;;;ACzBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,oBAAoB,GAAG,YAAY,GAAG,eAAe,GAAG,oBAAoB,GAAG,4BAA4B,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,2BAA2B,GAAG,yBAAyB,GAAG,sBAAsB,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,4BAA4B,GAAG,sBAAsB,GAAG,yBAAyB,GAAG,yBAAyB,GAAG,cAAc;AACzb,kBAAkB,mBAAO,CAAC,sBAAW;AACrC,eAAe,mBAAO,CAAC,4BAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,IAAI;AACzD;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,0BAA0B,0BAA0B;AACpD;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA,+BAA+B,aAAa,EAAE,WAAW,EAAE,oCAAoC;AAC/F;AACA,sBAAsB;AACtB;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,kBAAkB,IAAI;AACtB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,8BAA8B,qDAAqD;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,kEAAkE,IAAI,cAAc,MAAM;AAC1F,uCAAuC,MAAM,gFAAgF,IAAI,KAAK,0CAA0C,GAAG,IAAI,KAAK;AAC5L,SAAS;AACT,mEAAmE,IAAI;AACvE;AACA;AACA;AACA;AACA,mDAAmD,IAAI,KAAK;AAC5D;AACA;AACA,SAAS;AACT,6DAA6D,gBAAgB;AAC7E;AACA,KAAK;AACL;AACA,kEAAkE,IAAI,cAAc,MAAM,yDAAyD,MAAM,oBAAoB,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,KAAK;AAC5M,mEAAmE,IAAI,2EAA2E,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,KAAK;AACjL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,kEAAkE,MAAM,EAAE,8BAA8B;AACxG;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,CAAC,WAAW,YAAY,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,UAAU;AACtD,6CAA6C,UAAU;AACvD;AACA,4CAA4C,SAAS;AACrD,4CAA4C,SAAS,6CAA6C;AAClG;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,0BAA0B,IAAI;AAC9B;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;;;;;;;;;;ACjLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB,GAAG,sBAAsB,GAAG,6BAA6B;AAC9E,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;AClBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB,GAAG,4BAA4B;AACxD,iBAAiB,mBAAO,CAAC,uBAAW;AACpC,kBAAkB,mBAAO,CAAC,uBAAY;AACtC,gBAAgB,mBAAO,CAAC,qBAAU;AAClC;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,YAAY,cAAc;AAC1B;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,yBAAyB;AACzB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,8BAA8B,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,gBAAgB;AAC5K,gBAAgB,mBAAO,CAAC,sBAAU;AAClC,wBAAwB,mBAAO,CAAC,6BAAiB;AACjD,iBAAiB,mBAAO,CAAC,uBAAW;AACpC,kBAAkB,mBAAO,CAAC,uBAAY;AACtC,eAAe,mBAAO,CAAC,qBAAS;AAChC;AACA;AACA;AACA;AACA,CAAC,eAAe,gBAAgB,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B,oEAAoE,KAAK;AACzE;AACA;AACA,mCAAmC,UAAU,+BAA+B,KAAK,OAAO,KAAK;AAC7F,8CAA8C,KAAK;AACnD,yDAAyD,KAAK;AAC9D;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,gDAAgD,UAAU,iBAAiB,UAAU;AACrF,8DAA8D,KAAK;AACnE,gDAAgD,MAAM;AACtD;AACA;AACA;AACA;AACA,gDAAgD,UAAU,kBAAkB,MAAM;AAClF,oBAAoB,UAAU,iBAAiB,MAAM,KAAK,MAAM,MAAM,KAAK;AAC3E,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA,gDAAgD,UAAU,mBAAmB,MAAM;AACnF,oBAAoB,UAAU,kBAAkB,MAAM,KAAK,MAAM,MAAM,MAAM,OAAO,MAAM;AAC1F,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA,gDAAgD,MAAM,iBAAiB,MAAM,WAAW,MAAM;AAC9F;AACA,gDAAgD,MAAM,gBAAgB,MAAM;AAC5E;AACA;AACA;AACA,+CAA+C,MAAM,YAAY,MAAM,WAAW,MAAM;AACxF;AACA;AACA;AACA;AACA,gDAAgD,UAAU,kBAAkB,UAAU;AACtF,mBAAmB,UAAU,mBAAmB,MAAM;AACtD,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA,+BAA+B,YAAY,qDAAqD,WAAW,GAAG,mBAAmB;AACjI;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,MAAM,EAAE,IAAI;AACnD;AACA,qDAAqD,KAAK;AAC1D;AACA;AACA,uCAAuC,MAAM,YAAY,MAAM,gCAAgC,KAAK;AACpG;AACA;AACA,iDAAiD,MAAM,iBAAiB,KAAK;AAC7E;AACA;AACA;AACA;AACA;AACA,8CAA8C,MAAM,EAAE,IAAI,EAAE,SAAS;AACrE;AACA;AACA;AACA,6DAA6D,MAAM,+DAA+D,KAAK;AACvI;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,MAAM;AACxD,0DAA0D,MAAM,KAAK,OAAO;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gBAAgB,QAAQ,gBAAgB,OAAO;AAC/C,eAAe,qBAAqB,oDAAoD,QAAQ,QAAQ,uBAAuB,QAAQ,aAAa;AACpJ;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;;;;;;;;;;AC1Ma;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,kBAAkB,mBAAO,CAAC,uBAAY;AACtC,eAAe,mBAAO,CAAC,qBAAS;AAChC;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA,0CAA0C,KAAK,EAAE,iCAAiC;AAClF;AACA,mEAAmE,UAAU;AAC7E;AACA;AACA,wCAAwC,WAAW;AACnD;AACA,wCAAwC,WAAW,KAAK,WAAW,cAAc,WAAW;AAC5F;AACA,UAAU,WAAW;AACrB,8CAA8C,WAAW,cAAc,WAAW;AAClF,0CAA0C,WAAW,IAAI,uCAAuC;AAChG;AACA;;;;;;;;;;;AClCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,kBAAkB,GAAG,4BAA4B;AACnE,qBAAqB,mBAAO,CAAC,yBAAc;AAC3C,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,wBAAwB,mBAAO,CAAC,6BAAiB;AACjD,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,kBAAkB,mBAAO,CAAC,uBAAW;AACrC,oBAAoB,mBAAO,CAAC,wBAAa;AACzC,kBAAkB,mBAAO,CAAC,uBAAY;AACtC,gBAAgB,mBAAO,CAAC,qBAAU;AAClC,kBAAkB,mBAAO,CAAC,wBAAY;AACtC,eAAe,mBAAO,CAAC,qBAAS;AAChC,iBAAiB,mBAAO,CAAC,uBAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,4BAA4B,4CAA4C;AACxE;AACA,mDAAmD,qBAAqB,IAAI,uBAAuB;AACnG,qDAAqD,EAAE,4BAA4B;AACnF;AACA;AACA,SAAS;AACT;AACA;AACA,mDAAmD,qBAAqB,IAAI,wBAAwB;AACpG;AACA;AACA;AACA,8BAA8B,EAAE,6BAA6B,OAAO,2BAA2B,IAAI,mCAAmC,IAAI,yBAAyB,GAAG,qBAAqB,EAAE,wCAAwC,+BAA+B,GAAG,mBAAmB,GAAG;AAC7R;AACA;AACA;AACA,kEAAkE,uBAAuB,GAAG,6BAA6B;AACzH,gEAAgE,uBAAuB,GAAG,2BAA2B;AACrH,wEAAwE,uBAAuB,GAAG,mCAAmC;AACrI,8DAA8D,uBAAuB,GAAG,yBAAyB;AACjH;AACA,wEAAwE,uBAAuB,GAAG,+BAA+B;AACjI,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE,KAAK;AACL;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC,8DAA8D,aAAa;AAC3E,+BAA+B,aAAa,qDAAqD,aAAa;AAC9G,+BAA+B,aAAa,qDAAqD,aAAa;AAC9G;AACA;AACA;AACA,gGAAgG,OAAO;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,WAAW,MAAM,uBAAuB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA,sEAAsE,cAAc;AACpF;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAA6C;AACvE;AACA;AACA,qCAAqC,qBAAqB,cAAc,IAAI;AAC5E;AACA;AACA,iDAAiD,cAAc;AAC/D,kDAAkD,qBAAqB;AACvE,qCAAqC,qBAAqB,iBAAiB,IAAI,IAAI,WAAW,IAAI,SAAS;AAC3G;AACA;AACA;AACA,YAAY,sDAAsD;AAClE;AACA;AACA,mCAAmC,wBAAwB,wFAAwF,gBAAgB,GAAG,wBAAwB;AAC9L;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA,2BAA2B,8BAA8B;AACzD;AACA,uCAAuC,UAAU;AACjD;AACA,uCAAuC,UAAU;AACjD;AACA;AACA,YAAY,2CAA2C;AACvD,YAAY,QAAQ;AACpB;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wBAAwB,MAAM,eAAe;AACpF;AACA;AACA;AACA,YAAY,qBAAqB,aAAa,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,EAAE,4BAA4B,uBAAuB;AAC/F;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,sDAAsD,eAAe,iBAAiB,QAAQ;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,SAAS,gBAAgB,+BAA+B;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B,sCAAsC,YAAY,oBAAoB,kDAAkD;AACxH;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB,mCAAmC;AACnD,qDAAqD,YAAY;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iGAAiG;AAC5I;AACA;AACA;AACA;AACA;AACA,4EAA4E,yBAAyB,GAAG;AACxG,4CAA4C,kBAAkB,GAAG,WAAW;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mCAAmC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,MAAM;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,MAAM;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,KAAK,EAAE,qEAAqE;AACnH,uCAAuC,MAAM,KAAK,KAAK;AACvD;AACA;AACA;AACA;AACA,gCAAgC,aAAa,EAAE,IAAI,8BAA8B,UAAU;AAC3F;AACA;AACA,eAAe;AACf;;;;;;;;;;;ACvgBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B,GAAG,uBAAuB,GAAG,uBAAuB,GAAG,wBAAwB;AAC3G,kBAAkB,mBAAO,CAAC,uBAAY;AACtC,gBAAgB,mBAAO,CAAC,qBAAU;AAClC,eAAe,mBAAO,CAAC,qCAAyB;AAChD,iBAAiB,mBAAO,CAAC,uBAAW;AACpC;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAiB,GAAG,QAAQ;AACtD;AACA;AACA,KAAK;AACL;AACA;AACA,wBAAwB;AACxB;AACA;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH,GAAG,aAAa,mBAAmB,kDAAkD,EAAE;AAC5M;AACA;AACA;AACA,iDAAiD,YAAY;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO,EAAE,oEAAoE;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,YAAY,gBAAgB;AAC5B,qEAAqE,cAAc,GAAG,sBAAsB;AAC5G;AACA;AACA,YAAY,MAAM;AAClB,6CAA6C,KAAK;AAClD;AACA,iEAAiE,yBAAyB,aAAa,MAAM,IAAI,wBAAwB,UAAU,KAAK;AACxJ,gEAAgE,wBAAwB;AACxF;AACA,KAAK;AACL;AACA,6BAA6B,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C,qEAAqE,cAAc,IAAI,qDAAqD;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,gCAAgC,mCAAmC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,QAAQ,IAAI,eAAe;AAC9F;AACA;AACA;AACA;AACA,oCAAoC,QAAQ,8BAA8B,cAAc;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;;;;;;;;;;;AC3Ha;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B,GAAG,2BAA2B,GAAG,oBAAoB;AAChF,kBAAkB,mBAAO,CAAC,uBAAY;AACtC,eAAe,mBAAO,CAAC,qBAAS;AAChC,4BAA4B,sEAAsE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc,EAAE,oCAAoC;AACpG,kCAAkC,iBAAiB,GAAG,QAAQ;AAC9D;AACA;AACA;AACA,gDAAgD,cAAc,EAAE,oCAAoC,EAAE,uCAAuC;AAC7I,kCAAkC,iBAAiB,GAAG,QAAQ,GAAG,uCAAuC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,8CAA8C,+DAA+D;AAC7G;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA,gBAAgB,+BAA+B;AAC/C,6DAA6D,QAAQ,EAAE,qCAAqC;AAC5G;AACA,oDAAoD,UAAU,EAAE,kEAAkE;AAClI,2DAA2D,SAAS;AACpE;AACA;AACA;AACA,8FAA8F;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,0CAA0C,uEAAuE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD,yCAAyC;AACzC;AACA,2BAA2B;AAC3B;;;;;;;;;;;AChFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,GAAG,WAAW,GAAG,SAAS,GAAG,kBAAkB;AAC/G,iBAAiB,mBAAO,CAAC,gCAAoB;AAC7C,8CAA6C,EAAE,qCAAqC,iCAAiC,EAAC;AACtH,gBAAgB,mBAAO,CAAC,8BAAmB;AAC3C,qCAAoC,EAAE,qCAAqC,uBAAuB,EAAC;AACnG,uCAAsC,EAAE,qCAAqC,yBAAyB,EAAC;AACvG,6CAA4C,EAAE,qCAAqC,+BAA+B,EAAC;AACnH,uCAAsC,EAAE,qCAAqC,yBAAyB,EAAC;AACvG,wCAAuC,EAAE,qCAAqC,0BAA0B,EAAC;AACzG,2CAA0C,EAAE,qCAAqC,6BAA6B,EAAC;AAC/G,2BAA2B,mBAAO,CAAC,uCAA4B;AAC/D,oBAAoB,mBAAO,CAAC,iCAAqB;AACjD,gBAAgB,mBAAO,CAAC,6BAAiB;AACzC,kBAAkB,mBAAO,CAAC,uBAAW;AACrC,kBAAkB,mBAAO,CAAC,8BAAmB;AAC7C,kBAAkB,mBAAO,CAAC,+BAAmB;AAC7C,mBAAmB,mBAAO,CAAC,yCAA6B;AACxD,eAAe,mBAAO,CAAC,4BAAgB;AACvC,uBAAuB,mBAAO,CAAC,8BAAkB;AACjD,cAAc,mBAAO,CAAC,2BAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,6CAA6C;AAClF,oCAAoC,aAAa;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8BAA8B,IAAI,kBAAkB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,gBAAgB,aAAa;AAC7B,gDAAgD,SAAS,yCAAyC;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,aAAa;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,MAAM;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gCAAgC;AAC/D;AACA,6CAA6C,KAAK,gBAAgB,YAAY;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA,0CAA0C,UAAU;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B,mDAAmD,UAAU,YAAY;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qCAAqC,KAAK;AAChD;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,EAAE,gBAAgB,EAAE,UAAU;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,2CAA2C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,GAAG;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,gCAAgC,IAAI,WAAW,IAAI,IAAI,eAAe;AACtE;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,iBAAiB,SAAS,YAAY;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,uCAAuC,KAAK;AAC5C;AACA,uCAAuC,KAAK;AAC5C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,4DAA4D,SAAS;AACrE;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA,UAAU,aAAa;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;;;;;;;;;;ACzmBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA,cAAc,mBAAO,CAAC,6BAAiB;AACvC;AACA,kBAAe;AACf;;;;;;;;;;;ACNa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;;;;;;;;;;;ACvBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY,mBAAO,CAAC,oBAAQ;AAC5B;AACA,kBAAe;AACf;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACVa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA,gBAAgB,UAAU,OAAO,mDAAmD,KAAK;AACzF,eAAe,UAAU,OAAO,wBAAwB,SAAS,KAAK;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA,qDAAqD,KAAK;AAC1D;AACA,wBAAwB,mBAAmB;AAC3C,qCAAqC,KAAK,KAAK,aAAa;AAC5D;AACA;AACA,2DAA2D,KAAK,KAAK,aAAa,IAAI;AACtF;AACA;AACA;AACA;AACA;AACA,4BAA4B,qDAAqD;AACjF;AACA;AACA,SAAS;AACT;AACA;AACA,+BAA+B;AAC/B,kBAAe;AACf;;;;;;;;;;;AChDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,qBAAS;AAChC,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,gBAAgB,mBAAO,CAAC,gCAAqB;AAC7C,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA,eAAe,QAAQ,wBAAwB,sBAAsB,2BAA2B;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW,MAAM,uBAAuB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,KAAK,MAAM,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA,wGAAwG,+BAA+B,QAAQ,IAAI;AACnJ;AACA;AACA;AACA;AACA,gDAAgD,KAAK,GAAG,IAAI;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACzGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACtBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,qBAAS;AAChC;AACA;AACA;AACA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA,kBAAe;AACf;;;;;;;;;;;ACXa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA,gBAAgB,UAAU,YAAY;AACtC,sDAAsD,KAAK;AAC3D,sDAAsD,KAAK,mBAAmB,KAAK;AACnF,eAAe,UAAU,YAAY,4CAA4C,eAAe,KAAK,uBAAuB,eAAe,IAAI,iBAAiB,KAAK;AACrK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,KAAK;AAC9D,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,KAAK,KAAK,IAAI;AACzD;AACA,2CAA2C,MAAM,KAAK,KAAK,KAAK,IAAI;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,KAAK;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA,yCAAyC,MAAM;AAC/C;AACA,2CAA2C,OAAO,KAAK,IAAI;AAC3D;AACA;AACA,2CAA2C,OAAO,IAAI,IAAI;AAC1D;AACA;AACA;AACA,+CAA+C,OAAO,KAAK,IAAI;AAC/D;AACA;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC9Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,GAAG,4BAA4B,GAAG,aAAa;AACzE,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,eAAe,mBAAO,CAAC,qBAAS;AAChC,aAAa;AACb,gBAAgB,UAAU,6BAA6B;AACvD;AACA,+CAA+C,cAAc,EAAE,MAAM,gBAAgB,UAAU;AAC/F,KAAK;AACL,eAAe,UAAU,8CAA8C,wBAAwB,YAAY,SAAS;AACpH,uBAAuB,gBAAgB;AACvC,iBAAiB,UAAU;AAC3B,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,uCAAuC,aAAa,MAAM,iDAAiD;AAC3G;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,kBAAe;AACf;;;;;;;;;;;ACpFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA,gBAAgB,QAAQ,uCAAuC,gBAAgB;AAC/E,eAAe,QAAQ,wBAAwB,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,UAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA,6DAA6D,QAAQ;AACrE;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACjEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,mBAAO,CAAC,8BAAmB;AACrD,sBAAsB,mBAAO,CAAC,2BAAe;AAC7C,gBAAgB,mBAAO,CAAC,qBAAS;AACjC,oBAAoB,mBAAO,CAAC,yBAAa;AACzC,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,uBAAuB,mBAAO,CAAC,4BAAgB;AAC/C,wBAAwB,mBAAO,CAAC,6BAAiB;AACjD,+BAA+B,mBAAO,CAAC,oCAAwB;AAC/D,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,4BAA4B,mBAAO,CAAC,gCAAqB;AACzD,cAAc,mBAAO,CAAC,mBAAO;AAC7B,gBAAgB,mBAAO,CAAC,qBAAS;AACjC,gBAAgB,mBAAO,CAAC,qBAAS;AACjC,gBAAgB,mBAAO,CAAC,qBAAS;AACjC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,mBAAmB,mBAAO,CAAC,wBAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;AC3Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,eAAe,mBAAO,CAAC,qBAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D;AACA;AACA;AACA,mCAAmC,KAAK,IAAI,EAAE;AAC9C;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,4BAA4B,QAAQ,OAAO,EAAE,mCAAmC,YAAY,0CAA0C,cAAc;AACpJ;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kBAAe;AACf;;;;;;;;;;;ACnDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,eAAe,mBAAO,CAAC,qBAAS;AAChC,0BAA0B,mBAAO,CAAC,8BAAmB;AACrD;AACA,gBAAgB,UAAU,OAAO,mDAAmD,KAAK;AACzF,eAAe,UAAU,OAAO,wBAAwB,SAAS,KAAK;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,aAAa,8BAA8B;AAC3C;AACA,kBAAe;AACf;;;;;;;;;;;ACzBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA,eAAe,QAAQ,wBAAwB,kBAAkB,gBAAgB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,gDAAgD,UAAU,KAAK,MAAM;AACrE;AACA,8DAA8D,QAAQ,IAAI,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,qBAAS;AAChC,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,MAAM,kBAAkB,KAAK;AAC7F;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC,QAAQ,IAAI;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,uDAAuD,MAAM,GAAG,IAAI;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC1Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,mBAAO,CAAC,qBAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACXa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,mBAAO,CAAC,oCAAwB;AACnD,eAAe,mBAAO,CAAC,qBAAS;AAChC,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,+BAA+B,mBAAO,CAAC,oCAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA,eAAe,QAAQ,wBAAwB,gBAAgB,qBAAqB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACrCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA,gDAAgD,QAAQ;AACxD,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB,GAAG,qBAAqB,GAAG,kBAAkB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,2BAA2B,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,yBAAyB,GAAG,wBAAwB,GAAG,8BAA8B;AAChV,kBAAkB,mBAAO,CAAC,+BAAoB;AAC9C,eAAe,mBAAO,CAAC,6BAAiB;AACxC,gBAAgB,mBAAO,CAAC,6BAAkB;AAC1C,eAAe,mBAAO,CAAC,6BAAiB;AACxC;AACA,YAAY,gBAAgB;AAC5B;AACA,wBAAwB,qCAAqC,KAAK,GAAG;AACrE;AACA,KAAK;AACL;AACA,8BAA8B;AAC9B,4BAA4B,iBAAiB,QAAQ;AACrD,uJAAuJ,SAAS,IAAI,KAAK;AACzK;AACA,wBAAwB;AACxB;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,mBAAmB;AACnB;AACA,+BAA+B,iBAAiB,QAAQ,KAAK,IAAI,SAAS;AAC1E;AACA,qBAAqB;AACrB;AACA,qCAAqC,KAAK,EAAE,sCAAsC;AAClF,+CAA+C,MAAM,KAAK,mCAAmC;AAC7F;AACA,sBAAsB;AACtB;AACA,qCAAqC,KAAK,EAAE,sCAAsC;AAClF;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,wBAAwB;AACxB,4BAA4B,wBAAwB,0CAA0C,MAAM;AACpG,2DAA2D,WAAW,IAAI,KAAK,IAAI,aAAa,EAAE,WAAW;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc,IAAI,sBAAsB;AAC7E,2DAA2D,KAAK,QAAQ,QAAQ,IAAI,KAAK,yBAAyB,KAAK,GAAG,KAAK;AAC/H;AACA,wBAAwB;AACxB;AACA,sBAAsB,WAAW,QAAQ;AACzC;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,kCAAkC,4EAA4E,GAAG,QAAQ,IAAI,EAAE;AAC/H,KAAK;AACL;AACA,kBAAkB;AAClB;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,KAAK;AAC9D;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,qBAAqB;AACrB;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,8CAA8C,OAAO,KAAK,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;AClIa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACTa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,kBAAM;AAC3B,cAAc,mBAAO,CAAC,mBAAO;AAC7B;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB;AAC3B;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;ACfa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,mBAAmB;AACrC,oBAAoB,mBAAO,CAAC,qCAAyB;AACrD,eAAe,mBAAO,CAAC,qBAAS;AAChC,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,gBAAgB,mBAAO,CAAC,gCAAqB;AAC7C,kBAAkB,mBAAO,CAAC,2BAAe;AACzC,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC,gBAAgB,mDAAmD;AACnE,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,WAAW;AACjE,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,gDAAgD,IAAI,UAAU;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,MAAM;AAClB;AACA,uCAAuC,mBAAmB;AAC1D,8BAA8B,4BAA4B,UAAU,EAAE;AACtE;AACA,mBAAmB;AACnB;AACA,YAAY,UAAU;AACtB,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,8CAA8C;AAC7F,iCAAiC;AACjC;AACA;AACA,SAAS;AACT,yCAAyC,GAAG,aAAa,mBAAmB;AAC5E;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD,gEAAgE,yBAAyB,aAAa,MAAM,IAAI,wBAAwB,UAAU,KAAK,KAAK;AAC5J,+DAA+D,wBAAwB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,kBAAe;AACf;;;;;;;;;;;ACzHa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,gBAAgB,mBAAO,CAAC,oCAAwB;AAChD,kBAAkB,mBAAO,CAAC,2BAAe;AACzC,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA,gBAAgB,UAAU,uBAAuB;AACjD,kBAAkB,QAAQ;AAC1B,2BAA2B,QAAQ;AACnC,eAAe,UAAU,4BAA4B,wBAAwB,SAAS,WAAW,SAAS,QAAQ,cAAc,KAAK;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,KAAK,EAAE,oCAAoC;AACpG,0CAA0C,KAAK,gEAAgE,kDAAkD;AACjK;AACA;AACA;AACA;AACA;AACA,+CAA+C,KAAK,MAAM,SAAS;AACnE;AACA;AACA;AACA,+BAA+B,sDAAsD;AACrF;AACA;AACA;AACA;AACA,2CAA2C,8BAA8B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH,QAAQ;AAC7H;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,QAAQ;AAC1E;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACnGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB;AACA;AACA;AACA;AACA,CAAC,iBAAiB,kBAAkB,kBAAkB;AACtD;;;;;;;;;;;ACRa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,iBAAiB,mBAAO,CAAC,sBAAU;AACnC,mBAAmB,mBAAO,CAAC,wBAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;AChBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD;AACA,gBAAgB,YAAY,8CAA8C,WAAW;AACrF,eAAe,YAAY,wBAAwB,UAAU,YAAY;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,+DAA+D,KAAK,GAAG,WAAW;AAClF;AACA;AACA;AACA,8CAA8C,MAAM,mBAAmB,MAAM,iEAAiE,KAAK,uDAAuD,KAAK;AAC/M;AACA;AACA;AACA;AACA,2CAA2C,YAAY,MAAM,OAAO;AACpE;AACA;AACA;AACA,2CAA2C,KAAK,iBAAiB,OAAO,GAAG,KAAK,MAAM,OAAO,GAAG,KAAK;AACrG,0CAA0C,OAAO,GAAG,KAAK;AACzD,8DAA8D,QAAQ,kBAAkB,YAAY,IAAI,OAAO,QAAQ,KAAK;AAC5H,2CAA2C,QAAQ,KAAK,QAAQ,cAAc,OAAO,MAAM,UAAU,MAAM,UAAU;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO,+BAA+B,cAAc;AAClG;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,kBAAkB,EAAE,mCAAmC;AACrG;AACA,wDAAwD,gCAAgC;AACxF;AACA,0FAA0F,IAAI;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO,GAAG,KAAK;AACpE;AACA,yEAAyE,OAAO,GAAG,KAAK,yBAAyB,OAAO,QAAQ,KAAK;AACrI;AACA;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC3Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,mBAAO,CAAC,sBAAU;AACnC;AACA,kBAAe;AACf;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB,GAAG,0BAA0B;AACtD,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,gBAAgB,mBAAO,CAAC,iCAAqB;AAC7C;AACA;AACA,eAAe,YAAY,wBAAwB,gBAAgB,YAAY;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA,+CAA+C,0CAA0C,GAAG,KAAK,IAAI,WAAW;AAChH;AACA;AACA,yCAAyC,QAAQ,MAAM,KAAK;AAC5D;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACxBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,gBAAgB,mBAAO,CAAC,iCAAqB;AAC7C;AACA;AACA,eAAe,YAAY,wBAAwB,iBAAiB,YAAY;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,SAAS,GAAG,KAAK,IAAI,EAAE;AAChG;AACA;AACA;AACA;AACA,sCAAsC,SAAS,GAAG,KAAK,IAAI,QAAQ,GAAG,EAAE;AACxE,sCAAsC,MAAM,MAAM,IAAI;AACtD;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC/Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB,mBAAO,CAAC,2BAAe;AAC7C,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,sBAAsB,mBAAO,CAAC,2BAAe;AAC7C,kBAAkB,mBAAO,CAAC,uBAAW;AACrC,0BAA0B,mBAAO,CAAC,+BAAmB;AACrD,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,sBAAsB,mBAAO,CAAC,2BAAe;AAC7C,gBAAgB,mBAAO,CAAC,qBAAS;AACjC,eAAe,mBAAO,CAAC,oBAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kDAAkD;AACxD,MAAM,4CAA4C;AAClD;AACA;AACA;AACA,kBAAe;AACf;;;;;;;;;;;AChCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD;AACA,cAAc,qBAAqB;AACnC;AACA,mDAAmD,MAAM,OAAO,YAAY;AAC5E,KAAK;AACL,eAAe,YAAY,wBAAwB,SAAS,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA,0CAA0C,KAAK,UAAU,IAAI,EAAE,WAAW;AAC1E,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACvBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,qBAAqB,mBAAO,CAAC,sCAA0B;AACvD;AACA,cAAc,qBAAqB;AACnC;AACA,mDAAmD,MAAM,OAAO,YAAY;AAC5E,KAAK;AACL,eAAe,YAAY,wBAAwB,SAAS,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD;AACA,oEAAoE,KAAK,+BAA+B,mDAAmD,GAAG,KAAK;AACnK,0CAA0C,KAAK,EAAE,IAAI,EAAE,WAAW;AAClE,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC1Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,wCAAwC;AACvD,wBAAwB,uCAAuC;AAC/D,wBAAwB,uCAAuC;AAC/D;AACA;AACA,gBAAgB,qBAAqB,mCAAmC,qBAAqB,EAAE,WAAW;AAC1G,eAAe,qBAAqB,wBAAwB,cAAc,oBAAoB,WAAW,YAAY;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAA4B;AAC5C,0CAA0C,MAAM,EAAE,oBAAoB,EAAE,YAAY,WAAW,KAAK;AACpG,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC1Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD;AACA,cAAc,qBAAqB;AACnC;AACA,mDAAmD,MAAM,OAAO,YAAY;AAC5E,KAAK;AACL,eAAe,YAAY,wBAAwB,SAAS,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA,sDAAsD,KAAK,WAAW,IAAI,EAAE,WAAW;AACvF,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACvBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD;AACA,gBAAgB,YAAY,+CAA+C,WAAW;AACtF,eAAe,YAAY,wBAAwB,cAAc,YAAY;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,sDAAsD,IAAI,MAAM,IAAI,SAAS,KAAK;AAClF,kCAAkC,KAAK,eAAe,IAAI;AAC1D,2CAA2C,YAAY,YAAY,KAAK,IAAI,KAAK,GAAG,WAAW,IAAI,QAAQ;AAC3G,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACzBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,qBAAS;AAChC,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD;AACA,gBAAgB,YAAY,+CAA+C,WAAW;AACtF,eAAe,YAAY,wBAAwB,WAAW,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA,+DAA+D,WAAW,IAAI,EAAE;AAChF,2CAA2C,OAAO,QAAQ,KAAK;AAC/D,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;ACvBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,qBAAS;AAChC,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C;AACA,gBAAgB,UAAU,mBAAmB,wDAAwD,gBAAgB;AACrH,eAAe,UAAU,mBAAmB,wBAAwB,mBAAmB,iBAAiB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,sDAAsD,YAAY,uBAAuB,WAAW;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA,aAAa;AACb;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC9Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,mBAAO,CAAC,6CAAiC;AAC5D,kBAAkB,mBAAO,CAAC,kCAAuB;AACjD,eAAe,mBAAO,CAAC,gCAAoB;AAC3C,gBAAgB,mBAAO,CAAC,iCAAqB;AAC7C;AACA,gBAAgB,UAAU,QAAQ,mEAAmE,GAAG,MAAM,GAAG;AACjH,eAAe,UAAU,QAAQ,wBAAwB,KAAK,EAAE,OAAO,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yDAAyD;AACzE;AACA;AACA;AACA;AACA,uEAAuE,YAAY;AACnF;AACA;AACA,uDAAuD,KAAK;AAC5D;AACA,4BAA4B,MAAM;AAClC;AACA,uCAAuC,GAAG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE,uCAAuC,EAAE,EAAE,GAAG;AAC9C,kDAAkD,KAAK,GAAG,EAAE;AAC5D;AACA;AACA,sDAAsD,MAAM,kCAAkC,MAAM;AACpG;AACA,mDAAmD,QAAQ,GAAG,KAAK;AACnE,sDAAsD,QAAQ,GAAG,KAAK;AACtE;AACA;AACA,iBAAiB;AACjB,8CAA8C,QAAQ,GAAG,KAAK,MAAM,EAAE;AACtE,aAAa;AACb;AACA;AACA;AACA;AACA,oDAAoD,EAAE,EAAE,GAAG,qCAAqC,GAAG,IAAI,IAAI,EAAE,EAAE,GAAG,oCAAoC,IAAI,GAAG,KAAK,GAAG,EAAE,KAAK,KAAK,GAAG,EAAE;AACtL;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA,kBAAe;AACf;;;;;;;;;;;AC/Da;;AAEb;;;;AAIA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,UAAU;AAC/B;;AAEA,qBAAqB,UAAU;AAC/B;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;AC7CY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,mBAAmB,yDAA+B;AAClD,mBAAmB,uEAA6C;;AAEhE;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kGAAkG;AAClG;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ,wBAAwB,KAAK;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,mBAAO,CAAC,4BAAgB;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,uDAAuD,KAAK,oBAAoB,IAAI;AACpF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,YAAY,kCAAkC,aAAa;AACjG;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,aAAa,UAAU,YAAY;AAC9E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,uCAAuC;AACvC;AACA;AACA,UAAU;AACV;;AAEA;AACA,SAAS,mBAAmB;AAC5B;AACA;AACA;AACA;AACA,oCAAoC,IAAI,kCAAkC,KAAK;AAC/E;AACA;AACA;;AAEA;;;;;;;;;;;;AChMY;;AAEZ;AACA,YAAY,mBAAO,CAAC,yBAAa;AACjC;;;;;;;;;;;;ACJY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,eAAe,qDAA2B;AAC1C,mBAAmB,8DAAoC;AACvD,eAAe,gEAAsC;;AAErD;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kGAAkG;AAClG;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ,4BAA4B,KAAK;AACjC,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,2DAA2D,KAAK,oBAAoB,IAAI;AACxF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,YAAY,kCAAkC,aAAa;AACzG;;AAEA;AACA;AACA;AACA;AACA,mDAAmD,aAAa,UAAU,YAAY;AACtF;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA,uBAAuB,kBAAkB;AACzC,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA,0CAA0C,IAAI,kCAAkC,KAAK;AACrF;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;;ACrPY;;AAEZ,UAAU,8DAAoC;AAC9C;AACA,UAAU,mBAAO,CAAC,oBAAQ;AAC1B;;;;;;;;;;;;ACLY;;AAEZ,UAAU,8DAAoC;AAC9C,WAAW,mBAAO,CAAC,gBAAI;AACvB,aAAa,mBAAO,CAAC,kBAAM;AAC3B,cAAc,mBAAO,CAAC,uBAAW;AACjC,eAAe,mBAAO,CAAC,sBAAW;;AAElC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/CY;;AAEZ,UAAU,8DAAoC;AAC9C,aAAa,mBAAO,CAAC,kBAAM;AAC3B,WAAW,mBAAO,CAAC,yBAAa;AAChC,cAAc,mBAAO,CAAC,uBAAW;AACjC,mBAAmB,8DAAoC;;AAEvD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AChDY;;AAEZ,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,gBAAgB,mBAAO,CAAC,uBAAW;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBY;;AAEZ,UAAU,8DAAoC;AAC9C,aAAa,mBAAO,CAAC,kBAAM;AAC3B,WAAW,mBAAO,CAAC,yBAAa;AAChC,cAAc,mBAAO,CAAC,uBAAW;AACjC,mBAAmB,8DAAoC;;AAEvD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC5DY;;AAEZ,aAAa,mBAAO,CAAC,kBAAM;AAC3B,WAAW,mBAAO,CAAC,yBAAa;AAChC,mBAAmB,8DAAoC;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AClGY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC9BY;;AAEZ,UAAU,8DAAoC;AAC9C,aAAa,mBAAO,CAAC,kBAAM;AAC3B,WAAW,mBAAO,CAAC,yBAAa;AAChC,gBAAgB,mBAAO,CAAC,uBAAW;AACnC;AACA;;AAEA,sBAAsB,mBAAO,CAAC,6BAAiB;AAC/C;AACA;;AAEA,qBAAqB,mBAAO,CAAC,2BAAgB;AAC7C;AACA;;AAEA,mBAAmB,8DAAoC;;AAEvD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC9DY;AACZ;AACA;AACA,UAAU,8DAAoC;AAC9C,WAAW,mBAAO,CAAC,yBAAa;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;ACvGY;;AAEZ;AACA,IAAI;AACJ;AACA,EAAE,mBAAO,CAAC,kBAAM;AAChB;AACA,EAAE,mBAAO,CAAC,yBAAa;AACvB,EAAE,mBAAO,CAAC,oBAAQ;AAClB,EAAE,mBAAO,CAAC,qBAAS;AACnB,EAAE,mBAAO,CAAC,sBAAU;AACpB,EAAE,mBAAO,CAAC,oBAAQ;AAClB,EAAE,mBAAO,CAAC,sBAAU;AACpB,EAAE,mBAAO,CAAC,yBAAa;AACvB,EAAE,mBAAO,CAAC,oBAAQ;AAClB,EAAE,mBAAO,CAAC,sBAAU;AACpB,EAAE,mBAAO,CAAC,2BAAe;AACzB,EAAE,mBAAO,CAAC,qBAAU;AACpB;;AAEA;AACA;AACA,WAAW,mBAAO,CAAC,gBAAI;AACvB;AACA,EAAE,mDAAkD;AACpD,aAAa;AACb,GAAG,EAAC;AACJ;;;;;;;;;;;;AC3BY;;AAEZ,UAAU,8DAAoC;AAC9C,iBAAiB,mBAAO,CAAC,wBAAY;;AAErC,wBAAwB,mBAAO,CAAC,0BAAe;AAC/C,0BAA0B,mBAAO,CAAC,gCAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACfY;;AAEZ,UAAU,8DAAoC;AAC9C,iBAAiB,mBAAO,CAAC,sBAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,cAAc,mBAAO,CAAC,uBAAW;AACjC,iBAAiB,mBAAO,CAAC,wBAAY;;AAErC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjBY;;AAEZ,aAAa,mBAAO,CAAC,kBAAM;AAC3B,cAAc,mBAAO,CAAC,uBAAW;AACjC,mBAAmB,8DAAoC;AACvD,iBAAiB,mBAAO,CAAC,wBAAY;;AAErC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;;;;;;;;;;;;AC1BY;AACZ,UAAU,8DAAoC;AAC9C,iBAAiB,mBAAO,CAAC,sBAAU;AACnC,mBAAmB,mBAAO,CAAC,2BAAe;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,yBAAyB,6DAAmC;;AAE5D;;AAEA;AACA;AACA,aAAa;AACb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrDY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,yBAAyB,6DAAmC;;AAE5D;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;;AC9DY;;AAEZ,aAAa,mBAAO,CAAC,kBAAM;;AAE3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACxBY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,iBAAiB,0DAAgC;AACjD,mBAAmB,wDAA+B;AAClD,mBAAmB,yDAA+B;AAClD,eAAe,mBAAO,CAAC,4BAAgB;;AAEvC;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,8DAA8D,IAAI,iBAAiB,KAAK;;AAExF;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACpHY;;AAEZ,UAAU,8DAAoC;AAC9C,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,aAAa,iDAAuB;AACpC,eAAe,oDAA2B;AAC1C,eAAe,qDAA2B;AAC1C,mBAAmB,8DAAoC;;AAEvD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,0CAA0C,IAAI,kCAAkC,KAAK;AACrF;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;;;;;;;;;;;ACjFY;;AAEZ,UAAU,8DAAoC;AAC9C,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,cAAc,mBAAO,CAAC,uBAAW;AACjC,mBAAmB,8DAAoC;;AAEvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACvCY;AACZ,UAAU,6DAAmC;AAC7C,WAAW,mBAAO,CAAC,mBAAO;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACXY;;AAEZ,UAAU,8DAAoC;AAC9C,eAAe,mBAAO,CAAC,sBAAU;;AAEjC;AACA;AACA;AACA;;;;;;;;;;;;ACRY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,aAAa,mBAAO,CAAC,kBAAM;AAC3B,eAAe,mBAAO,CAAC,oBAAQ;;AAE/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzTY;AACZ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXY;;AAEZ,WAAW,mBAAO,CAAC,yBAAa;AAChC,WAAW,mBAAO,CAAC,gBAAI;AACvB,aAAa,mBAAO,CAAC,kBAAM;;AAE3B,YAAY,IAAI;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9Ea;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,cAAc;AAClC;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;;AAEA,iFAAiF,sCAAsC;;AAEvH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACnFa;;AAEb,qBAAqB,mBAAO,CAAC,8BAAkB;;AAE/C;;;;;;;;;;;;ACJY;;AAEZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;ACtBA,SAAS,mBAAO,CAAC,gBAAI;AACrB,gBAAgB,mBAAO,CAAC,4BAAgB;AACxC,aAAa,mBAAO,CAAC,iCAAqB;AAC1C,YAAY,mBAAO,CAAC,wBAAY;;AAEhC,WAAW,mBAAO,CAAC,kBAAM;;AAEzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM,+CAAuB;AAC7B,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/bA,aAAa,iDAAwB;;AAErC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA,gBAAgB,mBAAO,CAAC,uBAAW;;AAEnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,cAAc;AACd,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN,+CAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;AClWa;;AAEb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPa;;AAEb;AACA;AACA,WAAW,mBAAO,CAAC,2BAAe;;AAElC,WAAW,aAAa;AACxB;;;;;;;;;;;;ACPa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;;;;;;;;;;;;AC1Ba;;AAEb,aAAa,mBAAO,CAAC,oBAAQ;;AAE7B;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAW,mBAAO,CAAC,yBAAa;;AAEhC;AACA;AACA;;;;;;;;;;;;ACnEA;AACA,QAAQ,sDAA4B;AACpC,CAAC;;AAED;AACA,QAAQ,8DAAoC;AAC5C,CAAC;;AAED;AACA,QAAQ,yDAA+B;AACvC,CAAC;;AAED;AACA,QAAQ,0DAAgC;AACxC,CAAC;;AAED;AACA,QAAQ,0DAAgC;AACxC,CAAC;;AAED;AACA,QAAQ,mBAAO,CAAC,yBAAa;AAC7B,CAAC;;AAED;AACA,EAAE;AACF;AACA,mBAAmB,eAAe;AAClC,cAAc,sDAAsD;AACpE;AACA;;;;;;;;;;;;AC9BA,eAAe,qDAA2B;;AAE1C,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd,eAAe;AACf,aAAa;AACb;;AAEA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;;;;;;;;;;;;ACpFA,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,eAAe,qDAA2B;AAC1C,gBAAgB,0DAAgC;AAChD,cAAc,sDAA4B;;AAE1C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA,eAAe,4DAA4D;AAC3E;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,0BAA0B,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,wDAAwD;;AAE/E;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,8CAA8C,kBAAkB,IAAI,IAAI;AACxE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2CAA2C;AACnE;AACA,MAAM;AACN;AACA,yBAAyB,2CAA2C;AACpE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;;AAEA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA,sCAAsC,MAAM;AAC5C;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA,uBAAuB;;AAEvB,qBAAqB;AACrB;AACA;;;;;;;;;;;;;AC7dA;;AAEA,UAAU,mBAAO,CAAC,uBAAW;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,QAAQ;AACR;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,UAAU,mBAAmB;AAC7B;;AAEA,UAAU;AACV;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA,UAAU;AACV;AACA;;AAEA,UAAU;AACV;AACA;;AAEA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,WAAW;;AAEX,UAAU;AACV;AACA;;AAEA,UAAU;AACV;AACA;AACA;;AAEA,QAAQ;AACR;;AAEA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;ACrvBA,UAAU,mBAAO,CAAC,uBAAW;;AAE7B;AACA;AACA,oBAAoB;AACpB,qCAAqC;AACrC;AACA;AACA;AACA;AACA,4CAA4C,aAAa;AACzD;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,UAAU;AACV;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,cAAc;AAChC;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;;AAEA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA,UAAU;AACV;;AAEA,UAAU;AACV;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA,UAAU;AACV;;AAEA,UAAU;AACV;;AAEA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+CAA+C,oBAAoB;AACnE;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACvXA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;;AAEA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC;AACnC;AACA;AACA;;AAEA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;;AAEA,qCAAqC;;;;;;;;;;;ACrErC,UAAU,mBAAO,CAAC,gBAAI;AACtB,UAAU,mBAAO,CAAC,iBAAK;;AAEvB;AACA;AACA,uBAAuB;AACvB,UAAU,SAAO;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM,8CAAoB;AAC1B;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;;;;;;;;;;;;;AC5Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;;;;;;;;AC5FA;AACA;AACA,QAAQ,mBAAO,CAAC,yBAAa;AAC7B,EAAE;AACF,QAAQ,mBAAO,CAAC,gBAAI;AACpB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrIa;;AAEb;;AAEA;AACA;AACA,4BAA4B,EAAE,0DAA0D,IAAI;;AAE5F;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA,+BAA+B,IAAI;AACnC;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB,oBAAoB;;;;;;;;;;;AC1EpB,YAAY,mBAAO,CAAC,yBAAa;AACjC,aAAa,mBAAO,CAAC,wBAAY;AACjC,eAAe,mBAAO,CAAC,0BAAe;AACtC,aAAa,mBAAO,CAAC,wBAAY;;AAEjC;;;;;;;;;;;ACLA,SAAS,mBAAO,CAAC,gBAAI;AACrB,iBAAiB,mBAAO,CAAC,uBAAW;AACpC,WAAW,mBAAO,CAAC,kBAAM;AACzB,aAAa,mBAAO,CAAC,sBAAU;AAC/B,uBAAuB,mBAAO,CAAC,kCAAsB;AACrD,uBAAuB,mBAAO,CAAC,iCAAqB;AACpD,aAAa,mBAAO,CAAC,4BAAgB;;AAErC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA;;AAEA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxUA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;;;;;;;;;;;;ACPa;;AAEb,mBAAmB,mBAAO,CAAC,4BAAgB;AAC3C,WAAW,mBAAO,CAAC,yBAAa;;AAEhC;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXa;;AAEb,SAAS,mBAAO,CAAC,gBAAI;;AAErB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6FAA6F;AAC7F;;AAEA;AACA;;;;;;;;;;;ACvBA,mBAAmB,mBAAO,CAAC,4BAAgB;;AAE3C;AACA;AACA;;;;;;;;;;;ACJA,WAAW,mBAAO,CAAC,kBAAM;AACzB,0BAA0B,mBAAO,CAAC,wBAAY,GAAG;;AAEjD;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,4CAA4C;AACtE;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;ACTA,aAAa,mBAAO,CAAC,4BAAgB;AACrC,SAAS,mBAAO,CAAC,gBAAI;AACrB,WAAW,mBAAO,CAAC,kBAAM;AACzB,iBAAiB,mBAAO,CAAC,uBAAW;AACpC,aAAa,mBAAO,CAAC,sBAAU;AAC/B,uBAAuB,mBAAO,CAAC,kCAAsB;AACrD,uBAAuB,mBAAO,CAAC,iCAAqB;;AAEpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uCAAuC,uBAAuB;AAC9D,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,uBAAuB;AAC7D,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6DAA6D;AAC7D;;AAEA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA,+DAA+D;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;;AAEA;AACA,kCAAkC;AAClC;;AAEA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/Ma;AACb,WAAW,mBAAO,CAAC,gBAAI;AACvB,YAAY,mBAAO,CAAC,gBAAK;AACzB,gBAAgB,mBAAO,CAAC,sBAAU;;AAElC,OAAO,KAAK;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,gCAAgC,IAAI;AACxE;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,GAAG;AACpC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA,0BAA0B,qBAAqB;AAC/C,0BAA0B,qBAAqB;AAC/C;;;;;;;;;;;;ACvJY;;AAEZ,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG,YAAY,gBAAgB;AAC/B;;AAEA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,GAAG,YAAY,gBAAgB;AAC/B;;;;;;;;;;;ACxBA;AACA;AACA,CAAC,KAA4D;AAC7D,CAAC,CAC0C;AAC3C,CAAC,6BAA6B;;AAE9B;AACA,oEAAoE,aAAa;AACjF;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,IAAI;AACvC;AACA,wDAAwD,EAAE;AAC1D;AACA,+DAA+D,EAAE;AACjE;AACA,+EAA+E,EAAE;AACjF;AACA,2DAA2D,IAAI,iDAAiD,EAAE;AAClH;AACA,2DAA2D,IAAI,iDAAiD,EAAE;AAClH;AACA,2DAA2D,IAAI;AAC/D;AACA,2DAA2D,IAAI;AAC/D;AACA,2DAA2D,IAAI;AAC/D;AACA,2DAA2D,IAAI;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,EAAE;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G,EAAE;AAC9G;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,+BAA+B;AAC/E;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;AAcD;AACA;AACA,8CAA8C,gBAAgB;;AAE9D;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,qBAAqB;;AAErB;AACA;AACA,kCAAkC;AAClC,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oCAAoC;AACpC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0DAA0D;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB,6CAA6C,oBAAoB;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,gEAAgE;AACxH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2DAA2D,mEAAmE;AAC9H;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2DAA2D,mEAAmE;AAC9H;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yDAAyD,yHAAyH;AAC1O;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,+BAA+B,yBAAyB;AACxD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,yDAAyD;AACzD,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc;AACd;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB;AACtB;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,gBAAgB;AACrD;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,gOAAgO;AAChO,oEAAoE;AACpE,6EAA6E,MAAM;AACnF;AACA,kEAAkE;AAClE,wEAAwE;AACxE;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA,0DAA0D,MAAM;AAChE;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA,+DAA+D,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,EAAE,iBAAiB,EAAE,EAAE,EAAE,cAAc,GAAG;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+CAA+C,aAAa;;AAE5D,CAAC;AACD;;;;;;;;;;;;ACl6Ca;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,mBAAmB,mBAAO,CAAC,wBAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;;;;;;;;;;ACrDa;AACb;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,iBAAiB,oGAAoG,cAAc;AACnI,8BAA8B,sBAAsB;AACpD,0BAA0B,YAAY,sBAAsB,qCAAqC,2CAA2C,MAAM;AAClJ,4BAA4B,MAAM,iBAAiB,YAAY;AAC/D,uBAAuB;AACvB,8BAA8B;AAC9B,6BAA6B;AAC7B,4BAA4B;AAC5B;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA,6BAA6B,qGAAqG;AAClI;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uCAAuC,sCAAsC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;AC3Oa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA,YAAY;AACZ;;;;;;;;;;;ACvIa;AACb;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,kCAAkC,mBAAO,CAAC,qBAAS;AACnD,wBAAwB,mBAAO,CAAC,4BAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4BAA4B;AACpC;AACA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;;;;;;;;;;AC3Ga;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,uFAAuF,cAAc;AAChN,uBAAuB,8BAA8B,gDAAgD,wDAAwD;AAC7J,6CAA6C,sCAAsC,UAAU,mBAAmB,IAAI;AACpH;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,8BAA8B,GAAG,mCAAmC;AACzF,wBAAwB,mBAAO,CAAC,gBAAI;AACpC,mCAAmC,mBAAO,CAAC,2BAAe;AAC1D,0BAA0B,mBAAO,CAAC,kBAAM;AACxC,yBAAyB,mBAAO,CAAC,8BAAkB;AACnD,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,wBAAwB,mBAAO,CAAC,6BAAiB;AACjD,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,wBAAwB,mBAAO,CAAC,4BAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG,wBAAwB,QAAQ,yCAAyC;AACzK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,mEAAmE,wBAAwB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,cAAc,wBAAwB,eAAe,iBAAiB;AAC1I;AACA,4DAA4D,wBAAwB,eAAe,iBAAiB,eAAe,WAAW;AAC9I;AACA;AACA;AACA;AACA,+EAA+E,KAAK;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA,iEAAiE,cAAc;AAC/E;AACA;AACA,8BAA8B,8CAA8C;AAC5E;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,mDAAmD;AACtG;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,yDAAyD,SAAS,oBAAoB,oBAAoB;AAC1G;AACA;AACA,yDAAyD,SAAS,mBAAmB,qBAAqB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,4BAA4B;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,uDAAuD,4BAA4B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,qBAAqB;AAClF,0CAA0C,0BAA0B;AACpE;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;AC/qBa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,mBAAmB,mBAAO,CAAC,wBAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,IAAI,IAAI;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB,uDAAuD,UAAU;AACtH;AACA;AACA;AACA,mCAAmC,kBAAkB,sDAAsD,UAAU;AACrH;AACA;AACA,mCAAmC,kBAAkB,yCAAyC,UAAU;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB;AACA;AACA;;;;;;;;;;;AChHa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,6BAA6B;AAClD,gCAAgC,mBAAO,CAAC,kBAAM;AAC9C,wBAAwB,mBAAO,CAAC,gBAAI;AACpC,yBAAyB,mBAAO,CAAC,sBAAU;AAC3C,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,wBAAwB,mBAAO,CAAC,6BAAiB;AACjD,yBAAyB,mBAAO,CAAC,8BAAkB;AACnD;AACA,2CAA2C,2BAA2B;AACtE,IAAI,yCAAyC;AAC7C;AACA;AACA,QAAQ,2BAA2B;AACnC,IAAI,iDAAiD;AACrD;AACA,QAAQ,yCAAyC;AACjD,IAAI,+CAA+C;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA,uEAAuE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B,6BAA6B,6BAA6B;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,6BAA6B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,yEAAyE,qBAAqB;AAC9F;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAgC;AACnD;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,kCAAkC;AAC9D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,qBAAqB;AAC9F;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA,4EAA4E,8BAA8B;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,8BAA8B;AAC9G;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA,oDAAoD;AACpD;AACA,8EAA8E,8BAA8B;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,8BAA8B;AAChH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,gEAAgE,qBAAqB;AACrF;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,iCAAiC;AAC7D;AACA;AACA;AACA,oDAAoD;AACpD,2HAA2H,qBAAqB;AAChJ;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,mCAAmC;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,wDAAwD,4BAA4B;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,4BAA4B;AACxF;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,0DAA0D,4BAA4B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,4BAA4B;AAC1F;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,yDAAyD,4BAA4B;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,4BAA4B;AACzF;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,2DAA2D,4BAA4B;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,4BAA4B;AAC3F;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,kCAAkC;AAC9D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA,gDAAgD;AAChD;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,4BAA4B;AACxD;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,mCAAmC;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,4BAA4B,4CAA4C;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,iCAAiC;AAC1F;AACA;AACA;AACA,4EAA4E;AAC5E,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,4BAA4B,wCAAwC;AACpE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,6CAA6C;AACtG;AACA;AACA;AACA,4EAA4E;AAC5E,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,4BAA4B,0CAA0C;AACtE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gCAAgC,cAAc,2BAA2B;AACtF,SAAS;AACT;AACA;AACA,4BAA4B,gCAAgC;AAC5D;AACA;AACA;AACA;AACA;AACA,aAAa,gCAAgC,cAAc,2BAA2B;AACtF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,6BAA6B;AACzD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW,IAAI,cAAc;AACrF;AACA;AACA;AACA,0DAA0D,WAAW,IAAI,cAAc;AACvF;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,mBAAmB,IAAI,cAAc;AACvG;AACA;AACA;AACA,wEAAwE,WAAW,IAAI,cAAc;AACrG;AACA;AACA;AACA,mEAAmE,WAAW,IAAI,cAAc;AAChG;AACA;AACA;AACA,2DAA2D,WAAW,IAAI,cAAc;AACxF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;ACpqCa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,iBAAiB,mBAAO,CAAC,sBAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iCAAiC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;ACxEa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd,0BAA0B,mBAAO,CAAC,kBAAM;AACxC,mBAAmB,mBAAO,CAAC,yBAAa;AACxC,6BAA6B,mBAAO,CAAC,qBAAS;AAC9C,mBAAmB,mBAAO,CAAC,oBAAQ;AACnC,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,sBAAsB,mBAAO,CAAC,0BAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,IAAI,YAAY,+BAA+B;AAChE;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA,uDAAuD,6BAA6B;AACpF;AACA;AACA,WAAW,kDAAkD;AAC7D;AACA;AACA;AACA,gBAAgB,oFAAoF;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,WAAW,UAAU,uBAAuB;AAC/F;AACA;AACA;AACA;AACA,mFAAmF,uBAAuB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,mDAAmD,WAAW,UAAU,uBAAuB,KAAK,EAAE;AACtG;AACA;AACA;AACA,yBAAyB,2BAA2B;AACpD;AACA;AACA,gBAAgB,sGAAsG;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,WAAW,UAAU,uBAAuB;AAC/F;AACA;AACA;AACA;AACA,mFAAmF,uBAAuB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA,mDAAmD,WAAW,UAAU,uBAAuB,KAAK,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wBAAwB;AACvD;AACA;AACA,kDAAkD,4BAA4B;AAC9E;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA,WAAW,kDAAkD;AAC7D;AACA;AACA;AACA,gBAAgB,qFAAqF;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA,iDAAiD,YAAY;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,oDAAoD,YAAY,UAAU,eAAe,KAAK,EAAE;AAChG;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA,gBAAgB,uGAAuG;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,oDAAoD,YAAY,UAAU,eAAe,KAAK,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;;;;;;;;;;ACrYa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,qBAAqB;AAC9D;AACA;AACA,QAAQ,uCAAuC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,kBAAkB;AACrC,wBAAwB,mBAAO,CAAC,gBAAI;AACpC,yBAAyB,mBAAO,CAAC,iBAAK;AACtC,eAAe,mBAAO,CAAC,oBAAQ;AAC/B,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,mCAAmC;AACtG;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,CAAC,iBAAiB,kBAAkB,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,2CAA2C;AAC7F;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,2CAA2C;AAC7F;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,2CAA2C;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,IAAI;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3aa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,wBAAwB,mBAAO,CAAC,gBAAI;AACpC,0BAA0B,mBAAO,CAAC,kBAAM;AACxC,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,8BAA8B,mBAAO,CAAC,iBAAK;AAC3C,uCAAuC,mBAAO,CAAC,0BAAc;AAC7D,sCAAsC,mBAAO,CAAC,yBAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,2BAA2B;AAC1E;AACA;AACA;AACA,+CAA+C,2BAA2B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,yBAAyB;AAC5E,kDAAkD,oBAAoB;AACtE;AACA,+BAA+B,qFAAqF;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,aAAa,cAAc;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,0BAA0B;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;ACpRa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;;;;;;;;;;AC7Da;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,2BAA2B,GAAG,uCAAuC;AACxF,0BAA0B,mBAAO,CAAC,kBAAM;AACxC,mCAAmC,mBAAO,CAAC,2BAAe;AAC1D,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,gBAAgB,mBAAO,CAAC,qBAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA,+CAA+C,iBAAiB;AAChE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,WAAW;AAC3F,yCAAyC,UAAU;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,aAAa;AAC/D;AACA;AACA;AACA;AACA,uDAAuD,aAAa;AACpE;AACA;AACA;AACA,uDAAuD,aAAa,GAAG,IAAI;AAC3E;AACA;AACA,+EAA+E,iBAAiB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6BAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,aAAa;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,iBAAiB;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,eAAe,GAAG,aAAa;AAC/E;AACA,4DAA4D,SAAS;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,UAAU,4BAA4B,qBAAqB;AAC3G,gDAAgD,UAAU,4BAA4B,yBAAyB;AAC/G;AACA;AACA,oDAAoD,UAAU;AAC9D;AACA;AACA;AACA,0CAA0C,UAAU,2BAA2B,iBAAiB;AAChG,0CAA0C,KAAK,2BAA2B,mBAAmB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,iBAAiB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,8BAA8B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;;;;;;;;;;;ACnca;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;ACvCa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;;;;;;;;;;AClGa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,0BAA0B,mBAAO,CAAC,kBAAM;AACxC,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,oBAAoB,mBAAO,CAAC,wBAAa;AACzC,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,uBAAuB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,gBAAgB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,8CAA8C;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oDAAoD;AACnE;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa;AAC3D;AACA;AACA;AACA;AACA,oCAAoC,wCAAwC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,aAAa;AACtE;AACA;AACA,kDAAkD,aAAa;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,yBAAyB,GAAG,sCAAsC;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;;;;;;;;;;ACvUa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,GAAG,yBAAyB;AAC/C;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iCAAiC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,YAAY;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,YAAY;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,YAAY;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,aAAa;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,YAAY,oCAAoC,SAAS;AACzG;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,wBAAwB;AAClE;AACA;AACA;AACA;AACA;AACA,SAAS,wCAAwC;AACjD;AACA;AACA;AACA,SAAS,qCAAqC;AAC9C;AACA;AACA;AACA,SAAS,wCAAwC;AACjD;AACA;AACA;AACA,SAAS,+CAA+C;AACxD;AACA;AACA;AACA,SAAS,2CAA2C;AACpD;AACA;AACA;AACA,SAAS,wCAAwC;AACjD;AACA;AACA;AACA,SAAS,4CAA4C;AACrD;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;;;;;;;;;;;ACpNa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,0BAA0B,mBAAO,CAAC,kBAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uDAAuD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,0DAA0D;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gDAAgD,KAAK,GAAG,OAAO;AAC/D;AACA;AACA,gDAAgD,KAAK;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,KAAK,GAAG,OAAO;AAC/D;AACA;AACA,gDAAgD,KAAK;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA,kBAAkB,SAAS,EAAE,uBAAuB,IAAI,QAAQ;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrNa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB,qBAAqB,qBAAqB;AAC/D;;;;;;;;;;;AClFa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,6BAA6B,mBAAO,CAAC,kCAAsB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;;;;;;;;;;ACzFa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;;;;;;;;;;;ACvDa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB,IAAI,KAAK;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzQa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mCAAmC;AAC5C;AACA;AACA;AACA,SAAS,qCAAqC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;ACxCa;AACb;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,kCAAkC,mBAAO,CAAC,qBAAS;AACnD,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,IAAI;AAClE;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,oDAAoD,IAAI;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,IAAI;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,cAAc;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,gBAAgB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,SAAS;AACjE;AACA;AACA;AACA;AACA,0DAA0D,OAAO;AACjE;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA,4DAA4D,YAAY,IAAI,QAAQ;AACpF,2DAA2D,WAAW;AACtE;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7La;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,uFAAuF,cAAc;AAChN,uBAAuB,8BAA8B,gDAAgD,wDAAwD;AAC7J,6CAA6C,sCAAsC,UAAU,mBAAmB,IAAI;AACpH;AACA,uDAAuD;AACvD;AACA;AACA,iBAAiB,6CAA6C,UAAU,sDAAsD,cAAc;AAC5I,0BAA0B,6BAA6B,oBAAoB,uCAAuC,kBAAkB;AACpI;AACA;AACA;AACA;AACA,iBAAiB,oGAAoG,cAAc;AACnI,8BAA8B,sBAAsB;AACpD,0BAA0B,YAAY,sBAAsB,qCAAqC,2CAA2C,MAAM;AAClJ,4BAA4B,MAAM,iBAAiB,YAAY;AAC/D,uBAAuB;AACvB,8BAA8B;AAC9B,6BAA6B;AAC7B,4BAA4B;AAC5B;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY,GAAG,mBAAmB,GAAG,gBAAgB;AACrD,wBAAwB,mBAAO,CAAC,gBAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,eAAe,gBAAgB,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB,mBAAmB,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G;AAC9G;AACA,oBAAoB,qDAAqD;AACzE,4BAA4B;AAC5B;AACA,wFAAwF,8EAA8E;AACtK;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,gBAAgB,qDAAqD;AACrE,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;;;;;;;;;;AC3Sa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,wBAAwB,mBAAO,CAAC,4BAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC,YAAY,oBAAoB;AAChC;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sGAAsG,SAAS;AAC/G;AACA;AACA;AACA;AACA;AACA,wFAAwF,wBAAwB,WAAW,SAAS;AACpI,oEAAoE,aAAa;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,kCAAkC,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,GAAG;AACrF;;;;;;;;;;;ACtFa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,4BAA4B,GAAG,qBAAqB,GAAG,sBAAsB,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,6BAA6B,GAAG,YAAY,GAAG,mBAAmB,GAAG,YAAY,GAAG,gBAAgB,GAAG,YAAY,GAAG,yBAAyB,GAAG,mBAAmB,GAAG,yBAAyB,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,YAAY,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,kBAAkB,GAAG,aAAa,GAAG,4BAA4B;AAC7uB;AACA;AACA;AACA;AACA;AACA,6BAA6B,mBAAO,CAAC,oCAAwB;AAC7D,wDAAuD,EAAE,qCAAqC,uDAAuD,EAAC;AACtJ,cAAc,mBAAO,CAAC,qBAAS;AAC/B,yCAAwC,EAAE,qCAAqC,yBAAyB,EAAC;AACzG,8CAA6C,EAAE,qCAAqC,8BAA8B,EAAC;AACnH,kBAAkB,mBAAO,CAAC,wBAAa;AACvC,iDAAgD,EAAE,qCAAqC,qCAAqC,EAAC;AAC7H,mDAAkD,EAAE,qCAAqC,uCAAuC,EAAC;AACjI,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,uBAAuB,mBAAO,CAAC,8BAAkB;AACjD,kDAAiD,EAAE,qCAAqC,2CAA2C,EAAC;AACpI,mBAAmB,mBAAO,CAAC,0BAAc;AACzC,8CAA6C,EAAE,qCAAqC,mCAAmC,EAAC;AACxH,kBAAkB,mBAAO,CAAC,yBAAa;AACvC,6CAA4C,EAAE,qCAAqC,iCAAiC,EAAC;AACrH,eAAe,mBAAO,CAAC,sBAAU;AACjC,0CAAyC,EAAE,qCAAqC,2BAA2B,EAAC;AAC5G,sBAAsB,mBAAO,CAAC,4BAAiB;AAC/C,iDAAgD,EAAE,qCAAqC,yCAAyC,EAAC;AACjI,iBAAiB,mBAAO,CAAC,wBAAY;AACrC,8CAA6C,EAAE,qCAAqC,iCAAiC,EAAC;AACtH,4CAA2C,EAAE,qCAAqC,+BAA+B,EAAC;AAClH,mBAAmB,mBAAO,CAAC,0BAAc;AACzC,8CAA6C,EAAE,qCAAqC,mCAAmC,EAAC;AACxH,iBAAiB,mBAAO,CAAC,wBAAY;AACrC,4CAA2C,EAAE,qCAAqC,+BAA+B,EAAC;AAClH,sBAAsB,mBAAO,CAAC,6BAAiB;AAC/C,iDAAgD,EAAE,qCAAqC,yCAAyC,EAAC;AACjI,oBAAoB,mBAAO,CAAC,2BAAe;AAC3C,+CAA8C,EAAE,qCAAqC,qCAAqC,EAAC;AAC3H,sBAAsB,mBAAO,CAAC,6BAAiB;AAC/C,iDAAgD,EAAE,qCAAqC,yCAAyC,EAAC;AACjI,uBAAuB,mBAAO,CAAC,8BAAkB;AACjD,kDAAiD,EAAE,qCAAqC,2CAA2C,EAAC;AACpI,0BAA0B,mBAAO,CAAC,iCAAqB;AACvD,qDAAoD,EAAE,qCAAqC,iDAAiD,EAAC;AAC7I,oBAAoB,mBAAO,CAAC,0BAAe;AAC3C,+CAA8C,EAAE,qCAAqC,qCAAqC,EAAC;AAC3H,qDAAoD,EAAE,qCAAqC,2CAA2C,EAAC;AACvI,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,4CAA2C,EAAE,qCAAqC,2BAA2B,EAAC;AAC9G,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,+CAA8C,EAAE,qCAAqC,8BAA8B,EAAC;AACpH,aAAa,mBAAO,CAAC,oBAAQ;AAC7B,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,mBAAmB,mBAAO,CAAC,0BAAc;AACzC,yDAAwD,EAAE,qCAAqC,8CAA8C,EAAC;AAC9I,8CAA6C,EAAE,qCAAqC,mCAAmC,EAAC;AACxH,mBAAmB,mBAAO,CAAC,0BAAc;AACzC,8CAA6C,EAAE,qCAAqC,mCAAmC,EAAC;AACxH,uBAAuB,mBAAO,CAAC,8BAAkB;AACjD,kDAAiD,EAAE,qCAAqC,2CAA2C,EAAC;AACpI,sBAAsB,mBAAO,CAAC,6BAAiB;AAC/C,iDAAgD,EAAE,qCAAqC,yCAAyC,EAAC;AACjI,6BAA6B,mBAAO,CAAC,oCAAwB;AAC7D,wDAAuD,EAAE,qCAAqC,uDAAuD,EAAC;AACtJ,iBAAiB,mBAAO,CAAC,wBAAY;AACrC,4CAA2C,EAAE,qCAAqC,+BAA+B,EAAC;AAClH;;;;;;;;;;;ACvEa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,mBAAmB,mBAAO,CAAC,wBAAY;AACvC;AACA;AACA,IAAI,yEAAyE;AAC7E;AACA;AACA;AACA;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvIa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,2BAA2B,mBAAO,CAAC,gCAAoB;AACvD;AACA,kCAAkC,qCAAqC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iCAAiC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;;;;;;;;;;AC9Ba;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,6BAA6B;AAChD,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B,6BAA6B,6BAA6B;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;;;;;;;;;;ACjKa;AACb;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B,aAAa,mBAAO,CAAC,gBAAI;AACzB,yCAAyC,mBAAO,CAAC,2BAAgB;AACjE,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;;;;;;;;;;;AChEa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B;AAC9B,yBAAyB,mBAAO,CAAC,8BAAkB;AACnD,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,sEAAsE;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;;;;;;;;;;AC7Fa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB;AACA,gDAAgD,sBAAsB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB,yBAAyB,yBAAyB;AAC3E;;;;;;;;;;;ACpBa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,+BAA+B,gCAAgC,gCAAgC;AAChG;;;;;;;;;;;AC/Ba;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,2BAA2B,mBAAO,CAAC,gCAAoB;AACvD;AACA,MAAM,wBAAwB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,QAAQ,sDAAsD;AACnI;AACA;AACA,oBAAoB;AACpB;;;;;;;;;;;AC/Ba;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qCAAqC;AACrC,4BAA4B,mBAAO,CAAC,0CAA8B;AAClE,uBAAuB,mBAAO,CAAC,4BAAgB;AAC/C;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;;;;;;;;;;;ACrEa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,4BAA4B,mBAAO,CAAC,0CAA8B;AAClE;AACA,sBAAsB,yBAAyB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA,2CAA2C,qEAAqE;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO,EAAE,uCAAuC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO,EAAE,cAAc;AACzE;AACA;AACA;AACA;AACA,mCAAmC;AACnC;;;;;;;;;;;AC/Da;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB,GAAG,6BAA6B;AACtD,4BAA4B,mBAAO,CAAC,0CAA8B;AAClE;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA,uCAAuC,KAAK;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,yBAAyB;AAC7D;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB,EAAE,YAAY,EAAE,yBAAyB;AACzG;AACA,oCAAoC,yBAAyB;AAC7D;AACA;AACA;AACA,sBAAsB;AACtB;;;;;;;;;;;ACrJa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C,uBAAuB,mBAAO,CAAC,4BAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;;;;;;;;;;AC9Fa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,2BAA2B,mBAAO,CAAC,gCAAoB;AACvD;AACA,wBAAwB,yBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;;;;;;;;;;AC/Ca;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,4BAA4B,mBAAO,CAAC,0CAA8B;AAClE,yBAAyB,mBAAO,CAAC,8BAAkB;AACnD,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;;;;;;;;;;;AClHa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,yBAAyB,mBAAO,CAAC,8BAAkB;AACnD,2BAA2B,mBAAO,CAAC,gCAAoB;AACvD;AACA;AACA;AACA;AACA;AACA,qEAAqE,0BAA0B;AAC/F,IAAI,2BAA2B;AAC/B;AACA,QAAQ,4CAA4C,KAAK;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,4BAA4B;AAC5D;AACA;AACA,gCAAgC,4BAA4B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;;;;;;;;;;AClGa;AACb;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,kCAAkC,mBAAO,CAAC,qBAAS;AACnD,yBAAyB,mBAAO,CAAC,8BAAkB;AACnD,2BAA2B,mBAAO,CAAC,gCAAoB;AACvD;AACA,MAAM,wBAAwB;AAC9B;AACA;AACA;AACA;AACA,eAAe,KAAK,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;;;;;;;;;;ACjCa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,4BAA4B,mBAAO,CAAC,0CAA8B;AAClE,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kCAAkC,gBAAgB;AACpF;AACA;AACA,+DAA+D,sBAAsB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;;;;;;;;;;AChHa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD,mBAAmB,mBAAO,CAAC,wBAAY;AACvC,qBAAqB,mBAAO,CAAC,0BAAc;AAC3C;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA,0BAA0B,+BAA+B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,kBAAkB,0BAA0B;AAC5D;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,kBAAkB,0BAA0B;AAC5D;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,kBAAkB,0BAA0B;AAC5D;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,kBAAkB,0BAA0B;AAC5D;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;;;;;;;;;;AC3Va;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B;AAC9B,iBAAiB,mBAAO,CAAC,mBAAQ;AACjC,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;;;;;;;;;;ACpDa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,2BAA2B,mBAAO,CAAC,gCAAoB;AACvD;AACA,gCAAgC,wBAAwB;AACxD;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA,eAAe;AACf,iBAAiB;AACjB;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iCAAiC;AACvE,iCAAiC,qCAAqC;AACtE;AACA;AACA,kDAAkD;AAClD;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;;;;;;;;;;ACxDa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB;AACA;AACA;AACA,QAAQ,gBAAgB;AACxB;AACA;AACA;AACA;AACA,eAAe;AACf,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,wBAAwB;AAC/B,sBAAsB,wBAAwB;AAC9C;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA,wFAAwF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;;;;;;;;;;AC1Ha;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB;AACA,kEAAkE,4BAA4B;AAC9F;AACA;AACA,QAAQ,6BAA6B;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qCAAqC,KAAK,+BAA+B;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;;;;;;;;;;ACtCa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,yBAAyB,mBAAO,CAAC,8BAAkB;AACnD,4BAA4B,mBAAO,CAAC,iCAAqB;AACzD,mCAAmC,mBAAO,CAAC,wCAA4B;AACvE,wCAAwC,mBAAO,CAAC,6CAAiC;AACjF;AACA,MAAM,yBAAyB,oCAAoC,oBAAoB;AACvF,mCAAmC,qCAAqC,KAAK,+BAA+B;AAC5G;AACA;AACA;AACA,gBAAgB,mDAAmD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;;;;;;;;;;;AC7Fa;AACb;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B,GAAG,mCAAmC,GAAG,oCAAoC,GAAG,+BAA+B,GAAG,gCAAgC,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,6BAA6B,GAAG,oBAAoB,GAAG,wBAAwB,GAAG,yBAAyB,GAAG,qBAAqB,GAAG,uBAAuB,GAAG,2BAA2B,GAAG,yBAAyB,GAAG,gCAAgC,GAAG,sBAAsB,GAAG,6BAA6B,GAAG,qCAAqC,GAAG,oBAAoB,GAAG,yBAAyB,GAAG,8BAA8B,GAAG,wBAAwB;AACxrB;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA,yBAAyB,mBAAO,CAAC,gCAAoB;AACrD,oDAAmD,EAAE,qCAAqC,+CAA+C,EAAC;AAC1I,+BAA+B,mBAAO,CAAC,sCAA0B;AACjE,0DAAyD,EAAE,qCAAqC,2DAA2D,EAAC;AAC5J,uBAAuB,mBAAO,CAAC,8BAAkB;AACjD,qDAAoD,EAAE,qCAAqC,8CAA8C,EAAC;AAC1I,qBAAqB,mBAAO,CAAC,4BAAgB;AAC7C,gDAA+C,EAAE,qCAAqC,uCAAuC,EAAC;AAC9H,sCAAsC,mBAAO,CAAC,6CAAiC;AAC/E,iEAAgE,EAAE,qCAAqC,yEAAyE,EAAC;AACjL,uBAAuB,mBAAO,CAAC,8BAAkB;AACjD,yDAAwD,EAAE,qCAAqC,kDAAkD,EAAC;AAClJ,kDAAiD,EAAE,qCAAqC,2CAA2C,EAAC;AACpI,iCAAiC,mBAAO,CAAC,wCAA4B;AACrE,4DAA2D,EAAE,qCAAqC,+DAA+D,EAAC;AAClK,0BAA0B,mBAAO,CAAC,iCAAqB;AACvD,qDAAoD,EAAE,qCAAqC,iDAAiD,EAAC;AAC7I,2BAA2B,mBAAO,CAAC,kCAAsB;AACzD,uDAAsD,EAAE,qCAAqC,oDAAoD,EAAC;AAClJ,wBAAwB,mBAAO,CAAC,+BAAmB;AACnD,mDAAkD,EAAE,qCAAqC,6CAA6C,EAAC;AACvI,sBAAsB,mBAAO,CAAC,6BAAiB;AAC/C,iDAAgD,EAAE,qCAAqC,yCAAyC,EAAC;AACjI,0BAA0B,mBAAO,CAAC,iCAAqB;AACvD,qDAAoD,EAAE,qCAAqC,iDAAiD,EAAC;AAC7I,yBAAyB,mBAAO,CAAC,gCAAoB;AACrD,oDAAmD,EAAE,qCAAqC,+CAA+C,EAAC;AAC1I,qBAAqB,mBAAO,CAAC,4BAAgB;AAC7C,gDAA+C,EAAE,qCAAqC,uCAAuC,EAAC;AAC9H,8BAA8B,mBAAO,CAAC,qCAAyB;AAC/D,yDAAwD,EAAE,qCAAqC,yDAAyD,EAAC;AACzJ,mBAAmB,mBAAO,CAAC,0BAAc;AACzC,8CAA6C,EAAE,qCAAqC,mCAAmC,EAAC;AACxH,iBAAiB,mBAAO,CAAC,wBAAY;AACrC,4CAA2C,EAAE,qCAAqC,+BAA+B,EAAC;AAClH,iBAAiB,mBAAO,CAAC,wBAAY;AACrC,4CAA2C,EAAE,qCAAqC,+BAA+B,EAAC;AAClH,0BAA0B,mBAAO,CAAC,iCAAqB;AACvD,4DAA2D,EAAE,qCAAqC,wDAAwD,EAAC;AAC3J,gCAAgC,mBAAO,CAAC,uCAA2B;AACnE,2DAA0D,EAAE,qCAAqC,6DAA6D,EAAC;AAC/J,qCAAqC,mBAAO,CAAC,4CAAgC;AAC7E,gEAA+D,EAAE,qCAAqC,uEAAuE,EAAC;AAC9K,oCAAoC,mBAAO,CAAC,2CAA+B;AAC3E,+DAA8D,EAAE,qCAAqC,qEAAqE,EAAC;AAC3K,+BAA+B,mBAAO,CAAC,sCAA0B;AACjE,0DAAyD,EAAE,qCAAqC,2DAA2D,EAAC;AAC5J;;;;;;;;;;;AC7DA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACyB;AACA;AACI;AAC0C;AACC;AACxE,wBAAwB,mDAAO;AAC/B;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E,2BAA2B,wDAAY;AACvC;AACA,UAAU,4EAAkB,yCAAyC,UAAU;AAC/E,+BAA+B,iBAAiB,GAAG,SAAS;AAC5D,4DAA4D,YAAY;AACxE,cAAc,oFAA0B,gBAAgB,yBAAyB;AACjF,KAAK,IAAI,8BAA8B;AACvC;AACA;AACA,UAAU,4EAAkB;AAC5B;AACA,+BAA+B,iBAAiB,GAAG,kBAAkB;AACrE,kCAAkC,iBAAiB,GAAG,oBAAoB;AAC1E;AACA,cAAc,sFAA4B,CAAC,wDAAY;AACvD;AACA;AACA,yEAAyE,YAAY;AACrF,kBAAkB,oGAA0C,GAAG,6BAA6B;AAC5F;AACA;AACA;AACA;AACA;AACA,uEAAuE,YAAY;AACnF;AACA,sBAAsB,wFAA8B,GAAG,6BAA6B;AACpF;AACA;AACA,sBAAsB,gGAAsC,GAAG,6BAA6B;AAC5F;AACA;AACA,KAAK,IAAI,8BAA8B;AACvC;AACA;AACA,UAAU,4EAAkB;AAC5B,4BAA4B,iBAAiB,GAAG,iBAAiB;AACjE,mCAAmC,qFAA2B;AAC9D,aAAa,sEAAY;AACzB,kBAAkB,oFAA0B;AAC5C;AACA;AACA,iEAAiE,SAAS;AAC1E;AACA,sBAAsB,wFAA8B,GAAG,qDAAqD;AAC5G;AACA;AACA,sBAAsB,kFAAwB,GAAG,qDAAqD;AACtG;AACA;AACA,KAAK,IAAI,8BAA8B;AACvC;AACA;AACA;AACA,iDAAiD,oBAAoB,GAAG,0BAA0B;AAClG,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C,SAAS,yDAAa;AACtB;AACA;AACA,kCAAkC,2DAAe;AACjD;AACA;AACA;AACA,qEAAqE,mBAAmB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,mBAAmB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yDAAQ,KAAK,wEAAuB;AACzD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD,wC","sources":["webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-draft-04@1.0.0_ajv@8.13.0/node_modules/ajv-draft-04/dist/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-draft-04@1.0.0_ajv@8.13.0/node_modules/ajv-draft-04/dist/vocabulary/core.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-draft-04@1.0.0_ajv@8.13.0/node_modules/ajv-draft-04/dist/vocabulary/draft4.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-draft-04@1.0.0_ajv@8.13.0/node_modules/ajv-draft-04/dist/vocabulary/validation/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-draft-04@1.0.0_ajv@8.13.0/node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-draft-04@1.0.0_ajv@8.13.0/node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.13.0/node_modules/ajv-formats/dist/formats.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.13.0/node_modules/ajv-formats/dist/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.13.0/node_modules/ajv-formats/dist/limit.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/ajv.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/codegen/code.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/codegen/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/codegen/scope.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/errors.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/names.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/ref_error.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/resolve.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/rules.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/util.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/validate/applicability.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/validate/boolSchema.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/validate/dataType.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/validate/defaults.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/validate/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/validate/keyword.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/compile/validate/subschema.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/core.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/runtime/equal.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/runtime/ucs2length.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/runtime/uri.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/runtime/validation_error.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/contains.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/if.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/items.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/not.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/properties.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/code.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/core/id.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/core/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/core/ref.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/discriminator/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/discriminator/types.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/draft7.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/format/format.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/format/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/metadata.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/const.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/enum.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/pattern.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/required.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/ajv@8.13.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy-sync/copy-sync.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy-sync/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy/copy.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/empty/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/file.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/link.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink-paths.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink-type.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/fs/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/jsonfile.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/output-json-sync.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/output-json.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/win32.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/move-sync/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/move/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/output/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/path-exists/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/remove/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/remove/rimraf.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/util/buffer.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/util/utimes.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/import-lazy@4.0.0/node_modules/import-lazy/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jju@1.4.0/node_modules/jju/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/analyze.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/document.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/parse.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/stringify.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/unicode.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/utils.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/jsonfile@4.0.0/node_modules/jsonfile/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/path-parse@1.0.7/node_modules/path-parse/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/async.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/caller.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/core.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/homedir.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/is-core.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/node-modules-paths.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/normalize-options.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/sync.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/universalify@0.1.2/node_modules/universalify/index.js","webpack://@rushstack/package-extractor/../../common/temp/default/node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js","webpack://@rushstack/package-extractor/../node-core-library/lib/AlreadyReportedError.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Async.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Constants.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Enum.js","webpack://@rushstack/package-extractor/../node-core-library/lib/EnvironmentMap.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Executable.js","webpack://@rushstack/package-extractor/../node-core-library/lib/FileError.js","webpack://@rushstack/package-extractor/../node-core-library/lib/FileSystem.js","webpack://@rushstack/package-extractor/../node-core-library/lib/FileWriter.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Import.js","webpack://@rushstack/package-extractor/../node-core-library/lib/InternalError.js","webpack://@rushstack/package-extractor/../node-core-library/lib/JsonFile.js","webpack://@rushstack/package-extractor/../node-core-library/lib/JsonSchema.js","webpack://@rushstack/package-extractor/../node-core-library/lib/LegacyAdapters.js","webpack://@rushstack/package-extractor/../node-core-library/lib/LockFile.js","webpack://@rushstack/package-extractor/../node-core-library/lib/MapExtensions.js","webpack://@rushstack/package-extractor/../node-core-library/lib/MinimumHeap.js","webpack://@rushstack/package-extractor/../node-core-library/lib/PackageJsonLookup.js","webpack://@rushstack/package-extractor/../node-core-library/lib/PackageName.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Path.js","webpack://@rushstack/package-extractor/../node-core-library/lib/PosixModeBits.js","webpack://@rushstack/package-extractor/../node-core-library/lib/ProtectableMap.js","webpack://@rushstack/package-extractor/../node-core-library/lib/ProtectableMapView.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Sort.js","webpack://@rushstack/package-extractor/../node-core-library/lib/StringBuilder.js","webpack://@rushstack/package-extractor/../node-core-library/lib/SubprocessTerminator.js","webpack://@rushstack/package-extractor/../node-core-library/lib/Text.js","webpack://@rushstack/package-extractor/../node-core-library/lib/TypeUuid.js","webpack://@rushstack/package-extractor/../node-core-library/lib/index.js","webpack://@rushstack/package-extractor/../terminal/lib/AnsiEscape.js","webpack://@rushstack/package-extractor/../terminal/lib/CallbackWritable.js","webpack://@rushstack/package-extractor/../terminal/lib/Colorize.js","webpack://@rushstack/package-extractor/../terminal/lib/ConsoleTerminalProvider.js","webpack://@rushstack/package-extractor/../terminal/lib/DiscardStdoutTransform.js","webpack://@rushstack/package-extractor/../terminal/lib/ITerminalChunk.js","webpack://@rushstack/package-extractor/../terminal/lib/ITerminalProvider.js","webpack://@rushstack/package-extractor/../terminal/lib/MockWritable.js","webpack://@rushstack/package-extractor/../terminal/lib/NormalizeNewlinesTextRewriter.js","webpack://@rushstack/package-extractor/../terminal/lib/PrefixProxyTerminalProvider.js","webpack://@rushstack/package-extractor/../terminal/lib/PrintUtilities.js","webpack://@rushstack/package-extractor/../terminal/lib/RemoveColorsTextRewriter.js","webpack://@rushstack/package-extractor/../terminal/lib/SplitterTransform.js","webpack://@rushstack/package-extractor/../terminal/lib/StdioLineTransform.js","webpack://@rushstack/package-extractor/../terminal/lib/StdioSummarizer.js","webpack://@rushstack/package-extractor/../terminal/lib/StdioWritable.js","webpack://@rushstack/package-extractor/../terminal/lib/StringBufferTerminalProvider.js","webpack://@rushstack/package-extractor/../terminal/lib/Terminal.js","webpack://@rushstack/package-extractor/../terminal/lib/TerminalStreamWritable.js","webpack://@rushstack/package-extractor/../terminal/lib/TerminalTransform.js","webpack://@rushstack/package-extractor/../terminal/lib/TerminalWritable.js","webpack://@rushstack/package-extractor/../terminal/lib/TextRewriter.js","webpack://@rushstack/package-extractor/../terminal/lib/TextRewriterTransform.js","webpack://@rushstack/package-extractor/../terminal/lib/index.js","webpack://@rushstack/package-extractor/external node-commonjs \"assert\"","webpack://@rushstack/package-extractor/external node-commonjs \"child_process\"","webpack://@rushstack/package-extractor/external node-commonjs \"constants\"","webpack://@rushstack/package-extractor/external node-commonjs \"fs\"","webpack://@rushstack/package-extractor/external node-commonjs \"module\"","webpack://@rushstack/package-extractor/external node-commonjs \"node:fs\"","webpack://@rushstack/package-extractor/external node-commonjs \"node:os\"","webpack://@rushstack/package-extractor/external node-commonjs \"node:path\"","webpack://@rushstack/package-extractor/external node-commonjs \"os\"","webpack://@rushstack/package-extractor/external node-commonjs \"path\"","webpack://@rushstack/package-extractor/external node-commonjs \"process\"","webpack://@rushstack/package-extractor/external node-commonjs \"stream\"","webpack://@rushstack/package-extractor/external node-commonjs \"tty\"","webpack://@rushstack/package-extractor/external node-commonjs \"util\"","webpack://@rushstack/package-extractor/webpack/bootstrap","webpack://@rushstack/package-extractor/webpack/runtime/compat get default export","webpack://@rushstack/package-extractor/webpack/runtime/define property getters","webpack://@rushstack/package-extractor/webpack/runtime/hasOwnProperty shorthand","webpack://@rushstack/package-extractor/webpack/runtime/make namespace object","webpack://@rushstack/package-extractor/./lib-esnext/scripts/create-links.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\nconst core_1 = require(\"ajv/dist/core\");\nconst draft4_1 = require(\"./vocabulary/draft4\");\nconst discriminator_1 = require(\"ajv/dist/vocabularies/discriminator\");\nconst draft4MetaSchema = require(\"./refs/json-schema-draft-04.json\");\nconst META_SUPPORT_DATA = [\"/properties\"];\nconst META_SCHEMA_ID = \"http://json-schema.org/draft-04/schema\";\nclass Ajv extends core_1.default {\n constructor(opts = {}) {\n super({\n ...opts,\n schemaId: \"id\",\n });\n }\n _addVocabularies() {\n super._addVocabularies();\n draft4_1.default.forEach((v) => this.addVocabulary(v));\n if (this.opts.discriminator)\n this.addKeyword(discriminator_1.default);\n }\n _addDefaultMetaSchema() {\n super._addDefaultMetaSchema();\n if (!this.opts.meta)\n return;\n const metaSchema = this.opts.$data\n ? this.$dataMetaSchema(draft4MetaSchema, META_SUPPORT_DATA)\n : draft4MetaSchema;\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n }\n defaultMeta() {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));\n }\n}\nmodule.exports = exports = Ajv;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = Ajv;\nvar core_2 = require(\"ajv/dist/core\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return core_2.KeywordCxt; } });\nvar core_3 = require(\"ajv/dist/core\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return core_3._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return core_3.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return core_3.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return core_3.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return core_3.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return core_3.CodeGen; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst ref_1 = require(\"ajv/dist/vocabularies/core/ref\");\nconst core = [\n \"$schema\",\n \"id\",\n \"$defs\",\n { keyword: \"$comment\" },\n \"definitions\",\n ref_1.default,\n];\nexports.default = core;\n//# sourceMappingURL=core.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"./core\");\nconst validation_1 = require(\"./validation\");\nconst applicator_1 = require(\"ajv/dist/vocabularies/applicator\");\nconst format_1 = require(\"ajv/dist/vocabularies/format\");\nconst metadataVocabulary = [\"title\", \"description\", \"default\"];\nconst draft4Vocabularies = [\n core_1.default,\n validation_1.default,\n applicator_1.default(),\n format_1.default,\n metadataVocabulary,\n];\nexports.default = draft4Vocabularies;\n//# sourceMappingURL=draft4.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst limitNumber_1 = require(\"./limitNumber\");\nconst limitNumberExclusive_1 = require(\"./limitNumberExclusive\");\nconst multipleOf_1 = require(\"ajv/dist/vocabularies/validation/multipleOf\");\nconst limitLength_1 = require(\"ajv/dist/vocabularies/validation/limitLength\");\nconst pattern_1 = require(\"ajv/dist/vocabularies/validation/pattern\");\nconst limitProperties_1 = require(\"ajv/dist/vocabularies/validation/limitProperties\");\nconst required_1 = require(\"ajv/dist/vocabularies/validation/required\");\nconst limitItems_1 = require(\"ajv/dist/vocabularies/validation/limitItems\");\nconst uniqueItems_1 = require(\"ajv/dist/vocabularies/validation/uniqueItems\");\nconst const_1 = require(\"ajv/dist/vocabularies/validation/const\");\nconst enum_1 = require(\"ajv/dist/vocabularies/validation/enum\");\nconst validation = [\n // number\n limitNumber_1.default,\n limitNumberExclusive_1.default,\n multipleOf_1.default,\n // string\n limitLength_1.default,\n pattern_1.default,\n // object\n limitProperties_1.default,\n required_1.default,\n // array\n limitItems_1.default,\n uniqueItems_1.default,\n // any\n { keyword: \"type\", schemaType: [\"string\", \"array\"] },\n { keyword: \"nullable\", schemaType: \"boolean\" },\n const_1.default,\n enum_1.default,\n];\nexports.default = validation;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"ajv/dist/core\");\nconst codegen_1 = require(\"ajv/dist/compile/codegen\");\nconst ops = codegen_1.operators;\nconst KWDs = {\n maximum: {\n exclusive: \"exclusiveMaximum\",\n ops: [\n { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n ],\n },\n minimum: {\n exclusive: \"exclusiveMinimum\",\n ops: [\n { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n { okStr: \">\", ok: ops.GT, fail: ops.LTE },\n ],\n },\n};\nconst error = {\n message: (cxt) => core_1.str `must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`,\n params: (cxt) => core_1._ `{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}`,\n};\nconst def = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { data, schemaCode } = cxt;\n cxt.fail$data(core_1._ `${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`);\n },\n};\nfunction kwdOp(cxt) {\n var _a;\n const keyword = cxt.keyword;\n const opsIdx = ((_a = cxt.parentSchema) === null || _a === void 0 ? void 0 : _a[KWDs[keyword].exclusive]) ? 1 : 0;\n return KWDs[keyword].ops[opsIdx];\n}\nexports.default = def;\n//# sourceMappingURL=limitNumber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst KWDs = {\n exclusiveMaximum: \"maximum\",\n exclusiveMinimum: \"minimum\",\n};\nconst def = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"boolean\",\n code({ keyword, parentSchema }) {\n const limitKwd = KWDs[keyword];\n if (parentSchema[limitKwd] === undefined) {\n throw new Error(`${keyword} can only be used with ${limitKwd}`);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitNumberExclusive.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatNames = exports.fastFormats = exports.fullFormats = void 0;\nfunction fmtDef(validate, compare) {\n return { validate, compare };\n}\nexports.fullFormats = {\n // date: http://tools.ietf.org/html/rfc3339#section-5.6\n date: fmtDef(date, compareDate),\n // date-time: http://tools.ietf.org/html/rfc3339#section-5.6\n time: fmtDef(getTime(true), compareTime),\n \"date-time\": fmtDef(getDateTime(true), compareDateTime),\n \"iso-time\": fmtDef(getTime(), compareIsoTime),\n \"iso-date-time\": fmtDef(getDateTime(), compareIsoDateTime),\n // duration: https://tools.ietf.org/html/rfc3339#appendix-A\n duration: /^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/,\n uri,\n \"uri-reference\": /^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,\n // uri-template: https://tools.ietf.org/html/rfc6570\n \"uri-template\": /^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,\n // For the source: https://gist.github.com/dperini/729294\n // For test cases: https://mathiasbynens.be/demo/url-regex\n url: /^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,\n email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,\n hostname: /^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,\n // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/,\n ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,\n regex,\n // uuid: http://tools.ietf.org/html/rfc4122\n uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,\n // JSON-pointer: https://tools.ietf.org/html/rfc6901\n // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A\n \"json-pointer\": /^(?:\\/(?:[^~/]|~0|~1)*)*$/,\n \"json-pointer-uri-fragment\": /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,\n // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00\n \"relative-json-pointer\": /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,\n // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types\n // byte: https://github.com/miguelmota/is-base64\n byte,\n // signed 32 bit integer\n int32: { type: \"number\", validate: validateInt32 },\n // signed 64 bit integer\n int64: { type: \"number\", validate: validateInt64 },\n // C-type float\n float: { type: \"number\", validate: validateNumber },\n // C-type double\n double: { type: \"number\", validate: validateNumber },\n // hint to the UI to hide input strings\n password: true,\n // unchecked string payload\n binary: true,\n};\nexports.fastFormats = {\n ...exports.fullFormats,\n date: fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/, compareDate),\n time: fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareTime),\n \"date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareDateTime),\n \"iso-time\": fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoTime),\n \"iso-date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoDateTime),\n // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js\n uri: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n \"uri-reference\": /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n // email (sources from jsen validator):\n // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363\n // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')\n email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,\n};\nexports.formatNames = Object.keys(exports.fullFormats);\nfunction isLeapYear(year) {\n // https://tools.ietf.org/html/rfc3339#appendix-C\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\nconst DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction date(str) {\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n const matches = DATE.exec(str);\n if (!matches)\n return false;\n const year = +matches[1];\n const month = +matches[2];\n const day = +matches[3];\n return (month >= 1 &&\n month <= 12 &&\n day >= 1 &&\n day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]));\n}\nfunction compareDate(d1, d2) {\n if (!(d1 && d2))\n return undefined;\n if (d1 > d2)\n return 1;\n if (d1 < d2)\n return -1;\n return 0;\n}\nconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i;\nfunction getTime(strictTimeZone) {\n return function time(str) {\n const matches = TIME.exec(str);\n if (!matches)\n return false;\n const hr = +matches[1];\n const min = +matches[2];\n const sec = +matches[3];\n const tz = matches[4];\n const tzSign = matches[5] === \"-\" ? -1 : 1;\n const tzH = +(matches[6] || 0);\n const tzM = +(matches[7] || 0);\n if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz))\n return false;\n if (hr <= 23 && min <= 59 && sec < 60)\n return true;\n // leap second\n const utcMin = min - tzM * tzSign;\n const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);\n return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;\n };\n}\nfunction compareTime(s1, s2) {\n if (!(s1 && s2))\n return undefined;\n const t1 = new Date(\"2020-01-01T\" + s1).valueOf();\n const t2 = new Date(\"2020-01-01T\" + s2).valueOf();\n if (!(t1 && t2))\n return undefined;\n return t1 - t2;\n}\nfunction compareIsoTime(t1, t2) {\n if (!(t1 && t2))\n return undefined;\n const a1 = TIME.exec(t1);\n const a2 = TIME.exec(t2);\n if (!(a1 && a2))\n return undefined;\n t1 = a1[1] + a1[2] + a1[3];\n t2 = a2[1] + a2[2] + a2[3];\n if (t1 > t2)\n return 1;\n if (t1 < t2)\n return -1;\n return 0;\n}\nconst DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction getDateTime(strictTimeZone) {\n const time = getTime(strictTimeZone);\n return function date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n const dateTime = str.split(DATE_TIME_SEPARATOR);\n return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);\n };\n}\nfunction compareDateTime(dt1, dt2) {\n if (!(dt1 && dt2))\n return undefined;\n const d1 = new Date(dt1).valueOf();\n const d2 = new Date(dt2).valueOf();\n if (!(d1 && d2))\n return undefined;\n return d1 - d2;\n}\nfunction compareIsoDateTime(dt1, dt2) {\n if (!(dt1 && dt2))\n return undefined;\n const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);\n const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);\n const res = compareDate(d1, d2);\n if (res === undefined)\n return undefined;\n return res || compareTime(t1, t2);\n}\nconst NOT_URI_FRAGMENT = /\\/|:/;\nconst URI = /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\nconst BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;\nfunction byte(str) {\n BYTE.lastIndex = 0;\n return BYTE.test(str);\n}\nconst MIN_INT32 = -(2 ** 31);\nconst MAX_INT32 = 2 ** 31 - 1;\nfunction validateInt32(value) {\n return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;\n}\nfunction validateInt64(value) {\n // JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64\n return Number.isInteger(value);\n}\nfunction validateNumber() {\n return true;\n}\nconst Z_ANCHOR = /[^\\\\]\\\\Z/;\nfunction regex(str) {\n if (Z_ANCHOR.test(str))\n return false;\n try {\n new RegExp(str);\n return true;\n }\n catch (e) {\n return false;\n }\n}\n//# sourceMappingURL=formats.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst formats_1 = require(\"./formats\");\nconst limit_1 = require(\"./limit\");\nconst codegen_1 = require(\"ajv/dist/compile/codegen\");\nconst fullName = new codegen_1.Name(\"fullFormats\");\nconst fastName = new codegen_1.Name(\"fastFormats\");\nconst formatsPlugin = (ajv, opts = { keywords: true }) => {\n if (Array.isArray(opts)) {\n addFormats(ajv, opts, formats_1.fullFormats, fullName);\n return ajv;\n }\n const [formats, exportName] = opts.mode === \"fast\" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];\n const list = opts.formats || formats_1.formatNames;\n addFormats(ajv, list, formats, exportName);\n if (opts.keywords)\n (0, limit_1.default)(ajv);\n return ajv;\n};\nformatsPlugin.get = (name, mode = \"full\") => {\n const formats = mode === \"fast\" ? formats_1.fastFormats : formats_1.fullFormats;\n const f = formats[name];\n if (!f)\n throw new Error(`Unknown format \"${name}\"`);\n return f;\n};\nfunction addFormats(ajv, list, fs, exportName) {\n var _a;\n var _b;\n (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : (_b.formats = (0, codegen_1._) `require(\"ajv-formats/dist/formats\").${exportName}`);\n for (const f of list)\n ajv.addFormat(f, fs[f]);\n}\nmodule.exports = exports = formatsPlugin;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = formatsPlugin;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatLimitDefinition = void 0;\nconst ajv_1 = require(\"ajv\");\nconst codegen_1 = require(\"ajv/dist/compile/codegen\");\nconst ops = codegen_1.operators;\nconst KWDs = {\n formatMaximum: { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n formatMinimum: { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n formatExclusiveMaximum: { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n formatExclusiveMinimum: { okStr: \">\", ok: ops.GT, fail: ops.LTE },\n};\nconst error = {\n message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`,\n params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,\n};\nexports.formatLimitDefinition = {\n keyword: Object.keys(KWDs),\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, schemaCode, keyword, it } = cxt;\n const { opts, self } = it;\n if (!opts.validateFormats)\n return;\n const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, \"format\");\n if (fCxt.$data)\n validate$DataFormat();\n else\n validateFormat();\n function validate$DataFormat() {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n });\n const fmt = gen.const(\"fmt\", (0, codegen_1._) `${fmts}[${fCxt.schemaCode}]`);\n cxt.fail$data((0, codegen_1.or)((0, codegen_1._) `typeof ${fmt} != \"object\"`, (0, codegen_1._) `${fmt} instanceof RegExp`, (0, codegen_1._) `typeof ${fmt}.compare != \"function\"`, compareCode(fmt)));\n }\n function validateFormat() {\n const format = fCxt.schema;\n const fmtDef = self.formats[format];\n if (!fmtDef || fmtDef === true)\n return;\n if (typeof fmtDef != \"object\" ||\n fmtDef instanceof RegExp ||\n typeof fmtDef.compare != \"function\") {\n throw new Error(`\"${keyword}\": format \"${format}\" does not define \"compare\" function`);\n }\n const fmt = gen.scopeValue(\"formats\", {\n key: format,\n ref: fmtDef,\n code: opts.code.formats ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : undefined,\n });\n cxt.fail$data(compareCode(fmt));\n }\n function compareCode(fmt) {\n return (0, codegen_1._) `${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;\n }\n },\n dependencies: [\"format\"],\n};\nconst formatLimitPlugin = (ajv) => {\n ajv.addKeyword(exports.formatLimitDefinition);\n return ajv;\n};\nexports.default = formatLimitPlugin;\n//# sourceMappingURL=limit.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;\nconst core_1 = require(\"./core\");\nconst draft7_1 = require(\"./vocabularies/draft7\");\nconst discriminator_1 = require(\"./vocabularies/discriminator\");\nconst draft7MetaSchema = require(\"./refs/json-schema-draft-07.json\");\nconst META_SUPPORT_DATA = [\"/properties\"];\nconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\nclass Ajv extends core_1.default {\n _addVocabularies() {\n super._addVocabularies();\n draft7_1.default.forEach((v) => this.addVocabulary(v));\n if (this.opts.discriminator)\n this.addKeyword(discriminator_1.default);\n }\n _addDefaultMetaSchema() {\n super._addDefaultMetaSchema();\n if (!this.opts.meta)\n return;\n const metaSchema = this.opts.$data\n ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)\n : draft7MetaSchema;\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n }\n defaultMeta() {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));\n }\n}\nexports.Ajv = Ajv;\nmodule.exports = exports = Ajv;\nmodule.exports.Ajv = Ajv;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = Ajv;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nvar validation_error_1 = require(\"./runtime/validation_error\");\nObject.defineProperty(exports, \"ValidationError\", { enumerable: true, get: function () { return validation_error_1.default; } });\nvar ref_error_1 = require(\"./compile/ref_error\");\nObject.defineProperty(exports, \"MissingRefError\", { enumerable: true, get: function () { return ref_error_1.default; } });\n//# sourceMappingURL=ajv.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\nclass _CodeOrName {\n}\nexports._CodeOrName = _CodeOrName;\nexports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\nclass Name extends _CodeOrName {\n constructor(s) {\n super();\n if (!exports.IDENTIFIER.test(s))\n throw new Error(\"CodeGen: name must be a valid identifier\");\n this.str = s;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n return false;\n }\n get names() {\n return { [this.str]: 1 };\n }\n}\nexports.Name = Name;\nclass _Code extends _CodeOrName {\n constructor(code) {\n super();\n this._items = typeof code === \"string\" ? [code] : code;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n if (this._items.length > 1)\n return false;\n const item = this._items[0];\n return item === \"\" || item === '\"\"';\n }\n get str() {\n var _a;\n return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, \"\")));\n }\n get names() {\n var _a;\n return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {\n if (c instanceof Name)\n names[c.str] = (names[c.str] || 0) + 1;\n return names;\n }, {})));\n }\n}\nexports._Code = _Code;\nexports.nil = new _Code(\"\");\nfunction _(strs, ...args) {\n const code = [strs[0]];\n let i = 0;\n while (i < args.length) {\n addCodeArg(code, args[i]);\n code.push(strs[++i]);\n }\n return new _Code(code);\n}\nexports._ = _;\nconst plus = new _Code(\"+\");\nfunction str(strs, ...args) {\n const expr = [safeStringify(strs[0])];\n let i = 0;\n while (i < args.length) {\n expr.push(plus);\n addCodeArg(expr, args[i]);\n expr.push(plus, safeStringify(strs[++i]));\n }\n optimize(expr);\n return new _Code(expr);\n}\nexports.str = str;\nfunction addCodeArg(code, arg) {\n if (arg instanceof _Code)\n code.push(...arg._items);\n else if (arg instanceof Name)\n code.push(arg);\n else\n code.push(interpolate(arg));\n}\nexports.addCodeArg = addCodeArg;\nfunction optimize(expr) {\n let i = 1;\n while (i < expr.length - 1) {\n if (expr[i] === plus) {\n const res = mergeExprItems(expr[i - 1], expr[i + 1]);\n if (res !== undefined) {\n expr.splice(i - 1, 3, res);\n continue;\n }\n expr[i++] = \"+\";\n }\n i++;\n }\n}\nfunction mergeExprItems(a, b) {\n if (b === '\"\"')\n return a;\n if (a === '\"\"')\n return b;\n if (typeof a == \"string\") {\n if (b instanceof Name || a[a.length - 1] !== '\"')\n return;\n if (typeof b != \"string\")\n return `${a.slice(0, -1)}${b}\"`;\n if (b[0] === '\"')\n return a.slice(0, -1) + b.slice(1);\n return;\n }\n if (typeof b == \"string\" && b[0] === '\"' && !(a instanceof Name))\n return `\"${a}${b.slice(1)}`;\n return;\n}\nfunction strConcat(c1, c2) {\n return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;\n}\nexports.strConcat = strConcat;\n// TODO do not allow arrays here\nfunction interpolate(x) {\n return typeof x == \"number\" || typeof x == \"boolean\" || x === null\n ? x\n : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n}\nfunction stringify(x) {\n return new _Code(safeStringify(x));\n}\nexports.stringify = stringify;\nfunction safeStringify(x) {\n return JSON.stringify(x)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\nexports.safeStringify = safeStringify;\nfunction getProperty(key) {\n return typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;\n}\nexports.getProperty = getProperty;\n//Does best effort to format the name properly\nfunction getEsmExportName(key) {\n if (typeof key == \"string\" && exports.IDENTIFIER.test(key)) {\n return new _Code(`${key}`);\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n}\nexports.getEsmExportName = getEsmExportName;\nfunction regexpCode(rx) {\n return new _Code(rx.toString());\n}\nexports.regexpCode = regexpCode;\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;\nconst code_1 = require(\"./code\");\nconst scope_1 = require(\"./scope\");\nvar code_2 = require(\"./code\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return code_2._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return code_2.str; } });\nObject.defineProperty(exports, \"strConcat\", { enumerable: true, get: function () { return code_2.strConcat; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return code_2.nil; } });\nObject.defineProperty(exports, \"getProperty\", { enumerable: true, get: function () { return code_2.getProperty; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return code_2.stringify; } });\nObject.defineProperty(exports, \"regexpCode\", { enumerable: true, get: function () { return code_2.regexpCode; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return code_2.Name; } });\nvar scope_2 = require(\"./scope\");\nObject.defineProperty(exports, \"Scope\", { enumerable: true, get: function () { return scope_2.Scope; } });\nObject.defineProperty(exports, \"ValueScope\", { enumerable: true, get: function () { return scope_2.ValueScope; } });\nObject.defineProperty(exports, \"ValueScopeName\", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });\nObject.defineProperty(exports, \"varKinds\", { enumerable: true, get: function () { return scope_2.varKinds; } });\nexports.operators = {\n GT: new code_1._Code(\">\"),\n GTE: new code_1._Code(\">=\"),\n LT: new code_1._Code(\"<\"),\n LTE: new code_1._Code(\"<=\"),\n EQ: new code_1._Code(\"===\"),\n NEQ: new code_1._Code(\"!==\"),\n NOT: new code_1._Code(\"!\"),\n OR: new code_1._Code(\"||\"),\n AND: new code_1._Code(\"&&\"),\n ADD: new code_1._Code(\"+\"),\n};\nclass Node {\n optimizeNodes() {\n return this;\n }\n optimizeNames(_names, _constants) {\n return this;\n }\n}\nclass Def extends Node {\n constructor(varKind, name, rhs) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.rhs = rhs;\n }\n render({ es5, _n }) {\n const varKind = es5 ? scope_1.varKinds.var : this.varKind;\n const rhs = this.rhs === undefined ? \"\" : ` = ${this.rhs}`;\n return `${varKind} ${this.name}${rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (!names[this.name.str])\n return;\n if (this.rhs)\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n }\n}\nclass Assign extends Node {\n constructor(lhs, rhs, sideEffects) {\n super();\n this.lhs = lhs;\n this.rhs = rhs;\n this.sideEffects = sideEffects;\n }\n render({ _n }) {\n return `${this.lhs} = ${this.rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)\n return;\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };\n return addExprNames(names, this.rhs);\n }\n}\nclass AssignOp extends Assign {\n constructor(lhs, op, rhs, sideEffects) {\n super(lhs, rhs, sideEffects);\n this.op = op;\n }\n render({ _n }) {\n return `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n }\n}\nclass Label extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n return `${this.label}:` + _n;\n }\n}\nclass Break extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n const label = this.label ? ` ${this.label}` : \"\";\n return `break${label};` + _n;\n }\n}\nclass Throw extends Node {\n constructor(error) {\n super();\n this.error = error;\n }\n render({ _n }) {\n return `throw ${this.error};` + _n;\n }\n get names() {\n return this.error.names;\n }\n}\nclass AnyCode extends Node {\n constructor(code) {\n super();\n this.code = code;\n }\n render({ _n }) {\n return `${this.code};` + _n;\n }\n optimizeNodes() {\n return `${this.code}` ? this : undefined;\n }\n optimizeNames(names, constants) {\n this.code = optimizeExpr(this.code, names, constants);\n return this;\n }\n get names() {\n return this.code instanceof code_1._CodeOrName ? this.code.names : {};\n }\n}\nclass ParentNode extends Node {\n constructor(nodes = []) {\n super();\n this.nodes = nodes;\n }\n render(opts) {\n return this.nodes.reduce((code, n) => code + n.render(opts), \"\");\n }\n optimizeNodes() {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n const n = nodes[i].optimizeNodes();\n if (Array.isArray(n))\n nodes.splice(i, 1, ...n);\n else if (n)\n nodes[i] = n;\n else\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n optimizeNames(names, constants) {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n // iterating backwards improves 1-pass optimization\n const n = nodes[i];\n if (n.optimizeNames(names, constants))\n continue;\n subtractNames(names, n.names);\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n get names() {\n return this.nodes.reduce((names, n) => addNames(names, n.names), {});\n }\n}\nclass BlockNode extends ParentNode {\n render(opts) {\n return \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n }\n}\nclass Root extends ParentNode {\n}\nclass Else extends BlockNode {\n}\nElse.kind = \"else\";\nclass If extends BlockNode {\n constructor(condition, nodes) {\n super(nodes);\n this.condition = condition;\n }\n render(opts) {\n let code = `if(${this.condition})` + super.render(opts);\n if (this.else)\n code += \"else \" + this.else.render(opts);\n return code;\n }\n optimizeNodes() {\n super.optimizeNodes();\n const cond = this.condition;\n if (cond === true)\n return this.nodes; // else is ignored here\n let e = this.else;\n if (e) {\n const ns = e.optimizeNodes();\n e = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n }\n if (e) {\n if (cond === false)\n return e instanceof If ? e : e.nodes;\n if (this.nodes.length)\n return this;\n return new If(not(cond), e instanceof If ? [e] : e.nodes);\n }\n if (cond === false || !this.nodes.length)\n return undefined;\n return this;\n }\n optimizeNames(names, constants) {\n var _a;\n this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n if (!(super.optimizeNames(names, constants) || this.else))\n return;\n this.condition = optimizeExpr(this.condition, names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n addExprNames(names, this.condition);\n if (this.else)\n addNames(names, this.else.names);\n return names;\n }\n}\nIf.kind = \"if\";\nclass For extends BlockNode {\n}\nFor.kind = \"for\";\nclass ForLoop extends For {\n constructor(iteration) {\n super();\n this.iteration = iteration;\n }\n render(opts) {\n return `for(${this.iteration})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iteration = optimizeExpr(this.iteration, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iteration.names);\n }\n}\nclass ForRange extends For {\n constructor(varKind, name, from, to) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.from = from;\n this.to = to;\n }\n render(opts) {\n const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n const { name, from, to } = this;\n return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);\n }\n get names() {\n const names = addExprNames(super.names, this.from);\n return addExprNames(names, this.to);\n }\n}\nclass ForIter extends For {\n constructor(loop, varKind, name, iterable) {\n super();\n this.loop = loop;\n this.varKind = varKind;\n this.name = name;\n this.iterable = iterable;\n }\n render(opts) {\n return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iterable = optimizeExpr(this.iterable, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iterable.names);\n }\n}\nclass Func extends BlockNode {\n constructor(name, args, async) {\n super();\n this.name = name;\n this.args = args;\n this.async = async;\n }\n render(opts) {\n const _async = this.async ? \"async \" : \"\";\n return `${_async}function ${this.name}(${this.args})` + super.render(opts);\n }\n}\nFunc.kind = \"func\";\nclass Return extends ParentNode {\n render(opts) {\n return \"return \" + super.render(opts);\n }\n}\nReturn.kind = \"return\";\nclass Try extends BlockNode {\n render(opts) {\n let code = \"try\" + super.render(opts);\n if (this.catch)\n code += this.catch.render(opts);\n if (this.finally)\n code += this.finally.render(opts);\n return code;\n }\n optimizeNodes() {\n var _a, _b;\n super.optimizeNodes();\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();\n return this;\n }\n optimizeNames(names, constants) {\n var _a, _b;\n super.optimizeNames(names, constants);\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n if (this.catch)\n addNames(names, this.catch.names);\n if (this.finally)\n addNames(names, this.finally.names);\n return names;\n }\n}\nclass Catch extends BlockNode {\n constructor(error) {\n super();\n this.error = error;\n }\n render(opts) {\n return `catch(${this.error})` + super.render(opts);\n }\n}\nCatch.kind = \"catch\";\nclass Finally extends BlockNode {\n render(opts) {\n return \"finally\" + super.render(opts);\n }\n}\nFinally.kind = \"finally\";\nclass CodeGen {\n constructor(extScope, opts = {}) {\n this._values = {};\n this._blockStarts = [];\n this._constants = {};\n this.opts = { ...opts, _n: opts.lines ? \"\\n\" : \"\" };\n this._extScope = extScope;\n this._scope = new scope_1.Scope({ parent: extScope });\n this._nodes = [new Root()];\n }\n toString() {\n return this._root.render(this.opts);\n }\n // returns unique name in the internal scope\n name(prefix) {\n return this._scope.name(prefix);\n }\n // reserves unique name in the external scope\n scopeName(prefix) {\n return this._extScope.name(prefix);\n }\n // reserves unique name in the external scope and assigns value to it\n scopeValue(prefixOrName, value) {\n const name = this._extScope.value(prefixOrName, value);\n const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());\n vs.add(name);\n return name;\n }\n getScopeValue(prefix, keyOrRef) {\n return this._extScope.getValue(prefix, keyOrRef);\n }\n // return code that assigns values in the external scope to the names that are used internally\n // (same names that were returned by gen.scopeName or gen.scopeValue)\n scopeRefs(scopeName) {\n return this._extScope.scopeRefs(scopeName, this._values);\n }\n scopeCode() {\n return this._extScope.scopeCode(this._values);\n }\n _def(varKind, nameOrPrefix, rhs, constant) {\n const name = this._scope.toName(nameOrPrefix);\n if (rhs !== undefined && constant)\n this._constants[name.str] = rhs;\n this._leafNode(new Def(varKind, name, rhs));\n return name;\n }\n // `const` declaration (`var` in es5 mode)\n const(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n }\n // `let` declaration with optional assignment (`var` in es5 mode)\n let(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n }\n // `var` declaration with optional assignment\n var(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n }\n // assignment code\n assign(lhs, rhs, sideEffects) {\n return this._leafNode(new Assign(lhs, rhs, sideEffects));\n }\n // `+=` code\n add(lhs, rhs) {\n return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));\n }\n // appends passed SafeExpr to code or executes Block\n code(c) {\n if (typeof c == \"function\")\n c();\n else if (c !== code_1.nil)\n this._leafNode(new AnyCode(c));\n return this;\n }\n // returns code for object literal for the passed argument list of key-value pairs\n object(...keyValues) {\n const code = [\"{\"];\n for (const [key, value] of keyValues) {\n if (code.length > 1)\n code.push(\",\");\n code.push(key);\n if (key !== value || this.opts.es5) {\n code.push(\":\");\n (0, code_1.addCodeArg)(code, value);\n }\n }\n code.push(\"}\");\n return new code_1._Code(code);\n }\n // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)\n if(condition, thenBody, elseBody) {\n this._blockNode(new If(condition));\n if (thenBody && elseBody) {\n this.code(thenBody).else().code(elseBody).endIf();\n }\n else if (thenBody) {\n this.code(thenBody).endIf();\n }\n else if (elseBody) {\n throw new Error('CodeGen: \"else\" body without \"then\" body');\n }\n return this;\n }\n // `else if` clause - invalid without `if` or after `else` clauses\n elseIf(condition) {\n return this._elseNode(new If(condition));\n }\n // `else` clause - only valid after `if` or `else if` clauses\n else() {\n return this._elseNode(new Else());\n }\n // end `if` statement (needed if gen.if was used only with condition)\n endIf() {\n return this._endBlockNode(If, Else);\n }\n _for(node, forBody) {\n this._blockNode(node);\n if (forBody)\n this.code(forBody).endFor();\n return this;\n }\n // a generic `for` clause (or statement if `forBody` is passed)\n for(iteration, forBody) {\n return this._for(new ForLoop(iteration), forBody);\n }\n // `for` statement for a range of values\n forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForRange(varKind, name, from, to), () => forBody(name));\n }\n // `for-of` statement (in es5 mode replace with a normal for loop)\n forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n const name = this._scope.toName(nameOrPrefix);\n if (this.opts.es5) {\n const arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n return this.forRange(\"_i\", 0, (0, code_1._) `${arr}.length`, (i) => {\n this.var(name, (0, code_1._) `${arr}[${i}]`);\n forBody(name);\n });\n }\n return this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n }\n // `for-in` statement.\n // With option `ownProperties` replaced with a `for-of` loop for object keys\n forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);\n }\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n }\n // end `for` loop\n endFor() {\n return this._endBlockNode(For);\n }\n // `label` statement\n label(label) {\n return this._leafNode(new Label(label));\n }\n // `break` statement\n break(label) {\n return this._leafNode(new Break(label));\n }\n // `return` statement\n return(value) {\n const node = new Return();\n this._blockNode(node);\n this.code(value);\n if (node.nodes.length !== 1)\n throw new Error('CodeGen: \"return\" should have one node');\n return this._endBlockNode(Return);\n }\n // `try` statement\n try(tryBody, catchCode, finallyCode) {\n if (!catchCode && !finallyCode)\n throw new Error('CodeGen: \"try\" without \"catch\" and \"finally\"');\n const node = new Try();\n this._blockNode(node);\n this.code(tryBody);\n if (catchCode) {\n const error = this.name(\"e\");\n this._currNode = node.catch = new Catch(error);\n catchCode(error);\n }\n if (finallyCode) {\n this._currNode = node.finally = new Finally();\n this.code(finallyCode);\n }\n return this._endBlockNode(Catch, Finally);\n }\n // `throw` statement\n throw(error) {\n return this._leafNode(new Throw(error));\n }\n // start self-balancing block\n block(body, nodeCount) {\n this._blockStarts.push(this._nodes.length);\n if (body)\n this.code(body).endBlock(nodeCount);\n return this;\n }\n // end the current self-balancing block\n endBlock(nodeCount) {\n const len = this._blockStarts.pop();\n if (len === undefined)\n throw new Error(\"CodeGen: not in self-balancing block\");\n const toClose = this._nodes.length - len;\n if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {\n throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n }\n this._nodes.length = len;\n return this;\n }\n // `function` heading (or definition if funcBody is passed)\n func(name, args = code_1.nil, async, funcBody) {\n this._blockNode(new Func(name, args, async));\n if (funcBody)\n this.code(funcBody).endFunc();\n return this;\n }\n // end function definition\n endFunc() {\n return this._endBlockNode(Func);\n }\n optimize(n = 1) {\n while (n-- > 0) {\n this._root.optimizeNodes();\n this._root.optimizeNames(this._root.names, this._constants);\n }\n }\n _leafNode(node) {\n this._currNode.nodes.push(node);\n return this;\n }\n _blockNode(node) {\n this._currNode.nodes.push(node);\n this._nodes.push(node);\n }\n _endBlockNode(N1, N2) {\n const n = this._currNode;\n if (n instanceof N1 || (N2 && n instanceof N2)) {\n this._nodes.pop();\n return this;\n }\n throw new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`);\n }\n _elseNode(node) {\n const n = this._currNode;\n if (!(n instanceof If)) {\n throw new Error('CodeGen: \"else\" without \"if\"');\n }\n this._currNode = n.else = node;\n return this;\n }\n get _root() {\n return this._nodes[0];\n }\n get _currNode() {\n const ns = this._nodes;\n return ns[ns.length - 1];\n }\n set _currNode(node) {\n const ns = this._nodes;\n ns[ns.length - 1] = node;\n }\n}\nexports.CodeGen = CodeGen;\nfunction addNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) + (from[n] || 0);\n return names;\n}\nfunction addExprNames(names, from) {\n return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;\n}\nfunction optimizeExpr(expr, names, constants) {\n if (expr instanceof code_1.Name)\n return replaceName(expr);\n if (!canOptimize(expr))\n return expr;\n return new code_1._Code(expr._items.reduce((items, c) => {\n if (c instanceof code_1.Name)\n c = replaceName(c);\n if (c instanceof code_1._Code)\n items.push(...c._items);\n else\n items.push(c);\n return items;\n }, []));\n function replaceName(n) {\n const c = constants[n.str];\n if (c === undefined || names[n.str] !== 1)\n return n;\n delete names[n.str];\n return c;\n }\n function canOptimize(e) {\n return (e instanceof code_1._Code &&\n e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined));\n }\n}\nfunction subtractNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) - (from[n] || 0);\n}\nfunction not(x) {\n return typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : (0, code_1._) `!${par(x)}`;\n}\nexports.not = not;\nconst andCode = mappend(exports.operators.AND);\n// boolean AND (&&) expression with the passed arguments\nfunction and(...args) {\n return args.reduce(andCode);\n}\nexports.and = and;\nconst orCode = mappend(exports.operators.OR);\n// boolean OR (||) expression with the passed arguments\nfunction or(...args) {\n return args.reduce(orCode);\n}\nexports.or = or;\nfunction mappend(op) {\n return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);\n}\nfunction par(x) {\n return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;\nconst code_1 = require(\"./code\");\nclass ValueError extends Error {\n constructor(name) {\n super(`CodeGen: \"code\" for ${name} not defined`);\n this.value = name.value;\n }\n}\nvar UsedValueState;\n(function (UsedValueState) {\n UsedValueState[UsedValueState[\"Started\"] = 0] = \"Started\";\n UsedValueState[UsedValueState[\"Completed\"] = 1] = \"Completed\";\n})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));\nexports.varKinds = {\n const: new code_1.Name(\"const\"),\n let: new code_1.Name(\"let\"),\n var: new code_1.Name(\"var\"),\n};\nclass Scope {\n constructor({ prefixes, parent } = {}) {\n this._names = {};\n this._prefixes = prefixes;\n this._parent = parent;\n }\n toName(nameOrPrefix) {\n return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n }\n name(prefix) {\n return new code_1.Name(this._newName(prefix));\n }\n _newName(prefix) {\n const ng = this._names[prefix] || this._nameGroup(prefix);\n return `${prefix}${ng.index++}`;\n }\n _nameGroup(prefix) {\n var _a, _b;\n if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) {\n throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n }\n return (this._names[prefix] = { prefix, index: 0 });\n }\n}\nexports.Scope = Scope;\nclass ValueScopeName extends code_1.Name {\n constructor(prefix, nameStr) {\n super(nameStr);\n this.prefix = prefix;\n }\n setValue(value, { property, itemIndex }) {\n this.value = value;\n this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;\n }\n}\nexports.ValueScopeName = ValueScopeName;\nconst line = (0, code_1._) `\\n`;\nclass ValueScope extends Scope {\n constructor(opts) {\n super(opts);\n this._values = {};\n this._scope = opts.scope;\n this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };\n }\n get() {\n return this._scope;\n }\n name(prefix) {\n return new ValueScopeName(prefix, this._newName(prefix));\n }\n value(nameOrPrefix, value) {\n var _a;\n if (value.ref === undefined)\n throw new Error(\"CodeGen: ref must be passed in value\");\n const name = this.toName(nameOrPrefix);\n const { prefix } = name;\n const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n let vs = this._values[prefix];\n if (vs) {\n const _name = vs.get(valueKey);\n if (_name)\n return _name;\n }\n else {\n vs = this._values[prefix] = new Map();\n }\n vs.set(valueKey, name);\n const s = this._scope[prefix] || (this._scope[prefix] = []);\n const itemIndex = s.length;\n s[itemIndex] = value.ref;\n name.setValue(value, { property: prefix, itemIndex });\n return name;\n }\n getValue(prefix, keyOrRef) {\n const vs = this._values[prefix];\n if (!vs)\n return;\n return vs.get(keyOrRef);\n }\n scopeRefs(scopeName, values = this._values) {\n return this._reduceValues(values, (name) => {\n if (name.scopePath === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return (0, code_1._) `${scopeName}${name.scopePath}`;\n });\n }\n scopeCode(values = this._values, usedValues, getCode) {\n return this._reduceValues(values, (name) => {\n if (name.value === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return name.value.code;\n }, usedValues, getCode);\n }\n _reduceValues(values, valueCode, usedValues = {}, getCode) {\n let code = code_1.nil;\n for (const prefix in values) {\n const vs = values[prefix];\n if (!vs)\n continue;\n const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map());\n vs.forEach((name) => {\n if (nameSet.has(name))\n return;\n nameSet.set(name, UsedValueState.Started);\n let c = valueCode(name);\n if (c) {\n const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;\n code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;\n }\n else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {\n code = (0, code_1._) `${code}${c}${this.opts._n}`;\n }\n else {\n throw new ValueError(name);\n }\n nameSet.set(name, UsedValueState.Completed);\n });\n }\n return code;\n }\n}\nexports.ValueScope = ValueScope;\n//# sourceMappingURL=scope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst util_1 = require(\"./util\");\nconst names_1 = require(\"./names\");\nexports.keywordError = {\n message: ({ keyword }) => (0, codegen_1.str) `must pass \"${keyword}\" keyword validation`,\n};\nexports.keyword$DataError = {\n message: ({ keyword, schemaType }) => schemaType\n ? (0, codegen_1.str) `\"${keyword}\" keyword must be ${schemaType} ($data)`\n : (0, codegen_1.str) `\"${keyword}\" keyword is invalid ($data)`,\n};\nfunction reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) {\n addError(gen, errObj);\n }\n else {\n returnErrors(it, (0, codegen_1._) `[${errObj}]`);\n }\n}\nexports.reportError = reportError;\nfunction reportExtraError(cxt, error = exports.keywordError, errorPaths) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n addError(gen, errObj);\n if (!(compositeRule || allErrors)) {\n returnErrors(it, names_1.default.vErrors);\n }\n}\nexports.reportExtraError = reportExtraError;\nfunction resetErrorsCount(gen, errsCount) {\n gen.assign(names_1.default.errors, errsCount);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));\n}\nexports.resetErrorsCount = resetErrorsCount;\nfunction extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {\n /* istanbul ignore if */\n if (errsCount === undefined)\n throw new Error(\"ajv implementation error\");\n const err = gen.name(\"err\");\n gen.forRange(\"i\", errsCount, names_1.default.errors, (i) => {\n gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`);\n gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`);\n if (it.opts.verbose) {\n gen.assign((0, codegen_1._) `${err}.schema`, schemaValue);\n gen.assign((0, codegen_1._) `${err}.data`, data);\n }\n });\n}\nexports.extendErrors = extendErrors;\nfunction addError(gen, errObj) {\n const err = gen.const(\"err\", errObj);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);\n gen.code((0, codegen_1._) `${names_1.default.errors}++`);\n}\nfunction returnErrors(it, errs) {\n const { gen, validateName, schemaEnv } = it;\n if (schemaEnv.$async) {\n gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, errs);\n gen.return(false);\n }\n}\nconst E = {\n keyword: new codegen_1.Name(\"keyword\"),\n schemaPath: new codegen_1.Name(\"schemaPath\"), // also used in JTD errors\n params: new codegen_1.Name(\"params\"),\n propertyName: new codegen_1.Name(\"propertyName\"),\n message: new codegen_1.Name(\"message\"),\n schema: new codegen_1.Name(\"schema\"),\n parentSchema: new codegen_1.Name(\"parentSchema\"),\n};\nfunction errorObjectCode(cxt, error, errorPaths) {\n const { createErrors } = cxt.it;\n if (createErrors === false)\n return (0, codegen_1._) `{}`;\n return errorObject(cxt, error, errorPaths);\n}\nfunction errorObject(cxt, error, errorPaths = {}) {\n const { gen, it } = cxt;\n const keyValues = [\n errorInstancePath(it, errorPaths),\n errorSchemaPath(cxt, errorPaths),\n ];\n extraErrorProps(cxt, error, keyValues);\n return gen.object(...keyValues);\n}\nfunction errorInstancePath({ errorPath }, { instancePath }) {\n const instPath = instancePath\n ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}`\n : errorPath;\n return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n}\nfunction errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`;\n if (schemaPath) {\n schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n }\n return [E.schemaPath, schPath];\n}\nfunction extraErrorProps(cxt, { params, message }, keyValues) {\n const { keyword, data, schemaValue, it } = cxt;\n const { opts, propertyName, topSchemaRef, schemaPath } = it;\n keyValues.push([E.keyword, keyword], [E.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._) `{}`]);\n if (opts.messages) {\n keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message]);\n }\n if (opts.verbose) {\n keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n }\n if (propertyName)\n keyValues.push([E.propertyName, propertyName]);\n}\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst validation_error_1 = require(\"../runtime/validation_error\");\nconst names_1 = require(\"./names\");\nconst resolve_1 = require(\"./resolve\");\nconst util_1 = require(\"./util\");\nconst validate_1 = require(\"./validate\");\nclass SchemaEnv {\n constructor(env) {\n var _a;\n this.refs = {};\n this.dynamicAnchors = {};\n let schema;\n if (typeof env.schema == \"object\")\n schema = env.schema;\n this.schema = env.schema;\n this.schemaId = env.schemaId;\n this.root = env.root || this;\n this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n this.schemaPath = env.schemaPath;\n this.localRefs = env.localRefs;\n this.meta = env.meta;\n this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n this.refs = {};\n }\n}\nexports.SchemaEnv = SchemaEnv;\n// let codeSize = 0\n// let nodeCount = 0\n// Compiles schema in SchemaEnv\nfunction compileSchema(sch) {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch);\n if (_sch)\n return _sch;\n const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails\n const { es5, lines } = this.opts.code;\n const { ownProperties } = this.opts;\n const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });\n let _ValidationError;\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: validation_error_1.default,\n code: (0, codegen_1._) `require(\"ajv/dist/runtime/validation_error\").default`,\n });\n }\n const validateName = gen.scopeName(\"validate\");\n sch.validateName = validateName;\n const schemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: names_1.default.data,\n parentData: names_1.default.parentData,\n parentDataProperty: names_1.default.parentDataProperty,\n dataNames: [names_1.default.data],\n dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true\n ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }\n : { ref: sch.schema }),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: codegen_1.nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: (0, codegen_1._) `\"\"`,\n opts: this.opts,\n self: this,\n };\n let sourceCode;\n try {\n this._compilations.add(sch);\n (0, validate_1.validateFunctionCode)(schemaCxt);\n gen.optimize(this.opts.code.optimize);\n // gen.optimize(1)\n const validateCode = gen.toString();\n sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process)\n sourceCode = this.opts.code.process(sourceCode, sch);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);\n const validate = makeValidate(this, this.scope.get());\n this.scope.value(validateName, { ref: validate });\n validate.errors = null;\n validate.schema = sch.schema;\n validate.schemaEnv = sch;\n if (sch.$async)\n validate.$async = true;\n if (this.opts.code.source === true) {\n validate.source = { validateName, validateCode, scopeValues: gen._values };\n }\n if (this.opts.unevaluated) {\n const { props, items } = schemaCxt;\n validate.evaluated = {\n props: props instanceof codegen_1.Name ? undefined : props,\n items: items instanceof codegen_1.Name ? undefined : items,\n dynamicProps: props instanceof codegen_1.Name,\n dynamicItems: items instanceof codegen_1.Name,\n };\n if (validate.source)\n validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n }\n sch.validate = validate;\n return sch;\n }\n catch (e) {\n delete sch.validate;\n delete sch.validateName;\n if (sourceCode)\n this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e;\n }\n finally {\n this._compilations.delete(sch);\n }\n}\nexports.compileSchema = compileSchema;\nfunction resolveRef(root, baseId, ref) {\n var _a;\n ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n const schOrFunc = root.refs[ref];\n if (schOrFunc)\n return schOrFunc;\n let _sch = resolve.call(this, root, ref);\n if (_sch === undefined) {\n const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv\n const { schemaId } = this.opts;\n if (schema)\n _sch = new SchemaEnv({ schema, schemaId, root, baseId });\n }\n if (_sch === undefined)\n return;\n return (root.refs[ref] = inlineOrCompile.call(this, _sch));\n}\nexports.resolveRef = resolveRef;\nfunction inlineOrCompile(sch) {\n if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))\n return sch.schema;\n return sch.validate ? sch : compileSchema.call(this, sch);\n}\n// Index of schema compilation in the currently compiled list\nfunction getCompilingSchema(schEnv) {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv))\n return sch;\n }\n}\nexports.getCompilingSchema = getCompilingSchema;\nfunction sameSchemaEnv(s1, s2) {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n}\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(root, // information about the root schema for the current schema\nref // reference to resolve\n) {\n let sch;\n while (typeof (sch = this.refs[ref]) == \"string\")\n ref = sch;\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n}\n// Resolve schema, its root and baseId\nfunction resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\nref // reference to resolve\n) {\n const p = this.opts.uriResolver.parse(ref);\n const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root);\n }\n const id = (0, resolve_1.normalizeId)(refPath);\n const schOrRef = this.refs[id] || this.schemas[id];\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef);\n if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\")\n return;\n return getJsonPointer.call(this, p, sch);\n }\n if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\")\n return;\n if (!schOrRef.validate)\n compileSchema.call(this, schOrRef);\n if (id === (0, resolve_1.normalizeId)(ref)) {\n const { schema } = schOrRef;\n const { schemaId } = this.opts;\n const schId = schema[schemaId];\n if (schId)\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n return new SchemaEnv({ schema, schemaId, root, baseId });\n }\n return getJsonPointer.call(this, p, schOrRef);\n}\nexports.resolveSchema = resolveSchema;\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n]);\nfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n var _a;\n if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\")\n return;\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\")\n return;\n const partSchema = schema[(0, util_1.unescapeFragment)(part)];\n if (partSchema === undefined)\n return;\n schema = partSchema;\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n }\n }\n let env;\n if (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n env = resolveSchema.call(this, root, $ref);\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const { schemaId } = this.opts;\n env = env || new SchemaEnv({ schema, schemaId, root, baseId });\n if (env.schema !== env.root.schema)\n return env;\n return undefined;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"./codegen\");\nconst names = {\n // validation function arguments\n data: new codegen_1.Name(\"data\"), // data passed to validation function\n // args passed from referencing schema\n valCxt: new codegen_1.Name(\"valCxt\"), // validation/data context - should not be used directly, it is destructured to the names below\n instancePath: new codegen_1.Name(\"instancePath\"),\n parentData: new codegen_1.Name(\"parentData\"),\n parentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n rootData: new codegen_1.Name(\"rootData\"), // root data - same as the data passed to the first/top validation function\n dynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"), // used to support recursiveRef and dynamicRef\n // function scoped variables\n vErrors: new codegen_1.Name(\"vErrors\"), // null or array of validation errors\n errors: new codegen_1.Name(\"errors\"), // counter of validation errors\n this: new codegen_1.Name(\"this\"),\n // \"globals\"\n self: new codegen_1.Name(\"self\"),\n scope: new codegen_1.Name(\"scope\"),\n // JTD serialize/parse name for JSON string and position\n json: new codegen_1.Name(\"json\"),\n jsonPos: new codegen_1.Name(\"jsonPos\"),\n jsonLen: new codegen_1.Name(\"jsonLen\"),\n jsonPart: new codegen_1.Name(\"jsonPart\"),\n};\nexports.default = names;\n//# sourceMappingURL=names.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst resolve_1 = require(\"./resolve\");\nclass MissingRefError extends Error {\n constructor(resolver, baseId, ref, msg) {\n super(msg || `can't resolve reference ${ref} from id ${baseId}`);\n this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n }\n}\nexports.default = MissingRefError;\n//# sourceMappingURL=ref_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;\nconst util_1 = require(\"./util\");\nconst equal = require(\"fast-deep-equal\");\nconst traverse = require(\"json-schema-traverse\");\n// TODO refactor to use keyword definitions\nconst SIMPLE_INLINED = new Set([\n \"type\",\n \"format\",\n \"pattern\",\n \"maxLength\",\n \"minLength\",\n \"maxProperties\",\n \"minProperties\",\n \"maxItems\",\n \"minItems\",\n \"maximum\",\n \"minimum\",\n \"uniqueItems\",\n \"multipleOf\",\n \"required\",\n \"enum\",\n \"const\",\n]);\nfunction inlineRef(schema, limit = true) {\n if (typeof schema == \"boolean\")\n return true;\n if (limit === true)\n return !hasRef(schema);\n if (!limit)\n return false;\n return countKeys(schema) <= limit;\n}\nexports.inlineRef = inlineRef;\nconst REF_KEYWORDS = new Set([\n \"$ref\",\n \"$recursiveRef\",\n \"$recursiveAnchor\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n]);\nfunction hasRef(schema) {\n for (const key in schema) {\n if (REF_KEYWORDS.has(key))\n return true;\n const sch = schema[key];\n if (Array.isArray(sch) && sch.some(hasRef))\n return true;\n if (typeof sch == \"object\" && hasRef(sch))\n return true;\n }\n return false;\n}\nfunction countKeys(schema) {\n let count = 0;\n for (const key in schema) {\n if (key === \"$ref\")\n return Infinity;\n count++;\n if (SIMPLE_INLINED.has(key))\n continue;\n if (typeof schema[key] == \"object\") {\n (0, util_1.eachItem)(schema[key], (sch) => (count += countKeys(sch)));\n }\n if (count === Infinity)\n return Infinity;\n }\n return count;\n}\nfunction getFullPath(resolver, id = \"\", normalize) {\n if (normalize !== false)\n id = normalizeId(id);\n const p = resolver.parse(id);\n return _getFullPath(resolver, p);\n}\nexports.getFullPath = getFullPath;\nfunction _getFullPath(resolver, p) {\n const serialized = resolver.serialize(p);\n return serialized.split(\"#\")[0] + \"#\";\n}\nexports._getFullPath = _getFullPath;\nconst TRAILING_SLASH_HASH = /#\\/?$/;\nfunction normalizeId(id) {\n return id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n}\nexports.normalizeId = normalizeId;\nfunction resolveUrl(resolver, baseId, id) {\n id = normalizeId(id);\n return resolver.resolve(baseId, id);\n}\nexports.resolveUrl = resolveUrl;\nconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\nfunction getSchemaRefs(schema, baseId) {\n if (typeof schema == \"boolean\")\n return {};\n const { schemaId, uriResolver } = this.opts;\n const schId = normalizeId(schema[schemaId] || baseId);\n const baseIds = { \"\": schId };\n const pathPrefix = getFullPath(uriResolver, schId, false);\n const localRefs = {};\n const schemaRefs = new Set();\n traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {\n if (parentJsonPtr === undefined)\n return;\n const fullPath = pathPrefix + jsonPtr;\n let innerBaseId = baseIds[parentJsonPtr];\n if (typeof sch[schemaId] == \"string\")\n innerBaseId = addRef.call(this, sch[schemaId]);\n addAnchor.call(this, sch.$anchor);\n addAnchor.call(this, sch.$dynamicAnchor);\n baseIds[jsonPtr] = innerBaseId;\n function addRef(ref) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _resolve = this.opts.uriResolver.resolve;\n ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);\n if (schemaRefs.has(ref))\n throw ambiguos(ref);\n schemaRefs.add(ref);\n let schOrRef = this.refs[ref];\n if (typeof schOrRef == \"string\")\n schOrRef = this.refs[schOrRef];\n if (typeof schOrRef == \"object\") {\n checkAmbiguosRef(sch, schOrRef.schema, ref);\n }\n else if (ref !== normalizeId(fullPath)) {\n if (ref[0] === \"#\") {\n checkAmbiguosRef(sch, localRefs[ref], ref);\n localRefs[ref] = sch;\n }\n else {\n this.refs[ref] = fullPath;\n }\n }\n return ref;\n }\n function addAnchor(anchor) {\n if (typeof anchor == \"string\") {\n if (!ANCHOR.test(anchor))\n throw new Error(`invalid anchor \"${anchor}\"`);\n addRef.call(this, `#${anchor}`);\n }\n }\n });\n return localRefs;\n function checkAmbiguosRef(sch1, sch2, ref) {\n if (sch2 !== undefined && !equal(sch1, sch2))\n throw ambiguos(ref);\n }\n function ambiguos(ref) {\n return new Error(`reference \"${ref}\" resolves to more than one schema`);\n }\n}\nexports.getSchemaRefs = getSchemaRefs;\n//# sourceMappingURL=resolve.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRules = exports.isJSONType = void 0;\nconst _jsonTypes = [\"string\", \"number\", \"integer\", \"boolean\", \"null\", \"object\", \"array\"];\nconst jsonTypes = new Set(_jsonTypes);\nfunction isJSONType(x) {\n return typeof x == \"string\" && jsonTypes.has(x);\n}\nexports.isJSONType = isJSONType;\nfunction getRules() {\n const groups = {\n number: { type: \"number\", rules: [] },\n string: { type: \"string\", rules: [] },\n array: { type: \"array\", rules: [] },\n object: { type: \"object\", rules: [] },\n };\n return {\n types: { ...groups, integer: true, boolean: true, null: true },\n rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],\n post: { rules: [] },\n all: {},\n keywords: {},\n };\n}\nexports.getRules = getRules;\n//# sourceMappingURL=rules.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst code_1 = require(\"./codegen/code\");\n// TODO refactor to use Set\nfunction toHash(arr) {\n const hash = {};\n for (const item of arr)\n hash[item] = true;\n return hash;\n}\nexports.toHash = toHash;\nfunction alwaysValidSchema(it, schema) {\n if (typeof schema == \"boolean\")\n return schema;\n if (Object.keys(schema).length === 0)\n return true;\n checkUnknownRules(it, schema);\n return !schemaHasRules(schema, it.self.RULES.all);\n}\nexports.alwaysValidSchema = alwaysValidSchema;\nfunction checkUnknownRules(it, schema = it.schema) {\n const { opts, self } = it;\n if (!opts.strictSchema)\n return;\n if (typeof schema === \"boolean\")\n return;\n const rules = self.RULES.keywords;\n for (const key in schema) {\n if (!rules[key])\n checkStrictMode(it, `unknown keyword: \"${key}\"`);\n }\n}\nexports.checkUnknownRules = checkUnknownRules;\nfunction schemaHasRules(schema, rules) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (rules[key])\n return true;\n return false;\n}\nexports.schemaHasRules = schemaHasRules;\nfunction schemaHasRulesButRef(schema, RULES) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (key !== \"$ref\" && RULES.all[key])\n return true;\n return false;\n}\nexports.schemaHasRulesButRef = schemaHasRulesButRef;\nfunction schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n if (!$data) {\n if (typeof schema == \"number\" || typeof schema == \"boolean\")\n return schema;\n if (typeof schema == \"string\")\n return (0, codegen_1._) `${schema}`;\n }\n return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n}\nexports.schemaRefOrVal = schemaRefOrVal;\nfunction unescapeFragment(str) {\n return unescapeJsonPointer(decodeURIComponent(str));\n}\nexports.unescapeFragment = unescapeFragment;\nfunction escapeFragment(str) {\n return encodeURIComponent(escapeJsonPointer(str));\n}\nexports.escapeFragment = escapeFragment;\nfunction escapeJsonPointer(str) {\n if (typeof str == \"number\")\n return `${str}`;\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexports.escapeJsonPointer = escapeJsonPointer;\nfunction unescapeJsonPointer(str) {\n return str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n}\nexports.unescapeJsonPointer = unescapeJsonPointer;\nfunction eachItem(xs, f) {\n if (Array.isArray(xs)) {\n for (const x of xs)\n f(x);\n }\n else {\n f(xs);\n }\n}\nexports.eachItem = eachItem;\nfunction makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) {\n return (gen, from, to, toName) => {\n const res = to === undefined\n ? from\n : to instanceof codegen_1.Name\n ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)\n : from instanceof codegen_1.Name\n ? (mergeToName(gen, to, from), from)\n : mergeValues(from, to);\n return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;\n };\n}\nexports.mergeEvaluated = {\n props: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => {\n gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`));\n }),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => {\n if (from === true) {\n gen.assign(to, true);\n }\n else {\n gen.assign(to, (0, codegen_1._) `${to} || {}`);\n setEvaluated(gen, to, from);\n }\n }),\n mergeValues: (from, to) => (from === true ? true : { ...from, ...to }),\n resultToName: evaluatedPropsToName,\n }),\n items: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)),\n mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),\n resultToName: (gen, items) => gen.var(\"items\", items),\n }),\n};\nfunction evaluatedPropsToName(gen, ps) {\n if (ps === true)\n return gen.var(\"props\", true);\n const props = gen.var(\"props\", (0, codegen_1._) `{}`);\n if (ps !== undefined)\n setEvaluated(gen, props, ps);\n return props;\n}\nexports.evaluatedPropsToName = evaluatedPropsToName;\nfunction setEvaluated(gen, props, ps) {\n Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));\n}\nexports.setEvaluated = setEvaluated;\nconst snippets = {};\nfunction useFunc(gen, f) {\n return gen.scopeValue(\"func\", {\n ref: f,\n code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)),\n });\n}\nexports.useFunc = useFunc;\nvar Type;\n(function (Type) {\n Type[Type[\"Num\"] = 0] = \"Num\";\n Type[Type[\"Str\"] = 1] = \"Str\";\n})(Type || (exports.Type = Type = {}));\nfunction getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n // let path\n if (dataProp instanceof codegen_1.Name) {\n const isNumber = dataPropType === Type.Num;\n return jsPropertySyntax\n ? isNumber\n ? (0, codegen_1._) `\"[\" + ${dataProp} + \"]\"`\n : (0, codegen_1._) `\"['\" + ${dataProp} + \"']\"`\n : isNumber\n ? (0, codegen_1._) `\"/\" + ${dataProp}`\n : (0, codegen_1._) `\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`; // TODO maybe use global escapePointer\n }\n return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n}\nexports.getErrorPath = getErrorPath;\nfunction checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n if (!mode)\n return;\n msg = `strict mode: ${msg}`;\n if (mode === true)\n throw new Error(msg);\n it.self.logger.warn(msg);\n}\nexports.checkStrictMode = checkStrictMode;\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;\nfunction schemaHasRulesForType({ schema, self }, type) {\n const group = self.RULES.types[type];\n return group && group !== true && shouldUseGroup(schema, group);\n}\nexports.schemaHasRulesForType = schemaHasRulesForType;\nfunction shouldUseGroup(schema, group) {\n return group.rules.some((rule) => shouldUseRule(schema, rule));\n}\nexports.shouldUseGroup = shouldUseGroup;\nfunction shouldUseRule(schema, rule) {\n var _a;\n return (schema[rule.keyword] !== undefined ||\n ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined)));\n}\nexports.shouldUseRule = shouldUseRule;\n//# sourceMappingURL=applicability.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst boolError = {\n message: \"boolean schema is false\",\n};\nfunction topBoolOrEmptySchema(it) {\n const { gen, schema, validateName } = it;\n if (schema === false) {\n falseSchemaError(it, false);\n }\n else if (typeof schema == \"object\" && schema.$async === true) {\n gen.return(names_1.default.data);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, null);\n gen.return(true);\n }\n}\nexports.topBoolOrEmptySchema = topBoolOrEmptySchema;\nfunction boolOrEmptySchema(it, valid) {\n const { gen, schema } = it;\n if (schema === false) {\n gen.var(valid, false); // TODO var\n falseSchemaError(it);\n }\n else {\n gen.var(valid, true); // TODO var\n }\n}\nexports.boolOrEmptySchema = boolOrEmptySchema;\nfunction falseSchemaError(it, overrideAllErrors) {\n const { gen, data } = it;\n // TODO maybe some other interface should be used for non-keyword validation errors...\n const cxt = {\n gen,\n keyword: \"false schema\",\n data,\n schema: false,\n schemaCode: false,\n schemaValue: false,\n params: {},\n it,\n };\n (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors);\n}\n//# sourceMappingURL=boolSchema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\nconst rules_1 = require(\"../rules\");\nconst applicability_1 = require(\"./applicability\");\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nvar DataType;\n(function (DataType) {\n DataType[DataType[\"Correct\"] = 0] = \"Correct\";\n DataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n})(DataType || (exports.DataType = DataType = {}));\nfunction getSchemaTypes(schema) {\n const types = getJSONTypes(schema.type);\n const hasNull = types.includes(\"null\");\n if (hasNull) {\n if (schema.nullable === false)\n throw new Error(\"type: null contradicts nullable: false\");\n }\n else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"');\n }\n if (schema.nullable === true)\n types.push(\"null\");\n }\n return types;\n}\nexports.getSchemaTypes = getSchemaTypes;\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction getJSONTypes(ts) {\n const types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n if (types.every(rules_1.isJSONType))\n return types;\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n}\nexports.getJSONTypes = getJSONTypes;\nfunction coerceAndCheckDataType(it, types) {\n const { gen, data, opts } = it;\n const coerceTo = coerceToTypes(types, opts.coerceTypes);\n const checkTypes = types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n gen.if(wrongType, () => {\n if (coerceTo.length)\n coerceData(it, types, coerceTo);\n else\n reportTypeError(it);\n });\n }\n return checkTypes;\n}\nexports.coerceAndCheckDataType = coerceAndCheckDataType;\nconst COERCIBLE = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"]);\nfunction coerceToTypes(types, coerceTypes) {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : [];\n}\nfunction coerceData(it, types, coerceTo) {\n const { gen, data, opts } = it;\n const dataType = gen.let(\"dataType\", (0, codegen_1._) `typeof ${data}`);\n const coerced = gen.let(\"coerced\", (0, codegen_1._) `undefined`);\n if (opts.coerceTypes === \"array\") {\n gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen\n .assign(data, (0, codegen_1._) `${data}[0]`)\n .assign(dataType, (0, codegen_1._) `typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n }\n gen.if((0, codegen_1._) `${coerced} !== undefined`);\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t);\n }\n }\n gen.else();\n reportTypeError(it);\n gen.endIf();\n gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {\n gen.assign(data, coerced);\n assignParentData(it, coerced);\n });\n function coerceSpecificType(t) {\n switch (t) {\n case \"string\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, (0, codegen_1._) `\"\" + ${data}`)\n .elseIf((0, codegen_1._) `${data} === null`)\n .assign(coerced, (0, codegen_1._) `\"\"`);\n return;\n case \"number\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"integer\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"boolean\":\n gen\n .elseIf((0, codegen_1._) `${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf((0, codegen_1._) `${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true);\n return;\n case \"null\":\n gen.elseIf((0, codegen_1._) `${data} === \"\" || ${data} === 0 || ${data} === false`);\n gen.assign(coerced, null);\n return;\n case \"array\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`)\n .assign(coerced, (0, codegen_1._) `[${data}]`);\n }\n }\n}\nfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n // TODO use gen.property\n gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));\n}\nfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n let cond;\n switch (dataType) {\n case \"null\":\n return (0, codegen_1._) `${data} ${EQ} null`;\n case \"array\":\n cond = (0, codegen_1._) `Array.isArray(${data})`;\n break;\n case \"object\":\n cond = (0, codegen_1._) `${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n break;\n case \"integer\":\n cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);\n break;\n case \"number\":\n cond = numCond();\n break;\n default:\n return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;\n }\n return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n function numCond(_cond = codegen_1.nil) {\n return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);\n }\n}\nexports.checkDataType = checkDataType;\nfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct);\n }\n let cond;\n const types = (0, util_1.toHash)(dataTypes);\n if (types.array && types.object) {\n const notObj = (0, codegen_1._) `typeof ${data} != \"object\"`;\n cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;\n delete types.null;\n delete types.array;\n delete types.object;\n }\n else {\n cond = codegen_1.nil;\n }\n if (types.number)\n delete types.integer;\n for (const t in types)\n cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n return cond;\n}\nexports.checkDataTypes = checkDataTypes;\nconst typeError = {\n message: ({ schema }) => `must be ${schema}`,\n params: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,\n};\nfunction reportTypeError(it) {\n const cxt = getTypeErrorContext(it);\n (0, errors_1.reportError)(cxt, typeError);\n}\nexports.reportTypeError = reportTypeError;\nfunction getTypeErrorContext(it) {\n const { gen, data, schema } = it;\n const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n };\n}\n//# sourceMappingURL=dataType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignDefaults = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction assignDefaults(it, ty) {\n const { properties, items } = it.schema;\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default);\n }\n }\n else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i) => assignDefault(it, i, sch.default));\n }\n}\nexports.assignDefaults = assignDefaults;\nfunction assignDefault(it, prop, defaultValue) {\n const { gen, compositeRule, data, opts } = it;\n if (defaultValue === undefined)\n return;\n const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`;\n if (compositeRule) {\n (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n return;\n }\n let condition = (0, codegen_1._) `${childData} === undefined`;\n if (opts.useDefaults === \"empty\") {\n condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === \"\"`;\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n}\n//# sourceMappingURL=defaults.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;\nconst boolSchema_1 = require(\"./boolSchema\");\nconst dataType_1 = require(\"./dataType\");\nconst applicability_1 = require(\"./applicability\");\nconst dataType_2 = require(\"./dataType\");\nconst defaults_1 = require(\"./defaults\");\nconst keyword_1 = require(\"./keyword\");\nconst subschema_1 = require(\"./subschema\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst resolve_1 = require(\"../resolve\");\nconst util_1 = require(\"../util\");\nconst errors_1 = require(\"../errors\");\n// schema compilation - generates validation function, subschemaCode (below) is used for subschemas\nfunction validateFunctionCode(it) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it);\n return;\n }\n }\n validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n}\nexports.validateFunctionCode = validateFunctionCode;\nfunction validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {\n if (opts.code.es5) {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n gen.code((0, codegen_1._) `\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n destructureValCxtES5(gen, opts);\n gen.code(body);\n });\n }\n else {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));\n }\n}\nfunction destructureValCxt(opts) {\n return (0, codegen_1._) `{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;\n}\nfunction destructureValCxtES5(gen, opts) {\n gen.if(names_1.default.valCxt, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n }, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `\"\"`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.rootData, names_1.default.data);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`);\n });\n}\nfunction topSchemaObjCode(it) {\n const { schema, opts, gen } = it;\n validateFunction(it, () => {\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n checkNoDefault(it);\n gen.let(names_1.default.vErrors, null);\n gen.let(names_1.default.errors, 0);\n if (opts.unevaluated)\n resetEvaluated(it);\n typeAndKeywords(it);\n returnResults(it);\n });\n return;\n}\nfunction resetEvaluated(it) {\n // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated\n const { gen, validateName } = it;\n it.evaluated = gen.const(\"evaluated\", (0, codegen_1._) `${validateName}.evaluated`);\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`));\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`));\n}\nfunction funcSourceUrl(schema, opts) {\n const schId = typeof schema == \"object\" && schema[opts.schemaId];\n return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil;\n}\n// schema compilation - this function is used recursively to generate code for sub-schemas\nfunction subschemaCode(it, valid) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid);\n return;\n }\n }\n (0, boolSchema_1.boolOrEmptySchema)(it, valid);\n}\nfunction schemaCxtHasRules({ schema, self }) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (self.RULES.all[key])\n return true;\n return false;\n}\nfunction isSchemaObj(it) {\n return typeof it.schema != \"boolean\";\n}\nfunction subSchemaObjCode(it, valid) {\n const { schema, gen, opts } = it;\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n updateContext(it);\n checkAsyncSchema(it);\n const errsCount = gen.const(\"_errs\", names_1.default.errors);\n typeAndKeywords(it, errsCount);\n // TODO var\n gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n}\nfunction checkKeywords(it) {\n (0, util_1.checkUnknownRules)(it);\n checkRefsAndKeywords(it);\n}\nfunction typeAndKeywords(it, errsCount) {\n if (it.opts.jtd)\n return schemaKeywords(it, [], false, errsCount);\n const types = (0, dataType_1.getSchemaTypes)(it.schema);\n const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);\n schemaKeywords(it, types, !checkedTypes, errsCount);\n}\nfunction checkRefsAndKeywords(it) {\n const { schema, errSchemaPath, opts, self } = it;\n if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {\n self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n }\n}\nfunction checkNoDefault(it) {\n const { schema, opts } = it;\n if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {\n (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n }\n}\nfunction updateContext(it) {\n const schId = it.schema[it.opts.schemaId];\n if (schId)\n it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n}\nfunction checkAsyncSchema(it) {\n if (it.schema.$async && !it.schemaEnv.$async)\n throw new Error(\"async schema in sync schema\");\n}\nfunction commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {\n const msg = schema.$comment;\n if (opts.$comment === true) {\n gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`);\n }\n else if (typeof opts.$comment == \"function\") {\n const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`;\n const rootName = gen.scopeValue(\"root\", { ref: schemaEnv.root });\n gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n }\n}\nfunction returnResults(it) {\n const { gen, schemaEnv, validateName, ValidationError, opts } = it;\n if (schemaEnv.$async) {\n // TODO assign unevaluated\n gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`));\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors);\n if (opts.unevaluated)\n assignEvaluated(it);\n gen.return((0, codegen_1._) `${names_1.default.errors} === 0`);\n }\n}\nfunction assignEvaluated({ gen, evaluated, props, items }) {\n if (props instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.props`, props);\n if (items instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.items`, items);\n}\nfunction schemaKeywords(it, types, typeErrors, errsCount) {\n const { gen, schema, data, allErrors, opts, self } = it;\n const { RULES } = self;\n if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n gen.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition)); // TODO typecast\n return;\n }\n if (!opts.jtd)\n checkStrictTypes(it, types);\n gen.block(() => {\n for (const group of RULES.rules)\n groupKeywords(group);\n groupKeywords(RULES.post);\n });\n function groupKeywords(group) {\n if (!(0, applicability_1.shouldUseGroup)(schema, group))\n return;\n if (group.type) {\n gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n iterateKeywords(it, group);\n if (types.length === 1 && types[0] === group.type && typeErrors) {\n gen.else();\n (0, dataType_2.reportTypeError)(it);\n }\n gen.endIf();\n }\n else {\n iterateKeywords(it, group);\n }\n // TODO make it \"ok\" call?\n if (!allErrors)\n gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`);\n }\n}\nfunction iterateKeywords(it, group) {\n const { gen, schema, opts: { useDefaults }, } = it;\n if (useDefaults)\n (0, defaults_1.assignDefaults)(it, group.type);\n gen.block(() => {\n for (const rule of group.rules) {\n if ((0, applicability_1.shouldUseRule)(schema, rule)) {\n keywordCode(it, rule.keyword, rule.definition, group.type);\n }\n }\n });\n}\nfunction checkStrictTypes(it, types) {\n if (it.schemaEnv.meta || !it.opts.strictTypes)\n return;\n checkContextTypes(it, types);\n if (!it.opts.allowUnionTypes)\n checkMultipleTypes(it, types);\n checkKeywordTypes(it, it.dataTypes);\n}\nfunction checkContextTypes(it, types) {\n if (!types.length)\n return;\n if (!it.dataTypes.length) {\n it.dataTypes = types;\n return;\n }\n types.forEach((t) => {\n if (!includesType(it.dataTypes, t)) {\n strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n }\n });\n narrowSchemaTypes(it, types);\n}\nfunction checkMultipleTypes(it, ts) {\n if (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) {\n strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n }\n}\nfunction checkKeywordTypes(it, ts) {\n const rules = it.self.RULES.all;\n for (const keyword in rules) {\n const rule = rules[keyword];\n if (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n const { type } = rule.definition;\n if (type.length && !type.some((t) => hasApplicableType(ts, t))) {\n strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n }\n }\n }\n}\nfunction hasApplicableType(schTs, kwdT) {\n return schTs.includes(kwdT) || (kwdT === \"number\" && schTs.includes(\"integer\"));\n}\nfunction includesType(ts, t) {\n return ts.includes(t) || (t === \"integer\" && ts.includes(\"number\"));\n}\nfunction narrowSchemaTypes(it, withTypes) {\n const ts = [];\n for (const t of it.dataTypes) {\n if (includesType(withTypes, t))\n ts.push(t);\n else if (withTypes.includes(\"integer\") && t === \"number\")\n ts.push(\"integer\");\n }\n it.dataTypes = ts;\n}\nfunction strictTypesError(it, msg) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n msg += ` at \"${schemaPath}\" (strictTypes)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n}\nclass KeywordCxt {\n constructor(it, def, keyword) {\n (0, keyword_1.validateKeywordUsage)(it, def, keyword);\n this.gen = it.gen;\n this.allErrors = it.allErrors;\n this.keyword = keyword;\n this.data = it.data;\n this.schema = it.schema[keyword];\n this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n this.schemaType = def.schemaType;\n this.parentSchema = it.schema;\n this.params = {};\n this.it = it;\n this.def = def;\n if (this.$data) {\n this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n }\n else {\n this.schemaCode = this.schemaValue;\n if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {\n throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n }\n }\n if (\"code\" in def ? def.trackErrors : def.errors !== false) {\n this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n }\n }\n result(condition, successAction, failAction) {\n this.failResult((0, codegen_1.not)(condition), successAction, failAction);\n }\n failResult(condition, successAction, failAction) {\n this.gen.if(condition);\n if (failAction)\n failAction();\n else\n this.error();\n if (successAction) {\n this.gen.else();\n successAction();\n if (this.allErrors)\n this.gen.endIf();\n }\n else {\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n }\n pass(condition, failAction) {\n this.failResult((0, codegen_1.not)(condition), undefined, failAction);\n }\n fail(condition) {\n if (condition === undefined) {\n this.error();\n if (!this.allErrors)\n this.gen.if(false); // this branch will be removed by gen.optimize\n return;\n }\n this.gen.if(condition);\n this.error();\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n fail$data(condition) {\n if (!this.$data)\n return this.fail(condition);\n const { schemaCode } = this;\n this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n }\n error(append, errorParams, errorPaths) {\n if (errorParams) {\n this.setParams(errorParams);\n this._error(append, errorPaths);\n this.setParams({});\n return;\n }\n this._error(append, errorPaths);\n }\n _error(append, errorPaths) {\n ;\n (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n }\n $dataError() {\n (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n }\n reset() {\n if (this.errsCount === undefined)\n throw new Error('add \"trackErrors\" to keyword definition');\n (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n }\n ok(cond) {\n if (!this.allErrors)\n this.gen.if(cond);\n }\n setParams(obj, assign) {\n if (assign)\n Object.assign(this.params, obj);\n else\n this.params = obj;\n }\n block$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n this.gen.block(() => {\n this.check$data(valid, $dataValid);\n codeBlock();\n });\n }\n check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n if (!this.$data)\n return;\n const { gen, schemaCode, schemaType, def } = this;\n gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid));\n if (valid !== codegen_1.nil)\n gen.assign(valid, true);\n if (schemaType.length || def.validateSchema) {\n gen.elseIf(this.invalid$data());\n this.$dataError();\n if (valid !== codegen_1.nil)\n gen.assign(valid, false);\n }\n gen.else();\n }\n invalid$data() {\n const { gen, schemaCode, schemaType, def, it } = this;\n return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n function wrong$DataType() {\n if (schemaType.length) {\n /* istanbul ignore if */\n if (!(schemaCode instanceof codegen_1.Name))\n throw new Error(\"ajv implementation error\");\n const st = Array.isArray(schemaType) ? schemaType : [schemaType];\n return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n }\n return codegen_1.nil;\n }\n function invalid$DataSchema() {\n if (def.validateSchema) {\n const validateSchemaRef = gen.scopeValue(\"validate$data\", { ref: def.validateSchema }); // TODO value.code for standalone\n return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`;\n }\n return codegen_1.nil;\n }\n }\n subschema(appl, valid) {\n const subschema = (0, subschema_1.getSubschema)(this.it, appl);\n (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n (0, subschema_1.extendSubschemaMode)(subschema, appl);\n const nextContext = { ...this.it, ...subschema, items: undefined, props: undefined };\n subschemaCode(nextContext, valid);\n return nextContext;\n }\n mergeEvaluated(schemaCxt, toName) {\n const { it, gen } = this;\n if (!it.opts.unevaluated)\n return;\n if (it.props !== true && schemaCxt.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);\n }\n if (it.items !== true && schemaCxt.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);\n }\n }\n mergeValidEvaluated(schemaCxt, valid) {\n const { it, gen } = this;\n if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n return true;\n }\n }\n}\nexports.KeywordCxt = KeywordCxt;\nfunction keywordCode(it, keyword, def, ruleType) {\n const cxt = new KeywordCxt(it, def, keyword);\n if (\"code\" in def) {\n def.code(cxt, ruleType);\n }\n else if (cxt.$data && def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n else if (\"macro\" in def) {\n (0, keyword_1.macroKeywordCode)(cxt, def);\n }\n else if (def.compile || def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n}\nconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\nconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\nfunction getData($data, { dataLevel, dataNames, dataPathArr }) {\n let jsonPointer;\n let data;\n if ($data === \"\")\n return names_1.default.rootData;\n if ($data[0] === \"/\") {\n if (!JSON_POINTER.test($data))\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n jsonPointer = $data;\n data = names_1.default.rootData;\n }\n else {\n const matches = RELATIVE_JSON_POINTER.exec($data);\n if (!matches)\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n const up = +matches[1];\n jsonPointer = matches[2];\n if (jsonPointer === \"#\") {\n if (up >= dataLevel)\n throw new Error(errorMsg(\"property/index\", up));\n return dataPathArr[dataLevel - up];\n }\n if (up > dataLevel)\n throw new Error(errorMsg(\"data\", up));\n data = dataNames[dataLevel - up];\n if (!jsonPointer)\n return data;\n }\n let expr = data;\n const segments = jsonPointer.split(\"/\");\n for (const segment of segments) {\n if (segment) {\n data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n expr = (0, codegen_1._) `${expr} && ${data}`;\n }\n }\n return expr;\n function errorMsg(pointerType, up) {\n return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n }\n}\nexports.getData = getData;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst code_1 = require(\"../../vocabularies/code\");\nconst errors_1 = require(\"../errors\");\nfunction macroKeywordCode(cxt, def) {\n const { gen, keyword, schema, parentSchema, it } = cxt;\n const macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n const schemaRef = useKeyword(gen, keyword, macroSchema);\n if (it.opts.validateSchema !== false)\n it.self.validateSchema(macroSchema, true);\n const valid = gen.name(\"valid\");\n cxt.subschema({\n schema: macroSchema,\n schemaPath: codegen_1.nil,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n topSchemaRef: schemaRef,\n compositeRule: true,\n }, valid);\n cxt.pass(valid, () => cxt.error(true));\n}\nexports.macroKeywordCode = macroKeywordCode;\nfunction funcKeywordCode(cxt, def) {\n var _a;\n const { gen, keyword, schema, parentSchema, $data, it } = cxt;\n checkAsyncKeyword(it, def);\n const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;\n const validateRef = useKeyword(gen, keyword, validate);\n const valid = gen.let(\"valid\");\n cxt.block$data(valid, validateKeyword);\n cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n function validateKeyword() {\n if (def.errors === false) {\n assignValid();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => cxt.error());\n }\n else {\n const ruleErrs = def.async ? validateAsync() : validateSync();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => addErrs(cxt, ruleErrs));\n }\n }\n function validateAsync() {\n const ruleErrs = gen.let(\"ruleErrs\", null);\n gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e)));\n return ruleErrs;\n }\n function validateSync() {\n const validateErrs = (0, codegen_1._) `${validateRef}.errors`;\n gen.assign(validateErrs, null);\n assignValid(codegen_1.nil);\n return validateErrs;\n }\n function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) {\n const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n const passSchema = !((\"compile\" in def && !$data) || def.schema === false);\n gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n }\n function reportErrs(errors) {\n var _a;\n gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors);\n }\n}\nexports.funcKeywordCode = funcKeywordCode;\nfunction modifyData(cxt) {\n const { gen, data, it } = cxt;\n gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`));\n}\nfunction addErrs(cxt, errs) {\n const { gen } = cxt;\n gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => {\n gen\n .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`)\n .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n (0, errors_1.extendErrors)(cxt);\n }, () => cxt.error());\n}\nfunction checkAsyncKeyword({ schemaEnv }, def) {\n if (def.async && !schemaEnv.$async)\n throw new Error(\"async keyword in sync schema\");\n}\nfunction useKeyword(gen, keyword, result) {\n if (result === undefined)\n throw new Error(`keyword \"${keyword}\" failed to compile`);\n return gen.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });\n}\nfunction validSchemaType(schema, schemaType, allowUndefined = false) {\n // TODO add tests\n return (!schemaType.length ||\n schemaType.some((st) => st === \"array\"\n ? Array.isArray(schema)\n : st === \"object\"\n ? schema && typeof schema == \"object\" && !Array.isArray(schema)\n : typeof schema == st || (allowUndefined && typeof schema == \"undefined\")));\n}\nexports.validSchemaType = validSchemaType;\nfunction validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {\n /* istanbul ignore if */\n if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {\n throw new Error(\"ajv implementation error\");\n }\n const deps = def.dependencies;\n if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {\n throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n }\n if (def.validateSchema) {\n const valid = def.validateSchema(schema[keyword]);\n if (!valid) {\n const msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` +\n self.errorsText(def.validateSchema.errors);\n if (opts.validateSchema === \"log\")\n self.logger.error(msg);\n else\n throw new Error(msg);\n }\n }\n}\nexports.validateKeywordUsage = validateKeywordUsage;\n//# sourceMappingURL=keyword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n if (keyword !== undefined && schema !== undefined) {\n throw new Error('both \"keyword\" and \"schema\" passed, only one allowed');\n }\n if (keyword !== undefined) {\n const sch = it.schema[keyword];\n return schemaProp === undefined\n ? {\n schema: sch,\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n }\n : {\n schema: sch[schemaProp],\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`,\n };\n }\n if (schema !== undefined) {\n if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {\n throw new Error('\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"');\n }\n return {\n schema,\n schemaPath,\n topSchemaRef,\n errSchemaPath,\n };\n }\n throw new Error('either \"keyword\" or \"schema\" must be passed');\n}\nexports.getSubschema = getSubschema;\nfunction extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n if (data !== undefined && dataProp !== undefined) {\n throw new Error('both \"data\" and \"dataProp\" passed, only one allowed');\n }\n const { gen } = it;\n if (dataProp !== undefined) {\n const { errorPath, dataPathArr, opts } = it;\n const nextData = gen.let(\"data\", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);\n dataContextProps(nextData);\n subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`;\n subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n }\n if (data !== undefined) {\n const nextData = data instanceof codegen_1.Name ? data : gen.let(\"data\", data, true); // replaceable if used once?\n dataContextProps(nextData);\n if (propertyName !== undefined)\n subschema.propertyName = propertyName;\n // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr\n }\n if (dataTypes)\n subschema.dataTypes = dataTypes;\n function dataContextProps(_nextData) {\n subschema.data = _nextData;\n subschema.dataLevel = it.dataLevel + 1;\n subschema.dataTypes = [];\n it.definedProperties = new Set();\n subschema.parentData = it.data;\n subschema.dataNames = [...it.dataNames, _nextData];\n }\n}\nexports.extendSubschemaData = extendSubschemaData;\nfunction extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n if (compositeRule !== undefined)\n subschema.compositeRule = compositeRule;\n if (createErrors !== undefined)\n subschema.createErrors = createErrors;\n if (allErrors !== undefined)\n subschema.allErrors = allErrors;\n subschema.jtdDiscriminator = jtdDiscriminator; // not inherited\n subschema.jtdMetadata = jtdMetadata; // not inherited\n}\nexports.extendSubschemaMode = extendSubschemaMode;\n//# sourceMappingURL=subschema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nconst validation_error_1 = require(\"./runtime/validation_error\");\nconst ref_error_1 = require(\"./compile/ref_error\");\nconst rules_1 = require(\"./compile/rules\");\nconst compile_1 = require(\"./compile\");\nconst codegen_2 = require(\"./compile/codegen\");\nconst resolve_1 = require(\"./compile/resolve\");\nconst dataType_1 = require(\"./compile/validate/dataType\");\nconst util_1 = require(\"./compile/util\");\nconst $dataRefSchema = require(\"./refs/data.json\");\nconst uri_1 = require(\"./runtime/uri\");\nconst defaultRegExp = (str, flags) => new RegExp(str, flags);\ndefaultRegExp.code = \"new RegExp\";\nconst META_IGNORE_OPTIONS = [\"removeAdditional\", \"useDefaults\", \"coerceTypes\"];\nconst EXT_SCOPE_NAMES = new Set([\n \"validate\",\n \"serialize\",\n \"parse\",\n \"wrapper\",\n \"root\",\n \"schema\",\n \"keyword\",\n \"pattern\",\n \"formats\",\n \"validate$data\",\n \"func\",\n \"obj\",\n \"Error\",\n]);\nconst removedOptions = {\n errorDataPath: \"\",\n format: \"`validateFormats: false` can be used instead.\",\n nullable: '\"nullable\" keyword is supported by default.',\n jsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n extendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n missingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n processCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n sourceCode: \"Use option `code: {source: true}`\",\n strictDefaults: \"It is default now, see option `strict`.\",\n strictKeywords: \"It is default now, see option `strict`.\",\n uniqueItems: '\"uniqueItems\" keyword is always validated.',\n unknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n cache: \"Map is used as cache, schema object as key.\",\n serialize: \"Map is used as cache, schema object as key.\",\n ajvErrors: \"It is default now.\",\n};\nconst deprecatedOptions = {\n ignoreKeywordsWithRef: \"\",\n jsPropertySyntax: \"\",\n unicode: '\"minLength\"/\"maxLength\" account for unicode characters by default.',\n};\nconst MAX_EXPRESSION = 200;\n// eslint-disable-next-line complexity\nfunction requiredOptions(o) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n const s = o.strict;\n const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;\n const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0;\n const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n return {\n strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,\n strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,\n strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : \"log\",\n strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : \"log\",\n strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,\n code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },\n loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,\n messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,\n inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,\n schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,\n validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,\n unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,\n uriResolver: uriResolver,\n };\n}\nclass Ajv {\n constructor(opts = {}) {\n this.schemas = {};\n this.refs = {};\n this.formats = {};\n this._compilations = new Set();\n this._loading = {};\n this._cache = new Map();\n opts = this.opts = { ...opts, ...requiredOptions(opts) };\n const { es5, lines } = this.opts.code;\n this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });\n this.logger = getLogger(opts.logger);\n const formatOpt = opts.validateFormats;\n opts.validateFormats = false;\n this.RULES = (0, rules_1.getRules)();\n checkOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n checkOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n this._metaOpts = getMetaSchemaOptions.call(this);\n if (opts.formats)\n addInitialFormats.call(this);\n this._addVocabularies();\n this._addDefaultMetaSchema();\n if (opts.keywords)\n addInitialKeywords.call(this, opts.keywords);\n if (typeof opts.meta == \"object\")\n this.addMetaSchema(opts.meta);\n addInitialSchemas.call(this);\n opts.validateFormats = formatOpt;\n }\n _addVocabularies() {\n this.addKeyword(\"$async\");\n }\n _addDefaultMetaSchema() {\n const { $data, meta, schemaId } = this.opts;\n let _dataRefSchema = $dataRefSchema;\n if (schemaId === \"id\") {\n _dataRefSchema = { ...$dataRefSchema };\n _dataRefSchema.id = _dataRefSchema.$id;\n delete _dataRefSchema.$id;\n }\n if (meta && $data)\n this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n }\n defaultMeta() {\n const { meta, schemaId } = this.opts;\n return (this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : undefined);\n }\n validate(schemaKeyRef, // key, ref or schema object\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n data // to be validated\n ) {\n let v;\n if (typeof schemaKeyRef == \"string\") {\n v = this.getSchema(schemaKeyRef);\n if (!v)\n throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n }\n else {\n v = this.compile(schemaKeyRef);\n }\n const valid = v(data);\n if (!(\"$async\" in v))\n this.errors = v.errors;\n return valid;\n }\n compile(schema, _meta) {\n const sch = this._addSchema(schema, _meta);\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n compileAsync(schema, meta) {\n if (typeof this.opts.loadSchema != \"function\") {\n throw new Error(\"options.loadSchema should be a function\");\n }\n const { loadSchema } = this.opts;\n return runCompileAsync.call(this, schema, meta);\n async function runCompileAsync(_schema, _meta) {\n await loadMetaSchema.call(this, _schema.$schema);\n const sch = this._addSchema(_schema, _meta);\n return sch.validate || _compileAsync.call(this, sch);\n }\n async function loadMetaSchema($ref) {\n if ($ref && !this.getSchema($ref)) {\n await runCompileAsync.call(this, { $ref }, true);\n }\n }\n async function _compileAsync(sch) {\n try {\n return this._compileSchemaEnv(sch);\n }\n catch (e) {\n if (!(e instanceof ref_error_1.default))\n throw e;\n checkLoaded.call(this, e);\n await loadMissingSchema.call(this, e.missingSchema);\n return _compileAsync.call(this, sch);\n }\n }\n function checkLoaded({ missingSchema: ref, missingRef }) {\n if (this.refs[ref]) {\n throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n }\n }\n async function loadMissingSchema(ref) {\n const _schema = await _loadSchema.call(this, ref);\n if (!this.refs[ref])\n await loadMetaSchema.call(this, _schema.$schema);\n if (!this.refs[ref])\n this.addSchema(_schema, ref, meta);\n }\n async function _loadSchema(ref) {\n const p = this._loading[ref];\n if (p)\n return p;\n try {\n return await (this._loading[ref] = loadSchema(ref));\n }\n finally {\n delete this._loading[ref];\n }\n }\n }\n // Adds schema to the instance\n addSchema(schema, // If array is passed, `key` will be ignored\n key, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n _meta, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead.\n ) {\n if (Array.isArray(schema)) {\n for (const sch of schema)\n this.addSchema(sch, undefined, _meta, _validateSchema);\n return this;\n }\n let id;\n if (typeof schema === \"object\") {\n const { schemaId } = this.opts;\n id = schema[schemaId];\n if (id !== undefined && typeof id != \"string\") {\n throw new Error(`schema ${schemaId} must be string`);\n }\n }\n key = (0, resolve_1.normalizeId)(key || id);\n this._checkUnique(key);\n this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n return this;\n }\n // Add schema that will be used to validate other schemas\n // options in META_IGNORE_OPTIONS are alway set to false\n addMetaSchema(schema, key, // schema key\n _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema\n ) {\n this.addSchema(schema, key, true, _validateSchema);\n return this;\n }\n // Validate schema against its meta-schema\n validateSchema(schema, throwOrLogError) {\n if (typeof schema == \"boolean\")\n return true;\n let $schema;\n $schema = schema.$schema;\n if ($schema !== undefined && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\");\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\");\n this.errors = null;\n return true;\n }\n const valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n const message = \"schema is invalid: \" + this.errorsText();\n if (this.opts.validateSchema === \"log\")\n this.logger.error(message);\n else\n throw new Error(message);\n }\n return valid;\n }\n // Get compiled schema by `key` or `ref`.\n // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)\n getSchema(keyRef) {\n let sch;\n while (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\")\n keyRef = sch;\n if (sch === undefined) {\n const { schemaId } = this.opts;\n const root = new compile_1.SchemaEnv({ schema: {}, schemaId });\n sch = compile_1.resolveSchema.call(this, root, keyRef);\n if (!sch)\n return;\n this.refs[keyRef] = sch;\n }\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n // Remove cached schema(s).\n // If no parameter is passed all schemas but meta-schemas are removed.\n // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n removeSchema(schemaKeyRef) {\n if (schemaKeyRef instanceof RegExp) {\n this._removeAllSchemas(this.schemas, schemaKeyRef);\n this._removeAllSchemas(this.refs, schemaKeyRef);\n return this;\n }\n switch (typeof schemaKeyRef) {\n case \"undefined\":\n this._removeAllSchemas(this.schemas);\n this._removeAllSchemas(this.refs);\n this._cache.clear();\n return this;\n case \"string\": {\n const sch = getSchEnv.call(this, schemaKeyRef);\n if (typeof sch == \"object\")\n this._cache.delete(sch.schema);\n delete this.schemas[schemaKeyRef];\n delete this.refs[schemaKeyRef];\n return this;\n }\n case \"object\": {\n const cacheKey = schemaKeyRef;\n this._cache.delete(cacheKey);\n let id = schemaKeyRef[this.opts.schemaId];\n if (id) {\n id = (0, resolve_1.normalizeId)(id);\n delete this.schemas[id];\n delete this.refs[id];\n }\n return this;\n }\n default:\n throw new Error(\"ajv.removeSchema: invalid parameter\");\n }\n }\n // add \"vocabulary\" - a collection of keywords\n addVocabulary(definitions) {\n for (const def of definitions)\n this.addKeyword(def);\n return this;\n }\n addKeyword(kwdOrDef, def // deprecated\n ) {\n let keyword;\n if (typeof kwdOrDef == \"string\") {\n keyword = kwdOrDef;\n if (typeof def == \"object\") {\n this.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n def.keyword = keyword;\n }\n }\n else if (typeof kwdOrDef == \"object\" && def === undefined) {\n def = kwdOrDef;\n keyword = def.keyword;\n if (Array.isArray(keyword) && !keyword.length) {\n throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n }\n }\n else {\n throw new Error(\"invalid addKeywords parameters\");\n }\n checkKeyword.call(this, keyword, def);\n if (!def) {\n (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n return this;\n }\n keywordMetaschema.call(this, def);\n const definition = {\n ...def,\n type: (0, dataType_1.getJSONTypes)(def.type),\n schemaType: (0, dataType_1.getJSONTypes)(def.schemaType),\n };\n (0, util_1.eachItem)(keyword, definition.type.length === 0\n ? (k) => addRule.call(this, k, definition)\n : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));\n return this;\n }\n getKeyword(keyword) {\n const rule = this.RULES.all[keyword];\n return typeof rule == \"object\" ? rule.definition : !!rule;\n }\n // Remove keyword\n removeKeyword(keyword) {\n // TODO return type should be Ajv\n const { RULES } = this;\n delete RULES.keywords[keyword];\n delete RULES.all[keyword];\n for (const group of RULES.rules) {\n const i = group.rules.findIndex((rule) => rule.keyword === keyword);\n if (i >= 0)\n group.rules.splice(i, 1);\n }\n return this;\n }\n // Add format\n addFormat(name, format) {\n if (typeof format == \"string\")\n format = new RegExp(format);\n this.formats[name] = format;\n return this;\n }\n errorsText(errors = this.errors, // optional array of validation errors\n { separator = \", \", dataVar = \"data\" } = {} // optional options with properties `separator` and `dataVar`\n ) {\n if (!errors || errors.length === 0)\n return \"No errors\";\n return errors\n .map((e) => `${dataVar}${e.instancePath} ${e.message}`)\n .reduce((text, msg) => text + separator + msg);\n }\n $dataMetaSchema(metaSchema, keywordsJsonPointers) {\n const rules = this.RULES.all;\n metaSchema = JSON.parse(JSON.stringify(metaSchema));\n for (const jsonPointer of keywordsJsonPointers) {\n const segments = jsonPointer.split(\"/\").slice(1); // first segment is an empty string\n let keywords = metaSchema;\n for (const seg of segments)\n keywords = keywords[seg];\n for (const key in rules) {\n const rule = rules[key];\n if (typeof rule != \"object\")\n continue;\n const { $data } = rule.definition;\n const schema = keywords[key];\n if ($data && schema)\n keywords[key] = schemaOrData(schema);\n }\n }\n return metaSchema;\n }\n _removeAllSchemas(schemas, regex) {\n for (const keyRef in schemas) {\n const sch = schemas[keyRef];\n if (!regex || regex.test(keyRef)) {\n if (typeof sch == \"string\") {\n delete schemas[keyRef];\n }\n else if (sch && !sch.meta) {\n this._cache.delete(sch.schema);\n delete schemas[keyRef];\n }\n }\n }\n }\n _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n let id;\n const { schemaId } = this.opts;\n if (typeof schema == \"object\") {\n id = schema[schemaId];\n }\n else {\n if (this.opts.jtd)\n throw new Error(\"schema must be object\");\n else if (typeof schema != \"boolean\")\n throw new Error(\"schema must be object or boolean\");\n }\n let sch = this._cache.get(schema);\n if (sch !== undefined)\n return sch;\n baseId = (0, resolve_1.normalizeId)(id || baseId);\n const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });\n this._cache.set(sch.schema, sch);\n if (addSchema && !baseId.startsWith(\"#\")) {\n // TODO atm it is allowed to overwrite schemas without id (instead of not adding them)\n if (baseId)\n this._checkUnique(baseId);\n this.refs[baseId] = sch;\n }\n if (validateSchema)\n this.validateSchema(schema, true);\n return sch;\n }\n _checkUnique(id) {\n if (this.schemas[id] || this.refs[id]) {\n throw new Error(`schema with key or id \"${id}\" already exists`);\n }\n }\n _compileSchemaEnv(sch) {\n if (sch.meta)\n this._compileMetaSchema(sch);\n else\n compile_1.compileSchema.call(this, sch);\n /* istanbul ignore if */\n if (!sch.validate)\n throw new Error(\"ajv implementation error\");\n return sch.validate;\n }\n _compileMetaSchema(sch) {\n const currentOpts = this.opts;\n this.opts = this._metaOpts;\n try {\n compile_1.compileSchema.call(this, sch);\n }\n finally {\n this.opts = currentOpts;\n }\n }\n}\nAjv.ValidationError = validation_error_1.default;\nAjv.MissingRefError = ref_error_1.default;\nexports.default = Ajv;\nfunction checkOptions(checkOpts, options, msg, log = \"error\") {\n for (const key in checkOpts) {\n const opt = key;\n if (opt in options)\n this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);\n }\n}\nfunction getSchEnv(keyRef) {\n keyRef = (0, resolve_1.normalizeId)(keyRef); // TODO tests fail without this line\n return this.schemas[keyRef] || this.refs[keyRef];\n}\nfunction addInitialSchemas() {\n const optsSchemas = this.opts.schemas;\n if (!optsSchemas)\n return;\n if (Array.isArray(optsSchemas))\n this.addSchema(optsSchemas);\n else\n for (const key in optsSchemas)\n this.addSchema(optsSchemas[key], key);\n}\nfunction addInitialFormats() {\n for (const name in this.opts.formats) {\n const format = this.opts.formats[name];\n if (format)\n this.addFormat(name, format);\n }\n}\nfunction addInitialKeywords(defs) {\n if (Array.isArray(defs)) {\n this.addVocabulary(defs);\n return;\n }\n this.logger.warn(\"keywords option as map is deprecated, pass array\");\n for (const keyword in defs) {\n const def = defs[keyword];\n if (!def.keyword)\n def.keyword = keyword;\n this.addKeyword(def);\n }\n}\nfunction getMetaSchemaOptions() {\n const metaOpts = { ...this.opts };\n for (const opt of META_IGNORE_OPTIONS)\n delete metaOpts[opt];\n return metaOpts;\n}\nconst noLogs = { log() { }, warn() { }, error() { } };\nfunction getLogger(logger) {\n if (logger === false)\n return noLogs;\n if (logger === undefined)\n return console;\n if (logger.log && logger.warn && logger.error)\n return logger;\n throw new Error(\"logger must implement log, warn and error methods\");\n}\nconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\nfunction checkKeyword(keyword, def) {\n const { RULES } = this;\n (0, util_1.eachItem)(keyword, (kwd) => {\n if (RULES.keywords[kwd])\n throw new Error(`Keyword ${kwd} is already defined`);\n if (!KEYWORD_NAME.test(kwd))\n throw new Error(`Keyword ${kwd} has invalid name`);\n });\n if (!def)\n return;\n if (def.$data && !(\"code\" in def || \"validate\" in def)) {\n throw new Error('$data keyword must have \"code\" or \"validate\" function');\n }\n}\nfunction addRule(keyword, definition, dataType) {\n var _a;\n const post = definition === null || definition === void 0 ? void 0 : definition.post;\n if (dataType && post)\n throw new Error('keyword with \"post\" flag cannot have \"type\"');\n const { RULES } = this;\n let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);\n if (!ruleGroup) {\n ruleGroup = { type: dataType, rules: [] };\n RULES.rules.push(ruleGroup);\n }\n RULES.keywords[keyword] = true;\n if (!definition)\n return;\n const rule = {\n keyword,\n definition: {\n ...definition,\n type: (0, dataType_1.getJSONTypes)(definition.type),\n schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType),\n },\n };\n if (definition.before)\n addBeforeRule.call(this, ruleGroup, rule, definition.before);\n else\n ruleGroup.rules.push(rule);\n RULES.all[keyword] = rule;\n (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));\n}\nfunction addBeforeRule(ruleGroup, rule, before) {\n const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n if (i >= 0) {\n ruleGroup.rules.splice(i, 0, rule);\n }\n else {\n ruleGroup.rules.push(rule);\n this.logger.warn(`rule ${before} is not defined`);\n }\n}\nfunction keywordMetaschema(def) {\n let { metaSchema } = def;\n if (metaSchema === undefined)\n return;\n if (def.$data && this.opts.$data)\n metaSchema = schemaOrData(metaSchema);\n def.validateSchema = this.compile(metaSchema, true);\n}\nconst $dataRef = {\n $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n};\nfunction schemaOrData(schema) {\n return { anyOf: [schema, $dataRef] };\n}\n//# sourceMappingURL=core.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// https://github.com/ajv-validator/ajv/issues/889\nconst equal = require(\"fast-deep-equal\");\nequal.code = 'require(\"ajv/dist/runtime/equal\").default';\nexports.default = equal;\n//# sourceMappingURL=equal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// https://mathiasbynens.be/notes/javascript-encoding\n// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode\nfunction ucs2length(str) {\n const len = str.length;\n let length = 0;\n let pos = 0;\n let value;\n while (pos < len) {\n length++;\n value = str.charCodeAt(pos++);\n if (value >= 0xd800 && value <= 0xdbff && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xfc00) === 0xdc00)\n pos++; // low surrogate\n }\n }\n return length;\n}\nexports.default = ucs2length;\nucs2length.code = 'require(\"ajv/dist/runtime/ucs2length\").default';\n//# sourceMappingURL=ucs2length.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst uri = require(\"uri-js\");\nuri.code = 'require(\"ajv/dist/runtime/uri\").default';\nexports.default = uri;\n//# sourceMappingURL=uri.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass ValidationError extends Error {\n constructor(errors) {\n super(\"validation failed\");\n this.errors = errors;\n this.ajv = this.validation = true;\n }\n}\nexports.default = ValidationError;\n//# sourceMappingURL=validation_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateAdditionalItems = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"additionalItems\",\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { parentSchema, it } = cxt;\n const { items } = parentSchema;\n if (!Array.isArray(items)) {\n (0, util_1.checkStrictMode)(it, '\"additionalItems\" is ignored when \"items\" is not an array of schemas');\n return;\n }\n validateAdditionalItems(cxt, items);\n },\n};\nfunction validateAdditionalItems(cxt, items) {\n const { gen, schema, data, keyword, it } = cxt;\n it.items = true;\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n if (schema === false) {\n cxt.setParams({ len: items.length });\n cxt.pass((0, codegen_1._) `${len} <= ${items.length}`);\n }\n else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.var(\"valid\", (0, codegen_1._) `${len} <= ${items.length}`); // TODO var\n gen.if((0, codegen_1.not)(valid), () => validateItems(valid));\n cxt.ok(valid);\n }\n function validateItems(valid) {\n gen.forRange(\"i\", items.length, len, (i) => {\n cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);\n if (!it.allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n });\n }\n}\nexports.validateAdditionalItems = validateAdditionalItems;\nexports.default = def;\n//# sourceMappingURL=additionalItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must NOT have additional properties\",\n params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`,\n};\nconst def = {\n keyword: \"additionalProperties\",\n type: [\"object\"],\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, data, errsCount, it } = cxt;\n /* istanbul ignore if */\n if (!errsCount)\n throw new Error(\"ajv implementation error\");\n const { allErrors, opts } = it;\n it.props = true;\n if (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema))\n return;\n const props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n checkAdditionalProperties();\n cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n function checkAdditionalProperties() {\n gen.forIn(\"key\", data, (key) => {\n if (!props.length && !patProps.length)\n additionalPropertyCode(key);\n else\n gen.if(isAdditional(key), () => additionalPropertyCode(key));\n });\n }\n function isAdditional(key) {\n let definedProp;\n if (props.length > 8) {\n // TODO maybe an option instead of hard-coded 8?\n const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);\n }\n else if (props.length) {\n definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`));\n }\n else {\n definedProp = codegen_1.nil;\n }\n if (patProps.length) {\n definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`));\n }\n return (0, codegen_1.not)(definedProp);\n }\n function deleteAdditional(key) {\n gen.code((0, codegen_1._) `delete ${data}[${key}]`);\n }\n function additionalPropertyCode(key) {\n if (opts.removeAdditional === \"all\" || (opts.removeAdditional && schema === false)) {\n deleteAdditional(key);\n return;\n }\n if (schema === false) {\n cxt.setParams({ additionalProperty: key });\n cxt.error();\n if (!allErrors)\n gen.break();\n return;\n }\n if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.name(\"valid\");\n if (opts.removeAdditional === \"failing\") {\n applyAdditionalSchema(key, valid, false);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.reset();\n deleteAdditional(key);\n });\n }\n else {\n applyAdditionalSchema(key, valid);\n if (!allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n }\n }\n function applyAdditionalSchema(key, valid, errors) {\n const subschema = {\n keyword: \"additionalProperties\",\n dataProp: key,\n dataPropType: util_1.Type.Str,\n };\n if (errors === false) {\n Object.assign(subschema, {\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n });\n }\n cxt.subschema(subschema, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=additionalProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"allOf\",\n schemaType: \"array\",\n code(cxt) {\n const { gen, schema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const valid = gen.name(\"valid\");\n schema.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n const schCxt = cxt.subschema({ keyword: \"allOf\", schemaProp: i }, valid);\n cxt.ok(valid);\n cxt.mergeEvaluated(schCxt);\n });\n },\n};\nexports.default = def;\n//# sourceMappingURL=allOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"anyOf\",\n schemaType: \"array\",\n trackErrors: true,\n code: code_1.validateUnion,\n error: { message: \"must match a schema in anyOf\" },\n};\nexports.default = def;\n//# sourceMappingURL=anyOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { min, max } }) => max === undefined\n ? (0, codegen_1.str) `must contain at least ${min} valid item(s)`\n : (0, codegen_1.str) `must contain at least ${min} and no more than ${max} valid item(s)`,\n params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._) `{minContains: ${min}}` : (0, codegen_1._) `{minContains: ${min}, maxContains: ${max}}`,\n};\nconst def = {\n keyword: \"contains\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n let min;\n let max;\n const { minContains, maxContains } = parentSchema;\n if (it.opts.next) {\n min = minContains === undefined ? 1 : minContains;\n max = maxContains;\n }\n else {\n min = 1;\n }\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n cxt.setParams({ min, max });\n if (max === undefined && min === 0) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n return;\n }\n if (max !== undefined && min > max) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n cxt.fail();\n return;\n }\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n let cond = (0, codegen_1._) `${len} >= ${min}`;\n if (max !== undefined)\n cond = (0, codegen_1._) `${cond} && ${len} <= ${max}`;\n cxt.pass(cond);\n return;\n }\n it.items = true;\n const valid = gen.name(\"valid\");\n if (max === undefined && min === 1) {\n validateItems(valid, () => gen.if(valid, () => gen.break()));\n }\n else if (min === 0) {\n gen.let(valid, true);\n if (max !== undefined)\n gen.if((0, codegen_1._) `${data}.length > 0`, validateItemsWithCount);\n }\n else {\n gen.let(valid, false);\n validateItemsWithCount();\n }\n cxt.result(valid, () => cxt.reset());\n function validateItemsWithCount() {\n const schValid = gen.name(\"_valid\");\n const count = gen.let(\"count\", 0);\n validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));\n }\n function validateItems(_valid, block) {\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword: \"contains\",\n dataProp: i,\n dataPropType: util_1.Type.Num,\n compositeRule: true,\n }, _valid);\n block();\n });\n }\n function checkLimits(count) {\n gen.code((0, codegen_1._) `${count}++`);\n if (max === undefined) {\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true).break());\n }\n else {\n gen.if((0, codegen_1._) `${count} > ${max}`, () => gen.assign(valid, false).break());\n if (min === 1)\n gen.assign(valid, true);\n else\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true));\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=contains.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nexports.error = {\n message: ({ params: { property, depsCount, deps } }) => {\n const property_ies = depsCount === 1 ? \"property\" : \"properties\";\n return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;\n },\n params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._) `{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`, // TODO change to reference\n};\nconst def = {\n keyword: \"dependencies\",\n type: \"object\",\n schemaType: \"object\",\n error: exports.error,\n code(cxt) {\n const [propDeps, schDeps] = splitDependencies(cxt);\n validatePropertyDeps(cxt, propDeps);\n validateSchemaDeps(cxt, schDeps);\n },\n};\nfunction splitDependencies({ schema }) {\n const propertyDeps = {};\n const schemaDeps = {};\n for (const key in schema) {\n if (key === \"__proto__\")\n continue;\n const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n deps[key] = schema[key];\n }\n return [propertyDeps, schemaDeps];\n}\nfunction validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n const { gen, data, it } = cxt;\n if (Object.keys(propertyDeps).length === 0)\n return;\n const missing = gen.let(\"missing\");\n for (const prop in propertyDeps) {\n const deps = propertyDeps[prop];\n if (deps.length === 0)\n continue;\n const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);\n cxt.setParams({\n property: prop,\n depsCount: deps.length,\n deps: deps.join(\", \"),\n });\n if (it.allErrors) {\n gen.if(hasProperty, () => {\n for (const depProp of deps) {\n (0, code_1.checkReportMissingProp)(cxt, depProp);\n }\n });\n }\n else {\n gen.if((0, codegen_1._) `${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n}\nexports.validatePropertyDeps = validatePropertyDeps;\nfunction validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n for (const prop in schemaDeps) {\n if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))\n continue;\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {\n const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);\n cxt.mergeValidEvaluated(schCxt, valid);\n }, () => gen.var(valid, true) // TODO var\n );\n cxt.ok(valid);\n }\n}\nexports.validateSchemaDeps = validateSchemaDeps;\nexports.default = def;\n//# sourceMappingURL=dependencies.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params }) => (0, codegen_1.str) `must match \"${params.ifClause}\" schema`,\n params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`,\n};\nconst def = {\n keyword: \"if\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, parentSchema, it } = cxt;\n if (parentSchema.then === undefined && parentSchema.else === undefined) {\n (0, util_1.checkStrictMode)(it, '\"if\" without \"then\" and \"else\" is ignored');\n }\n const hasThen = hasSchema(it, \"then\");\n const hasElse = hasSchema(it, \"else\");\n if (!hasThen && !hasElse)\n return;\n const valid = gen.let(\"valid\", true);\n const schValid = gen.name(\"_valid\");\n validateIf();\n cxt.reset();\n if (hasThen && hasElse) {\n const ifClause = gen.let(\"ifClause\");\n cxt.setParams({ ifClause });\n gen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n }\n else if (hasThen) {\n gen.if(schValid, validateClause(\"then\"));\n }\n else {\n gen.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n }\n cxt.pass(valid, () => cxt.error(true));\n function validateIf() {\n const schCxt = cxt.subschema({\n keyword: \"if\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, schValid);\n cxt.mergeEvaluated(schCxt);\n }\n function validateClause(keyword, ifClause) {\n return () => {\n const schCxt = cxt.subschema({ keyword }, schValid);\n gen.assign(valid, schValid);\n cxt.mergeValidEvaluated(schCxt, valid);\n if (ifClause)\n gen.assign(ifClause, (0, codegen_1._) `${keyword}`);\n else\n cxt.setParams({ ifClause: keyword });\n };\n }\n },\n};\nfunction hasSchema(it, keyword) {\n const schema = it.schema[keyword];\n return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema);\n}\nexports.default = def;\n//# sourceMappingURL=if.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst additionalItems_1 = require(\"./additionalItems\");\nconst prefixItems_1 = require(\"./prefixItems\");\nconst items_1 = require(\"./items\");\nconst items2020_1 = require(\"./items2020\");\nconst contains_1 = require(\"./contains\");\nconst dependencies_1 = require(\"./dependencies\");\nconst propertyNames_1 = require(\"./propertyNames\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst properties_1 = require(\"./properties\");\nconst patternProperties_1 = require(\"./patternProperties\");\nconst not_1 = require(\"./not\");\nconst anyOf_1 = require(\"./anyOf\");\nconst oneOf_1 = require(\"./oneOf\");\nconst allOf_1 = require(\"./allOf\");\nconst if_1 = require(\"./if\");\nconst thenElse_1 = require(\"./thenElse\");\nfunction getApplicator(draft2020 = false) {\n const applicator = [\n // any\n not_1.default,\n anyOf_1.default,\n oneOf_1.default,\n allOf_1.default,\n if_1.default,\n thenElse_1.default,\n // object\n propertyNames_1.default,\n additionalProperties_1.default,\n dependencies_1.default,\n properties_1.default,\n patternProperties_1.default,\n ];\n // array\n if (draft2020)\n applicator.push(prefixItems_1.default, items2020_1.default);\n else\n applicator.push(additionalItems_1.default, items_1.default);\n applicator.push(contains_1.default);\n return applicator;\n}\nexports.default = getApplicator;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateTuple = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"array\", \"boolean\"],\n before: \"uniqueItems\",\n code(cxt) {\n const { schema, it } = cxt;\n if (Array.isArray(schema))\n return validateTuple(cxt, \"additionalItems\", schema);\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nfunction validateTuple(cxt, extraItems, schArr = cxt.schema) {\n const { gen, parentSchema, data, keyword, it } = cxt;\n checkStrictTuple(parentSchema);\n if (it.opts.unevaluated && schArr.length && it.items !== true) {\n it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);\n }\n const valid = gen.name(\"valid\");\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n schArr.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({\n keyword,\n schemaProp: i,\n dataProp: i,\n }, valid));\n cxt.ok(valid);\n });\n function checkStrictTuple(sch) {\n const { opts, errSchemaPath } = it;\n const l = schArr.length;\n const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);\n if (opts.strictTuples && !fullTuple) {\n const msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n }\n }\n}\nexports.validateTuple = validateTuple;\nexports.default = def;\n//# sourceMappingURL=items.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst additionalItems_1 = require(\"./additionalItems\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { schema, parentSchema, it } = cxt;\n const { prefixItems } = parentSchema;\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n if (prefixItems)\n (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n else\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nexports.default = def;\n//# sourceMappingURL=items2020.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"not\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n code(cxt) {\n const { gen, schema, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n cxt.fail();\n return;\n }\n const valid = gen.name(\"valid\");\n cxt.subschema({\n keyword: \"not\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, valid);\n cxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n },\n error: { message: \"must NOT be valid\" },\n};\nexports.default = def;\n//# sourceMappingURL=not.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must match exactly one schema in oneOf\",\n params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`,\n};\nconst def = {\n keyword: \"oneOf\",\n schemaType: \"array\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n if (it.opts.discriminator && parentSchema.discriminator)\n return;\n const schArr = schema;\n const valid = gen.let(\"valid\", false);\n const passing = gen.let(\"passing\", null);\n const schValid = gen.name(\"_valid\");\n cxt.setParams({ passing });\n // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas\n gen.block(validateOneOf);\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n function validateOneOf() {\n schArr.forEach((sch, i) => {\n let schCxt;\n if ((0, util_1.alwaysValidSchema)(it, sch)) {\n gen.var(schValid, true);\n }\n else {\n schCxt = cxt.subschema({\n keyword: \"oneOf\",\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n }\n if (i > 0) {\n gen\n .if((0, codegen_1._) `${schValid} && ${valid}`)\n .assign(valid, false)\n .assign(passing, (0, codegen_1._) `[${passing}, ${i}]`)\n .else();\n }\n gen.if(schValid, () => {\n gen.assign(valid, true);\n gen.assign(passing, i);\n if (schCxt)\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=oneOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst util_2 = require(\"../../compile/util\");\nconst def = {\n keyword: \"patternProperties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, data, parentSchema, it } = cxt;\n const { opts } = it;\n const patterns = (0, code_1.allSchemaProperties)(schema);\n const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));\n if (patterns.length === 0 ||\n (alwaysValidPatterns.length === patterns.length &&\n (!it.opts.unevaluated || it.props === true))) {\n return;\n }\n const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n const valid = gen.name(\"valid\");\n if (it.props !== true && !(it.props instanceof codegen_1.Name)) {\n it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);\n }\n const { props } = it;\n validatePatternProperties();\n function validatePatternProperties() {\n for (const pat of patterns) {\n if (checkProperties)\n checkMatchingProperties(pat);\n if (it.allErrors) {\n validateProperties(pat);\n }\n else {\n gen.var(valid, true); // TODO var\n validateProperties(pat);\n gen.if(valid);\n }\n }\n }\n function checkMatchingProperties(pat) {\n for (const prop in checkProperties) {\n if (new RegExp(pat).test(prop)) {\n (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n }\n }\n }\n function validateProperties(pat) {\n gen.forIn(\"key\", data, (key) => {\n gen.if((0, codegen_1._) `${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n const alwaysValid = alwaysValidPatterns.includes(pat);\n if (!alwaysValid) {\n cxt.subschema({\n keyword: \"patternProperties\",\n schemaProp: pat,\n dataProp: key,\n dataPropType: util_2.Type.Str,\n }, valid);\n }\n if (it.opts.unevaluated && props !== true) {\n gen.assign((0, codegen_1._) `${props}[${key}]`, true);\n }\n else if (!alwaysValid && !it.allErrors) {\n // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false)\n // or if all properties were evaluated (props === true)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=patternProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst items_1 = require(\"./items\");\nconst def = {\n keyword: \"prefixItems\",\n type: \"array\",\n schemaType: [\"array\"],\n before: \"uniqueItems\",\n code: (cxt) => (0, items_1.validateTuple)(cxt, \"items\"),\n};\nexports.default = def;\n//# sourceMappingURL=prefixItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_1 = require(\"../../compile/validate\");\nconst code_1 = require(\"../code\");\nconst util_1 = require(\"../../compile/util\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst def = {\n keyword: \"properties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n if (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === undefined) {\n additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n }\n const allProps = (0, code_1.allSchemaProperties)(schema);\n for (const prop of allProps) {\n it.definedProperties.add(prop);\n }\n if (it.opts.unevaluated && allProps.length && it.props !== true) {\n it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);\n }\n const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));\n if (properties.length === 0)\n return;\n const valid = gen.name(\"valid\");\n for (const prop of properties) {\n if (hasDefault(prop)) {\n applyPropertySchema(prop);\n }\n else {\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));\n applyPropertySchema(prop);\n if (!it.allErrors)\n gen.else().var(valid, true);\n gen.endIf();\n }\n cxt.it.definedProperties.add(prop);\n cxt.ok(valid);\n }\n function hasDefault(prop) {\n return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined;\n }\n function applyPropertySchema(prop) {\n cxt.subschema({\n keyword: \"properties\",\n schemaProp: prop,\n dataProp: prop,\n }, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=properties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"property name must be valid\",\n params: ({ params }) => (0, codegen_1._) `{propertyName: ${params.propertyName}}`,\n};\nconst def = {\n keyword: \"propertyNames\",\n type: \"object\",\n schemaType: [\"object\", \"boolean\"],\n error,\n code(cxt) {\n const { gen, schema, data, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n const valid = gen.name(\"valid\");\n gen.forIn(\"key\", data, (key) => {\n cxt.setParams({ propertyName: key });\n cxt.subschema({\n keyword: \"propertyNames\",\n data: key,\n dataTypes: [\"string\"],\n propertyName: key,\n compositeRule: true,\n }, valid);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error(true);\n if (!it.allErrors)\n gen.break();\n });\n });\n cxt.ok(valid);\n },\n};\nexports.default = def;\n//# sourceMappingURL=propertyNames.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: [\"then\", \"else\"],\n schemaType: [\"object\", \"boolean\"],\n code({ keyword, parentSchema, it }) {\n if (parentSchema.if === undefined)\n (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=thenElse.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;\nconst codegen_1 = require(\"../compile/codegen\");\nconst util_1 = require(\"../compile/util\");\nconst names_1 = require(\"../compile/names\");\nconst util_2 = require(\"../compile/util\");\nfunction checkReportMissingProp(cxt, prop) {\n const { gen, data, it } = cxt;\n gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n cxt.setParams({ missingProperty: (0, codegen_1._) `${prop}` }, true);\n cxt.error();\n });\n}\nexports.checkReportMissingProp = checkReportMissingProp;\nfunction checkMissingProp({ gen, data, it: { opts } }, properties, missing) {\n return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._) `${missing} = ${prop}`)));\n}\nexports.checkMissingProp = checkMissingProp;\nfunction reportMissingProp(cxt, missing) {\n cxt.setParams({ missingProperty: missing }, true);\n cxt.error();\n}\nexports.reportMissingProp = reportMissingProp;\nfunction hasPropFunc(gen) {\n return gen.scopeValue(\"func\", {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ref: Object.prototype.hasOwnProperty,\n code: (0, codegen_1._) `Object.prototype.hasOwnProperty`,\n });\n}\nexports.hasPropFunc = hasPropFunc;\nfunction isOwnProperty(gen, data, property) {\n return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`;\n}\nexports.isOwnProperty = isOwnProperty;\nfunction propertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n return ownProperties ? (0, codegen_1._) `${cond} && ${isOwnProperty(gen, data, property)}` : cond;\n}\nexports.propertyInData = propertyInData;\nfunction noPropertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;\n}\nexports.noPropertyInData = noPropertyInData;\nfunction allSchemaProperties(schemaMap) {\n return schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : [];\n}\nexports.allSchemaProperties = allSchemaProperties;\nfunction schemaProperties(it, schemaMap) {\n return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));\n}\nexports.schemaProperties = schemaProperties;\nfunction callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {\n const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n const valCxt = [\n [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n [names_1.default.parentData, it.parentData],\n [names_1.default.parentDataProperty, it.parentDataProperty],\n [names_1.default.rootData, names_1.default.rootData],\n ];\n if (it.opts.dynamicRef)\n valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n const args = (0, codegen_1._) `${dataAndSchema}, ${gen.object(...valCxt)}`;\n return context !== codegen_1.nil ? (0, codegen_1._) `${func}.call(${context}, ${args})` : (0, codegen_1._) `${func}(${args})`;\n}\nexports.callValidateCode = callValidateCode;\nconst newRegExp = (0, codegen_1._) `new RegExp`;\nfunction usePattern({ gen, it: { opts } }, pattern) {\n const u = opts.unicodeRegExp ? \"u\" : \"\";\n const { regExp } = opts.code;\n const rx = regExp(pattern, u);\n return gen.scopeValue(\"pattern\", {\n key: rx.toString(),\n ref: rx,\n code: (0, codegen_1._) `${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`,\n });\n}\nexports.usePattern = usePattern;\nfunction validateArray(cxt) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n if (it.allErrors) {\n const validArr = gen.let(\"valid\", true);\n validateItems(() => gen.assign(validArr, false));\n return validArr;\n }\n gen.var(valid, true);\n validateItems(() => gen.break());\n return valid;\n function validateItems(notValid) {\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword,\n dataProp: i,\n dataPropType: util_1.Type.Num,\n }, valid);\n gen.if((0, codegen_1.not)(valid), notValid);\n });\n }\n}\nexports.validateArray = validateArray;\nfunction validateUnion(cxt) {\n const { gen, schema, keyword, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));\n if (alwaysValid && !it.opts.unevaluated)\n return;\n const valid = gen.let(\"valid\", false);\n const schValid = gen.name(\"_valid\");\n gen.block(() => schema.forEach((_sch, i) => {\n const schCxt = cxt.subschema({\n keyword,\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n gen.assign(valid, (0, codegen_1._) `${valid} || ${schValid}`);\n const merged = cxt.mergeValidEvaluated(schCxt, schValid);\n // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true)\n // or if all properties and items were evaluated (it.props === true && it.items === true)\n if (!merged)\n gen.if((0, codegen_1.not)(valid));\n }));\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n}\nexports.validateUnion = validateUnion;\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst def = {\n keyword: \"id\",\n code() {\n throw new Error('NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID');\n },\n};\nexports.default = def;\n//# sourceMappingURL=id.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst id_1 = require(\"./id\");\nconst ref_1 = require(\"./ref\");\nconst core = [\n \"$schema\",\n \"$id\",\n \"$defs\",\n \"$vocabulary\",\n { keyword: \"$comment\" },\n \"definitions\",\n id_1.default,\n ref_1.default,\n];\nexports.default = core;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callRef = exports.getValidate = void 0;\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt) {\n const { gen, schema: $ref, it } = cxt;\n const { baseId, schemaEnv: env, validateName, opts, self } = it;\n const { root } = env;\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId)\n return callRootRef();\n const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n if (schOrEnv === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n if (schOrEnv instanceof compile_1.SchemaEnv)\n return callValidate(schOrEnv);\n return inlineRefSchema(schOrEnv);\n function callRootRef() {\n if (env === root)\n return callRef(cxt, validateName, env, env.$async);\n const rootName = gen.scopeValue(\"root\", { ref: root });\n return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async);\n }\n function callValidate(sch) {\n const v = getValidate(cxt, sch);\n callRef(cxt, v, sch, sch.$async);\n }\n function inlineRefSchema(sch) {\n const schName = gen.scopeValue(\"schema\", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });\n const valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({\n schema: sch,\n dataTypes: [],\n schemaPath: codegen_1.nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n }, valid);\n cxt.mergeEvaluated(schCxt);\n cxt.ok(valid);\n }\n },\n};\nfunction getValidate(cxt, sch) {\n const { gen } = cxt;\n return sch.validate\n ? gen.scopeValue(\"validate\", { ref: sch.validate })\n : (0, codegen_1._) `${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n}\nexports.getValidate = getValidate;\nfunction callRef(cxt, v, sch, $async) {\n const { gen, it } = cxt;\n const { allErrors, schemaEnv: env, opts } = it;\n const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n if ($async)\n callAsyncRef();\n else\n callSyncRef();\n function callAsyncRef() {\n if (!env.$async)\n throw new Error(\"async schema referenced by sync schema\");\n const valid = gen.let(\"valid\");\n gen.try(() => {\n gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result\n if (!allErrors)\n gen.assign(valid, true);\n }, (e) => {\n gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n addErrorsFrom(e);\n if (!allErrors)\n gen.assign(valid, false);\n });\n cxt.ok(valid);\n }\n function callSyncRef() {\n cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n }\n function addErrorsFrom(source) {\n const errs = (0, codegen_1._) `${source}.errors`;\n gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged\n gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n }\n function addEvaluatedFrom(source) {\n var _a;\n if (!it.opts.unevaluated)\n return;\n const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n }\n }\n else {\n const props = gen.var(\"props\", (0, codegen_1._) `${source}.evaluated.props`);\n it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n }\n }\n else {\n const items = gen.var(\"items\", (0, codegen_1._) `${source}.evaluated.items`);\n it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n }\n }\n }\n}\nexports.callRef = callRef;\nexports.default = def;\n//# sourceMappingURL=ref.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst types_1 = require(\"../discriminator/types\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf`,\n params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n};\nconst def = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt) {\n const { gen, data, schema, parentSchema, it } = cxt;\n const { oneOf } = parentSchema;\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\");\n }\n const tagName = schema.propertyName;\n if (typeof tagName != \"string\")\n throw new Error(\"discriminator: requires propertyName\");\n if (schema.mapping)\n throw new Error(\"discriminator: mapping is not supported\");\n if (!oneOf)\n throw new Error(\"discriminator: requires oneOf keyword\");\n const valid = gen.let(\"valid\", false);\n const tag = gen.const(\"tag\", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`);\n gen.if((0, codegen_1._) `typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));\n cxt.ok(valid);\n function validateMapping() {\n const mapping = getMapping();\n gen.if(false);\n for (const tagValue in mapping) {\n gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);\n gen.assign(valid, applyTagSchema(mapping[tagValue]));\n }\n gen.else();\n cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });\n gen.endIf();\n }\n function applyTagSchema(schemaProp) {\n const _valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({ keyword: \"oneOf\", schemaProp }, _valid);\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n return _valid;\n }\n function getMapping() {\n var _a;\n const oneOfMapping = {};\n const topRequired = hasRequired(parentSchema);\n let tagRequired = true;\n for (let i = 0; i < oneOf.length; i++) {\n let sch = oneOf[i];\n if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref);\n if (sch instanceof compile_1.SchemaEnv)\n sch = sch.schema;\n }\n const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n if (typeof propSch != \"object\") {\n throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch));\n addMappings(propSch, i);\n }\n if (!tagRequired)\n throw new Error(`discriminator: \"${tagName}\" must be required`);\n return oneOfMapping;\n function hasRequired({ required }) {\n return Array.isArray(required) && required.includes(tagName);\n }\n function addMappings(sch, i) {\n if (sch.const) {\n addMapping(sch.const, i);\n }\n else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i);\n }\n }\n else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n }\n }\n function addMapping(tagValue, i) {\n if (typeof tagValue != \"string\" || tagValue in oneOfMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n }\n oneOfMapping[tagValue] = i;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscrError = void 0;\nvar DiscrError;\n(function (DiscrError) {\n DiscrError[\"Tag\"] = \"tag\";\n DiscrError[\"Mapping\"] = \"mapping\";\n})(DiscrError || (exports.DiscrError = DiscrError = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"./core\");\nconst validation_1 = require(\"./validation\");\nconst applicator_1 = require(\"./applicator\");\nconst format_1 = require(\"./format\");\nconst metadata_1 = require(\"./metadata\");\nconst draft7Vocabularies = [\n core_1.default,\n validation_1.default,\n (0, applicator_1.default)(),\n format_1.default,\n metadata_1.metadataVocabulary,\n metadata_1.contentVocabulary,\n];\nexports.default = draft7Vocabularies;\n//# sourceMappingURL=draft7.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match format \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{format: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"format\",\n type: [\"number\", \"string\"],\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt, ruleType) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n const { opts, errSchemaPath, schemaEnv, self } = it;\n if (!opts.validateFormats)\n return;\n if ($data)\n validate$DataFormat();\n else\n validateFormat();\n function validate$DataFormat() {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n });\n const fDef = gen.const(\"fDef\", (0, codegen_1._) `${fmts}[${schemaCode}]`);\n const fType = gen.let(\"fType\");\n const format = gen.let(\"format\");\n // TODO simplify\n gen.if((0, codegen_1._) `typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._) `${fDef}.type || \"string\"`).assign(format, (0, codegen_1._) `${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._) `\"string\"`).assign(format, fDef));\n cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n function unknownFmt() {\n if (opts.strictSchema === false)\n return codegen_1.nil;\n return (0, codegen_1._) `${schemaCode} && !${format}`;\n }\n function invalidFmt() {\n const callFormat = schemaEnv.$async\n ? (0, codegen_1._) `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))`\n : (0, codegen_1._) `${format}(${data})`;\n const validData = (0, codegen_1._) `(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n return (0, codegen_1._) `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n }\n }\n function validateFormat() {\n const formatDef = self.formats[schema];\n if (!formatDef) {\n unknownFormat();\n return;\n }\n if (formatDef === true)\n return;\n const [fmtType, format, fmtRef] = getFormat(formatDef);\n if (fmtType === ruleType)\n cxt.pass(validCondition());\n function unknownFormat() {\n if (opts.strictSchema === false) {\n self.logger.warn(unknownMsg());\n return;\n }\n throw new Error(unknownMsg());\n function unknownMsg() {\n return `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n }\n }\n function getFormat(fmtDef) {\n const code = fmtDef instanceof RegExp\n ? (0, codegen_1.regexpCode)(fmtDef)\n : opts.code.formats\n ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(schema)}`\n : undefined;\n const fmt = gen.scopeValue(\"formats\", { key: schema, ref: fmtDef, code });\n if (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) {\n return [fmtDef.type || \"string\", fmtDef.validate, (0, codegen_1._) `${fmt}.validate`];\n }\n return [\"string\", fmtDef, fmt];\n }\n function validCondition() {\n if (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n if (!schemaEnv.$async)\n throw new Error(\"async format in sync schema\");\n return (0, codegen_1._) `await ${fmtRef}(${data})`;\n }\n return typeof format == \"function\" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=format.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst format_1 = require(\"./format\");\nconst format = [format_1.default];\nexports.default = format;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.contentVocabulary = exports.metadataVocabulary = void 0;\nexports.metadataVocabulary = [\n \"title\",\n \"description\",\n \"default\",\n \"deprecated\",\n \"readOnly\",\n \"writeOnly\",\n \"examples\",\n];\nexports.contentVocabulary = [\n \"contentMediaType\",\n \"contentEncoding\",\n \"contentSchema\",\n];\n//# sourceMappingURL=metadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to constant\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValue: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"const\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schemaCode, schema } = cxt;\n if ($data || (schema && typeof schema == \"object\")) {\n cxt.fail$data((0, codegen_1._) `!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);\n }\n else {\n cxt.fail((0, codegen_1._) `${schema} !== ${data}`);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=const.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to one of the allowed values\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValues: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"enum\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n if (!$data && schema.length === 0)\n throw new Error(\"enum must have non-empty array\");\n const useLoop = schema.length >= it.opts.loopEnum;\n let eql;\n const getEql = () => (eql !== null && eql !== void 0 ? eql : (eql = (0, util_1.useFunc)(gen, equal_1.default)));\n let valid;\n if (useLoop || $data) {\n valid = gen.let(\"valid\");\n cxt.block$data(valid, loopEnum);\n }\n else {\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const vSchema = gen.const(\"vSchema\", schemaCode);\n valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));\n }\n cxt.pass(valid);\n function loopEnum() {\n gen.assign(valid, false);\n gen.forOf(\"v\", schemaCode, (v) => gen.if((0, codegen_1._) `${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));\n }\n function equalCode(vSchema, i) {\n const sch = schema[i];\n return typeof sch === \"object\" && sch !== null\n ? (0, codegen_1._) `${getEql()}(${data}, ${vSchema}[${i}])`\n : (0, codegen_1._) `${data} === ${sch}`;\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst limitNumber_1 = require(\"./limitNumber\");\nconst multipleOf_1 = require(\"./multipleOf\");\nconst limitLength_1 = require(\"./limitLength\");\nconst pattern_1 = require(\"./pattern\");\nconst limitProperties_1 = require(\"./limitProperties\");\nconst required_1 = require(\"./required\");\nconst limitItems_1 = require(\"./limitItems\");\nconst uniqueItems_1 = require(\"./uniqueItems\");\nconst const_1 = require(\"./const\");\nconst enum_1 = require(\"./enum\");\nconst validation = [\n // number\n limitNumber_1.default,\n multipleOf_1.default,\n // string\n limitLength_1.default,\n pattern_1.default,\n // object\n limitProperties_1.default,\n required_1.default,\n // array\n limitItems_1.default,\n uniqueItems_1.default,\n // any\n { keyword: \"type\", schemaType: [\"string\", \"array\"] },\n { keyword: \"nullable\", schemaType: \"boolean\" },\n const_1.default,\n enum_1.default,\n];\nexports.default = validation;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxItems\", \"minItems\"],\n type: \"array\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `${data}.length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst ucs2length_1 = require(\"../../runtime/ucs2length\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxLength\", \"minLength\"],\n type: \"string\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode, it } = cxt;\n const op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitLength.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst ops = codegen_1.operators;\nconst KWDs = {\n maximum: { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n minimum: { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n exclusiveMaximum: { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n exclusiveMinimum: { okStr: \">\", ok: ops.GT, fail: ops.LTE },\n};\nconst error = {\n message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`,\n params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitNumber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} properties`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxProperties\", \"minProperties\"],\n type: \"object\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`,\n params: ({ schemaCode }) => (0, codegen_1._) `{multipleOf: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"multipleOf\",\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, schemaCode, it } = cxt;\n // const bdt = bad$DataType(schemaCode, <string>def.schemaType, $data)\n const prec = it.opts.multipleOfPrecision;\n const res = gen.let(\"res\");\n const invalid = prec\n ? (0, codegen_1._) `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`\n : (0, codegen_1._) `${res} !== parseInt(${res})`;\n cxt.fail$data((0, codegen_1._) `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=multipleOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match pattern \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{pattern: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"pattern\",\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const { data, $data, schema, schemaCode, it } = cxt;\n // TODO regexp should be wrapped in try/catchs\n const u = it.opts.unicodeRegExp ? \"u\" : \"\";\n const regExp = $data ? (0, codegen_1._) `(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);\n cxt.fail$data((0, codegen_1._) `!${regExp}.test(${data})`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`,\n params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`,\n};\nconst def = {\n keyword: \"required\",\n type: \"object\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, schema, schemaCode, data, $data, it } = cxt;\n const { opts } = it;\n if (!$data && schema.length === 0)\n return;\n const useLoop = schema.length >= opts.loopRequired;\n if (it.allErrors)\n allErrorsMode();\n else\n exitOnErrorMode();\n if (opts.strictRequired) {\n const props = cxt.parentSchema.properties;\n const { definedProperties } = cxt.it;\n for (const requiredKey of schema) {\n if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n const msg = `required property \"${requiredKey}\" is not defined at \"${schemaPath}\" (strictRequired)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n }\n }\n }\n function allErrorsMode() {\n if (useLoop || $data) {\n cxt.block$data(codegen_1.nil, loopAllRequired);\n }\n else {\n for (const prop of schema) {\n (0, code_1.checkReportMissingProp)(cxt, prop);\n }\n }\n }\n function exitOnErrorMode() {\n const missing = gen.let(\"missing\");\n if (useLoop || $data) {\n const valid = gen.let(\"valid\", true);\n cxt.block$data(valid, () => loopUntilMissing(missing, valid));\n cxt.ok(valid);\n }\n else {\n gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n function loopAllRequired() {\n gen.forOf(\"prop\", schemaCode, (prop) => {\n cxt.setParams({ missingProperty: prop });\n gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());\n });\n }\n function loopUntilMissing(missing, valid) {\n cxt.setParams({ missingProperty: missing });\n gen.forOf(missing, schemaCode, () => {\n gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error();\n gen.break();\n });\n }, codegen_1.nil);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=required.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dataType_1 = require(\"../../compile/validate/dataType\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`,\n};\nconst def = {\n keyword: \"uniqueItems\",\n type: \"array\",\n schemaType: \"boolean\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n if (!$data && !schema)\n return;\n const valid = gen.let(\"valid\");\n const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`);\n cxt.ok(valid);\n function validateUniqueItems() {\n const i = gen.let(\"i\", (0, codegen_1._) `${data}.length`);\n const j = gen.let(\"j\");\n cxt.setParams({ i, j });\n gen.assign(valid, true);\n gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));\n }\n function canOptimize() {\n return itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\");\n }\n function loopN(i, j) {\n const item = gen.name(\"item\");\n const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n const indices = gen.const(\"indices\", (0, codegen_1._) `{}`);\n gen.for((0, codegen_1._) `;${i}--;`, () => {\n gen.let(item, (0, codegen_1._) `${data}[${i}]`);\n gen.if(wrongType, (0, codegen_1._) `continue`);\n if (itemTypes.length > 1)\n gen.if((0, codegen_1._) `typeof ${item} == \"string\"`, (0, codegen_1._) `${item} += \"_\"`);\n gen\n .if((0, codegen_1._) `typeof ${indices}[${item}] == \"number\"`, () => {\n gen.assign(j, (0, codegen_1._) `${indices}[${item}]`);\n cxt.error();\n gen.assign(valid, false).break();\n })\n .code((0, codegen_1._) `${indices}[${item}] = ${i}`);\n });\n }\n function loopN2(i, j) {\n const eql = (0, util_1.useFunc)(gen, equal_1.default);\n const outer = gen.name(\"outer\");\n gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => {\n cxt.error();\n gen.assign(valid, false).break(outer);\n })));\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=uniqueItems.js.map","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst mkdirpSync = require('../mkdirs').mkdirsSync\nconst utimesSync = require('../util/utimes.js').utimesMillisSync\n\nconst notExist = Symbol('notExist')\n\nfunction copySync (src, dest, opts) {\n if (typeof opts === 'function') {\n opts = {filter: opts}\n }\n\n opts = opts || {}\n opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now\n opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber\n\n // Warn about using preserveTimestamps on 32-bit node\n if (opts.preserveTimestamps && process.arch === 'ia32') {\n console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)\n }\n\n const destStat = checkPaths(src, dest)\n\n if (opts.filter && !opts.filter(src, dest)) return\n\n const destParent = path.dirname(dest)\n if (!fs.existsSync(destParent)) mkdirpSync(destParent)\n return startCopy(destStat, src, dest, opts)\n}\n\nfunction startCopy (destStat, src, dest, opts) {\n if (opts.filter && !opts.filter(src, dest)) return\n return getStats(destStat, src, dest, opts)\n}\n\nfunction getStats (destStat, src, dest, opts) {\n const statSync = opts.dereference ? fs.statSync : fs.lstatSync\n const srcStat = statSync(src)\n\n if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)\n else if (srcStat.isFile() ||\n srcStat.isCharacterDevice() ||\n srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)\n else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)\n}\n\nfunction onFile (srcStat, destStat, src, dest, opts) {\n if (destStat === notExist) return copyFile(srcStat, src, dest, opts)\n return mayCopyFile(srcStat, src, dest, opts)\n}\n\nfunction mayCopyFile (srcStat, src, dest, opts) {\n if (opts.overwrite) {\n fs.unlinkSync(dest)\n return copyFile(srcStat, src, dest, opts)\n } else if (opts.errorOnExist) {\n throw new Error(`'${dest}' already exists`)\n }\n}\n\nfunction copyFile (srcStat, src, dest, opts) {\n if (typeof fs.copyFileSync === 'function') {\n fs.copyFileSync(src, dest)\n fs.chmodSync(dest, srcStat.mode)\n if (opts.preserveTimestamps) {\n return utimesSync(dest, srcStat.atime, srcStat.mtime)\n }\n return\n }\n return copyFileFallback(srcStat, src, dest, opts)\n}\n\nfunction copyFileFallback (srcStat, src, dest, opts) {\n const BUF_LENGTH = 64 * 1024\n const _buff = require('../util/buffer')(BUF_LENGTH)\n\n const fdr = fs.openSync(src, 'r')\n const fdw = fs.openSync(dest, 'w', srcStat.mode)\n let pos = 0\n\n while (pos < srcStat.size) {\n const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)\n fs.writeSync(fdw, _buff, 0, bytesRead)\n pos += bytesRead\n }\n\n if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime)\n\n fs.closeSync(fdr)\n fs.closeSync(fdw)\n}\n\nfunction onDir (srcStat, destStat, src, dest, opts) {\n if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts)\n if (destStat && !destStat.isDirectory()) {\n throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)\n }\n return copyDir(src, dest, opts)\n}\n\nfunction mkDirAndCopy (srcStat, src, dest, opts) {\n fs.mkdirSync(dest)\n copyDir(src, dest, opts)\n return fs.chmodSync(dest, srcStat.mode)\n}\n\nfunction copyDir (src, dest, opts) {\n fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))\n}\n\nfunction copyDirItem (item, src, dest, opts) {\n const srcItem = path.join(src, item)\n const destItem = path.join(dest, item)\n const destStat = checkPaths(srcItem, destItem)\n return startCopy(destStat, srcItem, destItem, opts)\n}\n\nfunction onLink (destStat, src, dest, opts) {\n let resolvedSrc = fs.readlinkSync(src)\n\n if (opts.dereference) {\n resolvedSrc = path.resolve(process.cwd(), resolvedSrc)\n }\n\n if (destStat === notExist) {\n return fs.symlinkSync(resolvedSrc, dest)\n } else {\n let resolvedDest\n try {\n resolvedDest = fs.readlinkSync(dest)\n } catch (err) {\n // dest exists and is a regular file or directory,\n // Windows may throw UNKNOWN error. If dest already exists,\n // fs throws error anyway, so no need to guard against it here.\n if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)\n throw err\n }\n if (opts.dereference) {\n resolvedDest = path.resolve(process.cwd(), resolvedDest)\n }\n if (isSrcSubdir(resolvedSrc, resolvedDest)) {\n throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)\n }\n\n // prevent copy if src is a subdir of dest since unlinking\n // dest in this case would result in removing src contents\n // and therefore a broken symlink would be created.\n if (fs.statSync(dest).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) {\n throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)\n }\n return copyLink(resolvedSrc, dest)\n }\n}\n\nfunction copyLink (resolvedSrc, dest) {\n fs.unlinkSync(dest)\n return fs.symlinkSync(resolvedSrc, dest)\n}\n\n// return true if dest is a subdir of src, otherwise false.\nfunction isSrcSubdir (src, dest) {\n const srcArray = path.resolve(src).split(path.sep)\n const destArray = path.resolve(dest).split(path.sep)\n return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true)\n}\n\nfunction checkStats (src, dest) {\n const srcStat = fs.statSync(src)\n let destStat\n try {\n destStat = fs.statSync(dest)\n } catch (err) {\n if (err.code === 'ENOENT') return {srcStat, destStat: notExist}\n throw err\n }\n return {srcStat, destStat}\n}\n\nfunction checkPaths (src, dest) {\n const {srcStat, destStat} = checkStats(src, dest)\n if (destStat.ino && destStat.ino === srcStat.ino) {\n throw new Error('Source and destination must not be the same.')\n }\n if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {\n throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`)\n }\n return destStat\n}\n\nmodule.exports = copySync\n","'use strict'\n\nmodule.exports = {\n copySync: require('./copy-sync')\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst mkdirp = require('../mkdirs').mkdirs\nconst pathExists = require('../path-exists').pathExists\nconst utimes = require('../util/utimes').utimesMillis\n\nconst notExist = Symbol('notExist')\n\nfunction copy (src, dest, opts, cb) {\n if (typeof opts === 'function' && !cb) {\n cb = opts\n opts = {}\n } else if (typeof opts === 'function') {\n opts = {filter: opts}\n }\n\n cb = cb || function () {}\n opts = opts || {}\n\n opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now\n opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber\n\n // Warn about using preserveTimestamps on 32-bit node\n if (opts.preserveTimestamps && process.arch === 'ia32') {\n console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)\n }\n\n checkPaths(src, dest, (err, destStat) => {\n if (err) return cb(err)\n if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)\n return checkParentDir(destStat, src, dest, opts, cb)\n })\n}\n\nfunction checkParentDir (destStat, src, dest, opts, cb) {\n const destParent = path.dirname(dest)\n pathExists(destParent, (err, dirExists) => {\n if (err) return cb(err)\n if (dirExists) return startCopy(destStat, src, dest, opts, cb)\n mkdirp(destParent, err => {\n if (err) return cb(err)\n return startCopy(destStat, src, dest, opts, cb)\n })\n })\n}\n\nfunction handleFilter (onInclude, destStat, src, dest, opts, cb) {\n Promise.resolve(opts.filter(src, dest)).then(include => {\n if (include) {\n if (destStat) return onInclude(destStat, src, dest, opts, cb)\n return onInclude(src, dest, opts, cb)\n }\n return cb()\n }, error => cb(error))\n}\n\nfunction startCopy (destStat, src, dest, opts, cb) {\n if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)\n return getStats(destStat, src, dest, opts, cb)\n}\n\nfunction getStats (destStat, src, dest, opts, cb) {\n const stat = opts.dereference ? fs.stat : fs.lstat\n stat(src, (err, srcStat) => {\n if (err) return cb(err)\n\n if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)\n else if (srcStat.isFile() ||\n srcStat.isCharacterDevice() ||\n srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)\n else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)\n })\n}\n\nfunction onFile (srcStat, destStat, src, dest, opts, cb) {\n if (destStat === notExist) return copyFile(srcStat, src, dest, opts, cb)\n return mayCopyFile(srcStat, src, dest, opts, cb)\n}\n\nfunction mayCopyFile (srcStat, src, dest, opts, cb) {\n if (opts.overwrite) {\n fs.unlink(dest, err => {\n if (err) return cb(err)\n return copyFile(srcStat, src, dest, opts, cb)\n })\n } else if (opts.errorOnExist) {\n return cb(new Error(`'${dest}' already exists`))\n } else return cb()\n}\n\nfunction copyFile (srcStat, src, dest, opts, cb) {\n if (typeof fs.copyFile === 'function') {\n return fs.copyFile(src, dest, err => {\n if (err) return cb(err)\n return setDestModeAndTimestamps(srcStat, dest, opts, cb)\n })\n }\n return copyFileFallback(srcStat, src, dest, opts, cb)\n}\n\nfunction copyFileFallback (srcStat, src, dest, opts, cb) {\n const rs = fs.createReadStream(src)\n rs.on('error', err => cb(err)).once('open', () => {\n const ws = fs.createWriteStream(dest, { mode: srcStat.mode })\n ws.on('error', err => cb(err))\n .on('open', () => rs.pipe(ws))\n .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb))\n })\n}\n\nfunction setDestModeAndTimestamps (srcStat, dest, opts, cb) {\n fs.chmod(dest, srcStat.mode, err => {\n if (err) return cb(err)\n if (opts.preserveTimestamps) {\n return utimes(dest, srcStat.atime, srcStat.mtime, cb)\n }\n return cb()\n })\n}\n\nfunction onDir (srcStat, destStat, src, dest, opts, cb) {\n if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts, cb)\n if (destStat && !destStat.isDirectory()) {\n return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))\n }\n return copyDir(src, dest, opts, cb)\n}\n\nfunction mkDirAndCopy (srcStat, src, dest, opts, cb) {\n fs.mkdir(dest, err => {\n if (err) return cb(err)\n copyDir(src, dest, opts, err => {\n if (err) return cb(err)\n return fs.chmod(dest, srcStat.mode, cb)\n })\n })\n}\n\nfunction copyDir (src, dest, opts, cb) {\n fs.readdir(src, (err, items) => {\n if (err) return cb(err)\n return copyDirItems(items, src, dest, opts, cb)\n })\n}\n\nfunction copyDirItems (items, src, dest, opts, cb) {\n const item = items.pop()\n if (!item) return cb()\n return copyDirItem(items, item, src, dest, opts, cb)\n}\n\nfunction copyDirItem (items, item, src, dest, opts, cb) {\n const srcItem = path.join(src, item)\n const destItem = path.join(dest, item)\n checkPaths(srcItem, destItem, (err, destStat) => {\n if (err) return cb(err)\n startCopy(destStat, srcItem, destItem, opts, err => {\n if (err) return cb(err)\n return copyDirItems(items, src, dest, opts, cb)\n })\n })\n}\n\nfunction onLink (destStat, src, dest, opts, cb) {\n fs.readlink(src, (err, resolvedSrc) => {\n if (err) return cb(err)\n\n if (opts.dereference) {\n resolvedSrc = path.resolve(process.cwd(), resolvedSrc)\n }\n\n if (destStat === notExist) {\n return fs.symlink(resolvedSrc, dest, cb)\n } else {\n fs.readlink(dest, (err, resolvedDest) => {\n if (err) {\n // dest exists and is a regular file or directory,\n // Windows may throw UNKNOWN error. If dest already exists,\n // fs throws error anyway, so no need to guard against it here.\n if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)\n return cb(err)\n }\n if (opts.dereference) {\n resolvedDest = path.resolve(process.cwd(), resolvedDest)\n }\n if (isSrcSubdir(resolvedSrc, resolvedDest)) {\n return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))\n }\n\n // do not copy if src is a subdir of dest since unlinking\n // dest in this case would result in removing src contents\n // and therefore a broken symlink would be created.\n if (destStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) {\n return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))\n }\n return copyLink(resolvedSrc, dest, cb)\n })\n }\n })\n}\n\nfunction copyLink (resolvedSrc, dest, cb) {\n fs.unlink(dest, err => {\n if (err) return cb(err)\n return fs.symlink(resolvedSrc, dest, cb)\n })\n}\n\n// return true if dest is a subdir of src, otherwise false.\nfunction isSrcSubdir (src, dest) {\n const srcArray = path.resolve(src).split(path.sep)\n const destArray = path.resolve(dest).split(path.sep)\n return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true)\n}\n\nfunction checkStats (src, dest, cb) {\n fs.stat(src, (err, srcStat) => {\n if (err) return cb(err)\n fs.stat(dest, (err, destStat) => {\n if (err) {\n if (err.code === 'ENOENT') return cb(null, {srcStat, destStat: notExist})\n return cb(err)\n }\n return cb(null, {srcStat, destStat})\n })\n })\n}\n\nfunction checkPaths (src, dest, cb) {\n checkStats(src, dest, (err, stats) => {\n if (err) return cb(err)\n const {srcStat, destStat} = stats\n if (destStat.ino && destStat.ino === srcStat.ino) {\n return cb(new Error('Source and destination must not be the same.'))\n }\n if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {\n return cb(new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`))\n }\n return cb(null, destStat)\n })\n}\n\nmodule.exports = copy\n","'use strict'\n\nconst u = require('universalify').fromCallback\nmodule.exports = {\n copy: u(require('./copy'))\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst fs = require('fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst remove = require('../remove')\n\nconst emptyDir = u(function emptyDir (dir, callback) {\n callback = callback || function () {}\n fs.readdir(dir, (err, items) => {\n if (err) return mkdir.mkdirs(dir, callback)\n\n items = items.map(item => path.join(dir, item))\n\n deleteItem()\n\n function deleteItem () {\n const item = items.pop()\n if (!item) return callback()\n remove.remove(item, err => {\n if (err) return callback(err)\n deleteItem()\n })\n }\n })\n})\n\nfunction emptyDirSync (dir) {\n let items\n try {\n items = fs.readdirSync(dir)\n } catch (err) {\n return mkdir.mkdirsSync(dir)\n }\n\n items.forEach(item => {\n item = path.join(dir, item)\n remove.removeSync(item)\n })\n}\n\nmodule.exports = {\n emptyDirSync,\n emptydirSync: emptyDirSync,\n emptyDir,\n emptydir: emptyDir\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst path = require('path')\nconst fs = require('graceful-fs')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\n\nfunction createFile (file, callback) {\n function makeFile () {\n fs.writeFile(file, '', err => {\n if (err) return callback(err)\n callback()\n })\n }\n\n fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err\n if (!err && stats.isFile()) return callback()\n const dir = path.dirname(file)\n pathExists(dir, (err, dirExists) => {\n if (err) return callback(err)\n if (dirExists) return makeFile()\n mkdir.mkdirs(dir, err => {\n if (err) return callback(err)\n makeFile()\n })\n })\n })\n}\n\nfunction createFileSync (file) {\n let stats\n try {\n stats = fs.statSync(file)\n } catch (e) {}\n if (stats && stats.isFile()) return\n\n const dir = path.dirname(file)\n if (!fs.existsSync(dir)) {\n mkdir.mkdirsSync(dir)\n }\n\n fs.writeFileSync(file, '')\n}\n\nmodule.exports = {\n createFile: u(createFile),\n createFileSync\n}\n","'use strict'\n\nconst file = require('./file')\nconst link = require('./link')\nconst symlink = require('./symlink')\n\nmodule.exports = {\n // file\n createFile: file.createFile,\n createFileSync: file.createFileSync,\n ensureFile: file.createFile,\n ensureFileSync: file.createFileSync,\n // link\n createLink: link.createLink,\n createLinkSync: link.createLinkSync,\n ensureLink: link.createLink,\n ensureLinkSync: link.createLinkSync,\n // symlink\n createSymlink: symlink.createSymlink,\n createSymlinkSync: symlink.createSymlinkSync,\n ensureSymlink: symlink.createSymlink,\n ensureSymlinkSync: symlink.createSymlinkSync\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst path = require('path')\nconst fs = require('graceful-fs')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\n\nfunction createLink (srcpath, dstpath, callback) {\n function makeLink (srcpath, dstpath) {\n fs.link(srcpath, dstpath, err => {\n if (err) return callback(err)\n callback(null)\n })\n }\n\n pathExists(dstpath, (err, destinationExists) => {\n if (err) return callback(err)\n if (destinationExists) return callback(null)\n fs.lstat(srcpath, (err) => {\n if (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n return callback(err)\n }\n\n const dir = path.dirname(dstpath)\n pathExists(dir, (err, dirExists) => {\n if (err) return callback(err)\n if (dirExists) return makeLink(srcpath, dstpath)\n mkdir.mkdirs(dir, err => {\n if (err) return callback(err)\n makeLink(srcpath, dstpath)\n })\n })\n })\n })\n}\n\nfunction createLinkSync (srcpath, dstpath) {\n const destinationExists = fs.existsSync(dstpath)\n if (destinationExists) return undefined\n\n try {\n fs.lstatSync(srcpath)\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n throw err\n }\n\n const dir = path.dirname(dstpath)\n const dirExists = fs.existsSync(dir)\n if (dirExists) return fs.linkSync(srcpath, dstpath)\n mkdir.mkdirsSync(dir)\n\n return fs.linkSync(srcpath, dstpath)\n}\n\nmodule.exports = {\n createLink: u(createLink),\n createLinkSync\n}\n","'use strict'\n\nconst path = require('path')\nconst fs = require('graceful-fs')\nconst pathExists = require('../path-exists').pathExists\n\n/**\n * Function that returns two types of paths, one relative to symlink, and one\n * relative to the current working directory. Checks if path is absolute or\n * relative. If the path is relative, this function checks if the path is\n * relative to symlink or relative to current working directory. This is an\n * initiative to find a smarter `srcpath` to supply when building symlinks.\n * This allows you to determine which path to use out of one of three possible\n * types of source paths. The first is an absolute path. This is detected by\n * `path.isAbsolute()`. When an absolute path is provided, it is checked to\n * see if it exists. If it does it's used, if not an error is returned\n * (callback)/ thrown (sync). The other two options for `srcpath` are a\n * relative url. By default Node's `fs.symlink` works by creating a symlink\n * using `dstpath` and expects the `srcpath` to be relative to the newly\n * created symlink. If you provide a `srcpath` that does not exist on the file\n * system it results in a broken symlink. To minimize this, the function\n * checks to see if the 'relative to symlink' source file exists, and if it\n * does it will use it. If it does not, it checks if there's a file that\n * exists that is relative to the current working directory, if does its used.\n * This preserves the expectations of the original fs.symlink spec and adds\n * the ability to pass in `relative to current working direcotry` paths.\n */\n\nfunction symlinkPaths (srcpath, dstpath, callback) {\n if (path.isAbsolute(srcpath)) {\n return fs.lstat(srcpath, (err) => {\n if (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n return callback(err)\n }\n return callback(null, {\n 'toCwd': srcpath,\n 'toDst': srcpath\n })\n })\n } else {\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n return pathExists(relativeToDst, (err, exists) => {\n if (err) return callback(err)\n if (exists) {\n return callback(null, {\n 'toCwd': relativeToDst,\n 'toDst': srcpath\n })\n } else {\n return fs.lstat(srcpath, (err) => {\n if (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n return callback(err)\n }\n return callback(null, {\n 'toCwd': srcpath,\n 'toDst': path.relative(dstdir, srcpath)\n })\n })\n }\n })\n }\n}\n\nfunction symlinkPathsSync (srcpath, dstpath) {\n let exists\n if (path.isAbsolute(srcpath)) {\n exists = fs.existsSync(srcpath)\n if (!exists) throw new Error('absolute srcpath does not exist')\n return {\n 'toCwd': srcpath,\n 'toDst': srcpath\n }\n } else {\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n exists = fs.existsSync(relativeToDst)\n if (exists) {\n return {\n 'toCwd': relativeToDst,\n 'toDst': srcpath\n }\n } else {\n exists = fs.existsSync(srcpath)\n if (!exists) throw new Error('relative srcpath does not exist')\n return {\n 'toCwd': srcpath,\n 'toDst': path.relative(dstdir, srcpath)\n }\n }\n }\n}\n\nmodule.exports = {\n symlinkPaths,\n symlinkPathsSync\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\n\nfunction symlinkType (srcpath, type, callback) {\n callback = (typeof type === 'function') ? type : callback\n type = (typeof type === 'function') ? false : type\n if (type) return callback(null, type)\n fs.lstat(srcpath, (err, stats) => {\n if (err) return callback(null, 'file')\n type = (stats && stats.isDirectory()) ? 'dir' : 'file'\n callback(null, type)\n })\n}\n\nfunction symlinkTypeSync (srcpath, type) {\n let stats\n\n if (type) return type\n try {\n stats = fs.lstatSync(srcpath)\n } catch (e) {\n return 'file'\n }\n return (stats && stats.isDirectory()) ? 'dir' : 'file'\n}\n\nmodule.exports = {\n symlinkType,\n symlinkTypeSync\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst path = require('path')\nconst fs = require('graceful-fs')\nconst _mkdirs = require('../mkdirs')\nconst mkdirs = _mkdirs.mkdirs\nconst mkdirsSync = _mkdirs.mkdirsSync\n\nconst _symlinkPaths = require('./symlink-paths')\nconst symlinkPaths = _symlinkPaths.symlinkPaths\nconst symlinkPathsSync = _symlinkPaths.symlinkPathsSync\n\nconst _symlinkType = require('./symlink-type')\nconst symlinkType = _symlinkType.symlinkType\nconst symlinkTypeSync = _symlinkType.symlinkTypeSync\n\nconst pathExists = require('../path-exists').pathExists\n\nfunction createSymlink (srcpath, dstpath, type, callback) {\n callback = (typeof type === 'function') ? type : callback\n type = (typeof type === 'function') ? false : type\n\n pathExists(dstpath, (err, destinationExists) => {\n if (err) return callback(err)\n if (destinationExists) return callback(null)\n symlinkPaths(srcpath, dstpath, (err, relative) => {\n if (err) return callback(err)\n srcpath = relative.toDst\n symlinkType(relative.toCwd, type, (err, type) => {\n if (err) return callback(err)\n const dir = path.dirname(dstpath)\n pathExists(dir, (err, dirExists) => {\n if (err) return callback(err)\n if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)\n mkdirs(dir, err => {\n if (err) return callback(err)\n fs.symlink(srcpath, dstpath, type, callback)\n })\n })\n })\n })\n })\n}\n\nfunction createSymlinkSync (srcpath, dstpath, type) {\n const destinationExists = fs.existsSync(dstpath)\n if (destinationExists) return undefined\n\n const relative = symlinkPathsSync(srcpath, dstpath)\n srcpath = relative.toDst\n type = symlinkTypeSync(relative.toCwd, type)\n const dir = path.dirname(dstpath)\n const exists = fs.existsSync(dir)\n if (exists) return fs.symlinkSync(srcpath, dstpath, type)\n mkdirsSync(dir)\n return fs.symlinkSync(srcpath, dstpath, type)\n}\n\nmodule.exports = {\n createSymlink: u(createSymlink),\n createSymlinkSync\n}\n","'use strict'\n// This is adapted from https://github.com/normalize/mz\n// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors\nconst u = require('universalify').fromCallback\nconst fs = require('graceful-fs')\n\nconst api = [\n 'access',\n 'appendFile',\n 'chmod',\n 'chown',\n 'close',\n 'copyFile',\n 'fchmod',\n 'fchown',\n 'fdatasync',\n 'fstat',\n 'fsync',\n 'ftruncate',\n 'futimes',\n 'lchown',\n 'lchmod',\n 'link',\n 'lstat',\n 'mkdir',\n 'mkdtemp',\n 'open',\n 'readFile',\n 'readdir',\n 'readlink',\n 'realpath',\n 'rename',\n 'rmdir',\n 'stat',\n 'symlink',\n 'truncate',\n 'unlink',\n 'utimes',\n 'writeFile'\n].filter(key => {\n // Some commands are not available on some systems. Ex:\n // fs.copyFile was added in Node.js v8.5.0\n // fs.mkdtemp was added in Node.js v5.10.0\n // fs.lchown is not available on at least some Linux\n return typeof fs[key] === 'function'\n})\n\n// Export all keys:\nObject.keys(fs).forEach(key => {\n if (key === 'promises') {\n // fs.promises is a getter property that triggers ExperimentalWarning\n // Don't re-export it here, the getter is defined in \"lib/index.js\"\n return\n }\n exports[key] = fs[key]\n})\n\n// Universalify async methods:\napi.forEach(method => {\n exports[method] = u(fs[method])\n})\n\n// We differ from mz/fs in that we still ship the old, broken, fs.exists()\n// since we are a drop-in replacement for the native module\nexports.exists = function (filename, callback) {\n if (typeof callback === 'function') {\n return fs.exists(filename, callback)\n }\n return new Promise(resolve => {\n return fs.exists(filename, resolve)\n })\n}\n\n// fs.read() & fs.write need special treatment due to multiple callback args\n\nexports.read = function (fd, buffer, offset, length, position, callback) {\n if (typeof callback === 'function') {\n return fs.read(fd, buffer, offset, length, position, callback)\n }\n return new Promise((resolve, reject) => {\n fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {\n if (err) return reject(err)\n resolve({ bytesRead, buffer })\n })\n })\n}\n\n// Function signature can be\n// fs.write(fd, buffer[, offset[, length[, position]]], callback)\n// OR\n// fs.write(fd, string[, position[, encoding]], callback)\n// We need to handle both cases, so we use ...args\nexports.write = function (fd, buffer, ...args) {\n if (typeof args[args.length - 1] === 'function') {\n return fs.write(fd, buffer, ...args)\n }\n\n return new Promise((resolve, reject) => {\n fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {\n if (err) return reject(err)\n resolve({ bytesWritten, buffer })\n })\n })\n}\n","'use strict'\n\nmodule.exports = Object.assign(\n {},\n // Export promiseified graceful-fs:\n require('./fs'),\n // Export extra methods:\n require('./copy-sync'),\n require('./copy'),\n require('./empty'),\n require('./ensure'),\n require('./json'),\n require('./mkdirs'),\n require('./move-sync'),\n require('./move'),\n require('./output'),\n require('./path-exists'),\n require('./remove')\n)\n\n// Export fs.promises as a getter property so that we don't trigger\n// ExperimentalWarning before fs.promises is actually accessed.\nconst fs = require('fs')\nif (Object.getOwnPropertyDescriptor(fs, 'promises')) {\n Object.defineProperty(module.exports, 'promises', {\n get () { return fs.promises }\n })\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst jsonFile = require('./jsonfile')\n\njsonFile.outputJson = u(require('./output-json'))\njsonFile.outputJsonSync = require('./output-json-sync')\n// aliases\njsonFile.outputJSON = jsonFile.outputJson\njsonFile.outputJSONSync = jsonFile.outputJsonSync\njsonFile.writeJSON = jsonFile.writeJson\njsonFile.writeJSONSync = jsonFile.writeJsonSync\njsonFile.readJSON = jsonFile.readJson\njsonFile.readJSONSync = jsonFile.readJsonSync\n\nmodule.exports = jsonFile\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst jsonFile = require('jsonfile')\n\nmodule.exports = {\n // jsonfile exports\n readJson: u(jsonFile.readFile),\n readJsonSync: jsonFile.readFileSync,\n writeJson: u(jsonFile.writeFile),\n writeJsonSync: jsonFile.writeFileSync\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst jsonFile = require('./jsonfile')\n\nfunction outputJsonSync (file, data, options) {\n const dir = path.dirname(file)\n\n if (!fs.existsSync(dir)) {\n mkdir.mkdirsSync(dir)\n }\n\n jsonFile.writeJsonSync(file, data, options)\n}\n\nmodule.exports = outputJsonSync\n","'use strict'\n\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\nconst jsonFile = require('./jsonfile')\n\nfunction outputJson (file, data, options, callback) {\n if (typeof options === 'function') {\n callback = options\n options = {}\n }\n\n const dir = path.dirname(file)\n\n pathExists(dir, (err, itDoes) => {\n if (err) return callback(err)\n if (itDoes) return jsonFile.writeJson(file, data, options, callback)\n\n mkdir.mkdirs(dir, err => {\n if (err) return callback(err)\n jsonFile.writeJson(file, data, options, callback)\n })\n })\n}\n\nmodule.exports = outputJson\n","'use strict'\nconst u = require('universalify').fromCallback\nconst mkdirs = u(require('./mkdirs'))\nconst mkdirsSync = require('./mkdirs-sync')\n\nmodule.exports = {\n mkdirs,\n mkdirsSync,\n // alias\n mkdirp: mkdirs,\n mkdirpSync: mkdirsSync,\n ensureDir: mkdirs,\n ensureDirSync: mkdirsSync\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst invalidWin32Path = require('./win32').invalidWin32Path\n\nconst o777 = parseInt('0777', 8)\n\nfunction mkdirsSync (p, opts, made) {\n if (!opts || typeof opts !== 'object') {\n opts = { mode: opts }\n }\n\n let mode = opts.mode\n const xfs = opts.fs || fs\n\n if (process.platform === 'win32' && invalidWin32Path(p)) {\n const errInval = new Error(p + ' contains invalid WIN32 path characters.')\n errInval.code = 'EINVAL'\n throw errInval\n }\n\n if (mode === undefined) {\n mode = o777 & (~process.umask())\n }\n if (!made) made = null\n\n p = path.resolve(p)\n\n try {\n xfs.mkdirSync(p, mode)\n made = made || p\n } catch (err0) {\n if (err0.code === 'ENOENT') {\n if (path.dirname(p) === p) throw err0\n made = mkdirsSync(path.dirname(p), opts, made)\n mkdirsSync(p, opts, made)\n } else {\n // In the case of any other error, just see if there's a dir there\n // already. If so, then hooray! If not, then something is borked.\n let stat\n try {\n stat = xfs.statSync(p)\n } catch (err1) {\n throw err0\n }\n if (!stat.isDirectory()) throw err0\n }\n }\n\n return made\n}\n\nmodule.exports = mkdirsSync\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst invalidWin32Path = require('./win32').invalidWin32Path\n\nconst o777 = parseInt('0777', 8)\n\nfunction mkdirs (p, opts, callback, made) {\n if (typeof opts === 'function') {\n callback = opts\n opts = {}\n } else if (!opts || typeof opts !== 'object') {\n opts = { mode: opts }\n }\n\n if (process.platform === 'win32' && invalidWin32Path(p)) {\n const errInval = new Error(p + ' contains invalid WIN32 path characters.')\n errInval.code = 'EINVAL'\n return callback(errInval)\n }\n\n let mode = opts.mode\n const xfs = opts.fs || fs\n\n if (mode === undefined) {\n mode = o777 & (~process.umask())\n }\n if (!made) made = null\n\n callback = callback || function () {}\n p = path.resolve(p)\n\n xfs.mkdir(p, mode, er => {\n if (!er) {\n made = made || p\n return callback(null, made)\n }\n switch (er.code) {\n case 'ENOENT':\n if (path.dirname(p) === p) return callback(er)\n mkdirs(path.dirname(p), opts, (er, made) => {\n if (er) callback(er, made)\n else mkdirs(p, opts, callback, made)\n })\n break\n\n // In the case of any other error, just see if there's a dir\n // there already. If so, then hooray! If not, then something\n // is borked.\n default:\n xfs.stat(p, (er2, stat) => {\n // if the stat fails, then that's super weird.\n // let the original error be the failure reason.\n if (er2 || !stat.isDirectory()) callback(er, made)\n else callback(null, made)\n })\n break\n }\n })\n}\n\nmodule.exports = mkdirs\n","'use strict'\n\nconst path = require('path')\n\n// get drive on windows\nfunction getRootPath (p) {\n p = path.normalize(path.resolve(p)).split(path.sep)\n if (p.length > 0) return p[0]\n return null\n}\n\n// http://stackoverflow.com/a/62888/10333 contains more accurate\n// TODO: expand to include the rest\nconst INVALID_PATH_CHARS = /[<>:\"|?*]/\n\nfunction invalidWin32Path (p) {\n const rp = getRootPath(p)\n p = p.replace(rp, '')\n return INVALID_PATH_CHARS.test(p)\n}\n\nmodule.exports = {\n getRootPath,\n invalidWin32Path\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst copySync = require('../copy-sync').copySync\nconst removeSync = require('../remove').removeSync\nconst mkdirpSync = require('../mkdirs').mkdirsSync\nconst buffer = require('../util/buffer')\n\nfunction moveSync (src, dest, options) {\n options = options || {}\n const overwrite = options.overwrite || options.clobber || false\n\n src = path.resolve(src)\n dest = path.resolve(dest)\n\n if (src === dest) return fs.accessSync(src)\n\n if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`)\n\n mkdirpSync(path.dirname(dest))\n tryRenameSync()\n\n function tryRenameSync () {\n if (overwrite) {\n try {\n return fs.renameSync(src, dest)\n } catch (err) {\n if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') {\n removeSync(dest)\n options.overwrite = false // just overwriteed it, no need to do it again\n return moveSync(src, dest, options)\n }\n\n if (err.code !== 'EXDEV') throw err\n return moveSyncAcrossDevice(src, dest, overwrite)\n }\n } else {\n try {\n fs.linkSync(src, dest)\n return fs.unlinkSync(src)\n } catch (err) {\n if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') {\n return moveSyncAcrossDevice(src, dest, overwrite)\n }\n throw err\n }\n }\n }\n}\n\nfunction moveSyncAcrossDevice (src, dest, overwrite) {\n const stat = fs.statSync(src)\n\n if (stat.isDirectory()) {\n return moveDirSyncAcrossDevice(src, dest, overwrite)\n } else {\n return moveFileSyncAcrossDevice(src, dest, overwrite)\n }\n}\n\nfunction moveFileSyncAcrossDevice (src, dest, overwrite) {\n const BUF_LENGTH = 64 * 1024\n const _buff = buffer(BUF_LENGTH)\n\n const flags = overwrite ? 'w' : 'wx'\n\n const fdr = fs.openSync(src, 'r')\n const stat = fs.fstatSync(fdr)\n const fdw = fs.openSync(dest, flags, stat.mode)\n let pos = 0\n\n while (pos < stat.size) {\n const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)\n fs.writeSync(fdw, _buff, 0, bytesRead)\n pos += bytesRead\n }\n\n fs.closeSync(fdr)\n fs.closeSync(fdw)\n return fs.unlinkSync(src)\n}\n\nfunction moveDirSyncAcrossDevice (src, dest, overwrite) {\n const options = {\n overwrite: false\n }\n\n if (overwrite) {\n removeSync(dest)\n tryCopySync()\n } else {\n tryCopySync()\n }\n\n function tryCopySync () {\n copySync(src, dest, options)\n return removeSync(src)\n }\n}\n\n// return true if dest is a subdir of src, otherwise false.\n// extract dest base dir and check if that is the same as src basename\nfunction isSrcSubdir (src, dest) {\n try {\n return fs.statSync(src).isDirectory() &&\n src !== dest &&\n dest.indexOf(src) > -1 &&\n dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src)\n } catch (e) {\n return false\n }\n}\n\nmodule.exports = {\n moveSync\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst copy = require('../copy').copy\nconst remove = require('../remove').remove\nconst mkdirp = require('../mkdirs').mkdirp\nconst pathExists = require('../path-exists').pathExists\n\nfunction move (src, dest, opts, cb) {\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n const overwrite = opts.overwrite || opts.clobber || false\n\n src = path.resolve(src)\n dest = path.resolve(dest)\n\n if (src === dest) return fs.access(src, cb)\n\n fs.stat(src, (err, st) => {\n if (err) return cb(err)\n\n if (st.isDirectory() && isSrcSubdir(src, dest)) {\n return cb(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`))\n }\n mkdirp(path.dirname(dest), err => {\n if (err) return cb(err)\n return doRename(src, dest, overwrite, cb)\n })\n })\n}\n\nfunction doRename (src, dest, overwrite, cb) {\n if (overwrite) {\n return remove(dest, err => {\n if (err) return cb(err)\n return rename(src, dest, overwrite, cb)\n })\n }\n pathExists(dest, (err, destExists) => {\n if (err) return cb(err)\n if (destExists) return cb(new Error('dest already exists.'))\n return rename(src, dest, overwrite, cb)\n })\n}\n\nfunction rename (src, dest, overwrite, cb) {\n fs.rename(src, dest, err => {\n if (!err) return cb()\n if (err.code !== 'EXDEV') return cb(err)\n return moveAcrossDevice(src, dest, overwrite, cb)\n })\n}\n\nfunction moveAcrossDevice (src, dest, overwrite, cb) {\n const opts = {\n overwrite,\n errorOnExist: true\n }\n\n copy(src, dest, opts, err => {\n if (err) return cb(err)\n return remove(src, cb)\n })\n}\n\nfunction isSrcSubdir (src, dest) {\n const srcArray = src.split(path.sep)\n const destArray = dest.split(path.sep)\n\n return srcArray.reduce((acc, current, i) => {\n return acc && destArray[i] === current\n }, true)\n}\n\nmodule.exports = {\n move: u(move)\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\n\nfunction outputFile (file, data, encoding, callback) {\n if (typeof encoding === 'function') {\n callback = encoding\n encoding = 'utf8'\n }\n\n const dir = path.dirname(file)\n pathExists(dir, (err, itDoes) => {\n if (err) return callback(err)\n if (itDoes) return fs.writeFile(file, data, encoding, callback)\n\n mkdir.mkdirs(dir, err => {\n if (err) return callback(err)\n\n fs.writeFile(file, data, encoding, callback)\n })\n })\n}\n\nfunction outputFileSync (file, ...args) {\n const dir = path.dirname(file)\n if (fs.existsSync(dir)) {\n return fs.writeFileSync(file, ...args)\n }\n mkdir.mkdirsSync(dir)\n fs.writeFileSync(file, ...args)\n}\n\nmodule.exports = {\n outputFile: u(outputFile),\n outputFileSync\n}\n","'use strict'\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\n\nfunction pathExists (path) {\n return fs.access(path).then(() => true).catch(() => false)\n}\n\nmodule.exports = {\n pathExists: u(pathExists),\n pathExistsSync: fs.existsSync\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst rimraf = require('./rimraf')\n\nmodule.exports = {\n remove: u(rimraf),\n removeSync: rimraf.sync\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst assert = require('assert')\n\nconst isWindows = (process.platform === 'win32')\n\nfunction defaults (options) {\n const methods = [\n 'unlink',\n 'chmod',\n 'stat',\n 'lstat',\n 'rmdir',\n 'readdir'\n ]\n methods.forEach(m => {\n options[m] = options[m] || fs[m]\n m = m + 'Sync'\n options[m] = options[m] || fs[m]\n })\n\n options.maxBusyTries = options.maxBusyTries || 3\n}\n\nfunction rimraf (p, options, cb) {\n let busyTries = 0\n\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n assert(p, 'rimraf: missing path')\n assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')\n assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')\n assert(options, 'rimraf: invalid options argument provided')\n assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')\n\n defaults(options)\n\n rimraf_(p, options, function CB (er) {\n if (er) {\n if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&\n busyTries < options.maxBusyTries) {\n busyTries++\n const time = busyTries * 100\n // try again, with the same exact callback as this one.\n return setTimeout(() => rimraf_(p, options, CB), time)\n }\n\n // already gone\n if (er.code === 'ENOENT') er = null\n }\n\n cb(er)\n })\n}\n\n// Two possible strategies.\n// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR\n// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR\n//\n// Both result in an extra syscall when you guess wrong. However, there\n// are likely far more normal files in the world than directories. This\n// is based on the assumption that a the average number of files per\n// directory is >= 1.\n//\n// If anyone ever complains about this, then I guess the strategy could\n// be made configurable somehow. But until then, YAGNI.\nfunction rimraf_ (p, options, cb) {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n // sunos lets the root user unlink directories, which is... weird.\n // so we have to lstat here and make sure it's not a dir.\n options.lstat(p, (er, st) => {\n if (er && er.code === 'ENOENT') {\n return cb(null)\n }\n\n // Windows can EPERM on stat. Life is suffering.\n if (er && er.code === 'EPERM' && isWindows) {\n return fixWinEPERM(p, options, er, cb)\n }\n\n if (st && st.isDirectory()) {\n return rmdir(p, options, er, cb)\n }\n\n options.unlink(p, er => {\n if (er) {\n if (er.code === 'ENOENT') {\n return cb(null)\n }\n if (er.code === 'EPERM') {\n return (isWindows)\n ? fixWinEPERM(p, options, er, cb)\n : rmdir(p, options, er, cb)\n }\n if (er.code === 'EISDIR') {\n return rmdir(p, options, er, cb)\n }\n }\n return cb(er)\n })\n })\n}\n\nfunction fixWinEPERM (p, options, er, cb) {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n if (er) {\n assert(er instanceof Error)\n }\n\n options.chmod(p, 0o666, er2 => {\n if (er2) {\n cb(er2.code === 'ENOENT' ? null : er)\n } else {\n options.stat(p, (er3, stats) => {\n if (er3) {\n cb(er3.code === 'ENOENT' ? null : er)\n } else if (stats.isDirectory()) {\n rmdir(p, options, er, cb)\n } else {\n options.unlink(p, cb)\n }\n })\n }\n })\n}\n\nfunction fixWinEPERMSync (p, options, er) {\n let stats\n\n assert(p)\n assert(options)\n if (er) {\n assert(er instanceof Error)\n }\n\n try {\n options.chmodSync(p, 0o666)\n } catch (er2) {\n if (er2.code === 'ENOENT') {\n return\n } else {\n throw er\n }\n }\n\n try {\n stats = options.statSync(p)\n } catch (er3) {\n if (er3.code === 'ENOENT') {\n return\n } else {\n throw er\n }\n }\n\n if (stats.isDirectory()) {\n rmdirSync(p, options, er)\n } else {\n options.unlinkSync(p)\n }\n}\n\nfunction rmdir (p, options, originalEr, cb) {\n assert(p)\n assert(options)\n if (originalEr) {\n assert(originalEr instanceof Error)\n }\n assert(typeof cb === 'function')\n\n // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)\n // if we guessed wrong, and it's not a directory, then\n // raise the original error.\n options.rmdir(p, er => {\n if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {\n rmkids(p, options, cb)\n } else if (er && er.code === 'ENOTDIR') {\n cb(originalEr)\n } else {\n cb(er)\n }\n })\n}\n\nfunction rmkids (p, options, cb) {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n options.readdir(p, (er, files) => {\n if (er) return cb(er)\n\n let n = files.length\n let errState\n\n if (n === 0) return options.rmdir(p, cb)\n\n files.forEach(f => {\n rimraf(path.join(p, f), options, er => {\n if (errState) {\n return\n }\n if (er) return cb(errState = er)\n if (--n === 0) {\n options.rmdir(p, cb)\n }\n })\n })\n })\n}\n\n// this looks simpler, and is strictly *faster*, but will\n// tie up the JavaScript thread and fail on excessively\n// deep directory trees.\nfunction rimrafSync (p, options) {\n let st\n\n options = options || {}\n defaults(options)\n\n assert(p, 'rimraf: missing path')\n assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')\n assert(options, 'rimraf: missing options')\n assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')\n\n try {\n st = options.lstatSync(p)\n } catch (er) {\n if (er.code === 'ENOENT') {\n return\n }\n\n // Windows can EPERM on stat. Life is suffering.\n if (er.code === 'EPERM' && isWindows) {\n fixWinEPERMSync(p, options, er)\n }\n }\n\n try {\n // sunos lets the root user unlink directories, which is... weird.\n if (st && st.isDirectory()) {\n rmdirSync(p, options, null)\n } else {\n options.unlinkSync(p)\n }\n } catch (er) {\n if (er.code === 'ENOENT') {\n return\n } else if (er.code === 'EPERM') {\n return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)\n } else if (er.code !== 'EISDIR') {\n throw er\n }\n rmdirSync(p, options, er)\n }\n}\n\nfunction rmdirSync (p, options, originalEr) {\n assert(p)\n assert(options)\n if (originalEr) {\n assert(originalEr instanceof Error)\n }\n\n try {\n options.rmdirSync(p)\n } catch (er) {\n if (er.code === 'ENOTDIR') {\n throw originalEr\n } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {\n rmkidsSync(p, options)\n } else if (er.code !== 'ENOENT') {\n throw er\n }\n }\n}\n\nfunction rmkidsSync (p, options) {\n assert(p)\n assert(options)\n options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))\n\n if (isWindows) {\n // We only end up here once we got ENOTEMPTY at least once, and\n // at this point, we are guaranteed to have removed all the kids.\n // So, we know that it won't be ENOENT or ENOTDIR or anything else.\n // try really hard to delete stuff on windows, because it has a\n // PROFOUNDLY annoying habit of not closing handles promptly when\n // files are deleted, resulting in spurious ENOTEMPTY errors.\n const startTime = Date.now()\n do {\n try {\n const ret = options.rmdirSync(p, options)\n return ret\n } catch (er) { }\n } while (Date.now() - startTime < 500) // give up after 500ms\n } else {\n const ret = options.rmdirSync(p, options)\n return ret\n }\n}\n\nmodule.exports = rimraf\nrimraf.sync = rimrafSync\n","'use strict'\n/* eslint-disable node/no-deprecated-api */\nmodule.exports = function (size) {\n if (typeof Buffer.allocUnsafe === 'function') {\n try {\n return Buffer.allocUnsafe(size)\n } catch (e) {\n return new Buffer(size)\n }\n }\n return new Buffer(size)\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst os = require('os')\nconst path = require('path')\n\n// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not\nfunction hasMillisResSync () {\n let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2))\n tmpfile = path.join(os.tmpdir(), tmpfile)\n\n // 550 millis past UNIX epoch\n const d = new Date(1435410243862)\n fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')\n const fd = fs.openSync(tmpfile, 'r+')\n fs.futimesSync(fd, d, d)\n fs.closeSync(fd)\n return fs.statSync(tmpfile).mtime > 1435410243000\n}\n\nfunction hasMillisRes (callback) {\n let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2))\n tmpfile = path.join(os.tmpdir(), tmpfile)\n\n // 550 millis past UNIX epoch\n const d = new Date(1435410243862)\n fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => {\n if (err) return callback(err)\n fs.open(tmpfile, 'r+', (err, fd) => {\n if (err) return callback(err)\n fs.futimes(fd, d, d, err => {\n if (err) return callback(err)\n fs.close(fd, err => {\n if (err) return callback(err)\n fs.stat(tmpfile, (err, stats) => {\n if (err) return callback(err)\n callback(null, stats.mtime > 1435410243000)\n })\n })\n })\n })\n })\n}\n\nfunction timeRemoveMillis (timestamp) {\n if (typeof timestamp === 'number') {\n return Math.floor(timestamp / 1000) * 1000\n } else if (timestamp instanceof Date) {\n return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)\n } else {\n throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')\n }\n}\n\nfunction utimesMillis (path, atime, mtime, callback) {\n // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)\n fs.open(path, 'r+', (err, fd) => {\n if (err) return callback(err)\n fs.futimes(fd, atime, mtime, futimesErr => {\n fs.close(fd, closeErr => {\n if (callback) callback(futimesErr || closeErr)\n })\n })\n })\n}\n\nfunction utimesMillisSync (path, atime, mtime) {\n const fd = fs.openSync(path, 'r+')\n fs.futimesSync(fd, atime, mtime)\n return fs.closeSync(fd)\n}\n\nmodule.exports = {\n hasMillisRes,\n hasMillisResSync,\n timeRemoveMillis,\n utimesMillis,\n utimesMillisSync\n}\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict'\n\nmodule.exports = clone\n\nvar getPrototypeOf = Object.getPrototypeOf || function (obj) {\n return obj.__proto__\n}\n\nfunction clone (obj) {\n if (obj === null || typeof obj !== 'object')\n return obj\n\n if (obj instanceof Object)\n var copy = { __proto__: getPrototypeOf(obj) }\n else\n var copy = Object.create(null)\n\n Object.getOwnPropertyNames(obj).forEach(function (key) {\n Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))\n })\n\n return copy\n}\n","var fs = require('fs')\nvar polyfills = require('./polyfills.js')\nvar legacy = require('./legacy-streams.js')\nvar clone = require('./clone.js')\n\nvar util = require('util')\n\n/* istanbul ignore next - node 0.x polyfill */\nvar gracefulQueue\nvar previousSymbol\n\n/* istanbul ignore else - node 0.x polyfill */\nif (typeof Symbol === 'function' && typeof Symbol.for === 'function') {\n gracefulQueue = Symbol.for('graceful-fs.queue')\n // This is used in testing by future versions\n previousSymbol = Symbol.for('graceful-fs.previous')\n} else {\n gracefulQueue = '___graceful-fs.queue'\n previousSymbol = '___graceful-fs.previous'\n}\n\nfunction noop () {}\n\nfunction publishQueue(context, queue) {\n Object.defineProperty(context, gracefulQueue, {\n get: function() {\n return queue\n }\n })\n}\n\nvar debug = noop\nif (util.debuglog)\n debug = util.debuglog('gfs4')\nelse if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || ''))\n debug = function() {\n var m = util.format.apply(util, arguments)\n m = 'GFS4: ' + m.split(/\\n/).join('\\nGFS4: ')\n console.error(m)\n }\n\n// Once time initialization\nif (!fs[gracefulQueue]) {\n // This queue can be shared by multiple loaded instances\n var queue = global[gracefulQueue] || []\n publishQueue(fs, queue)\n\n // Patch fs.close/closeSync to shared queue version, because we need\n // to retry() whenever a close happens *anywhere* in the program.\n // This is essential when multiple graceful-fs instances are\n // in play at the same time.\n fs.close = (function (fs$close) {\n function close (fd, cb) {\n return fs$close.call(fs, fd, function (err) {\n // This function uses the graceful-fs shared queue\n if (!err) {\n resetQueue()\n }\n\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n })\n }\n\n Object.defineProperty(close, previousSymbol, {\n value: fs$close\n })\n return close\n })(fs.close)\n\n fs.closeSync = (function (fs$closeSync) {\n function closeSync (fd) {\n // This function uses the graceful-fs shared queue\n fs$closeSync.apply(fs, arguments)\n resetQueue()\n }\n\n Object.defineProperty(closeSync, previousSymbol, {\n value: fs$closeSync\n })\n return closeSync\n })(fs.closeSync)\n\n if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || '')) {\n process.on('exit', function() {\n debug(fs[gracefulQueue])\n require('assert').equal(fs[gracefulQueue].length, 0)\n })\n }\n}\n\nif (!global[gracefulQueue]) {\n publishQueue(global, fs[gracefulQueue]);\n}\n\nmodule.exports = patch(clone(fs))\nif (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {\n module.exports = patch(fs)\n fs.__patched = true;\n}\n\nfunction patch (fs) {\n // Everything that references the open() function needs to be in here\n polyfills(fs)\n fs.gracefulify = patch\n\n fs.createReadStream = createReadStream\n fs.createWriteStream = createWriteStream\n var fs$readFile = fs.readFile\n fs.readFile = readFile\n function readFile (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$readFile(path, options, cb)\n\n function go$readFile (path, options, cb, startTime) {\n return fs$readFile(path, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$writeFile = fs.writeFile\n fs.writeFile = writeFile\n function writeFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$writeFile(path, data, options, cb)\n\n function go$writeFile (path, data, options, cb, startTime) {\n return fs$writeFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$appendFile = fs.appendFile\n if (fs$appendFile)\n fs.appendFile = appendFile\n function appendFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$appendFile(path, data, options, cb)\n\n function go$appendFile (path, data, options, cb, startTime) {\n return fs$appendFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$copyFile = fs.copyFile\n if (fs$copyFile)\n fs.copyFile = copyFile\n function copyFile (src, dest, flags, cb) {\n if (typeof flags === 'function') {\n cb = flags\n flags = 0\n }\n return go$copyFile(src, dest, flags, cb)\n\n function go$copyFile (src, dest, flags, cb, startTime) {\n return fs$copyFile(src, dest, flags, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$readdir = fs.readdir\n fs.readdir = readdir\n var noReaddirOptionVersions = /^v[0-5]\\./\n function readdir (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n var go$readdir = noReaddirOptionVersions.test(process.version)\n ? function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n : function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, options, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n\n return go$readdir(path, options, cb)\n\n function fs$readdirCallback (path, options, cb, startTime) {\n return function (err, files) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([\n go$readdir,\n [path, options, cb],\n err,\n startTime || Date.now(),\n Date.now()\n ])\n else {\n if (files && files.sort)\n files.sort()\n\n if (typeof cb === 'function')\n cb.call(this, err, files)\n }\n }\n }\n }\n\n if (process.version.substr(0, 4) === 'v0.8') {\n var legStreams = legacy(fs)\n ReadStream = legStreams.ReadStream\n WriteStream = legStreams.WriteStream\n }\n\n var fs$ReadStream = fs.ReadStream\n if (fs$ReadStream) {\n ReadStream.prototype = Object.create(fs$ReadStream.prototype)\n ReadStream.prototype.open = ReadStream$open\n }\n\n var fs$WriteStream = fs.WriteStream\n if (fs$WriteStream) {\n WriteStream.prototype = Object.create(fs$WriteStream.prototype)\n WriteStream.prototype.open = WriteStream$open\n }\n\n Object.defineProperty(fs, 'ReadStream', {\n get: function () {\n return ReadStream\n },\n set: function (val) {\n ReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n Object.defineProperty(fs, 'WriteStream', {\n get: function () {\n return WriteStream\n },\n set: function (val) {\n WriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n // legacy names\n var FileReadStream = ReadStream\n Object.defineProperty(fs, 'FileReadStream', {\n get: function () {\n return FileReadStream\n },\n set: function (val) {\n FileReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n var FileWriteStream = WriteStream\n Object.defineProperty(fs, 'FileWriteStream', {\n get: function () {\n return FileWriteStream\n },\n set: function (val) {\n FileWriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n function ReadStream (path, options) {\n if (this instanceof ReadStream)\n return fs$ReadStream.apply(this, arguments), this\n else\n return ReadStream.apply(Object.create(ReadStream.prototype), arguments)\n }\n\n function ReadStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n if (that.autoClose)\n that.destroy()\n\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n that.read()\n }\n })\n }\n\n function WriteStream (path, options) {\n if (this instanceof WriteStream)\n return fs$WriteStream.apply(this, arguments), this\n else\n return WriteStream.apply(Object.create(WriteStream.prototype), arguments)\n }\n\n function WriteStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n that.destroy()\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n }\n })\n }\n\n function createReadStream (path, options) {\n return new fs.ReadStream(path, options)\n }\n\n function createWriteStream (path, options) {\n return new fs.WriteStream(path, options)\n }\n\n var fs$open = fs.open\n fs.open = open\n function open (path, flags, mode, cb) {\n if (typeof mode === 'function')\n cb = mode, mode = null\n\n return go$open(path, flags, mode, cb)\n\n function go$open (path, flags, mode, cb, startTime) {\n return fs$open(path, flags, mode, function (err, fd) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n return fs\n}\n\nfunction enqueue (elem) {\n debug('ENQUEUE', elem[0].name, elem[1])\n fs[gracefulQueue].push(elem)\n retry()\n}\n\n// keep track of the timeout between retry() calls\nvar retryTimer\n\n// reset the startTime and lastTime to now\n// this resets the start of the 60 second overall timeout as well as the\n// delay between attempts so that we'll retry these jobs sooner\nfunction resetQueue () {\n var now = Date.now()\n for (var i = 0; i < fs[gracefulQueue].length; ++i) {\n // entries that are only a length of 2 are from an older version, don't\n // bother modifying those since they'll be retried anyway.\n if (fs[gracefulQueue][i].length > 2) {\n fs[gracefulQueue][i][3] = now // startTime\n fs[gracefulQueue][i][4] = now // lastTime\n }\n }\n // call retry to make sure we're actively processing the queue\n retry()\n}\n\nfunction retry () {\n // clear the timer and remove it to help prevent unintended concurrency\n clearTimeout(retryTimer)\n retryTimer = undefined\n\n if (fs[gracefulQueue].length === 0)\n return\n\n var elem = fs[gracefulQueue].shift()\n var fn = elem[0]\n var args = elem[1]\n // these items may be unset if they were added by an older graceful-fs\n var err = elem[2]\n var startTime = elem[3]\n var lastTime = elem[4]\n\n // if we don't have a startTime we have no way of knowing if we've waited\n // long enough, so go ahead and retry this item now\n if (startTime === undefined) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args)\n } else if (Date.now() - startTime >= 60000) {\n // it's been more than 60 seconds total, bail now\n debug('TIMEOUT', fn.name, args)\n var cb = args.pop()\n if (typeof cb === 'function')\n cb.call(null, err)\n } else {\n // the amount of time between the last attempt and right now\n var sinceAttempt = Date.now() - lastTime\n // the amount of time between when we first tried, and when we last tried\n // rounded up to at least 1\n var sinceStart = Math.max(lastTime - startTime, 1)\n // backoff. wait longer than the total time we've been retrying, but only\n // up to a maximum of 100ms\n var desiredDelay = Math.min(sinceStart * 1.2, 100)\n // it's been long enough since the last retry, do it again\n if (sinceAttempt >= desiredDelay) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args.concat([startTime]))\n } else {\n // if we can't do this job yet, push it to the end of the queue\n // and let the next iteration check again\n fs[gracefulQueue].push(elem)\n }\n }\n\n // schedule our next run if one isn't already scheduled\n if (retryTimer === undefined) {\n retryTimer = setTimeout(retry, 0)\n }\n}\n","var Stream = require('stream').Stream\n\nmodule.exports = legacy\n\nfunction legacy (fs) {\n return {\n ReadStream: ReadStream,\n WriteStream: WriteStream\n }\n\n function ReadStream (path, options) {\n if (!(this instanceof ReadStream)) return new ReadStream(path, options);\n\n Stream.call(this);\n\n var self = this;\n\n this.path = path;\n this.fd = null;\n this.readable = true;\n this.paused = false;\n\n this.flags = 'r';\n this.mode = 438; /*=0666*/\n this.bufferSize = 64 * 1024;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.encoding) this.setEncoding(this.encoding);\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.end === undefined) {\n this.end = Infinity;\n } else if ('number' !== typeof this.end) {\n throw TypeError('end must be a Number');\n }\n\n if (this.start > this.end) {\n throw new Error('start must be <= end');\n }\n\n this.pos = this.start;\n }\n\n if (this.fd !== null) {\n process.nextTick(function() {\n self._read();\n });\n return;\n }\n\n fs.open(this.path, this.flags, this.mode, function (err, fd) {\n if (err) {\n self.emit('error', err);\n self.readable = false;\n return;\n }\n\n self.fd = fd;\n self.emit('open', fd);\n self._read();\n })\n }\n\n function WriteStream (path, options) {\n if (!(this instanceof WriteStream)) return new WriteStream(path, options);\n\n Stream.call(this);\n\n this.path = path;\n this.fd = null;\n this.writable = true;\n\n this.flags = 'w';\n this.encoding = 'binary';\n this.mode = 438; /*=0666*/\n this.bytesWritten = 0;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.start < 0) {\n throw new Error('start must be >= zero');\n }\n\n this.pos = this.start;\n }\n\n this.busy = false;\n this._queue = [];\n\n if (this.fd === null) {\n this._open = fs.open;\n this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);\n this.flush();\n }\n }\n}\n","var constants = require('constants')\n\nvar origCwd = process.cwd\nvar cwd = null\n\nvar platform = process.env.GRACEFUL_FS_PLATFORM || process.platform\n\nprocess.cwd = function() {\n if (!cwd)\n cwd = origCwd.call(process)\n return cwd\n}\ntry {\n process.cwd()\n} catch (er) {}\n\n// This check is needed until node.js 12 is required\nif (typeof process.chdir === 'function') {\n var chdir = process.chdir\n process.chdir = function (d) {\n cwd = null\n chdir.call(process, d)\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)\n}\n\nmodule.exports = patch\n\nfunction patch (fs) {\n // (re-)implement some things that are known busted or missing.\n\n // lchmod, broken prior to 0.6.2\n // back-port the fix here.\n if (constants.hasOwnProperty('O_SYMLINK') &&\n process.version.match(/^v0\\.6\\.[0-2]|^v0\\.5\\./)) {\n patchLchmod(fs)\n }\n\n // lutimes implementation, or no-op\n if (!fs.lutimes) {\n patchLutimes(fs)\n }\n\n // https://github.com/isaacs/node-graceful-fs/issues/4\n // Chown should not fail on einval or eperm if non-root.\n // It should not fail on enosys ever, as this just indicates\n // that a fs doesn't support the intended operation.\n\n fs.chown = chownFix(fs.chown)\n fs.fchown = chownFix(fs.fchown)\n fs.lchown = chownFix(fs.lchown)\n\n fs.chmod = chmodFix(fs.chmod)\n fs.fchmod = chmodFix(fs.fchmod)\n fs.lchmod = chmodFix(fs.lchmod)\n\n fs.chownSync = chownFixSync(fs.chownSync)\n fs.fchownSync = chownFixSync(fs.fchownSync)\n fs.lchownSync = chownFixSync(fs.lchownSync)\n\n fs.chmodSync = chmodFixSync(fs.chmodSync)\n fs.fchmodSync = chmodFixSync(fs.fchmodSync)\n fs.lchmodSync = chmodFixSync(fs.lchmodSync)\n\n fs.stat = statFix(fs.stat)\n fs.fstat = statFix(fs.fstat)\n fs.lstat = statFix(fs.lstat)\n\n fs.statSync = statFixSync(fs.statSync)\n fs.fstatSync = statFixSync(fs.fstatSync)\n fs.lstatSync = statFixSync(fs.lstatSync)\n\n // if lchmod/lchown do not exist, then make them no-ops\n if (fs.chmod && !fs.lchmod) {\n fs.lchmod = function (path, mode, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchmodSync = function () {}\n }\n if (fs.chown && !fs.lchown) {\n fs.lchown = function (path, uid, gid, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchownSync = function () {}\n }\n\n // on Windows, A/V software can lock the directory, causing this\n // to fail with an EACCES or EPERM if the directory contains newly\n // created files. Try again on failure, for up to 60 seconds.\n\n // Set the timeout this long because some Windows Anti-Virus, such as Parity\n // bit9, may lock files for up to a minute, causing npm package install\n // failures. Also, take care to yield the scheduler. Windows scheduling gives\n // CPU to a busy looping process, which can cause the program causing the lock\n // contention to be starved of CPU by node, so the contention doesn't resolve.\n if (platform === \"win32\") {\n fs.rename = typeof fs.rename !== 'function' ? fs.rename\n : (function (fs$rename) {\n function rename (from, to, cb) {\n var start = Date.now()\n var backoff = 0;\n fs$rename(from, to, function CB (er) {\n if (er\n && (er.code === \"EACCES\" || er.code === \"EPERM\" || er.code === \"EBUSY\")\n && Date.now() - start < 60000) {\n setTimeout(function() {\n fs.stat(to, function (stater, st) {\n if (stater && stater.code === \"ENOENT\")\n fs$rename(from, to, CB);\n else\n cb(er)\n })\n }, backoff)\n if (backoff < 100)\n backoff += 10;\n return;\n }\n if (cb) cb(er)\n })\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)\n return rename\n })(fs.rename)\n }\n\n // if read() returns EAGAIN, then just try it again.\n fs.read = typeof fs.read !== 'function' ? fs.read\n : (function (fs$read) {\n function read (fd, buffer, offset, length, position, callback_) {\n var callback\n if (callback_ && typeof callback_ === 'function') {\n var eagCounter = 0\n callback = function (er, _, __) {\n if (er && er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n callback_.apply(this, arguments)\n }\n }\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n\n // This ensures `util.promisify` works as it does for native `fs.read`.\n if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)\n return read\n })(fs.read)\n\n fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync\n : (function (fs$readSync) { return function (fd, buffer, offset, length, position) {\n var eagCounter = 0\n while (true) {\n try {\n return fs$readSync.call(fs, fd, buffer, offset, length, position)\n } catch (er) {\n if (er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n continue\n }\n throw er\n }\n }\n }})(fs.readSync)\n\n function patchLchmod (fs) {\n fs.lchmod = function (path, mode, callback) {\n fs.open( path\n , constants.O_WRONLY | constants.O_SYMLINK\n , mode\n , function (err, fd) {\n if (err) {\n if (callback) callback(err)\n return\n }\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n fs.fchmod(fd, mode, function (err) {\n fs.close(fd, function(err2) {\n if (callback) callback(err || err2)\n })\n })\n })\n }\n\n fs.lchmodSync = function (path, mode) {\n var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)\n\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n var threw = true\n var ret\n try {\n ret = fs.fchmodSync(fd, mode)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n }\n\n function patchLutimes (fs) {\n if (constants.hasOwnProperty(\"O_SYMLINK\") && fs.futimes) {\n fs.lutimes = function (path, at, mt, cb) {\n fs.open(path, constants.O_SYMLINK, function (er, fd) {\n if (er) {\n if (cb) cb(er)\n return\n }\n fs.futimes(fd, at, mt, function (er) {\n fs.close(fd, function (er2) {\n if (cb) cb(er || er2)\n })\n })\n })\n }\n\n fs.lutimesSync = function (path, at, mt) {\n var fd = fs.openSync(path, constants.O_SYMLINK)\n var ret\n var threw = true\n try {\n ret = fs.futimesSync(fd, at, mt)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n\n } else if (fs.futimes) {\n fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }\n fs.lutimesSync = function () {}\n }\n }\n\n function chmodFix (orig) {\n if (!orig) return orig\n return function (target, mode, cb) {\n return orig.call(fs, target, mode, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chmodFixSync (orig) {\n if (!orig) return orig\n return function (target, mode) {\n try {\n return orig.call(fs, target, mode)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n\n function chownFix (orig) {\n if (!orig) return orig\n return function (target, uid, gid, cb) {\n return orig.call(fs, target, uid, gid, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chownFixSync (orig) {\n if (!orig) return orig\n return function (target, uid, gid) {\n try {\n return orig.call(fs, target, uid, gid)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n function statFix (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n function callback (er, stats) {\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n if (cb) cb.apply(this, arguments)\n }\n return options ? orig.call(fs, target, options, callback)\n : orig.call(fs, target, callback)\n }\n }\n\n function statFixSync (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options) {\n var stats = options ? orig.call(fs, target, options)\n : orig.call(fs, target)\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n return stats;\n }\n }\n\n // ENOSYS means that the fs doesn't support the op. Just ignore\n // that, because it doesn't matter.\n //\n // if there's no getuid, or if getuid() is something other\n // than 0, and the error is EINVAL or EPERM, then just ignore\n // it.\n //\n // This specific case is a silent failure in cp, install, tar,\n // and most other unix tools that manage permissions.\n //\n // When running as root, or if other types of errors are\n // encountered, then it's strict.\n function chownErOk (er) {\n if (!er)\n return true\n\n if (er.code === \"ENOSYS\")\n return true\n\n var nonroot = !process.getuid || process.getuid() !== 0\n if (nonroot) {\n if (er.code === \"EINVAL\" || er.code === \"EPERM\")\n return true\n }\n\n return false\n }\n}\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\nconst lazy = (importedModule, importFn, moduleId) =>\n\timportedModule === undefined ? importFn(moduleId) : importedModule;\n\nmodule.exports = importFn => {\n\treturn moduleId => {\n\t\tlet importedModule;\n\n\t\tconst handler = {\n\t\t\tget: (target, property) => {\n\t\t\t\timportedModule = lazy(importedModule, importFn, moduleId);\n\t\t\t\treturn Reflect.get(importedModule, property);\n\t\t\t},\n\t\t\tapply: (target, thisArgument, argumentsList) => {\n\t\t\t\timportedModule = lazy(importedModule, importFn, moduleId);\n\t\t\t\treturn Reflect.apply(importedModule, thisArgument, argumentsList);\n\t\t\t},\n\t\t\tconstruct: (target, argumentsList) => {\n\t\t\t\timportedModule = lazy(importedModule, importFn, moduleId);\n\t\t\t\treturn Reflect.construct(importedModule, argumentsList);\n\t\t\t}\n\t\t};\n\n\t\t// eslint-disable-next-line prefer-arrow-callback\n\t\treturn new Proxy(function () {}, handler);\n\t};\n};\n","'use strict';\n\nvar hasOwn = require('hasown');\n\nfunction specifierIncluded(current, specifier) {\n\tvar nodeParts = current.split('.');\n\tvar parts = specifier.split(' ');\n\tvar op = parts.length > 1 ? parts[0] : '=';\n\tvar versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');\n\n\tfor (var i = 0; i < 3; ++i) {\n\t\tvar cur = parseInt(nodeParts[i] || 0, 10);\n\t\tvar ver = parseInt(versionParts[i] || 0, 10);\n\t\tif (cur === ver) {\n\t\t\tcontinue; // eslint-disable-line no-restricted-syntax, no-continue\n\t\t}\n\t\tif (op === '<') {\n\t\t\treturn cur < ver;\n\t\t}\n\t\tif (op === '>=') {\n\t\t\treturn cur >= ver;\n\t\t}\n\t\treturn false;\n\t}\n\treturn op === '>=';\n}\n\nfunction matchesRange(current, range) {\n\tvar specifiers = range.split(/ ?&& ?/);\n\tif (specifiers.length === 0) {\n\t\treturn false;\n\t}\n\tfor (var i = 0; i < specifiers.length; ++i) {\n\t\tif (!specifierIncluded(current, specifiers[i])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nfunction versionIncluded(nodeVersion, specifierValue) {\n\tif (typeof specifierValue === 'boolean') {\n\t\treturn specifierValue;\n\t}\n\n\tvar current = typeof nodeVersion === 'undefined'\n\t\t? process.versions && process.versions.node\n\t\t: nodeVersion;\n\n\tif (typeof current !== 'string') {\n\t\tthrow new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');\n\t}\n\n\tif (specifierValue && typeof specifierValue === 'object') {\n\t\tfor (var i = 0; i < specifierValue.length; ++i) {\n\t\t\tif (matchesRange(current, specifierValue[i])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\treturn matchesRange(current, specifierValue);\n}\n\nvar data = require('./core.json');\n\nmodule.exports = function isCore(x, nodeVersion) {\n\treturn hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);\n};\n","\nmodule.exports.__defineGetter__('parse', function() {\n\treturn require('./lib/parse').parse\n})\n\nmodule.exports.__defineGetter__('stringify', function() {\n\treturn require('./lib/stringify').stringify\n})\n\nmodule.exports.__defineGetter__('tokenize', function() {\n\treturn require('./lib/parse').tokenize\n})\n\nmodule.exports.__defineGetter__('update', function() {\n\treturn require('./lib/document').update\n})\n\nmodule.exports.__defineGetter__('analyze', function() {\n\treturn require('./lib/analyze').analyze\n})\n\nmodule.exports.__defineGetter__('utils', function() {\n\treturn require('./lib/utils')\n})\n\n/**package\n{ \"name\": \"jju\",\n \"version\": \"0.0.0\",\n \"dependencies\": {\"js-yaml\": \"*\"},\n \"scripts\": {\"postinstall\": \"js-yaml package.yaml > package.json ; npm install\"}\n}\n**/\n","\nvar tokenize = require('./parse').tokenize\n\nmodule.exports.analyze = function analyzeJSON(input, options) {\n if (options == null) options = {}\n\n if (!Array.isArray(input)) {\n input = tokenize(input, options)\n }\n\n var result = {\n has_whitespace: false,\n has_comments: false,\n has_newlines: false,\n has_trailing_comma: false,\n indent: '',\n newline: '\\n',\n quote: '\"',\n quote_keys: true,\n }\n\n var stats = {\n indent: {},\n newline: {},\n quote: {},\n }\n\n for (var i=0; i<input.length; i++) {\n if (input[i].type === 'newline') {\n if (input[i+1] && input[i+1].type === 'whitespace') {\n if (input[i+1].raw[0] === '\\t') {\n // if first is tab, then indent is tab\n stats.indent['\\t'] = (stats.indent['\\t'] || 0) + 1\n }\n if (input[i+1].raw.match(/^\\x20+$/)) {\n // if all are spaces, then indent is space\n // this can fail with mixed indent (4, 2 would display 3)\n var ws_len = input[i+1].raw.length\n var indent_len = input[i+1].stack.length + 1\n if (ws_len % indent_len === 0) {\n var t = Array(ws_len / indent_len + 1).join(' ')\n stats.indent[t] = (stats.indent[t] || 0) + 1\n }\n }\n }\n\n stats.newline[input[i].raw] = (stats.newline[input[i].raw] || 0) + 1\n }\n\n if (input[i].type === 'newline') {\n result.has_newlines = true\n }\n if (input[i].type === 'whitespace') {\n result.has_whitespace = true\n }\n if (input[i].type === 'comment') {\n result.has_comments = true\n }\n if (input[i].type === 'key') {\n if (input[i].raw[0] !== '\"' && input[i].raw[0] !== \"'\") result.quote_keys = false\n }\n\n if (input[i].type === 'key' || input[i].type === 'literal') {\n if (input[i].raw[0] === '\"' || input[i].raw[0] === \"'\") {\n stats.quote[input[i].raw[0]] = (stats.quote[input[i].raw[0]] || 0) + 1\n }\n }\n\n if (input[i].type === 'separator' && input[i].raw === ',') {\n for (var j=i+1; j<input.length; j++) {\n if (input[j].type === 'literal' || input[j].type === 'key') break\n if (input[j].type === 'separator') result.has_trailing_comma = true\n }\n }\n }\n\n for (var k in stats) {\n if (Object.keys(stats[k]).length) {\n result[k] = Object.keys(stats[k]).reduce(function(a, b) {\n return stats[k][a] > stats[k][b] ? a : b\n })\n }\n }\n\n return result\n}\n\n","\nvar assert = require('assert')\nvar tokenize = require('./parse').tokenize\nvar stringify = require('./stringify').stringify\nvar analyze = require('./analyze').analyze\n\nfunction isObject(x) {\n return typeof(x) === 'object' && x !== null\n}\n\nfunction value_to_tokenlist(value, stack, options, is_key, indent) {\n options = Object.create(options)\n options._stringify_key = !!is_key\n\n if (indent) {\n options._prefix = indent.prefix.map(function(x) {\n return x.raw\n }).join('')\n }\n\n if (options._splitMin == null) options._splitMin = 0\n if (options._splitMax == null) options._splitMax = 0\n\n var stringified = stringify(value, options)\n\n if (is_key) {\n return [ { raw: stringified, type: 'key', stack: stack, value: value } ]\n }\n\n options._addstack = stack\n var result = tokenize(stringified, {\n _addstack: stack,\n })\n result.data = null\n return result\n}\n\n// '1.2.3' -> ['1','2','3']\nfunction arg_to_path(path) {\n // array indexes\n if (typeof(path) === 'number') path = String(path)\n\n if (path === '') path = []\n if (typeof(path) === 'string') path = path.split('.')\n\n if (!Array.isArray(path)) throw Error('Invalid path type, string or array expected')\n return path\n}\n\n// returns new [begin, end] or false if not found\n//\n// {x:3, xxx: 111, y: [111, {q: 1, e: 2} ,333] }\n// f('y',0) returns this B^^^^^^^^^^^^^^^^^^^^^^^^E\n// then f('1',1) would reduce it to B^^^^^^^^^^E\nfunction find_element_in_tokenlist(element, lvl, tokens, begin, end) {\n while(tokens[begin].stack[lvl] != element) {\n if (begin++ >= end) return false\n }\n while(tokens[end].stack[lvl] != element) {\n if (end-- < begin) return false\n }\n return [begin, end]\n}\n\nfunction is_whitespace(token_type) {\n return token_type === 'whitespace'\n || token_type === 'newline'\n || token_type === 'comment'\n}\n\nfunction find_first_non_ws_token(tokens, begin, end) {\n while(is_whitespace(tokens[begin].type)) {\n if (begin++ >= end) return false\n }\n return begin\n}\n\nfunction find_last_non_ws_token(tokens, begin, end) {\n while(is_whitespace(tokens[end].type)) {\n if (end-- < begin) return false\n }\n return end\n}\n\n/*\n * when appending a new element of an object/array, we are trying to\n * figure out the style used on the previous element\n *\n * return {prefix, sep1, sep2, suffix}\n *\n * ' \"key\" : \"element\" \\r\\n'\n * prefix^^^^ sep1^ ^^sep2 ^^^^^^^^suffix\n *\n * begin - the beginning of the object/array\n * end - last token of the last element (value or comma usually)\n */\nfunction detect_indent_style(tokens, is_array, begin, end, level) {\n var result = {\n sep1: [],\n sep2: [],\n suffix: [],\n prefix: [],\n newline: [],\n }\n\n if (tokens[end].type === 'separator' && tokens[end].stack.length !== level+1 && tokens[end].raw !== ',') {\n // either a beginning of the array (no last element) or other weird situation\n //\n // just return defaults\n return result\n }\n\n // ' \"key\" : \"value\" ,'\n // skipping last separator, we're now here ^^\n if (tokens[end].type === 'separator')\n end = find_last_non_ws_token(tokens, begin, end - 1)\n if (end === false) return result\n\n // ' \"key\" : \"value\" ,'\n // skipping value ^^^^^^^\n while(tokens[end].stack.length > level) end--\n\n if (!is_array) {\n while(is_whitespace(tokens[end].type)) {\n if (end < begin) return result\n if (tokens[end].type === 'whitespace') {\n result.sep2.unshift(tokens[end])\n } else {\n // newline, comment or other unrecognized codestyle\n return result\n }\n end--\n }\n\n // ' \"key\" : \"value\" ,'\n // skipping separator ^\n assert.equal(tokens[end].type, 'separator')\n assert.equal(tokens[end].raw, ':')\n while(is_whitespace(tokens[--end].type)) {\n if (end < begin) return result\n if (tokens[end].type === 'whitespace') {\n result.sep1.unshift(tokens[end])\n } else {\n // newline, comment or other unrecognized codestyle\n return result\n }\n }\n\n assert.equal(tokens[end].type, 'key')\n end--\n }\n\n // ' \"key\" : \"value\" ,'\n // skipping key ^^^^^\n while(is_whitespace(tokens[end].type)) {\n if (end < begin) return result\n if (tokens[end].type === 'whitespace') {\n result.prefix.unshift(tokens[end])\n } else if (tokens[end].type === 'newline') {\n result.newline.unshift(tokens[end])\n return result\n } else {\n // comment or other unrecognized codestyle\n return result\n }\n end--\n }\n\n return result\n}\n\nfunction Document(text, options) {\n var self = Object.create(Document.prototype)\n\n if (options == null) options = {}\n //options._structure = true\n var tokens = self._tokens = tokenize(text, options)\n self._data = tokens.data\n tokens.data = null\n self._options = options\n\n var stats = analyze(text, options)\n if (options.indent == null) {\n options.indent = stats.indent\n }\n if (options.quote == null) {\n options.quote = stats.quote\n }\n if (options.quote_keys == null) {\n options.quote_keys = stats.quote_keys\n }\n if (options.no_trailing_comma == null) {\n options.no_trailing_comma = !stats.has_trailing_comma\n }\n return self\n}\n\n// return true if it's a proper object\n// throw otherwise\nfunction check_if_can_be_placed(key, object, is_unset) {\n //if (object == null) return false\n function error(add) {\n return Error(\"You can't \" + (is_unset ? 'unset' : 'set') + \" key '\" + key + \"'\" + add)\n }\n\n if (!isObject(object)) {\n throw error(' of an non-object')\n }\n if (Array.isArray(object)) {\n // array, check boundary\n if (String(key).match(/^\\d+$/)) {\n key = Number(String(key))\n if (object.length < key || (is_unset && object.length === key)) {\n throw error(', out of bounds')\n } else if (is_unset && object.length !== key+1) {\n throw error(' in the middle of an array')\n } else {\n return true\n }\n } else {\n throw error(' of an array')\n }\n } else {\n // object\n return true\n }\n}\n\n// usage: document.set('path.to.something', 'value')\n// or: document.set(['path','to','something'], 'value')\nDocument.prototype.set = function(path, value) {\n path = arg_to_path(path)\n\n // updating this._data and check for errors\n if (path.length === 0) {\n if (value === undefined) throw Error(\"can't remove root document\")\n this._data = value\n var new_key = false\n\n } else {\n var data = this._data\n\n for (var i=0; i<path.length-1; i++) {\n check_if_can_be_placed(path[i], data, false)\n data = data[path[i]]\n }\n if (i === path.length-1) {\n check_if_can_be_placed(path[i], data, value === undefined)\n }\n\n var new_key = !(path[i] in data)\n\n if (value === undefined) {\n if (Array.isArray(data)) {\n data.pop()\n } else {\n delete data[path[i]]\n }\n } else {\n data[path[i]] = value\n }\n }\n\n // for inserting document\n if (!this._tokens.length)\n this._tokens = [ { raw: '', type: 'literal', stack: [], value: undefined } ]\n\n var position = [\n find_first_non_ws_token(this._tokens, 0, this._tokens.length - 1),\n find_last_non_ws_token(this._tokens, 0, this._tokens.length - 1),\n ]\n for (var i=0; i<path.length-1; i++) {\n position = find_element_in_tokenlist(path[i], i, this._tokens, position[0], position[1])\n if (position == false) throw Error('internal error, please report this')\n }\n // assume that i == path.length-1 here\n\n if (path.length === 0) {\n var newtokens = value_to_tokenlist(value, path, this._options)\n // all good\n\n } else if (!new_key) {\n // replace old value with a new one (or deleting something)\n var pos_old = position\n position = find_element_in_tokenlist(path[i], i, this._tokens, position[0], position[1])\n\n if (value === undefined && position !== false) {\n // deleting element (position !== false ensures there's something)\n var newtokens = []\n\n if (!Array.isArray(data)) {\n // removing element from an object, `{x:1, key:CURRENT} -> {x:1}`\n // removing sep, literal and optional sep\n // ':'\n var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1)\n assert.equal(this._tokens[pos2].type, 'separator')\n assert.equal(this._tokens[pos2].raw, ':')\n position[0] = pos2\n\n // key\n var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1)\n assert.equal(this._tokens[pos2].type, 'key')\n assert.equal(this._tokens[pos2].value, path[path.length-1])\n position[0] = pos2\n }\n\n // removing comma in arrays and objects\n var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1)\n assert.equal(this._tokens[pos2].type, 'separator')\n if (this._tokens[pos2].raw === ',') {\n position[0] = pos2\n } else {\n // beginning of the array/object, so we should remove trailing comma instead\n pos2 = find_first_non_ws_token(this._tokens, position[1] + 1, pos_old[1])\n assert.equal(this._tokens[pos2].type, 'separator')\n if (this._tokens[pos2].raw === ',') {\n position[1] = pos2\n }\n }\n\n } else {\n var indent = pos2 !== false\n ? detect_indent_style(this._tokens, Array.isArray(data), pos_old[0], position[1] - 1, i)\n : {}\n var newtokens = value_to_tokenlist(value, path, this._options, false, indent)\n }\n\n } else {\n // insert new key, that's tricky\n var path_1 = path.slice(0, i)\n\n // find a last separator after which we're inserting it\n var pos2 = find_last_non_ws_token(this._tokens, position[0] + 1, position[1] - 1)\n assert(pos2 !== false)\n\n var indent = pos2 !== false\n ? detect_indent_style(this._tokens, Array.isArray(data), position[0] + 1, pos2, i)\n : {}\n\n var newtokens = value_to_tokenlist(value, path, this._options, false, indent)\n\n // adding leading whitespaces according to detected codestyle\n var prefix = []\n if (indent.newline && indent.newline.length)\n prefix = prefix.concat(indent.newline)\n if (indent.prefix && indent.prefix.length)\n prefix = prefix.concat(indent.prefix)\n\n // adding '\"key\":' (as in \"key\":\"value\") to object values\n if (!Array.isArray(data)) {\n prefix = prefix.concat(value_to_tokenlist(path[path.length-1], path_1, this._options, true))\n if (indent.sep1 && indent.sep1.length)\n prefix = prefix.concat(indent.sep1)\n prefix.push({raw: ':', type: 'separator', stack: path_1})\n if (indent.sep2 && indent.sep2.length)\n prefix = prefix.concat(indent.sep2)\n }\n\n newtokens.unshift.apply(newtokens, prefix)\n\n // check if prev token is a separator AND they're at the same level\n if (this._tokens[pos2].type === 'separator' && this._tokens[pos2].stack.length === path.length-1) {\n // previous token is either , or [ or {\n if (this._tokens[pos2].raw === ',') {\n // restore ending comma\n newtokens.push({raw: ',', type: 'separator', stack: path_1})\n }\n } else {\n // previous token isn't a separator, so need to insert one\n newtokens.unshift({raw: ',', type: 'separator', stack: path_1})\n }\n\n if (indent.suffix && indent.suffix.length)\n newtokens.push.apply(newtokens, indent.suffix)\n\n assert.equal(this._tokens[position[1]].type, 'separator')\n position[0] = pos2+1\n position[1] = pos2\n }\n\n newtokens.unshift(position[1] - position[0] + 1)\n newtokens.unshift(position[0])\n this._tokens.splice.apply(this._tokens, newtokens)\n\n return this\n}\n\n// convenience method\nDocument.prototype.unset = function(path) {\n return this.set(path, undefined)\n}\n\nDocument.prototype.get = function(path) {\n path = arg_to_path(path)\n\n var data = this._data\n for (var i=0; i<path.length; i++) {\n if (!isObject(data)) return undefined\n data = data[path[i]]\n }\n return data\n}\n\nDocument.prototype.has = function(path) {\n path = arg_to_path(path)\n\n var data = this._data\n for (var i=0; i<path.length; i++) {\n if (!isObject(data)) return false\n data = data[path[i]]\n }\n return data !== undefined\n}\n\n// compare old object and new one, and change differences only\nDocument.prototype.update = function(value) {\n var self = this\n change([], self._data, value)\n return self\n\n function change(path, old_data, new_data) {\n if (!isObject(new_data) || !isObject(old_data)) {\n // if source or dest is primitive, just replace\n if (new_data !== old_data)\n self.set(path, new_data)\n\n } else if (Array.isArray(new_data) != Array.isArray(old_data)) {\n // old data is an array XOR new data is an array, replace as well\n self.set(path, new_data)\n\n } else if (Array.isArray(new_data)) {\n // both values are arrays here\n\n if (new_data.length > old_data.length) {\n // adding new elements, so going forward\n for (var i=0; i<new_data.length; i++) {\n path.push(String(i))\n change(path, old_data[i], new_data[i])\n path.pop()\n }\n\n } else {\n // removing something, so going backward\n for (var i=old_data.length-1; i>=0; i--) {\n path.push(String(i))\n change(path, old_data[i], new_data[i])\n path.pop()\n }\n }\n\n } else {\n // both values are objects here\n for (var i in new_data) {\n path.push(String(i))\n change(path, old_data[i], new_data[i])\n path.pop()\n }\n\n for (var i in old_data) {\n if (i in new_data) continue\n path.push(String(i))\n change(path, old_data[i], new_data[i])\n path.pop()\n }\n }\n }\n}\n\nDocument.prototype.toString = function() {\n return this._tokens.map(function(x) {\n return x.raw\n }).join('')\n}\n\nmodule.exports.Document = Document\n\nmodule.exports.update = function updateJSON(source, new_value, options) {\n return Document(source, options).update(new_value).toString()\n}\n\n","\n// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf\n\nvar Uni = require('./unicode')\n\nfunction isHexDigit(x) {\n return (x >= '0' && x <= '9')\n || (x >= 'A' && x <= 'F')\n || (x >= 'a' && x <= 'f')\n}\n\nfunction isOctDigit(x) {\n return x >= '0' && x <= '7'\n}\n\nfunction isDecDigit(x) {\n return x >= '0' && x <= '9'\n}\n\nvar unescapeMap = {\n '\\'': '\\'',\n '\"' : '\"',\n '\\\\': '\\\\',\n 'b' : '\\b',\n 'f' : '\\f',\n 'n' : '\\n',\n 'r' : '\\r',\n 't' : '\\t',\n 'v' : '\\v',\n '/' : '/',\n}\n\nfunction formatError(input, msg, position, lineno, column, json5) {\n var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1)\n , tmppos = position - column - 1\n , srcline = ''\n , underline = ''\n\n var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON\n\n // output no more than 70 characters before the wrong ones\n if (tmppos < position - 70) {\n tmppos = position - 70\n }\n\n while (1) {\n var chr = input[++tmppos]\n\n if (isLineTerminator(chr) || tmppos === input.length) {\n if (position >= tmppos) {\n // ending line error, so show it after the last char\n underline += '^'\n }\n break\n }\n srcline += chr\n\n if (position === tmppos) {\n underline += '^'\n } else if (position > tmppos) {\n underline += input[tmppos] === '\\t' ? '\\t' : ' '\n }\n\n // output no more than 78 characters on the string\n if (srcline.length > 78) break\n }\n\n return result + '\\n' + srcline + '\\n' + underline\n}\n\nfunction parse(input, options) {\n // parse as a standard JSON mode\n var json5 = false\n var cjson = false\n\n if (options.legacy || options.mode === 'json') {\n // use json\n } else if (options.mode === 'cjson') {\n cjson = true\n } else if (options.mode === 'json5') {\n json5 = true\n } else {\n // use it by default\n json5 = true\n }\n\n var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON\n var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON\n\n var length = input.length\n , lineno = 0\n , linestart = 0\n , position = 0\n , stack = []\n\n var tokenStart = function() {}\n var tokenEnd = function(v) {return v}\n\n /* tokenize({\n raw: '...',\n type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline',\n value: 'number'|'string'|'whatever',\n path: [...],\n })\n */\n if (options._tokenize) {\n ;(function() {\n var start = null\n tokenStart = function() {\n if (start !== null) throw Error('internal error, token overlap')\n start = position\n }\n\n tokenEnd = function(v, type) {\n if (start != position) {\n var hash = {\n raw: input.substr(start, position-start),\n type: type,\n stack: stack.slice(0),\n }\n if (v !== undefined) hash.value = v\n options._tokenize.call(null, hash)\n }\n start = null\n return v\n }\n })()\n }\n\n function fail(msg) {\n var column = position - linestart\n\n if (!msg) {\n if (position < length) {\n var token = '\\'' +\n JSON\n .stringify(input[position])\n .replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n + '\\''\n\n if (!msg) msg = 'Unexpected token ' + token\n } else {\n if (!msg) msg = 'Unexpected end of input'\n }\n }\n\n var error = SyntaxError(formatError(input, msg, position, lineno, column, json5))\n error.row = lineno + 1\n error.column = column + 1\n throw error\n }\n\n function newline(chr) {\n // account for <cr><lf>\n if (chr === '\\r' && input[position] === '\\n') position++\n linestart = position\n lineno++\n }\n\n function parseGeneric() {\n var result\n\n while (position < length) {\n tokenStart()\n var chr = input[position++]\n\n if (chr === '\"' || (chr === '\\'' && json5)) {\n return tokenEnd(parseString(chr), 'literal')\n\n } else if (chr === '{') {\n tokenEnd(undefined, 'separator')\n return parseObject()\n\n } else if (chr === '[') {\n tokenEnd(undefined, 'separator')\n return parseArray()\n\n } else if (chr === '-'\n || chr === '.'\n || isDecDigit(chr)\n // + number Infinity NaN\n || (json5 && (chr === '+' || chr === 'I' || chr === 'N'))\n ) {\n return tokenEnd(parseNumber(), 'literal')\n\n } else if (chr === 'n') {\n parseKeyword('null')\n return tokenEnd(null, 'literal')\n\n } else if (chr === 't') {\n parseKeyword('true')\n return tokenEnd(true, 'literal')\n\n } else if (chr === 'f') {\n parseKeyword('false')\n return tokenEnd(false, 'literal')\n\n } else {\n position--\n return tokenEnd(undefined)\n }\n }\n }\n\n function parseKey() {\n var result\n\n while (position < length) {\n tokenStart()\n var chr = input[position++]\n\n if (chr === '\"' || (chr === '\\'' && json5)) {\n return tokenEnd(parseString(chr), 'key')\n\n } else if (chr === '{') {\n tokenEnd(undefined, 'separator')\n return parseObject()\n\n } else if (chr === '[') {\n tokenEnd(undefined, 'separator')\n return parseArray()\n\n } else if (chr === '.'\n || isDecDigit(chr)\n ) {\n return tokenEnd(parseNumber(true), 'key')\n\n } else if (json5\n && Uni.isIdentifierStart(chr) || (chr === '\\\\' && input[position] === 'u')) {\n // unicode char or a unicode sequence\n var rollback = position - 1\n var result = parseIdentifier()\n\n if (result === undefined) {\n position = rollback\n return tokenEnd(undefined)\n } else {\n return tokenEnd(result, 'key')\n }\n\n } else {\n position--\n return tokenEnd(undefined)\n }\n }\n }\n\n function skipWhiteSpace() {\n tokenStart()\n while (position < length) {\n var chr = input[position++]\n\n if (isLineTerminator(chr)) {\n position--\n tokenEnd(undefined, 'whitespace')\n tokenStart()\n position++\n newline(chr)\n tokenEnd(undefined, 'newline')\n tokenStart()\n\n } else if (isWhiteSpace(chr)) {\n // nothing\n\n } else if (chr === '/'\n && (json5 || cjson)\n && (input[position] === '/' || input[position] === '*')\n ) {\n position--\n tokenEnd(undefined, 'whitespace')\n tokenStart()\n position++\n skipComment(input[position++] === '*')\n tokenEnd(undefined, 'comment')\n tokenStart()\n\n } else {\n position--\n break\n }\n }\n return tokenEnd(undefined, 'whitespace')\n }\n\n function skipComment(multi) {\n while (position < length) {\n var chr = input[position++]\n\n if (isLineTerminator(chr)) {\n // LineTerminator is an end of singleline comment\n if (!multi) {\n // let parent function deal with newline\n position--\n return\n }\n\n newline(chr)\n\n } else if (chr === '*' && multi) {\n // end of multiline comment\n if (input[position] === '/') {\n position++\n return\n }\n\n } else {\n // nothing\n }\n }\n\n if (multi) {\n fail('Unclosed multiline comment')\n }\n }\n\n function parseKeyword(keyword) {\n // keyword[0] is not checked because it should've checked earlier\n var _pos = position\n var len = keyword.length\n for (var i=1; i<len; i++) {\n if (position >= length || keyword[i] != input[position]) {\n position = _pos-1\n fail()\n }\n position++\n }\n }\n\n function parseObject() {\n var result = options.null_prototype ? Object.create(null) : {}\n , empty_object = {}\n , is_non_empty = false\n\n while (position < length) {\n skipWhiteSpace()\n var item1 = parseKey()\n skipWhiteSpace()\n tokenStart()\n var chr = input[position++]\n tokenEnd(undefined, 'separator')\n\n if (chr === '}' && item1 === undefined) {\n if (!json5 && is_non_empty) {\n position--\n fail('Trailing comma in object')\n }\n return result\n\n } else if (chr === ':' && item1 !== undefined) {\n skipWhiteSpace()\n stack.push(item1)\n var item2 = parseGeneric()\n stack.pop()\n\n if (item2 === undefined) fail('No value found for key ' + item1)\n if (typeof(item1) !== 'string') {\n if (!json5 || typeof(item1) !== 'number') {\n fail('Wrong key type: ' + item1)\n }\n }\n\n if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') {\n if (options.reserved_keys === 'throw') {\n fail('Reserved key: ' + item1)\n } else {\n // silently ignore it\n }\n } else {\n if (typeof(options.reviver) === 'function') {\n item2 = options.reviver.call(null, item1, item2)\n }\n\n if (item2 !== undefined) {\n is_non_empty = true\n Object.defineProperty(result, item1, {\n value: item2,\n enumerable: true,\n configurable: true,\n writable: true,\n })\n }\n }\n\n skipWhiteSpace()\n\n tokenStart()\n var chr = input[position++]\n tokenEnd(undefined, 'separator')\n\n if (chr === ',') {\n continue\n\n } else if (chr === '}') {\n return result\n\n } else {\n fail()\n }\n\n } else {\n position--\n fail()\n }\n }\n\n fail()\n }\n\n function parseArray() {\n var result = []\n\n while (position < length) {\n skipWhiteSpace()\n stack.push(result.length)\n var item = parseGeneric()\n stack.pop()\n skipWhiteSpace()\n tokenStart()\n var chr = input[position++]\n tokenEnd(undefined, 'separator')\n\n if (item !== undefined) {\n if (typeof(options.reviver) === 'function') {\n item = options.reviver.call(null, String(result.length), item)\n }\n if (item === undefined) {\n result.length++\n item = true // hack for check below, not included into result\n } else {\n result.push(item)\n }\n }\n\n if (chr === ',') {\n if (item === undefined) {\n fail('Elisions are not supported')\n }\n\n } else if (chr === ']') {\n if (!json5 && item === undefined && result.length) {\n position--\n fail('Trailing comma in array')\n }\n return result\n\n } else {\n position--\n fail()\n }\n }\n }\n\n function parseNumber() {\n // rewind because we don't know first char\n position--\n\n var start = position\n , chr = input[position++]\n , t\n\n var to_num = function(is_octal) {\n var str = input.substr(start, position - start)\n\n if (is_octal) {\n var result = parseInt(str.replace(/^0o?/, ''), 8)\n } else {\n var result = Number(str)\n }\n\n if (Number.isNaN(result)) {\n position--\n fail('Bad numeric literal - \"' + input.substr(start, position - start + 1) + '\"')\n } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) {\n // additional restrictions imposed by json\n position--\n fail('Non-json numeric literal - \"' + input.substr(start, position - start + 1) + '\"')\n } else {\n return result\n }\n }\n\n // ex: -5982475.249875e+29384\n // ^ skipping this\n if (chr === '-' || (chr === '+' && json5)) chr = input[position++]\n\n if (chr === 'N' && json5) {\n parseKeyword('NaN')\n return NaN\n }\n\n if (chr === 'I' && json5) {\n parseKeyword('Infinity')\n\n // returning +inf or -inf\n return to_num()\n }\n\n if (chr >= '1' && chr <= '9') {\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < length && isDecDigit(input[position])) position++\n chr = input[position++]\n }\n\n // special case for leading zero: 0.123456\n if (chr === '0') {\n chr = input[position++]\n\n // new syntax, \"0o777\" old syntax, \"0777\"\n var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr)\n var is_hex = chr === 'x' || chr === 'X'\n\n if (json5 && (is_octal || is_hex)) {\n while (position < length\n && (is_hex ? isHexDigit : isOctDigit)( input[position] )\n ) position++\n\n var sign = 1\n if (input[start] === '-') {\n sign = -1\n start++\n } else if (input[start] === '+') {\n start++\n }\n\n return sign * to_num(is_octal)\n }\n }\n\n if (chr === '.') {\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < length && isDecDigit(input[position])) position++\n chr = input[position++]\n }\n\n if (chr === 'e' || chr === 'E') {\n chr = input[position++]\n if (chr === '-' || chr === '+') position++\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < length && isDecDigit(input[position])) position++\n chr = input[position++]\n }\n\n // we have char in the buffer, so count for it\n position--\n return to_num()\n }\n\n function parseIdentifier() {\n // rewind because we don't know first char\n position--\n\n var result = ''\n\n while (position < length) {\n var chr = input[position++]\n\n if (chr === '\\\\'\n && input[position] === 'u'\n && isHexDigit(input[position+1])\n && isHexDigit(input[position+2])\n && isHexDigit(input[position+3])\n && isHexDigit(input[position+4])\n ) {\n // UnicodeEscapeSequence\n chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16))\n position += 5\n }\n\n if (result.length) {\n // identifier started\n if (Uni.isIdentifierPart(chr)) {\n result += chr\n } else {\n position--\n return result\n }\n\n } else {\n if (Uni.isIdentifierStart(chr)) {\n result += chr\n } else {\n return undefined\n }\n }\n }\n\n fail()\n }\n\n function parseString(endChar) {\n // 7.8.4 of ES262 spec\n var result = ''\n\n while (position < length) {\n var chr = input[position++]\n\n if (chr === endChar) {\n return result\n\n } else if (chr === '\\\\') {\n if (position >= length) fail()\n chr = input[position++]\n\n if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != \"'\"))) {\n result += unescapeMap[chr]\n\n } else if (json5 && isLineTerminator(chr)) {\n // line continuation\n newline(chr)\n\n } else if (chr === 'u' || (chr === 'x' && json5)) {\n // unicode/character escape sequence\n var off = chr === 'u' ? 4 : 2\n\n // validation for \\uXXXX\n for (var i=0; i<off; i++) {\n if (position >= length) fail()\n if (!isHexDigit(input[position])) fail('Bad escape sequence')\n position++\n }\n\n result += String.fromCharCode(parseInt(input.substr(position-off, off), 16))\n } else if (json5 && isOctDigit(chr)) {\n if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) {\n // three-digit octal\n var digits = 3\n } else if (isOctDigit(input[position])) {\n // two-digit octal\n var digits = 2\n } else {\n var digits = 1\n }\n position += digits - 1\n result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8))\n /*if (!isOctDigit(input[position])) {\n // \\0 is allowed still\n result += '\\0'\n } else {\n fail('Octal literals are not supported')\n }*/\n\n } else if (json5) {\n // \\X -> x\n result += chr\n\n } else {\n position--\n fail()\n }\n\n } else if (isLineTerminator(chr)) {\n fail()\n\n } else {\n if (!json5 && chr.charCodeAt(0) < 32) {\n position--\n fail('Unexpected control character')\n }\n\n // SourceCharacter but not one of \" or \\ or LineTerminator\n result += chr\n }\n }\n\n fail()\n }\n\n skipWhiteSpace()\n var return_value = parseGeneric()\n if (return_value !== undefined || position < length) {\n skipWhiteSpace()\n\n if (position >= length) {\n if (typeof(options.reviver) === 'function') {\n return_value = options.reviver.call(null, '', return_value)\n }\n return return_value\n } else {\n fail()\n }\n\n } else {\n if (position) {\n fail('No data, only a whitespace')\n } else {\n fail('No data, empty input')\n }\n }\n}\n\n/*\n * parse(text, options)\n * or\n * parse(text, reviver)\n *\n * where:\n * text - string\n * options - object\n * reviver - function\n */\nmodule.exports.parse = function parseJSON(input, options) {\n // support legacy functions\n if (typeof(options) === 'function') {\n options = {\n reviver: options\n }\n }\n\n if (input === undefined) {\n // parse(stringify(x)) should be equal x\n // with JSON functions it is not 'cause of undefined\n // so we're fixing it\n return undefined\n }\n\n // JSON.parse compat\n if (typeof(input) !== 'string') input = String(input)\n if (options == null) options = {}\n if (options.reserved_keys == null) options.reserved_keys = 'ignore'\n\n if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') {\n if (options.null_prototype == null) {\n options.null_prototype = true\n }\n }\n\n try {\n return parse(input, options)\n } catch(err) {\n // jju is a recursive parser, so JSON.parse(\"{{{{{{{\") could blow up the stack\n //\n // this catch is used to skip all those internal calls\n if (err instanceof SyntaxError && err.row != null && err.column != null) {\n var old_err = err\n err = SyntaxError(old_err.message)\n err.column = old_err.column\n err.row = old_err.row\n }\n throw err\n }\n}\n\nmodule.exports.tokenize = function tokenizeJSON(input, options) {\n if (options == null) options = {}\n\n options._tokenize = function(smth) {\n if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack)\n tokens.push(smth)\n }\n\n var tokens = []\n tokens.data = module.exports.parse(input, options)\n return tokens\n}\n\n","\nvar Uni = require('./unicode')\n\n// Fix Function#name on browsers that do not support it (IE)\n// http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie\nif (!(function f(){}).name) {\n Object.defineProperty((function(){}).constructor.prototype, 'name', {\n get: function() {\n var name = this.toString().match(/^\\s*function\\s*(\\S*)\\s*\\(/)[1]\n // For better performance only parse once, and then cache the\n // result through a new accessor for repeated access.\n Object.defineProperty(this, 'name', { value: name })\n return name\n }\n })\n}\n\nvar special_chars = {\n 0: '\\\\0', // this is not an octal literal\n 8: '\\\\b',\n 9: '\\\\t',\n 10: '\\\\n',\n 11: '\\\\v',\n 12: '\\\\f',\n 13: '\\\\r',\n 92: '\\\\\\\\',\n}\n\n// for oddballs\nvar hasOwnProperty = Object.prototype.hasOwnProperty\n\n// some people escape those, so I'd copy this to be safe\nvar escapable = /[\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/\n\nfunction _stringify(object, options, recursiveLvl, currentKey) {\n var json5 = (options.mode === 'json5' || !options.mode)\n /*\n * Opinionated decision warning:\n *\n * Objects are serialized in the following form:\n * { type: 'Class', data: DATA }\n *\n * Class is supposed to be a function, and new Class(DATA) is\n * supposed to be equivalent to the original value\n */\n /*function custom_type() {\n return stringify({\n type: object.constructor.name,\n data: object.toString()\n })\n }*/\n\n // if add, it's an internal indentation, so we add 1 level and a eol\n // if !add, it's an ending indentation, so we just indent\n function indent(str, add) {\n var prefix = options._prefix ? options._prefix : ''\n if (!options.indent) return prefix + str\n var result = ''\n var count = recursiveLvl + (add || 0)\n for (var i=0; i<count; i++) result += options.indent\n return prefix + result + str + (add ? '\\n' : '')\n }\n\n function _stringify_key(key) {\n if (options.quote_keys) return _stringify_str(key)\n if (String(Number(key)) == key && key[0] != '-') return key\n if (key == '') return _stringify_str(key)\n\n var result = ''\n for (var i=0; i<key.length; i++) {\n if (i > 0) {\n if (!Uni.isIdentifierPart(key[i]))\n return _stringify_str(key)\n\n } else {\n if (!Uni.isIdentifierStart(key[i]))\n return _stringify_str(key)\n }\n\n var chr = key.charCodeAt(i)\n\n if (options.ascii) {\n if (chr < 0x80) {\n result += key[i]\n\n } else {\n result += '\\\\u' + ('0000' + chr.toString(16)).slice(-4)\n }\n\n } else {\n if (escapable.exec(key[i])) {\n result += '\\\\u' + ('0000' + chr.toString(16)).slice(-4)\n\n } else {\n result += key[i]\n }\n }\n }\n\n return result\n }\n\n function _stringify_str(key) {\n var quote = options.quote\n var quoteChr = quote.charCodeAt(0)\n\n var result = ''\n for (var i=0; i<key.length; i++) {\n var chr = key.charCodeAt(i)\n\n if (chr < 0x10) {\n if (chr === 0 && json5) {\n result += '\\\\0'\n } else if (chr >= 8 && chr <= 13 && (json5 || chr !== 11)) {\n result += special_chars[chr]\n } else if (json5) {\n result += '\\\\x0' + chr.toString(16)\n } else {\n result += '\\\\u000' + chr.toString(16)\n }\n\n } else if (chr < 0x20) {\n if (json5) {\n result += '\\\\x' + chr.toString(16)\n } else {\n result += '\\\\u00' + chr.toString(16)\n }\n\n } else if (chr >= 0x20 && chr < 0x80) {\n // ascii range\n if (chr === 47 && i && key[i-1] === '<') {\n // escaping slashes in </script>\n result += '\\\\' + key[i]\n\n } else if (chr === 92) {\n result += '\\\\\\\\'\n\n } else if (chr === quoteChr) {\n result += '\\\\' + quote\n\n } else {\n result += key[i]\n }\n\n } else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) {\n if (chr < 0x100) {\n if (json5) {\n result += '\\\\x' + chr.toString(16)\n } else {\n result += '\\\\u00' + chr.toString(16)\n }\n\n } else if (chr < 0x1000) {\n result += '\\\\u0' + chr.toString(16)\n\n } else if (chr < 0x10000) {\n result += '\\\\u' + chr.toString(16)\n\n } else {\n throw Error('weird codepoint')\n }\n } else {\n result += key[i]\n }\n }\n return quote + result + quote\n }\n\n function _stringify_object() {\n if (object === null) return 'null'\n var result = []\n , len = 0\n , braces\n\n if (Array.isArray(object)) {\n braces = '[]'\n for (var i=0; i<object.length; i++) {\n var s = _stringify(object[i], options, recursiveLvl+1, String(i))\n if (s === undefined) s = 'null'\n len += s.length + 2\n result.push(s + ',')\n }\n\n } else {\n braces = '{}'\n var fn = function(key) {\n var t = _stringify(object[key], options, recursiveLvl+1, key)\n if (t !== undefined) {\n t = _stringify_key(key) + ':' + (options.indent ? ' ' : '') + t + ','\n len += t.length + 1\n result.push(t)\n }\n }\n\n if (Array.isArray(options.replacer)) {\n for (var i=0; i<options.replacer.length; i++)\n if (hasOwnProperty.call(object, options.replacer[i]))\n fn(options.replacer[i])\n } else {\n var keys = Object.keys(object)\n if (options.sort_keys)\n keys = keys.sort(typeof(options.sort_keys) === 'function'\n ? options.sort_keys : undefined)\n keys.forEach(fn)\n }\n }\n\n // objects shorter than 30 characters are always inlined\n // objects longer than 60 characters are always splitted to multiple lines\n // anything in the middle depends on indentation level\n len -= 2\n if (options.indent && (len > options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin) ) {\n // remove trailing comma in multiline if asked to\n if (options.no_trailing_comma && result.length) {\n result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1)\n }\n\n var innerStuff = result.map(function(x) {return indent(x, 1)}).join('')\n return braces[0]\n + (options.indent ? '\\n' : '')\n + innerStuff\n + indent(braces[1])\n } else {\n // always remove trailing comma in one-lined arrays\n if (result.length) {\n result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1)\n }\n\n var innerStuff = result.join(options.indent ? ' ' : '')\n return braces[0]\n + innerStuff\n + braces[1]\n }\n }\n\n function _stringify_nonobject(object) {\n if (typeof(options.replacer) === 'function') {\n object = options.replacer.call(null, currentKey, object)\n }\n\n switch(typeof(object)) {\n case 'string':\n return _stringify_str(object)\n\n case 'number':\n if (object === 0 && 1/object < 0) {\n // Opinionated decision warning:\n //\n // I want cross-platform negative zero in all js engines\n // I know they're equal, but why lose that tiny bit of\n // information needlessly?\n return '-0'\n }\n if (!json5 && !Number.isFinite(object)) {\n // json don't support infinity (= sucks)\n return 'null'\n }\n return object.toString()\n\n case 'boolean':\n return object.toString()\n\n case 'undefined':\n return undefined\n\n case 'function':\n// return custom_type()\n\n default:\n // fallback for something weird\n return JSON.stringify(object)\n }\n }\n\n if (options._stringify_key) {\n return _stringify_key(object)\n }\n\n if (typeof(object) === 'object') {\n if (object === null) return 'null'\n\n var str\n if (typeof(str = object.toJSON5) === 'function' && options.mode !== 'json') {\n object = str.call(object, currentKey)\n\n } else if (typeof(str = object.toJSON) === 'function') {\n object = str.call(object, currentKey)\n }\n\n if (object === null) return 'null'\n if (typeof(object) !== 'object') return _stringify_nonobject(object)\n\n if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) {\n object = object.valueOf()\n return _stringify_nonobject(object)\n\n } else if (object.constructor === Date) {\n // only until we can't do better\n return _stringify_nonobject(object.toISOString())\n\n } else {\n if (typeof(options.replacer) === 'function') {\n object = options.replacer.call(null, currentKey, object)\n if (typeof(object) !== 'object') return _stringify_nonobject(object)\n }\n\n return _stringify_object(object)\n }\n } else {\n return _stringify_nonobject(object)\n }\n}\n\n/*\n * stringify(value, options)\n * or\n * stringify(value, replacer, space)\n *\n * where:\n * value - anything\n * options - object\n * replacer - function or array\n * space - boolean or number or string\n */\nmodule.exports.stringify = function stringifyJSON(object, options, _space) {\n // support legacy syntax\n if (typeof(options) === 'function' || Array.isArray(options)) {\n options = {\n replacer: options\n }\n } else if (typeof(options) === 'object' && options !== null) {\n // nothing to do\n } else {\n options = {}\n }\n if (_space != null) options.indent = _space\n\n if (options.indent == null) options.indent = '\\t'\n if (options.quote == null) options.quote = \"'\"\n if (options.ascii == null) options.ascii = false\n if (options.mode == null) options.mode = 'json5'\n\n if (options.mode === 'json' || options.mode === 'cjson') {\n // json only supports double quotes (= sucks)\n options.quote = '\"'\n\n // json don't support trailing commas (= sucks)\n options.no_trailing_comma = true\n\n // json don't support unquoted property names (= sucks)\n options.quote_keys = true\n }\n\n // why would anyone use such objects?\n if (typeof(options.indent) === 'object') {\n if (options.indent.constructor === Number\n || options.indent.constructor === Boolean\n || options.indent.constructor === String)\n options.indent = options.indent.valueOf()\n }\n\n // gap is capped at 10 characters\n if (typeof(options.indent) === 'number') {\n if (options.indent >= 0) {\n options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ')\n } else {\n options.indent = false\n }\n } else if (typeof(options.indent) === 'string') {\n options.indent = options.indent.substr(0, 10)\n }\n\n if (options._splitMin == null) options._splitMin = 50\n if (options._splitMax == null) options._splitMax = 70\n\n return _stringify(object, options, 0, '')\n}\n\n","\n// This is autogenerated with esprima tools, see:\n// https://github.com/ariya/esprima/blob/master/esprima.js\n//\n// PS: oh God, I hate Unicode\n\n// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart:\n\nvar Uni = module.exports\n\nmodule.exports.isWhiteSpace = function isWhiteSpace(x) {\n // section 7.2, table 2\n return x === '\\u0020'\n || x === '\\u00A0'\n || x === '\\uFEFF' // <-- this is not a Unicode WS, only a JS one\n || (x >= '\\u0009' && x <= '\\u000D') // 9 A B C D\n\n // + whitespace characters from unicode, category Zs\n || x === '\\u1680'\n || (x >= '\\u2000' && x <= '\\u200A') // 0 1 2 3 4 5 6 7 8 9 A\n || x === '\\u2028'\n || x === '\\u2029'\n || x === '\\u202F'\n || x === '\\u205F'\n || x === '\\u3000'\n}\n\nmodule.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) {\n return x === '\\u0020'\n || x === '\\u0009'\n || x === '\\u000A'\n || x === '\\u000D'\n}\n\nmodule.exports.isLineTerminator = function isLineTerminator(x) {\n // ok, here is the part when JSON is wrong\n // section 7.3, table 3\n return x === '\\u000A'\n || x === '\\u000D'\n || x === '\\u2028'\n || x === '\\u2029'\n}\n\nmodule.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) {\n return x === '\\u000A'\n || x === '\\u000D'\n}\n\nmodule.exports.isIdentifierStart = function isIdentifierStart(x) {\n return x === '$'\n || x === '_'\n || (x >= 'A' && x <= 'Z')\n || (x >= 'a' && x <= 'z')\n || (x >= '\\u0080' && Uni.NonAsciiIdentifierStart.test(x))\n}\n\nmodule.exports.isIdentifierPart = function isIdentifierPart(x) {\n return x === '$'\n || x === '_'\n || (x >= 'A' && x <= 'Z')\n || (x >= 'a' && x <= 'z')\n || (x >= '0' && x <= '9') // <-- addition to Start\n || (x >= '\\u0080' && Uni.NonAsciiIdentifierPart.test(x))\n}\n\nmodule.exports.NonAsciiIdentifierStart = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/\n\n// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart:\n\nmodule.exports.NonAsciiIdentifierPart = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0\\u08A2-\\u08AC\\u08E4-\\u08FE\\u0900-\\u0963\\u0966-\\u096F\\u0971-\\u0977\\u0979-\\u097F\\u0981-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C01-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C82\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D02\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1D00-\\u1DE6\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA697\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7B\\uAA80-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE26\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/\n","var FS = require('fs')\nvar jju = require('../')\n\n// this function registers json5 extension, so you\n// can do `require(\"./config.json5\")` kind of thing\nmodule.exports.register = function() {\n var r = require, e = 'extensions'\n r[e]['.json5'] = function(m, f) {\n /*eslint no-sync:0*/\n m.exports = jju.parse(FS.readFileSync(f, 'utf8'))\n }\n}\n\n// this function monkey-patches JSON.parse, so it\n// will return an exact position of error in case\n// of parse failure\nmodule.exports.patch_JSON_parse = function() {\n var _parse = JSON.parse\n JSON.parse = function(text, rev) {\n try {\n return _parse(text, rev)\n } catch(err) {\n // this call should always throw\n require('jju').parse(text, {\n mode: 'json',\n legacy: true,\n reviver: rev,\n reserved_keys: 'replace',\n null_prototype: false,\n })\n\n // if it didn't throw, but original parser did,\n // this is an error in this library and should be reported\n throw err\n }\n }\n}\n\n// this function is an express/connect middleware\n// that accepts uploads in application/json5 format\nmodule.exports.middleware = function() {\n return function(req, res, next) {\n throw Error('this function is removed, use express-json5 instead')\n }\n}\n\n","'use strict';\n\nvar traverse = module.exports = function (schema, opts, cb) {\n // Legacy support for v0.3.1 and earlier.\n if (typeof opts == 'function') {\n cb = opts;\n opts = {};\n }\n\n cb = opts.cb || cb;\n var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};\n var post = cb.post || function() {};\n\n _traverse(opts, pre, post, schema, '', schema);\n};\n\n\ntraverse.keywords = {\n additionalItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n};\n\ntraverse.arrayKeywords = {\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\n\ntraverse.propsKeywords = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependencies: true\n};\n\ntraverse.skipKeywords = {\n default: true,\n enum: true,\n const: true,\n required: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\n\n\nfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (schema && typeof schema == 'object' && !Array.isArray(schema)) {\n pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n for (var key in schema) {\n var sch = schema[key];\n if (Array.isArray(sch)) {\n if (key in traverse.arrayKeywords) {\n for (var i=0; i<sch.length; i++)\n _traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);\n }\n } else if (key in traverse.propsKeywords) {\n if (sch && typeof sch == 'object') {\n for (var prop in sch)\n _traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);\n }\n } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {\n _traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);\n }\n }\n post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n }\n}\n\n\nfunction escapeJsonPtr(str) {\n return str.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n","var _fs\ntry {\n _fs = require('graceful-fs')\n} catch (_) {\n _fs = require('fs')\n}\n\nfunction readFile (file, options, callback) {\n if (callback == null) {\n callback = options\n options = {}\n }\n\n if (typeof options === 'string') {\n options = {encoding: options}\n }\n\n options = options || {}\n var fs = options.fs || _fs\n\n var shouldThrow = true\n if ('throws' in options) {\n shouldThrow = options.throws\n }\n\n fs.readFile(file, options, function (err, data) {\n if (err) return callback(err)\n\n data = stripBom(data)\n\n var obj\n try {\n obj = JSON.parse(data, options ? options.reviver : null)\n } catch (err2) {\n if (shouldThrow) {\n err2.message = file + ': ' + err2.message\n return callback(err2)\n } else {\n return callback(null, null)\n }\n }\n\n callback(null, obj)\n })\n}\n\nfunction readFileSync (file, options) {\n options = options || {}\n if (typeof options === 'string') {\n options = {encoding: options}\n }\n\n var fs = options.fs || _fs\n\n var shouldThrow = true\n if ('throws' in options) {\n shouldThrow = options.throws\n }\n\n try {\n var content = fs.readFileSync(file, options)\n content = stripBom(content)\n return JSON.parse(content, options.reviver)\n } catch (err) {\n if (shouldThrow) {\n err.message = file + ': ' + err.message\n throw err\n } else {\n return null\n }\n }\n}\n\nfunction stringify (obj, options) {\n var spaces\n var EOL = '\\n'\n if (typeof options === 'object' && options !== null) {\n if (options.spaces) {\n spaces = options.spaces\n }\n if (options.EOL) {\n EOL = options.EOL\n }\n }\n\n var str = JSON.stringify(obj, options ? options.replacer : null, spaces)\n\n return str.replace(/\\n/g, EOL) + EOL\n}\n\nfunction writeFile (file, obj, options, callback) {\n if (callback == null) {\n callback = options\n options = {}\n }\n options = options || {}\n var fs = options.fs || _fs\n\n var str = ''\n try {\n str = stringify(obj, options)\n } catch (err) {\n // Need to return whether a callback was passed or not\n if (callback) callback(err, null)\n return\n }\n\n fs.writeFile(file, str, options, callback)\n}\n\nfunction writeFileSync (file, obj, options) {\n options = options || {}\n var fs = options.fs || _fs\n\n var str = stringify(obj, options)\n // not sure if fs.writeFileSync returns anything, but just in case\n return fs.writeFileSync(file, str, options)\n}\n\nfunction stripBom (content) {\n // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified\n if (Buffer.isBuffer(content)) content = content.toString('utf8')\n content = content.replace(/^\\uFEFF/, '')\n return content\n}\n\nvar jsonfile = {\n readFile: readFile,\n readFileSync: readFileSync,\n writeFile: writeFile,\n writeFileSync: writeFileSync\n}\n\nmodule.exports = jsonfile\n","'use strict';\n\nvar isWindows = process.platform === 'win32';\n\n// Regex to split a windows path into into [dir, root, basename, name, ext]\nvar splitWindowsRe =\n /^(((?:[a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/]+)?[\\\\\\/]?)(?:[^\\\\\\/]*[\\\\\\/])*)((\\.{1,2}|[^\\\\\\/]+?|)(\\.[^.\\/\\\\]*|))[\\\\\\/]*$/;\n\nvar win32 = {};\n\nfunction win32SplitPath(filename) {\n return splitWindowsRe.exec(filename).slice(1);\n}\n\nwin32.parse = function(pathString) {\n if (typeof pathString !== 'string') {\n throw new TypeError(\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\n );\n }\n var allParts = win32SplitPath(pathString);\n if (!allParts || allParts.length !== 5) {\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\n }\n return {\n root: allParts[1],\n dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1),\n base: allParts[2],\n ext: allParts[4],\n name: allParts[3]\n };\n};\n\n\n\n// Split a filename into [dir, root, basename, name, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^((\\/?)(?:[^\\/]*\\/)*)((\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))[\\/]*$/;\nvar posix = {};\n\n\nfunction posixSplitPath(filename) {\n return splitPathRe.exec(filename).slice(1);\n}\n\n\nposix.parse = function(pathString) {\n if (typeof pathString !== 'string') {\n throw new TypeError(\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\n );\n }\n var allParts = posixSplitPath(pathString);\n if (!allParts || allParts.length !== 5) {\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\n }\n \n return {\n root: allParts[1],\n dir: allParts[0].slice(0, -1),\n base: allParts[2],\n ext: allParts[4],\n name: allParts[3],\n };\n};\n\n\nif (isWindows)\n module.exports = win32.parse;\nelse /* posix */\n module.exports = posix.parse;\n\nmodule.exports.posix = posix.parse;\nmodule.exports.win32 = win32.parse;\n","var async = require('./lib/async');\nasync.core = require('./lib/core');\nasync.isCore = require('./lib/is-core');\nasync.sync = require('./lib/sync');\n\nmodule.exports = async;\n","var fs = require('fs');\nvar getHomedir = require('./homedir');\nvar path = require('path');\nvar caller = require('./caller');\nvar nodeModulesPaths = require('./node-modules-paths');\nvar normalizeOptions = require('./normalize-options');\nvar isCore = require('is-core-module');\n\nvar realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;\n\nvar homedir = getHomedir();\nvar defaultPaths = function () {\n return [\n path.join(homedir, '.node_modules'),\n path.join(homedir, '.node_libraries')\n ];\n};\n\nvar defaultIsFile = function isFile(file, cb) {\n fs.stat(file, function (err, stat) {\n if (!err) {\n return cb(null, stat.isFile() || stat.isFIFO());\n }\n if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);\n return cb(err);\n });\n};\n\nvar defaultIsDir = function isDirectory(dir, cb) {\n fs.stat(dir, function (err, stat) {\n if (!err) {\n return cb(null, stat.isDirectory());\n }\n if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);\n return cb(err);\n });\n};\n\nvar defaultRealpath = function realpath(x, cb) {\n realpathFS(x, function (realpathErr, realPath) {\n if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);\n else cb(null, realpathErr ? x : realPath);\n });\n};\n\nvar maybeRealpath = function maybeRealpath(realpath, x, opts, cb) {\n if (opts && opts.preserveSymlinks === false) {\n realpath(x, cb);\n } else {\n cb(null, x);\n }\n};\n\nvar defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) {\n readFile(pkgfile, function (readFileErr, body) {\n if (readFileErr) cb(readFileErr);\n else {\n try {\n var pkg = JSON.parse(body);\n cb(null, pkg);\n } catch (jsonErr) {\n cb(null);\n }\n }\n });\n};\n\nvar getPackageCandidates = function getPackageCandidates(x, start, opts) {\n var dirs = nodeModulesPaths(start, opts, x);\n for (var i = 0; i < dirs.length; i++) {\n dirs[i] = path.join(dirs[i], x);\n }\n return dirs;\n};\n\nmodule.exports = function resolve(x, options, callback) {\n var cb = callback;\n var opts = options;\n if (typeof options === 'function') {\n cb = opts;\n opts = {};\n }\n if (typeof x !== 'string') {\n var err = new TypeError('Path must be a string.');\n return process.nextTick(function () {\n cb(err);\n });\n }\n\n opts = normalizeOptions(x, opts);\n\n var isFile = opts.isFile || defaultIsFile;\n var isDirectory = opts.isDirectory || defaultIsDir;\n var readFile = opts.readFile || fs.readFile;\n var realpath = opts.realpath || defaultRealpath;\n var readPackage = opts.readPackage || defaultReadPackage;\n if (opts.readFile && opts.readPackage) {\n var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.');\n return process.nextTick(function () {\n cb(conflictErr);\n });\n }\n var packageIterator = opts.packageIterator;\n\n var extensions = opts.extensions || ['.js'];\n var includeCoreModules = opts.includeCoreModules !== false;\n var basedir = opts.basedir || path.dirname(caller());\n var parent = opts.filename || basedir;\n\n opts.paths = opts.paths || defaultPaths();\n\n // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory\n var absoluteStart = path.resolve(basedir);\n\n maybeRealpath(\n realpath,\n absoluteStart,\n opts,\n function (err, realStart) {\n if (err) cb(err);\n else init(realStart);\n }\n );\n\n var res;\n function init(basedir) {\n if ((/^(?:\\.\\.?(?:\\/|$)|\\/|([A-Za-z]:)?[/\\\\])/).test(x)) {\n res = path.resolve(basedir, x);\n if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';\n if ((/\\/$/).test(x) && res === basedir) {\n loadAsDirectory(res, opts.package, onfile);\n } else loadAsFile(res, opts.package, onfile);\n } else if (includeCoreModules && isCore(x)) {\n return cb(null, x);\n } else loadNodeModules(x, basedir, function (err, n, pkg) {\n if (err) cb(err);\n else if (n) {\n return maybeRealpath(realpath, n, opts, function (err, realN) {\n if (err) {\n cb(err);\n } else {\n cb(null, realN, pkg);\n }\n });\n } else {\n var moduleError = new Error(\"Cannot find module '\" + x + \"' from '\" + parent + \"'\");\n moduleError.code = 'MODULE_NOT_FOUND';\n cb(moduleError);\n }\n });\n }\n\n function onfile(err, m, pkg) {\n if (err) cb(err);\n else if (m) cb(null, m, pkg);\n else loadAsDirectory(res, function (err, d, pkg) {\n if (err) cb(err);\n else if (d) {\n maybeRealpath(realpath, d, opts, function (err, realD) {\n if (err) {\n cb(err);\n } else {\n cb(null, realD, pkg);\n }\n });\n } else {\n var moduleError = new Error(\"Cannot find module '\" + x + \"' from '\" + parent + \"'\");\n moduleError.code = 'MODULE_NOT_FOUND';\n cb(moduleError);\n }\n });\n }\n\n function loadAsFile(x, thePackage, callback) {\n var loadAsFilePackage = thePackage;\n var cb = callback;\n if (typeof loadAsFilePackage === 'function') {\n cb = loadAsFilePackage;\n loadAsFilePackage = undefined;\n }\n\n var exts = [''].concat(extensions);\n load(exts, x, loadAsFilePackage);\n\n function load(exts, x, loadPackage) {\n if (exts.length === 0) return cb(null, undefined, loadPackage);\n var file = x + exts[0];\n\n var pkg = loadPackage;\n if (pkg) onpkg(null, pkg);\n else loadpkg(path.dirname(file), onpkg);\n\n function onpkg(err, pkg_, dir) {\n pkg = pkg_;\n if (err) return cb(err);\n if (dir && pkg && opts.pathFilter) {\n var rfile = path.relative(dir, file);\n var rel = rfile.slice(0, rfile.length - exts[0].length);\n var r = opts.pathFilter(pkg, x, rel);\n if (r) return load(\n [''].concat(extensions.slice()),\n path.resolve(dir, r),\n pkg\n );\n }\n isFile(file, onex);\n }\n function onex(err, ex) {\n if (err) return cb(err);\n if (ex) return cb(null, file, pkg);\n load(exts.slice(1), x, pkg);\n }\n }\n }\n\n function loadpkg(dir, cb) {\n if (dir === '' || dir === '/') return cb(null);\n if (process.platform === 'win32' && (/^\\w:[/\\\\]*$/).test(dir)) {\n return cb(null);\n }\n if ((/[/\\\\]node_modules[/\\\\]*$/).test(dir)) return cb(null);\n\n maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {\n if (unwrapErr) return loadpkg(path.dirname(dir), cb);\n var pkgfile = path.join(pkgdir, 'package.json');\n isFile(pkgfile, function (err, ex) {\n // on err, ex is false\n if (!ex) return loadpkg(path.dirname(dir), cb);\n\n readPackage(readFile, pkgfile, function (err, pkgParam) {\n if (err) cb(err);\n\n var pkg = pkgParam;\n\n if (pkg && opts.packageFilter) {\n pkg = opts.packageFilter(pkg, pkgfile);\n }\n cb(null, pkg, dir);\n });\n });\n });\n }\n\n function loadAsDirectory(x, loadAsDirectoryPackage, callback) {\n var cb = callback;\n var fpkg = loadAsDirectoryPackage;\n if (typeof fpkg === 'function') {\n cb = fpkg;\n fpkg = opts.package;\n }\n\n maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) {\n if (unwrapErr) return cb(unwrapErr);\n var pkgfile = path.join(pkgdir, 'package.json');\n isFile(pkgfile, function (err, ex) {\n if (err) return cb(err);\n if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);\n\n readPackage(readFile, pkgfile, function (err, pkgParam) {\n if (err) return cb(err);\n\n var pkg = pkgParam;\n\n if (pkg && opts.packageFilter) {\n pkg = opts.packageFilter(pkg, pkgfile);\n }\n\n if (pkg && pkg.main) {\n if (typeof pkg.main !== 'string') {\n var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');\n mainError.code = 'INVALID_PACKAGE_MAIN';\n return cb(mainError);\n }\n if (pkg.main === '.' || pkg.main === './') {\n pkg.main = 'index';\n }\n loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {\n if (err) return cb(err);\n if (m) return cb(null, m, pkg);\n if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);\n\n var dir = path.resolve(x, pkg.main);\n loadAsDirectory(dir, pkg, function (err, n, pkg) {\n if (err) return cb(err);\n if (n) return cb(null, n, pkg);\n loadAsFile(path.join(x, 'index'), pkg, cb);\n });\n });\n return;\n }\n\n loadAsFile(path.join(x, '/index'), pkg, cb);\n });\n });\n });\n }\n\n function processDirs(cb, dirs) {\n if (dirs.length === 0) return cb(null, undefined);\n var dir = dirs[0];\n\n isDirectory(path.dirname(dir), isdir);\n\n function isdir(err, isdir) {\n if (err) return cb(err);\n if (!isdir) return processDirs(cb, dirs.slice(1));\n loadAsFile(dir, opts.package, onfile);\n }\n\n function onfile(err, m, pkg) {\n if (err) return cb(err);\n if (m) return cb(null, m, pkg);\n loadAsDirectory(dir, opts.package, ondir);\n }\n\n function ondir(err, n, pkg) {\n if (err) return cb(err);\n if (n) return cb(null, n, pkg);\n processDirs(cb, dirs.slice(1));\n }\n }\n function loadNodeModules(x, start, cb) {\n var thunk = function () { return getPackageCandidates(x, start, opts); };\n processDirs(\n cb,\n packageIterator ? packageIterator(x, start, thunk, opts) : thunk()\n );\n }\n};\n","module.exports = function () {\n // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n var origPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function (_, stack) { return stack; };\n var stack = (new Error()).stack;\n Error.prepareStackTrace = origPrepareStackTrace;\n return stack[2].getFileName();\n};\n","'use strict';\n\nvar isCoreModule = require('is-core-module');\nvar data = require('./core.json');\n\nvar core = {};\nfor (var mod in data) { // eslint-disable-line no-restricted-syntax\n if (Object.prototype.hasOwnProperty.call(data, mod)) {\n core[mod] = isCoreModule(mod);\n }\n}\nmodule.exports = core;\n","'use strict';\n\nvar os = require('os');\n\n// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js\n\nmodule.exports = os.homedir || function homedir() {\n var home = process.env.HOME;\n var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;\n\n if (process.platform === 'win32') {\n return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null;\n }\n\n if (process.platform === 'darwin') {\n return home || (user ? '/Users/' + user : null);\n }\n\n if (process.platform === 'linux') {\n return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens\n }\n\n return home || null;\n};\n","var isCoreModule = require('is-core-module');\n\nmodule.exports = function isCore(x) {\n return isCoreModule(x);\n};\n","var path = require('path');\nvar parse = path.parse || require('path-parse'); // eslint-disable-line global-require\n\nvar getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {\n var prefix = '/';\n if ((/^([A-Za-z]:)/).test(absoluteStart)) {\n prefix = '';\n } else if ((/^\\\\\\\\/).test(absoluteStart)) {\n prefix = '\\\\\\\\';\n }\n\n var paths = [absoluteStart];\n var parsed = parse(absoluteStart);\n while (parsed.dir !== paths[paths.length - 1]) {\n paths.push(parsed.dir);\n parsed = parse(parsed.dir);\n }\n\n return paths.reduce(function (dirs, aPath) {\n return dirs.concat(modules.map(function (moduleDir) {\n return path.resolve(prefix, aPath, moduleDir);\n }));\n }, []);\n};\n\nmodule.exports = function nodeModulesPaths(start, opts, request) {\n var modules = opts && opts.moduleDirectory\n ? [].concat(opts.moduleDirectory)\n : ['node_modules'];\n\n if (opts && typeof opts.paths === 'function') {\n return opts.paths(\n request,\n start,\n function () { return getNodeModulesDirs(start, modules); },\n opts\n );\n }\n\n var dirs = getNodeModulesDirs(start, modules);\n return opts && opts.paths ? dirs.concat(opts.paths) : dirs;\n};\n","module.exports = function (x, opts) {\n /**\n * This file is purposefully a passthrough. It's expected that third-party\n * environments will override it at runtime in order to inject special logic\n * into `resolve` (by manipulating the options). One such example is the PnP\n * code path in Yarn.\n */\n\n return opts || {};\n};\n","var isCore = require('is-core-module');\nvar fs = require('fs');\nvar path = require('path');\nvar getHomedir = require('./homedir');\nvar caller = require('./caller');\nvar nodeModulesPaths = require('./node-modules-paths');\nvar normalizeOptions = require('./normalize-options');\n\nvar realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;\n\nvar homedir = getHomedir();\nvar defaultPaths = function () {\n return [\n path.join(homedir, '.node_modules'),\n path.join(homedir, '.node_libraries')\n ];\n};\n\nvar defaultIsFile = function isFile(file) {\n try {\n var stat = fs.statSync(file, { throwIfNoEntry: false });\n } catch (e) {\n if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;\n throw e;\n }\n return !!stat && (stat.isFile() || stat.isFIFO());\n};\n\nvar defaultIsDir = function isDirectory(dir) {\n try {\n var stat = fs.statSync(dir, { throwIfNoEntry: false });\n } catch (e) {\n if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;\n throw e;\n }\n return !!stat && stat.isDirectory();\n};\n\nvar defaultRealpathSync = function realpathSync(x) {\n try {\n return realpathFS(x);\n } catch (realpathErr) {\n if (realpathErr.code !== 'ENOENT') {\n throw realpathErr;\n }\n }\n return x;\n};\n\nvar maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) {\n if (opts && opts.preserveSymlinks === false) {\n return realpathSync(x);\n }\n return x;\n};\n\nvar defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) {\n var body = readFileSync(pkgfile);\n try {\n var pkg = JSON.parse(body);\n return pkg;\n } catch (jsonErr) {}\n};\n\nvar getPackageCandidates = function getPackageCandidates(x, start, opts) {\n var dirs = nodeModulesPaths(start, opts, x);\n for (var i = 0; i < dirs.length; i++) {\n dirs[i] = path.join(dirs[i], x);\n }\n return dirs;\n};\n\nmodule.exports = function resolveSync(x, options) {\n if (typeof x !== 'string') {\n throw new TypeError('Path must be a string.');\n }\n var opts = normalizeOptions(x, options);\n\n var isFile = opts.isFile || defaultIsFile;\n var readFileSync = opts.readFileSync || fs.readFileSync;\n var isDirectory = opts.isDirectory || defaultIsDir;\n var realpathSync = opts.realpathSync || defaultRealpathSync;\n var readPackageSync = opts.readPackageSync || defaultReadPackageSync;\n if (opts.readFileSync && opts.readPackageSync) {\n throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.');\n }\n var packageIterator = opts.packageIterator;\n\n var extensions = opts.extensions || ['.js'];\n var includeCoreModules = opts.includeCoreModules !== false;\n var basedir = opts.basedir || path.dirname(caller());\n var parent = opts.filename || basedir;\n\n opts.paths = opts.paths || defaultPaths();\n\n // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory\n var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);\n\n if ((/^(?:\\.\\.?(?:\\/|$)|\\/|([A-Za-z]:)?[/\\\\])/).test(x)) {\n var res = path.resolve(absoluteStart, x);\n if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';\n var m = loadAsFileSync(res) || loadAsDirectorySync(res);\n if (m) return maybeRealpathSync(realpathSync, m, opts);\n } else if (includeCoreModules && isCore(x)) {\n return x;\n } else {\n var n = loadNodeModulesSync(x, absoluteStart);\n if (n) return maybeRealpathSync(realpathSync, n, opts);\n }\n\n var err = new Error(\"Cannot find module '\" + x + \"' from '\" + parent + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n\n function loadAsFileSync(x) {\n var pkg = loadpkg(path.dirname(x));\n\n if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {\n var rfile = path.relative(pkg.dir, x);\n var r = opts.pathFilter(pkg.pkg, x, rfile);\n if (r) {\n x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign\n }\n }\n\n if (isFile(x)) {\n return x;\n }\n\n for (var i = 0; i < extensions.length; i++) {\n var file = x + extensions[i];\n if (isFile(file)) {\n return file;\n }\n }\n }\n\n function loadpkg(dir) {\n if (dir === '' || dir === '/') return;\n if (process.platform === 'win32' && (/^\\w:[/\\\\]*$/).test(dir)) {\n return;\n }\n if ((/[/\\\\]node_modules[/\\\\]*$/).test(dir)) return;\n\n var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');\n\n if (!isFile(pkgfile)) {\n return loadpkg(path.dirname(dir));\n }\n\n var pkg = readPackageSync(readFileSync, pkgfile);\n\n if (pkg && opts.packageFilter) {\n // v2 will pass pkgfile\n pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment\n }\n\n return { pkg: pkg, dir: dir };\n }\n\n function loadAsDirectorySync(x) {\n var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');\n if (isFile(pkgfile)) {\n try {\n var pkg = readPackageSync(readFileSync, pkgfile);\n } catch (e) {}\n\n if (pkg && opts.packageFilter) {\n // v2 will pass pkgfile\n pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment\n }\n\n if (pkg && pkg.main) {\n if (typeof pkg.main !== 'string') {\n var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');\n mainError.code = 'INVALID_PACKAGE_MAIN';\n throw mainError;\n }\n if (pkg.main === '.' || pkg.main === './') {\n pkg.main = 'index';\n }\n try {\n var m = loadAsFileSync(path.resolve(x, pkg.main));\n if (m) return m;\n var n = loadAsDirectorySync(path.resolve(x, pkg.main));\n if (n) return n;\n } catch (e) {}\n }\n }\n\n return loadAsFileSync(path.join(x, '/index'));\n }\n\n function loadNodeModulesSync(x, start) {\n var thunk = function () { return getPackageCandidates(x, start, opts); };\n var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();\n\n for (var i = 0; i < dirs.length; i++) {\n var dir = dirs[i];\n if (isDirectory(path.dirname(dir))) {\n var m = loadAsFileSync(dir);\n if (m) return m;\n var n = loadAsDirectorySync(dir);\n if (n) return n;\n }\n }\n }\n};\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet flagForceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tflagForceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m') ||\n\t\t\thasFlag('color=full') ||\n\t\t\thasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream, options = {}) {\n\tconst level = supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options\n\t});\n\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: getSupportLevel({isTTY: tty.isatty(1)}),\n\tstderr: getSupportLevel({isTTY: tty.isatty(2)})\n};\n","'use strict'\n\nexports.fromCallback = function (fn) {\n return Object.defineProperty(function () {\n if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)\n else {\n return new Promise((resolve, reject) => {\n arguments[arguments.length] = (err, res) => {\n if (err) return reject(err)\n resolve(res)\n }\n arguments.length++\n fn.apply(this, arguments)\n })\n }\n }, 'name', { value: fn.name })\n}\n\nexports.fromPromise = function (fn) {\n return Object.defineProperty(function () {\n const cb = arguments[arguments.length - 1]\n if (typeof cb !== 'function') return fn.apply(this, arguments)\n else fn.apply(this, arguments).then(r => cb(null, r), cb)\n }, 'name', { value: fn.name })\n}\n","/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.URI = global.URI || {})));\n}(this, (function (exports) { 'use strict';\n\nfunction merge() {\n for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {\n sets[_key] = arguments[_key];\n }\n\n if (sets.length > 1) {\n sets[0] = sets[0].slice(0, -1);\n var xl = sets.length - 1;\n for (var x = 1; x < xl; ++x) {\n sets[x] = sets[x].slice(1, -1);\n }\n sets[xl] = sets[xl].slice(1);\n return sets.join('');\n } else {\n return sets[0];\n }\n}\nfunction subexp(str) {\n return \"(?:\" + str + \")\";\n}\nfunction typeOf(o) {\n return o === undefined ? \"undefined\" : o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase();\n}\nfunction toUpperCase(str) {\n return str.toUpperCase();\n}\nfunction toArray(obj) {\n return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];\n}\nfunction assign(target, source) {\n var obj = target;\n if (source) {\n for (var key in source) {\n obj[key] = source[key];\n }\n }\n return obj;\n}\n\nfunction buildExps(isIRI) {\n var ALPHA$$ = \"[A-Za-z]\",\n CR$ = \"[\\\\x0D]\",\n DIGIT$$ = \"[0-9]\",\n DQUOTE$$ = \"[\\\\x22]\",\n HEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"),\n //case-insensitive\n LF$$ = \"[\\\\x0A]\",\n SP$$ = \"[\\\\x20]\",\n PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)),\n //expanded\n GEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n SUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n UCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\",\n //subset, excludes bidi control characters\n IPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\",\n //subset\n UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n USERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n DEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n DEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$),\n //relaxed parsing rules\n IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n H16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n LS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n IPV6ADDRESS1$ = subexp(subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$),\n // 6( h16 \":\" ) ls32\n IPV6ADDRESS2$ = subexp(\"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$),\n // \"::\" 5( h16 \":\" ) ls32\n IPV6ADDRESS3$ = subexp(subexp(H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$),\n //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$),\n //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$),\n //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$),\n //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$),\n //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$),\n //[ *5( h16 \":\" ) h16 ] \"::\" h16\n IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\"),\n //[ *6( h16 \":\" ) h16 ] \"::\"\n IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n ZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"),\n //RFC 6874\n IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$),\n //RFC 6874\n IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$),\n //RFC 6874, with relaxed parsing rules\n IPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n IP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"),\n //RFC 6874\n REG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n HOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n PORT$ = subexp(DIGIT$$ + \"*\"),\n AUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n PCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n SEGMENT$ = subexp(PCHAR$ + \"*\"),\n SEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n PATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n PATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"),\n //simplified\n PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$),\n //simplified\n PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$),\n //simplified\n PATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n PATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n QUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n FRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n HIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n RELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n RELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n URI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n ABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n GENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n RELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n ABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n SAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n AUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\";\n return {\n NOT_SCHEME: new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n NOT_USERINFO: new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n NOT_HOST: new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n NOT_PATH: new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n NOT_PATH_NOSCHEME: new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n NOT_QUERY: new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n NOT_FRAGMENT: new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n ESCAPE: new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n UNRESERVED: new RegExp(UNRESERVED$$, \"g\"),\n OTHER_CHARS: new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n PCT_ENCODED: new RegExp(PCT_ENCODED$, \"g\"),\n IPV4ADDRESS: new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n IPV6ADDRESS: new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n };\n}\nvar URI_PROTOCOL = buildExps(false);\n\nvar IRI_PROTOCOL = buildExps(true);\n\nvar slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\n/** Highest positive signed 32-bit float value */\n\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nvar regexPunycode = /^xn--/;\nvar regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nvar regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nvar errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error$1(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tvar result = [];\n\tvar length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tvar parts = string.split('@');\n\tvar result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tvar labels = string.split('.');\n\tvar encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tvar output = [];\n\tvar counter = 0;\n\tvar length = string.length;\n\twhile (counter < length) {\n\t\tvar value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tvar extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) {\n\t\t\t\t// Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nvar ucs2encode = function ucs2encode(array) {\n\treturn String.fromCodePoint.apply(String, toConsumableArray(array));\n};\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nvar basicToDigit = function basicToDigit(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nvar digitToBasic = function digitToBasic(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nvar adapt = function adapt(delta, numPoints, firstTime) {\n\tvar k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nvar decode = function decode(input) {\n\t// Don't use UCS-2.\n\tvar output = [];\n\tvar inputLength = input.length;\n\tvar i = 0;\n\tvar n = initialN;\n\tvar bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tvar basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (var j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror$1('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tvar oldi = i;\n\t\tfor (var w = 1, k = base;; /* no condition */k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror$1('invalid-input');\n\t\t\t}\n\n\t\t\tvar digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror$1('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tvar t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tvar baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror$1('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\t\t}\n\n\t\tvar out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror$1('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\t}\n\n\treturn String.fromCodePoint.apply(String, output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nvar encode = function encode(input) {\n\tvar output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tvar inputLength = input.length;\n\n\t// Initialize the state.\n\tvar n = initialN;\n\tvar delta = 0;\n\tvar bias = initialBias;\n\n\t// Handle the basic code points.\n\tvar _iteratorNormalCompletion = true;\n\tvar _didIteratorError = false;\n\tvar _iteratorError = undefined;\n\n\ttry {\n\t\tfor (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar _currentValue2 = _step.value;\n\n\t\t\tif (_currentValue2 < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(_currentValue2));\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t_iterator.return();\n\t\t\t}\n\t\t} finally {\n\t\t\tif (_didIteratorError) {\n\t\t\t\tthrow _iteratorError;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar basicLength = output.length;\n\tvar handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tvar m = maxInt;\n\t\tvar _iteratorNormalCompletion2 = true;\n\t\tvar _didIteratorError2 = false;\n\t\tvar _iteratorError2 = undefined;\n\n\t\ttry {\n\t\t\tfor (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\tvar currentValue = _step2.value;\n\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow.\n\t\t} catch (err) {\n\t\t\t_didIteratorError2 = true;\n\t\t\t_iteratorError2 = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t_iterator2.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror$1('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tvar _iteratorNormalCompletion3 = true;\n\t\tvar _didIteratorError3 = false;\n\t\tvar _iteratorError3 = undefined;\n\n\t\ttry {\n\t\t\tfor (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\tvar _currentValue = _step3.value;\n\n\t\t\t\tif (_currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror$1('overflow');\n\t\t\t\t}\n\t\t\t\tif (_currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\t\tvar q = delta;\n\t\t\t\t\tfor (var k = base;; /* no condition */k += base) {\n\t\t\t\t\t\tvar t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar qMinusT = q - t;\n\t\t\t\t\t\tvar baseMinusT = base - t;\n\t\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError3 = true;\n\t\t\t_iteratorError3 = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t_iterator3.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError3) {\n\t\t\t\t\tthrow _iteratorError3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nvar toUnicode = function toUnicode(input) {\n\treturn mapDomain(input, function (string) {\n\t\treturn regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nvar toASCII = function toASCII(input) {\n\treturn mapDomain(input, function (string) {\n\t\treturn regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nvar punycode = {\n\t/**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n\t'version': '2.1.0',\n\t/**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode\n * @type Object\n */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\n/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/uri-js\n */\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\nvar SCHEMES = {};\nfunction pctEncChar(chr) {\n var c = chr.charCodeAt(0);\n var e = void 0;\n if (c < 16) e = \"%0\" + c.toString(16).toUpperCase();else if (c < 128) e = \"%\" + c.toString(16).toUpperCase();else if (c < 2048) e = \"%\" + (c >> 6 | 192).toString(16).toUpperCase() + \"%\" + (c & 63 | 128).toString(16).toUpperCase();else e = \"%\" + (c >> 12 | 224).toString(16).toUpperCase() + \"%\" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + \"%\" + (c & 63 | 128).toString(16).toUpperCase();\n return e;\n}\nfunction pctDecChars(str) {\n var newStr = \"\";\n var i = 0;\n var il = str.length;\n while (i < il) {\n var c = parseInt(str.substr(i + 1, 2), 16);\n if (c < 128) {\n newStr += String.fromCharCode(c);\n i += 3;\n } else if (c >= 194 && c < 224) {\n if (il - i >= 6) {\n var c2 = parseInt(str.substr(i + 4, 2), 16);\n newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);\n } else {\n newStr += str.substr(i, 6);\n }\n i += 6;\n } else if (c >= 224) {\n if (il - i >= 9) {\n var _c = parseInt(str.substr(i + 4, 2), 16);\n var c3 = parseInt(str.substr(i + 7, 2), 16);\n newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);\n } else {\n newStr += str.substr(i, 9);\n }\n i += 9;\n } else {\n newStr += str.substr(i, 3);\n i += 3;\n }\n }\n return newStr;\n}\nfunction _normalizeComponentEncoding(components, protocol) {\n function decodeUnreserved(str) {\n var decStr = pctDecChars(str);\n return !decStr.match(protocol.UNRESERVED) ? str : decStr;\n }\n if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n return components;\n}\n\nfunction _stripLeadingZeros(str) {\n return str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\nfunction _normalizeIPv4(host, protocol) {\n var matches = host.match(protocol.IPV4ADDRESS) || [];\n\n var _matches = slicedToArray(matches, 2),\n address = _matches[1];\n\n if (address) {\n return address.split(\".\").map(_stripLeadingZeros).join(\".\");\n } else {\n return host;\n }\n}\nfunction _normalizeIPv6(host, protocol) {\n var matches = host.match(protocol.IPV6ADDRESS) || [];\n\n var _matches2 = slicedToArray(matches, 3),\n address = _matches2[1],\n zone = _matches2[2];\n\n if (address) {\n var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),\n _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),\n last = _address$toLowerCase$2[0],\n first = _address$toLowerCase$2[1];\n\n var firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n var lastFields = last.split(\":\").map(_stripLeadingZeros);\n var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n var fieldCount = isLastFieldIPv4Address ? 7 : 8;\n var lastFieldsStart = lastFields.length - fieldCount;\n var fields = Array(fieldCount);\n for (var x = 0; x < fieldCount; ++x) {\n fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n }\n if (isLastFieldIPv4Address) {\n fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n }\n var allZeroFields = fields.reduce(function (acc, field, index) {\n if (!field || field === \"0\") {\n var lastLongest = acc[acc.length - 1];\n if (lastLongest && lastLongest.index + lastLongest.length === index) {\n lastLongest.length++;\n } else {\n acc.push({ index: index, length: 1 });\n }\n }\n return acc;\n }, []);\n var longestZeroFields = allZeroFields.sort(function (a, b) {\n return b.length - a.length;\n })[0];\n var newHost = void 0;\n if (longestZeroFields && longestZeroFields.length > 1) {\n var newFirst = fields.slice(0, longestZeroFields.index);\n var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n newHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n } else {\n newHost = fields.join(\":\");\n }\n if (zone) {\n newHost += \"%\" + zone;\n }\n return newHost;\n } else {\n return host;\n }\n}\nvar URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nvar NO_MATCH_IS_UNDEFINED = \"\".match(/(){0}/)[1] === undefined;\nfunction parse(uriString) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var components = {};\n var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;\n if (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n var matches = uriString.match(URI_PARSE);\n if (matches) {\n if (NO_MATCH_IS_UNDEFINED) {\n //store each component\n components.scheme = matches[1];\n components.userinfo = matches[3];\n components.host = matches[4];\n components.port = parseInt(matches[5], 10);\n components.path = matches[6] || \"\";\n components.query = matches[7];\n components.fragment = matches[8];\n //fix port number\n if (isNaN(components.port)) {\n components.port = matches[5];\n }\n } else {\n //IE FIX for improper RegExp matching\n //store each component\n components.scheme = matches[1] || undefined;\n components.userinfo = uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined;\n components.host = uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined;\n components.port = parseInt(matches[5], 10);\n components.path = matches[6] || \"\";\n components.query = uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined;\n components.fragment = uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined;\n //fix port number\n if (isNaN(components.port)) {\n components.port = uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined;\n }\n }\n if (components.host) {\n //normalize IP hosts\n components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n }\n //determine reference type\n if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n components.reference = \"same-document\";\n } else if (components.scheme === undefined) {\n components.reference = \"relative\";\n } else if (components.fragment === undefined) {\n components.reference = \"absolute\";\n } else {\n components.reference = \"uri\";\n }\n //check for reference errors\n if (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n components.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n }\n //find scheme handler\n var schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n //check if scheme can't handle IRIs\n if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n //if host component is a domain name\n if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {\n //convert Unicode IDN -> ASCII IDN\n try {\n components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n } catch (e) {\n components.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n }\n }\n //convert IRI -> URI\n _normalizeComponentEncoding(components, URI_PROTOCOL);\n } else {\n //normalize encodings\n _normalizeComponentEncoding(components, protocol);\n }\n //perform scheme specific parsing\n if (schemeHandler && schemeHandler.parse) {\n schemeHandler.parse(components, options);\n }\n } else {\n components.error = components.error || \"URI can not be parsed.\";\n }\n return components;\n}\n\nfunction _recomposeAuthority(components, options) {\n var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;\n var uriTokens = [];\n if (components.userinfo !== undefined) {\n uriTokens.push(components.userinfo);\n uriTokens.push(\"@\");\n }\n if (components.host !== undefined) {\n //normalize IP hosts, add brackets and escape zone separator for IPv6\n uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {\n return \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\";\n }));\n }\n if (typeof components.port === \"number\" || typeof components.port === \"string\") {\n uriTokens.push(\":\");\n uriTokens.push(String(components.port));\n }\n return uriTokens.length ? uriTokens.join(\"\") : undefined;\n}\n\nvar RDS1 = /^\\.\\.?\\//;\nvar RDS2 = /^\\/\\.(\\/|$)/;\nvar RDS3 = /^\\/\\.\\.(\\/|$)/;\nvar RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\nfunction removeDotSegments(input) {\n var output = [];\n while (input.length) {\n if (input.match(RDS1)) {\n input = input.replace(RDS1, \"\");\n } else if (input.match(RDS2)) {\n input = input.replace(RDS2, \"/\");\n } else if (input.match(RDS3)) {\n input = input.replace(RDS3, \"/\");\n output.pop();\n } else if (input === \".\" || input === \"..\") {\n input = \"\";\n } else {\n var im = input.match(RDS5);\n if (im) {\n var s = im[0];\n input = input.slice(s.length);\n output.push(s);\n } else {\n throw new Error(\"Unexpected dot segment condition\");\n }\n }\n }\n return output.join(\"\");\n}\n\nfunction serialize(components) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;\n var uriTokens = [];\n //find scheme handler\n var schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n //perform scheme specific serialization\n if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n if (components.host) {\n //if host component is an IPv6 address\n if (protocol.IPV6ADDRESS.test(components.host)) {}\n //TODO: normalize IPv6 address as per RFC 5952\n\n //if host component is a domain name\n else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {\n //convert IDN via punycode\n try {\n components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);\n } catch (e) {\n components.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n }\n }\n }\n //normalize encoding\n _normalizeComponentEncoding(components, protocol);\n if (options.reference !== \"suffix\" && components.scheme) {\n uriTokens.push(components.scheme);\n uriTokens.push(\":\");\n }\n var authority = _recomposeAuthority(components, options);\n if (authority !== undefined) {\n if (options.reference !== \"suffix\") {\n uriTokens.push(\"//\");\n }\n uriTokens.push(authority);\n if (components.path && components.path.charAt(0) !== \"/\") {\n uriTokens.push(\"/\");\n }\n }\n if (components.path !== undefined) {\n var s = components.path;\n if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n s = removeDotSegments(s);\n }\n if (authority === undefined) {\n s = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n }\n uriTokens.push(s);\n }\n if (components.query !== undefined) {\n uriTokens.push(\"?\");\n uriTokens.push(components.query);\n }\n if (components.fragment !== undefined) {\n uriTokens.push(\"#\");\n uriTokens.push(components.fragment);\n }\n return uriTokens.join(\"\"); //merge tokens into a string\n}\n\nfunction resolveComponents(base, relative) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var skipNormalization = arguments[3];\n\n var target = {};\n if (!skipNormalization) {\n base = parse(serialize(base, options), options); //normalize base components\n relative = parse(serialize(relative, options), options); //normalize relative components\n }\n options = options || {};\n if (!options.tolerant && relative.scheme) {\n target.scheme = relative.scheme;\n //target.authority = relative.authority;\n target.userinfo = relative.userinfo;\n target.host = relative.host;\n target.port = relative.port;\n target.path = removeDotSegments(relative.path || \"\");\n target.query = relative.query;\n } else {\n if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n //target.authority = relative.authority;\n target.userinfo = relative.userinfo;\n target.host = relative.host;\n target.port = relative.port;\n target.path = removeDotSegments(relative.path || \"\");\n target.query = relative.query;\n } else {\n if (!relative.path) {\n target.path = base.path;\n if (relative.query !== undefined) {\n target.query = relative.query;\n } else {\n target.query = base.query;\n }\n } else {\n if (relative.path.charAt(0) === \"/\") {\n target.path = removeDotSegments(relative.path);\n } else {\n if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n target.path = \"/\" + relative.path;\n } else if (!base.path) {\n target.path = relative.path;\n } else {\n target.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n }\n target.path = removeDotSegments(target.path);\n }\n target.query = relative.query;\n }\n //target.authority = base.authority;\n target.userinfo = base.userinfo;\n target.host = base.host;\n target.port = base.port;\n }\n target.scheme = base.scheme;\n }\n target.fragment = relative.fragment;\n return target;\n}\n\nfunction resolve(baseURI, relativeURI, options) {\n var schemelessOptions = assign({ scheme: 'null' }, options);\n return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n}\n\nfunction normalize(uri, options) {\n if (typeof uri === \"string\") {\n uri = serialize(parse(uri, options), options);\n } else if (typeOf(uri) === \"object\") {\n uri = parse(serialize(uri, options), options);\n }\n return uri;\n}\n\nfunction equal(uriA, uriB, options) {\n if (typeof uriA === \"string\") {\n uriA = serialize(parse(uriA, options), options);\n } else if (typeOf(uriA) === \"object\") {\n uriA = serialize(uriA, options);\n }\n if (typeof uriB === \"string\") {\n uriB = serialize(parse(uriB, options), options);\n } else if (typeOf(uriB) === \"object\") {\n uriB = serialize(uriB, options);\n }\n return uriA === uriB;\n}\n\nfunction escapeComponent(str, options) {\n return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);\n}\n\nfunction unescapeComponent(str, options) {\n return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);\n}\n\nvar handler = {\n scheme: \"http\",\n domainHost: true,\n parse: function parse(components, options) {\n //report missing host\n if (!components.host) {\n components.error = components.error || \"HTTP URIs must have a host.\";\n }\n return components;\n },\n serialize: function serialize(components, options) {\n var secure = String(components.scheme).toLowerCase() === \"https\";\n //normalize the default port\n if (components.port === (secure ? 443 : 80) || components.port === \"\") {\n components.port = undefined;\n }\n //normalize the empty path\n if (!components.path) {\n components.path = \"/\";\n }\n //NOTE: We do not parse query strings for HTTP URIs\n //as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n //and not the HTTP spec.\n return components;\n }\n};\n\nvar handler$1 = {\n scheme: \"https\",\n domainHost: handler.domainHost,\n parse: handler.parse,\n serialize: handler.serialize\n};\n\nfunction isSecure(wsComponents) {\n return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n//RFC 6455\nvar handler$2 = {\n scheme: \"ws\",\n domainHost: true,\n parse: function parse(components, options) {\n var wsComponents = components;\n //indicate if the secure flag is set\n wsComponents.secure = isSecure(wsComponents);\n //construct resouce name\n wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n wsComponents.path = undefined;\n wsComponents.query = undefined;\n return wsComponents;\n },\n serialize: function serialize(wsComponents, options) {\n //normalize the default port\n if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n wsComponents.port = undefined;\n }\n //ensure scheme matches secure flag\n if (typeof wsComponents.secure === 'boolean') {\n wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws';\n wsComponents.secure = undefined;\n }\n //reconstruct path from resource name\n if (wsComponents.resourceName) {\n var _wsComponents$resourc = wsComponents.resourceName.split('?'),\n _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),\n path = _wsComponents$resourc2[0],\n query = _wsComponents$resourc2[1];\n\n wsComponents.path = path && path !== '/' ? path : undefined;\n wsComponents.query = query;\n wsComponents.resourceName = undefined;\n }\n //forbid fragment component\n wsComponents.fragment = undefined;\n return wsComponents;\n }\n};\n\nvar handler$3 = {\n scheme: \"wss\",\n domainHost: handler$2.domainHost,\n parse: handler$2.parse,\n serialize: handler$2.serialize\n};\n\nvar O = {};\nvar isIRI = true;\n//RFC 3986\nvar UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nvar HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nvar PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nvar ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nvar QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nvar VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nvar SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nvar UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nvar PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nvar NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nvar NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nvar NOT_HFVALUE = NOT_HFNAME;\nfunction decodeUnreserved(str) {\n var decStr = pctDecChars(str);\n return !decStr.match(UNRESERVED) ? str : decStr;\n}\nvar handler$4 = {\n scheme: \"mailto\",\n parse: function parse$$1(components, options) {\n var mailtoComponents = components;\n var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(\",\") : [];\n mailtoComponents.path = undefined;\n if (mailtoComponents.query) {\n var unknownHeaders = false;\n var headers = {};\n var hfields = mailtoComponents.query.split(\"&\");\n for (var x = 0, xl = hfields.length; x < xl; ++x) {\n var hfield = hfields[x].split(\"=\");\n switch (hfield[0]) {\n case \"to\":\n var toAddrs = hfield[1].split(\",\");\n for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {\n to.push(toAddrs[_x]);\n }\n break;\n case \"subject\":\n mailtoComponents.subject = unescapeComponent(hfield[1], options);\n break;\n case \"body\":\n mailtoComponents.body = unescapeComponent(hfield[1], options);\n break;\n default:\n unknownHeaders = true;\n headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n break;\n }\n }\n if (unknownHeaders) mailtoComponents.headers = headers;\n }\n mailtoComponents.query = undefined;\n for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {\n var addr = to[_x2].split(\"@\");\n addr[0] = unescapeComponent(addr[0]);\n if (!options.unicodeSupport) {\n //convert Unicode IDN -> ASCII IDN\n try {\n addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n } catch (e) {\n mailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n }\n } else {\n addr[1] = unescapeComponent(addr[1], options).toLowerCase();\n }\n to[_x2] = addr.join(\"@\");\n }\n return mailtoComponents;\n },\n serialize: function serialize$$1(mailtoComponents, options) {\n var components = mailtoComponents;\n var to = toArray(mailtoComponents.to);\n if (to) {\n for (var x = 0, xl = to.length; x < xl; ++x) {\n var toAddr = String(to[x]);\n var atIdx = toAddr.lastIndexOf(\"@\");\n var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n var domain = toAddr.slice(atIdx + 1);\n //convert IDN via punycode\n try {\n domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);\n } catch (e) {\n components.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n }\n to[x] = localPart + \"@\" + domain;\n }\n components.path = to.join(\",\");\n }\n var headers = mailtoComponents.headers = mailtoComponents.headers || {};\n if (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n if (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n var fields = [];\n for (var name in headers) {\n if (headers[name] !== O[name]) {\n fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + \"=\" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));\n }\n }\n if (fields.length) {\n components.query = fields.join(\"&\");\n }\n return components;\n }\n};\n\nvar URN_PARSE = /^([^\\:]+)\\:(.*)/;\n//RFC 2141\nvar handler$5 = {\n scheme: \"urn\",\n parse: function parse$$1(components, options) {\n var matches = components.path && components.path.match(URN_PARSE);\n var urnComponents = components;\n if (matches) {\n var scheme = options.scheme || urnComponents.scheme || \"urn\";\n var nid = matches[1].toLowerCase();\n var nss = matches[2];\n var urnScheme = scheme + \":\" + (options.nid || nid);\n var schemeHandler = SCHEMES[urnScheme];\n urnComponents.nid = nid;\n urnComponents.nss = nss;\n urnComponents.path = undefined;\n if (schemeHandler) {\n urnComponents = schemeHandler.parse(urnComponents, options);\n }\n } else {\n urnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n }\n return urnComponents;\n },\n serialize: function serialize$$1(urnComponents, options) {\n var scheme = options.scheme || urnComponents.scheme || \"urn\";\n var nid = urnComponents.nid;\n var urnScheme = scheme + \":\" + (options.nid || nid);\n var schemeHandler = SCHEMES[urnScheme];\n if (schemeHandler) {\n urnComponents = schemeHandler.serialize(urnComponents, options);\n }\n var uriComponents = urnComponents;\n var nss = urnComponents.nss;\n uriComponents.path = (nid || options.nid) + \":\" + nss;\n return uriComponents;\n }\n};\n\nvar UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\n//RFC 4122\nvar handler$6 = {\n scheme: \"urn:uuid\",\n parse: function parse(urnComponents, options) {\n var uuidComponents = urnComponents;\n uuidComponents.uuid = uuidComponents.nss;\n uuidComponents.nss = undefined;\n if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n uuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n }\n return uuidComponents;\n },\n serialize: function serialize(uuidComponents, options) {\n var urnComponents = uuidComponents;\n //normalize UUID\n urnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n return urnComponents;\n }\n};\n\nSCHEMES[handler.scheme] = handler;\nSCHEMES[handler$1.scheme] = handler$1;\nSCHEMES[handler$2.scheme] = handler$2;\nSCHEMES[handler$3.scheme] = handler$3;\nSCHEMES[handler$4.scheme] = handler$4;\nSCHEMES[handler$5.scheme] = handler$5;\nSCHEMES[handler$6.scheme] = handler$6;\n\nexports.SCHEMES = SCHEMES;\nexports.pctEncChar = pctEncChar;\nexports.pctDecChars = pctDecChars;\nexports.parse = parse;\nexports.removeDotSegments = removeDotSegments;\nexports.serialize = serialize;\nexports.resolveComponents = resolveComponents;\nexports.resolve = resolve;\nexports.normalize = normalize;\nexports.equal = equal;\nexports.escapeComponent = escapeComponent;\nexports.unescapeComponent = unescapeComponent;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=uri.all.js.map\n","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlreadyReportedError = void 0;\nconst TypeUuid_1 = require(\"./TypeUuid\");\nconst uuidAlreadyReportedError = 'f26b0640-a49b-49d1-9ead-1a516d5920c7';\n/**\n * This exception can be thrown to indicate that an operation failed and an error message has already\n * been reported appropriately. Thus, the catch handler does not have responsibility for reporting\n * the error.\n *\n * @remarks\n * For example, suppose a tool writes interactive output to `console.log()`. When an exception is thrown,\n * the `catch` handler will typically provide simplistic reporting such as this:\n *\n * ```ts\n * catch (error) {\n * console.log(\"ERROR: \" + error.message);\n * }\n * ```\n *\n * Suppose that the code performing the operation normally prints rich output to the console. It may be able to\n * present an error message more nicely (for example, as part of a table, or structured log format). Throwing\n * `AlreadyReportedError` provides a way to use exception handling to abort the operation, but instruct the `catch`\n * handler not to print an error a second time:\n *\n * ```ts\n * catch (error) {\n * if (error instanceof AlreadyReportedError) {\n * return;\n * }\n * console.log(\"ERROR: \" + error.message);\n * }\n * ```\n *\n * @public\n */\nclass AlreadyReportedError extends Error {\n constructor() {\n super('An error occurred.');\n // Manually set the prototype, as we can no longer extend built-in classes like Error, Array, Map, etc\n // [https://github.com/microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work](https://github.com/microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work)\n //\n // Note: the prototype must also be set on any classes which extend this one\n this.__proto__ = AlreadyReportedError.prototype; // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n static [Symbol.hasInstance](instance) {\n return TypeUuid_1.TypeUuid.isInstanceOf(instance, uuidAlreadyReportedError);\n }\n}\nexports.AlreadyReportedError = AlreadyReportedError;\nTypeUuid_1.TypeUuid.registerClass(AlreadyReportedError, uuidAlreadyReportedError);\n//# sourceMappingURL=AlreadyReportedError.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\nvar __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncQueue = exports.Async = void 0;\nfunction toWeightedIterator(iterable, useWeights) {\n const iterator = (iterable[Symbol.iterator] ||\n iterable[Symbol.asyncIterator]).call(iterable);\n return {\n [Symbol.asyncIterator]: () => ({\n // eslint-disable-next-line @typescript-eslint/naming-convention\n next: async () => {\n // The await is necessary here, but TS will complain - it's a false positive.\n const { value, done } = await iterator.next();\n return {\n value: { element: value, weight: useWeights ? value === null || value === void 0 ? void 0 : value.weight : 1 },\n done: !!done\n };\n }\n })\n };\n}\n/**\n * Utilities for parallel asynchronous operations, for use with the system `Promise` APIs.\n *\n * @public\n */\nclass Async {\n static async mapAsync(iterable, callback, options) {\n const result = [];\n // @ts-expect-error https://github.com/microsoft/TypeScript/issues/22609, it succeeds against the implementation but fails against the overloads\n await Async.forEachAsync(iterable, async (item, arrayIndex) => {\n result[arrayIndex] = await callback(item, arrayIndex);\n }, options);\n return result;\n }\n static async _forEachWeightedAsync(iterable, callback, options) {\n await new Promise((resolve, reject) => {\n const concurrency = (options === null || options === void 0 ? void 0 : options.concurrency) && options.concurrency > 0 ? options.concurrency : Infinity;\n let concurrentUnitsInProgress = 0;\n const iterator = iterable[Symbol.asyncIterator].call(iterable);\n let arrayIndex = 0;\n let iteratorIsComplete = false;\n let promiseHasResolvedOrRejected = false;\n async function queueOperationsAsync() {\n while (concurrentUnitsInProgress < concurrency &&\n !iteratorIsComplete &&\n !promiseHasResolvedOrRejected) {\n // Increment the current concurrency units in progress by the concurrency limit before fetching the iterator weight.\n // This function is reentrant, so this if concurrency is finite, at most 1 operation will be waiting. If it's infinite,\n // there will be effectively no cap on the number of operations waiting.\n const limitedConcurrency = !Number.isFinite(concurrency) ? 1 : concurrency;\n concurrentUnitsInProgress += limitedConcurrency;\n const currentIteratorResult = await iterator.next();\n // eslint-disable-next-line require-atomic-updates\n iteratorIsComplete = !!currentIteratorResult.done;\n if (!iteratorIsComplete) {\n const currentIteratorValue = currentIteratorResult.value;\n Async.validateWeightedIterable(currentIteratorValue);\n // Cap the weight to concurrency, this allows 0 weight items to execute despite the concurrency limit.\n const weight = Math.min(currentIteratorValue.weight, concurrency);\n // Remove the \"lock\" from the concurrency check and only apply the current weight.\n // This should allow other operations to execute.\n concurrentUnitsInProgress += weight;\n concurrentUnitsInProgress -= limitedConcurrency;\n Promise.resolve(callback(currentIteratorValue.element, arrayIndex++))\n .then(async () => {\n // Remove the operation completely from the in progress units.\n concurrentUnitsInProgress -= weight;\n await onOperationCompletionAsync();\n })\n .catch((error) => {\n promiseHasResolvedOrRejected = true;\n reject(error);\n });\n }\n else {\n // The iterator is complete and there wasn't a value, so untrack the waiting state.\n concurrentUnitsInProgress -= limitedConcurrency;\n }\n }\n if (iteratorIsComplete) {\n await onOperationCompletionAsync();\n }\n }\n async function onOperationCompletionAsync() {\n if (!promiseHasResolvedOrRejected) {\n if (concurrentUnitsInProgress === 0 && iteratorIsComplete) {\n promiseHasResolvedOrRejected = true;\n resolve();\n }\n else if (!iteratorIsComplete) {\n await queueOperationsAsync();\n }\n }\n }\n queueOperationsAsync().catch((error) => {\n promiseHasResolvedOrRejected = true;\n reject(error);\n });\n });\n }\n static async forEachAsync(iterable, callback, options) {\n await Async._forEachWeightedAsync(toWeightedIterator(iterable, options === null || options === void 0 ? void 0 : options.weighted), callback, options);\n }\n /**\n * Return a promise that resolves after the specified number of milliseconds.\n */\n static async sleepAsync(ms) {\n await new Promise((resolve) => {\n setTimeout(resolve, ms);\n });\n }\n /**\n * Executes an async function and optionally retries it if it fails.\n */\n static async runWithRetriesAsync({ action, maxRetries, retryDelayMs = 0 }) {\n let retryCounter = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n try {\n return await action();\n }\n catch (e) {\n if (++retryCounter > maxRetries) {\n throw e;\n }\n else if (retryDelayMs > 0) {\n await Async.sleepAsync(retryDelayMs);\n }\n }\n }\n }\n /**\n * Ensures that the argument is a valid {@link IWeighted}, with a `weight` argument that\n * is a positive integer or 0.\n */\n static validateWeightedIterable(operation) {\n if (operation.weight < 0) {\n throw new Error('Weight must be a whole number greater than or equal to 0');\n }\n if (operation.weight % 1 !== 0) {\n throw new Error('Weight must be a whole number greater than or equal to 0');\n }\n }\n /**\n * Returns a Signal, a.k.a. a \"deferred promise\".\n */\n static getSignal() {\n return getSignal();\n }\n}\nexports.Async = Async;\n/**\n * Returns an unwrapped promise.\n */\nfunction getSignal() {\n let resolver;\n let rejecter;\n const promise = new Promise((resolve, reject) => {\n resolver = resolve;\n rejecter = reject;\n });\n return [promise, resolver, rejecter];\n}\n/**\n * A queue that allows for asynchronous iteration. During iteration, the queue will wait until\n * the next item is pushed into the queue before yielding. If instead all queue items are consumed\n * and all callbacks have been called, the queue will return.\n *\n * @public\n */\nclass AsyncQueue {\n constructor(iterable) {\n this._queue = iterable ? Array.from(iterable) : [];\n const [promise, resolver] = getSignal();\n this._onPushSignal = promise;\n this._onPushResolve = resolver;\n }\n [Symbol.asyncIterator]() {\n return __asyncGenerator(this, arguments, function* _a() {\n let activeIterations = 0;\n let [callbackSignal, callbackResolve] = getSignal();\n const callback = () => {\n if (--activeIterations === 0) {\n // Resolve whatever the latest callback promise is and create a new one\n callbackResolve();\n const [newCallbackSignal, newCallbackResolve] = getSignal();\n callbackSignal = newCallbackSignal;\n callbackResolve = newCallbackResolve;\n }\n };\n let position = 0;\n while (this._queue.length > position || activeIterations > 0) {\n if (this._queue.length > position) {\n activeIterations++;\n yield yield __await([this._queue[position++], callback]);\n }\n else {\n // On push, the item will be added to the queue and the onPushSignal will be resolved.\n // On calling the callback, active iterations will be decremented by the callback and the\n // callbackSignal will be resolved. This means that the loop will continue if there are\n // active iterations or if there are items in the queue that haven't been yielded yet.\n yield __await(Promise.race([this._onPushSignal, callbackSignal]));\n }\n }\n });\n }\n /**\n * Adds an item to the queue.\n *\n * @param item - The item to push into the queue.\n */\n push(item) {\n this._queue.push(item);\n this._onPushResolve();\n const [onPushSignal, onPushResolve] = getSignal();\n this._onPushSignal = onPushSignal;\n this._onPushResolve = onPushResolve;\n }\n}\nexports.AsyncQueue = AsyncQueue;\n//# sourceMappingURL=Async.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FolderConstants = exports.FileConstants = void 0;\n/**\n * String constants for common filenames and parts of filenames.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/typedef\nexports.FileConstants = {\n /**\n * \"package.json\" - the configuration file that defines an NPM package\n */\n PackageJson: 'package.json'\n};\n/**\n * String constants for common folder names.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/typedef\nexports.FolderConstants = {\n /**\n * \".git\" - the data storage for a Git working folder\n */\n Git: '.git',\n /**\n * \"node_modules\" - the folder where package managers install their files\n */\n NodeModules: 'node_modules'\n};\n//# sourceMappingURL=Constants.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Enum = void 0;\n/**\n * A helper for looking up TypeScript `enum` keys/values.\n *\n * @remarks\n * TypeScript enums implement a lookup table for mapping between their keys and values:\n *\n * ```ts\n * enum Colors {\n * Red = 1\n * }\n *\n * // Prints \"Red\"\n * console.log(Colors[1]);\n *\n * // Prints \"1\"\n * console.log(Colors[\"Red]);\n * ```\n *\n * However the compiler's \"noImplicitAny\" validation has trouble with these mappings, because\n * there are so many possible types for the map elements:\n *\n * ```ts\n * function f(s: string): Colors | undefined {\n * // (TS 7015) Element implicitly has an 'any' type because\n * // index expression is not of type 'number'.\n * return Colors[s];\n * }\n * ```\n *\n * The `Enum` helper provides a more specific, strongly typed way to access members:\n *\n * ```ts\n * function f(s: string): Colors | undefined {\n * return Enum.tryGetValueByKey(Colors, s);\n * }\n * ```\n *\n * @public\n */\nclass Enum {\n constructor() { }\n /**\n * Returns an enum value, given its key. Returns `undefined` if no matching key is found.\n *\n * @example\n *\n * Example usage:\n * ```ts\n * enum Colors {\n * Red = 1\n * }\n *\n * // Prints \"1\"\n * console.log(Enum.tryGetValueByKey(Colors, \"Red\"));\n *\n * // Prints \"undefined\"\n * console.log(Enum.tryGetValueByKey(Colors, \"Black\"));\n * ```\n */\n static tryGetValueByKey(enumObject, key) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return enumObject[key];\n }\n /**\n * This API is similar to {@link Enum.tryGetValueByKey}, except that it throws an exception\n * if the key is undefined.\n */\n static getValueByKey(enumObject, key) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = enumObject[key];\n if (result === undefined) {\n throw new Error(`The lookup key ${JSON.stringify(key)} is not defined`);\n }\n return result;\n }\n /**\n * Returns an enum string key, given its numeric value. Returns `undefined` if no matching value\n * is found.\n *\n * @remarks\n * The TypeScript compiler only creates a reverse mapping for enum members whose value is numeric.\n * For example:\n *\n * ```ts\n * enum E {\n * A = 1,\n * B = 'c'\n * }\n *\n * // Prints \"A\"\n * console.log(E[1]);\n *\n * // Prints \"undefined\"\n * console.log(E[\"c\"]);\n * ```\n *\n * @example\n *\n * Example usage:\n * ```ts\n * enum Colors {\n * Red = 1,\n * Blue = 'blue'\n * }\n *\n * // Prints \"Red\"\n * console.log(Enum.tryGetKeyByNumber(Colors, 1));\n *\n * // Prints \"undefined\"\n * console.log(Enum.tryGetKeyByNumber(Colors, -1));\n * ```\n */\n static tryGetKeyByNumber(enumObject, value) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return enumObject[value];\n }\n /**\n * This API is similar to {@link Enum.tryGetKeyByNumber}, except that it throws an exception\n * if the key is undefined.\n */\n static getKeyByNumber(enumObject, value) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = enumObject[value];\n if (result === undefined) {\n throw new Error(`The value ${value} does not exist in the mapping`);\n }\n return result;\n }\n}\nexports.Enum = Enum;\n//# sourceMappingURL=Enum.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EnvironmentMap = void 0;\nconst process_1 = __importDefault(require(\"process\"));\nconst InternalError_1 = require(\"./InternalError\");\n/**\n * A map data structure that stores process environment variables. On Windows\n * operating system, the variable names are case-insensitive.\n * @public\n */\nclass EnvironmentMap {\n constructor(environmentObject = {}) {\n this._map = new Map();\n // This property helps catch a mistake where an instance of `EnvironmentMap` is accidentally passed to\n // a function that expects a `Record<string, string>` (as would be used with the `process.env` API).\n // The property getter will throw an exception if that function tries to enumerate the object values.\n Object.defineProperty(this, '_sanityCheck', {\n enumerable: true,\n get: function () {\n throw new InternalError_1.InternalError('Attempt to read EnvironmentMap class as an object');\n }\n });\n this.caseSensitive = process_1.default.platform !== 'win32';\n this.mergeFromObject(environmentObject);\n }\n /**\n * Clears all entries, resulting in an empty map.\n */\n clear() {\n this._map.clear();\n }\n /**\n * Assigns the variable to the specified value. A previous value will be overwritten.\n *\n * @remarks\n * The value can be an empty string. To completely remove the entry, use\n * {@link EnvironmentMap.unset} instead.\n */\n set(name, value) {\n const key = this.caseSensitive ? name : name.toUpperCase();\n this._map.set(key, { name: name, value });\n }\n /**\n * Removes the key from the map, if present.\n */\n unset(name) {\n const key = this.caseSensitive ? name : name.toUpperCase();\n this._map.delete(key);\n }\n /**\n * Returns the value of the specified variable, or `undefined` if the map does not contain that name.\n */\n get(name) {\n const key = this.caseSensitive ? name : name.toUpperCase();\n const entry = this._map.get(key);\n if (entry === undefined) {\n return undefined;\n }\n return entry.value;\n }\n /**\n * Returns the map keys, which are environment variable names.\n */\n names() {\n return this._map.keys();\n }\n /**\n * Returns the map entries.\n */\n entries() {\n return this._map.values();\n }\n /**\n * Adds each entry from `environmentMap` to this map.\n */\n mergeFrom(environmentMap) {\n for (const entry of environmentMap.entries()) {\n this.set(entry.name, entry.value);\n }\n }\n /**\n * Merges entries from a plain JavaScript object, such as would be used with the `process.env` API.\n */\n mergeFromObject(environmentObject = {}) {\n for (const [name, value] of Object.entries(environmentObject)) {\n if (value !== undefined) {\n this.set(name, value);\n }\n }\n }\n /**\n * Returns the keys as a plain JavaScript object similar to the object returned by the `process.env` API.\n */\n toObject() {\n const result = {};\n for (const entry of this.entries()) {\n result[entry.name] = entry.value;\n }\n return result;\n }\n}\nexports.EnvironmentMap = EnvironmentMap;\n//# sourceMappingURL=EnvironmentMap.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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 __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Executable = exports.parseProcessListOutput = exports.parseProcessListOutputAsync = void 0;\nconst os = __importStar(require(\"os\"));\nconst child_process = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst EnvironmentMap_1 = require(\"./EnvironmentMap\");\nconst FileSystem_1 = require(\"./FileSystem\");\nconst PosixModeBits_1 = require(\"./PosixModeBits\");\nconst Text_1 = require(\"./Text\");\nconst InternalError_1 = require(\"./InternalError\");\nconst OS_PLATFORM = os.platform();\nasync function parseProcessListOutputAsync(stream, platform = OS_PLATFORM) {\n var _a, e_1, _b, _c;\n const processInfoById = new Map();\n let seenHeaders = false;\n try {\n for (var _d = true, _e = __asyncValues(Text_1.Text.readLinesFromIterableAsync(stream, { ignoreEmptyLines: true })), _f; _f = await _e.next(), _a = _f.done, !_a; _d = true) {\n _c = _f.value;\n _d = false;\n const line = _c;\n if (!seenHeaders) {\n seenHeaders = true;\n }\n else {\n parseProcessInfoEntry(line, processInfoById, platform);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = _e.return)) await _b.call(_e);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return processInfoById;\n}\nexports.parseProcessListOutputAsync = parseProcessListOutputAsync;\nfunction parseProcessListOutput(\n// eslint-disable-next-line @rushstack/no-new-null\noutput, platform = OS_PLATFORM) {\n const processInfoById = new Map();\n let seenHeaders = false;\n for (const line of Text_1.Text.readLinesFromIterable(output, { ignoreEmptyLines: true })) {\n if (!seenHeaders) {\n seenHeaders = true;\n }\n else {\n parseProcessInfoEntry(line, processInfoById, platform);\n }\n }\n return processInfoById;\n}\nexports.parseProcessListOutput = parseProcessListOutput;\n// win32 format:\n// Name ParentProcessId ProcessId\n// process name 1234 5678\n// unix format:\n// PPID PID COMMAND\n// 51234 56784 process name\nconst NAME_GROUP = 'name';\nconst PROCESS_ID_GROUP = 'pid';\nconst PARENT_PROCESS_ID_GROUP = 'ppid';\n// eslint-disable-next-line @rushstack/security/no-unsafe-regexp\nconst PROCESS_LIST_ENTRY_REGEX_WIN32 = new RegExp(`^(?<${NAME_GROUP}>.+?)\\\\s+(?<${PARENT_PROCESS_ID_GROUP}>\\\\d+)\\\\s+(?<${PROCESS_ID_GROUP}>\\\\d+)\\\\s*$`);\n// eslint-disable-next-line @rushstack/security/no-unsafe-regexp\nconst PROCESS_LIST_ENTRY_REGEX_UNIX = new RegExp(`^\\\\s*(?<${PARENT_PROCESS_ID_GROUP}>\\\\d+)\\\\s+(?<${PROCESS_ID_GROUP}>\\\\d+)\\\\s+(?<${NAME_GROUP}>.+?)\\\\s*$`);\nfunction parseProcessInfoEntry(line, existingProcessInfoById, platform) {\n const processListEntryRegex = platform === 'win32' ? PROCESS_LIST_ENTRY_REGEX_WIN32 : PROCESS_LIST_ENTRY_REGEX_UNIX;\n const match = line.match(processListEntryRegex);\n if (!(match === null || match === void 0 ? void 0 : match.groups)) {\n throw new InternalError_1.InternalError(`Invalid process list entry: ${line}`);\n }\n const processName = match.groups[NAME_GROUP];\n const processId = parseInt(match.groups[PROCESS_ID_GROUP], 10);\n const parentProcessId = parseInt(match.groups[PARENT_PROCESS_ID_GROUP], 10);\n // Only care about the parent process if it is not the same as the current process.\n let parentProcessInfo;\n if (parentProcessId !== processId) {\n parentProcessInfo = existingProcessInfoById.get(parentProcessId);\n if (!parentProcessInfo) {\n // Create a new placeholder entry for the parent with the information we have so far\n parentProcessInfo = {\n processName: '',\n processId: parentProcessId,\n parentProcessInfo: undefined,\n childProcessInfos: []\n };\n existingProcessInfoById.set(parentProcessId, parentProcessInfo);\n }\n }\n let processInfo = existingProcessInfoById.get(processId);\n if (!processInfo) {\n // Create a new entry\n processInfo = {\n processName,\n processId,\n parentProcessInfo,\n childProcessInfos: []\n };\n existingProcessInfoById.set(processId, processInfo);\n }\n else {\n // Update placeholder entry\n processInfo.processName = processName;\n processInfo.parentProcessInfo = parentProcessInfo;\n }\n // Add the process as a child of the parent process\n parentProcessInfo === null || parentProcessInfo === void 0 ? void 0 : parentProcessInfo.childProcessInfos.push(processInfo);\n}\nfunction convertToProcessInfoByNameMap(processInfoById) {\n const processInfoByNameMap = new Map();\n for (const processInfo of processInfoById.values()) {\n let processInfoNameEntries = processInfoByNameMap.get(processInfo.processName);\n if (!processInfoNameEntries) {\n processInfoNameEntries = [];\n processInfoByNameMap.set(processInfo.processName, processInfoNameEntries);\n }\n processInfoNameEntries.push(processInfo);\n }\n return processInfoByNameMap;\n}\nfunction getProcessListProcessOptions() {\n let command;\n let args;\n if (OS_PLATFORM === 'win32') {\n command = 'wmic.exe';\n // Order of declared properties does not impact the order of the output\n args = ['process', 'get', 'Name,ParentProcessId,ProcessId'];\n }\n else {\n command = 'ps';\n // -A: Select all processes\n // -w: Wide format\n // -o: User-defined format\n // Order of declared properties impacts the order of the output. We will\n // need to request the \"comm\" property last in order to ensure that the\n // process names are not truncated on certain platforms\n args = ['-Awo', 'ppid,pid,comm'];\n }\n return { path: command, args };\n}\n/**\n * The Executable class provides a safe, portable, recommended solution for tools that need\n * to launch child processes.\n *\n * @remarks\n * The NodeJS child_process API provides a solution for launching child processes, however\n * its design encourages reliance on the operating system shell for certain features.\n * Invoking the OS shell is not safe, not portable, and generally not recommended:\n *\n * - Different shells have different behavior and command-line syntax, and which shell you\n * will get with NodeJS is unpredictable. There is no universal shell guaranteed to be\n * available on all platforms.\n *\n * - If a command parameter contains symbol characters, a shell may interpret them, which\n * can introduce a security vulnerability\n *\n * - Each shell has different rules for escaping these symbols. On Windows, the default\n * shell is incapable of escaping certain character sequences.\n *\n * The Executable API provides a pure JavaScript implementation of primitive shell-like\n * functionality for searching the default PATH, appending default file extensions on Windows,\n * and executing a file that may contain a POSIX shebang. This primitive functionality\n * is sufficient (and recommended) for most tooling scenarios.\n *\n * If you need additional shell features such as wildcard globbing, environment variable\n * expansion, piping, or built-in commands, then we recommend to use the `@microsoft/rushell`\n * library instead. Rushell is a pure JavaScript shell with a standard syntax that is\n * guaranteed to work consistently across all platforms.\n *\n * @public\n */\nclass Executable {\n /**\n * Synchronously create a child process and optionally capture its output.\n *\n * @remarks\n * This function is similar to child_process.spawnSync(). The main differences are:\n *\n * - It does not invoke the OS shell unless the executable file is a shell script.\n * - Command-line arguments containing special characters are more accurately passed\n * through to the child process.\n * - If the filename is missing a path, then the shell's default PATH will be searched.\n * - If the filename is missing a file extension, then Windows default file extensions\n * will be searched.\n *\n * @param filename - The name of the executable file. This string must not contain any\n * command-line arguments. If the name contains any path delimiters, then the shell's\n * default PATH will not be searched.\n * @param args - The command-line arguments to be passed to the process.\n * @param options - Additional options\n * @returns the same data type as returned by the NodeJS child_process.spawnSync() API\n *\n * @privateRemarks\n *\n * NOTE: The NodeJS spawnSync() returns SpawnSyncReturns<string> or SpawnSyncReturns<Buffer>\n * polymorphically based on the options.encoding parameter value. This is a fairly confusing\n * design. In most cases, developers want string with the default encoding. If/when someone\n * wants binary output or a non-default text encoding, we will introduce a separate API function\n * with a name like \"spawnWithBufferSync\".\n */\n static spawnSync(filename, args, options) {\n if (!options) {\n options = {};\n }\n const context = Executable._getExecutableContext(options);\n const resolvedPath = Executable._tryResolve(filename, options, context);\n if (!resolvedPath) {\n throw new Error(`The executable file was not found: \"${filename}\"`);\n }\n const spawnOptions = {\n cwd: context.currentWorkingDirectory,\n env: context.environmentMap.toObject(),\n input: options.input,\n stdio: options.stdio,\n timeout: options.timeoutMs,\n maxBuffer: options.maxBuffer,\n // Contrary to what the NodeJS typings imply, we must explicitly specify \"utf8\" here\n // if we want the result to be SpawnSyncReturns<string> instead of SpawnSyncReturns<Buffer>.\n encoding: 'utf8',\n // NOTE: This is always false, because Rushell will be recommended instead of relying on the OS shell.\n shell: false\n };\n const normalizedCommandLine = Executable._buildCommandLineFixup(resolvedPath, args, context);\n return child_process.spawnSync(normalizedCommandLine.path, normalizedCommandLine.args, spawnOptions);\n }\n /**\n * Start a child process.\n *\n * @remarks\n * This function is similar to child_process.spawn(). The main differences are:\n *\n * - It does not invoke the OS shell unless the executable file is a shell script.\n * - Command-line arguments containing special characters are more accurately passed\n * through to the child process.\n * - If the filename is missing a path, then the shell's default PATH will be searched.\n * - If the filename is missing a file extension, then Windows default file extensions\n * will be searched.\n *\n * This command is asynchronous, but it does not return a `Promise`. Instead it returns\n * a Node.js `ChildProcess` supporting event notifications.\n *\n * @param filename - The name of the executable file. This string must not contain any\n * command-line arguments. If the name contains any path delimiters, then the shell's\n * default PATH will not be searched.\n * @param args - The command-line arguments to be passed to the process.\n * @param options - Additional options\n * @returns the same data type as returned by the NodeJS child_process.spawnSync() API\n */\n static spawn(filename, args, options) {\n if (!options) {\n options = {};\n }\n const context = Executable._getExecutableContext(options);\n const resolvedPath = Executable._tryResolve(filename, options, context);\n if (!resolvedPath) {\n throw new Error(`The executable file was not found: \"${filename}\"`);\n }\n const spawnOptions = {\n cwd: context.currentWorkingDirectory,\n env: context.environmentMap.toObject(),\n stdio: options.stdio,\n // NOTE: This is always false, because Rushell will be recommended instead of relying on the OS shell.\n shell: false\n };\n const normalizedCommandLine = Executable._buildCommandLineFixup(resolvedPath, args, context);\n return child_process.spawn(normalizedCommandLine.path, normalizedCommandLine.args, spawnOptions);\n }\n static async waitForExitAsync(childProcess, options = {}) {\n const { throwOnNonZeroExitCode, throwOnSignal, encoding } = options;\n if (encoding && (!childProcess.stdout || !childProcess.stderr)) {\n throw new Error('An encoding was specified, but stdout and/or stderr on the child process are not defined');\n }\n const collectedStdout = [];\n const collectedStderr = [];\n const useBufferEncoding = encoding === 'buffer';\n function normalizeChunk(chunk) {\n if (typeof chunk === 'string') {\n return (useBufferEncoding ? Buffer.from(chunk) : chunk);\n }\n else {\n return (useBufferEncoding ? chunk : chunk.toString(encoding));\n }\n }\n let errorThrown = undefined;\n const { exitCode, signal } = await new Promise((resolve, reject) => {\n if (encoding) {\n childProcess.stdout.on('data', (chunk) => {\n collectedStdout.push(normalizeChunk(chunk));\n });\n childProcess.stderr.on('data', (chunk) => {\n collectedStderr.push(normalizeChunk(chunk));\n });\n }\n childProcess.on('error', (error) => {\n // Wait to call reject() until any output is collected\n errorThrown = error;\n });\n childProcess.on('close', (closeExitCode, closeSignal) => {\n if (errorThrown) {\n reject(errorThrown);\n }\n if (closeSignal && throwOnSignal) {\n reject(new Error(`Process terminated by ${closeSignal}`));\n }\n else if (closeExitCode !== 0 && throwOnNonZeroExitCode) {\n reject(new Error(`Process exited with code ${closeExitCode}`));\n }\n else {\n resolve({ exitCode: closeExitCode, signal: closeSignal });\n }\n });\n });\n let stdout;\n let stderr;\n if (encoding === 'buffer') {\n stdout = Buffer.concat(collectedStdout);\n stderr = Buffer.concat(collectedStderr);\n }\n else if (encoding !== undefined) {\n stdout = collectedStdout.join('');\n stderr = collectedStderr.join('');\n }\n const result = {\n stdout: stdout,\n stderr: stderr,\n exitCode,\n signal\n };\n return result;\n }\n /* eslint-enable @rushstack/no-new-null */\n /**\n * Get the list of processes currently running on the system, keyed by the process ID.\n *\n * @remarks The underlying implementation depends on the operating system:\n * - On Windows, this uses the `wmic.exe` utility.\n * - On Unix, this uses the `ps` utility.\n */\n static async getProcessInfoByIdAsync() {\n const { path: command, args } = getProcessListProcessOptions();\n const process = Executable.spawn(command, args, {\n stdio: ['ignore', 'pipe', 'ignore']\n });\n if (process.stdout === null) {\n throw new InternalError_1.InternalError('Child process did not provide stdout');\n }\n const [processInfoByIdMap] = await Promise.all([\n parseProcessListOutputAsync(process.stdout),\n // Don't collect output in the result since we process it directly\n Executable.waitForExitAsync(process, { throwOnNonZeroExitCode: true, throwOnSignal: true })\n ]);\n return processInfoByIdMap;\n }\n /**\n * {@inheritDoc Executable.getProcessInfoByIdAsync}\n */\n static getProcessInfoById() {\n const { path: command, args } = getProcessListProcessOptions();\n const processOutput = Executable.spawnSync(command, args);\n if (processOutput.error) {\n throw new Error(`Unable to list processes: ${command} failed with error ${processOutput.error}`);\n }\n if (processOutput.status !== 0) {\n throw new Error(`Unable to list processes: ${command} exited with code ${processOutput.status}`);\n }\n return parseProcessListOutput(processOutput.output);\n }\n /**\n * Get the list of processes currently running on the system, keyed by the process name. All processes\n * with the same name will be grouped.\n *\n * @remarks The underlying implementation depends on the operating system:\n * - On Windows, this uses the `wmic.exe` utility.\n * - On Unix, this uses the `ps` utility.\n */\n static async getProcessInfoByNameAsync() {\n const processInfoById = await Executable.getProcessInfoByIdAsync();\n return convertToProcessInfoByNameMap(processInfoById);\n }\n /**\n * {@inheritDoc Executable.getProcessInfoByNameAsync}\n */\n static getProcessInfoByName() {\n const processInfoByIdMap = Executable.getProcessInfoById();\n return convertToProcessInfoByNameMap(processInfoByIdMap);\n }\n // PROBLEM: Given an \"args\" array of strings that may contain special characters (e.g. spaces,\n // backslashes, quotes), ensure that these strings pass through to the child process's ARGV array\n // without anything getting corrupted along the way.\n //\n // On Unix you just pass the array to spawnSync(). But on Windows, this is a very complex problem:\n // - The Win32 CreateProcess() API expects the args to be encoded as a single text string\n // - The decoding of this string is up to the application (not the OS), and there are 3 different\n // algorithms in common usage: the cmd.exe shell, the Microsoft CRT library init code, and\n // the Win32 CommandLineToArgvW()\n // - The encodings are counterintuitive and have lots of special cases\n // - NodeJS spawnSync() tries do the encoding without knowing which decoder will be used\n //\n // See these articles for a full analysis:\n // http://www.windowsinspired.com/understanding-the-command-line-string-and-arguments-received-by-a-windows-program/\n // http://www.windowsinspired.com/how-a-windows-programs-splits-its-command-line-into-individual-arguments/\n static _buildCommandLineFixup(resolvedPath, args, context) {\n const fileExtension = path.extname(resolvedPath);\n if (OS_PLATFORM === 'win32') {\n // Do we need a custom handler for this file type?\n switch (fileExtension.toUpperCase()) {\n case '.EXE':\n case '.COM':\n // okay to execute directly\n break;\n case '.BAT':\n case '.CMD': {\n Executable._validateArgsForWindowsShell(args);\n // These file types must be invoked via the Windows shell\n let shellPath = context.environmentMap.get('COMSPEC');\n if (!shellPath || !Executable._canExecute(shellPath, context)) {\n shellPath = Executable.tryResolve('cmd.exe');\n }\n if (!shellPath) {\n throw new Error(`Unable to execute \"${path.basename(resolvedPath)}\" ` +\n `because CMD.exe was not found in the PATH`);\n }\n const shellArgs = [];\n // /D: Disable execution of AutoRun commands when starting the new shell context\n shellArgs.push('/d');\n // /S: Disable Cmd.exe's parsing of double-quote characters inside the command-line\n shellArgs.push('/s');\n // /C: Execute the following command and then exit immediately\n shellArgs.push('/c');\n // If the path contains special charactrers (e.g. spaces), escape them so that\n // they don't get interpreted by the shell\n shellArgs.push(Executable._getEscapedForWindowsShell(resolvedPath));\n shellArgs.push(...args);\n return { path: shellPath, args: shellArgs };\n }\n default:\n throw new Error(`Cannot execute \"${path.basename(resolvedPath)}\" because the file type is not supported`);\n }\n }\n return {\n path: resolvedPath,\n args: args\n };\n }\n /**\n * Given a filename, this determines the absolute path of the executable file that would\n * be executed by a shell:\n *\n * - If the filename is missing a path, then the shell's default PATH will be searched.\n * - If the filename is missing a file extension, then Windows default file extensions\n * will be searched.\n *\n * @remarks\n *\n * @param filename - The name of the executable file. This string must not contain any\n * command-line arguments. If the name contains any path delimiters, then the shell's\n * default PATH will not be searched.\n * @param options - optional other parameters\n * @returns the absolute path of the executable, or undefined if it was not found\n */\n static tryResolve(filename, options) {\n return Executable._tryResolve(filename, options || {}, Executable._getExecutableContext(options));\n }\n static _tryResolve(filename, options, context) {\n // NOTE: Since \"filename\" cannot contain command-line arguments, the \"/\" here\n // must be interpreted as a path delimiter\n const hasPathSeparators = filename.indexOf('/') >= 0 || (OS_PLATFORM === 'win32' && filename.indexOf('\\\\') >= 0);\n // Are there any path separators?\n if (hasPathSeparators) {\n // If so, then don't search the PATH. Just resolve relative to the current working directory\n const resolvedPath = path.resolve(context.currentWorkingDirectory, filename);\n return Executable._tryResolveFileExtension(resolvedPath, context);\n }\n else {\n // Otherwise if it's a bare name, then try everything in the shell PATH\n const pathsToSearch = Executable._getSearchFolders(context);\n for (const pathToSearch of pathsToSearch) {\n const resolvedPath = path.join(pathToSearch, filename);\n const result = Executable._tryResolveFileExtension(resolvedPath, context);\n if (result) {\n return result;\n }\n }\n // No match was found\n return undefined;\n }\n }\n static _tryResolveFileExtension(resolvedPath, context) {\n if (Executable._canExecute(resolvedPath, context)) {\n return resolvedPath;\n }\n // Try the default file extensions\n for (const shellExtension of context.windowsExecutableExtensions) {\n const resolvedNameWithExtension = resolvedPath + shellExtension;\n if (Executable._canExecute(resolvedNameWithExtension, context)) {\n return resolvedNameWithExtension;\n }\n }\n return undefined;\n }\n static _buildEnvironmentMap(options) {\n const environmentMap = new EnvironmentMap_1.EnvironmentMap();\n if (options.environment !== undefined && options.environmentMap !== undefined) {\n throw new Error('IExecutableResolveOptions.environment and IExecutableResolveOptions.environmentMap' +\n ' cannot both be specified');\n }\n if (options.environment !== undefined) {\n environmentMap.mergeFromObject(options.environment);\n }\n else if (options.environmentMap !== undefined) {\n environmentMap.mergeFrom(options.environmentMap);\n }\n else {\n environmentMap.mergeFromObject(process.env);\n }\n return environmentMap;\n }\n /**\n * This is used when searching the shell PATH for an executable, to determine\n * whether a match should be skipped or not. If it returns true, this does not\n * guarantee that the file can be successfully executed.\n */\n static _canExecute(filePath, context) {\n if (!FileSystem_1.FileSystem.exists(filePath)) {\n return false;\n }\n if (OS_PLATFORM === 'win32') {\n // NOTE: For Windows, we don't validate that the file extension appears in PATHEXT.\n // That environment variable determines which extensions can be appended if the\n // extension is missing, but it does not affect whether a file may be executed or not.\n // Windows does have a (seldom used) ACL that can be used to deny execution permissions\n // for a file, but NodeJS doesn't expose that API, so we don't bother checking it.\n // However, Windows *does* require that the file has some kind of file extension\n if (path.extname(filePath) === '') {\n return false;\n }\n }\n else {\n // For Unix, check whether any of the POSIX execute bits are set\n try {\n // eslint-disable-next-line no-bitwise\n if ((FileSystem_1.FileSystem.getPosixModeBits(filePath) & PosixModeBits_1.PosixModeBits.AllExecute) === 0) {\n return false; // not executable\n }\n }\n catch (error) {\n // If we have trouble accessing the file, ignore the error and consider it \"not executable\"\n // since that's what a shell would do\n }\n }\n return true;\n }\n /**\n * Returns the list of folders where we will search for an executable,\n * based on the PATH environment variable.\n */\n static _getSearchFolders(context) {\n const pathList = context.environmentMap.get('PATH') || '';\n const folders = [];\n // Avoid processing duplicates\n const seenPaths = new Set();\n // NOTE: Cmd.exe on Windows always searches the current working directory first.\n // PowerShell and Unix shells do NOT do that, because it's a security concern.\n // We follow their behavior.\n for (const splitPath of pathList.split(path.delimiter)) {\n const trimmedPath = splitPath.trim();\n if (trimmedPath !== '') {\n if (!seenPaths.has(trimmedPath)) {\n // Fun fact: If you put relative paths in your PATH environment variable,\n // all shells will dynamically match them against the current working directory.\n // This is a terrible design, and in practice nobody does that, but it is supported...\n // so we allow it here.\n const resolvedPath = path.resolve(context.currentWorkingDirectory, trimmedPath);\n if (!seenPaths.has(resolvedPath)) {\n if (FileSystem_1.FileSystem.exists(resolvedPath)) {\n folders.push(resolvedPath);\n }\n seenPaths.add(resolvedPath);\n }\n seenPaths.add(trimmedPath);\n }\n }\n }\n return folders;\n }\n static _getExecutableContext(options) {\n if (!options) {\n options = {};\n }\n const environment = Executable._buildEnvironmentMap(options);\n let currentWorkingDirectory;\n if (options.currentWorkingDirectory) {\n currentWorkingDirectory = path.resolve(options.currentWorkingDirectory);\n }\n else {\n currentWorkingDirectory = process.cwd();\n }\n const windowsExecutableExtensions = [];\n if (OS_PLATFORM === 'win32') {\n const pathExtVariable = environment.get('PATHEXT') || '';\n for (const splitValue of pathExtVariable.split(';')) {\n const trimmed = splitValue.trim().toLowerCase();\n // Ignore malformed extensions\n if (/^\\.[a-z0-9\\.]*[a-z0-9]$/i.test(trimmed)) {\n // Don't add the same extension twice\n if (windowsExecutableExtensions.indexOf(trimmed) < 0) {\n windowsExecutableExtensions.push(trimmed);\n }\n }\n }\n }\n return {\n environmentMap: environment,\n currentWorkingDirectory,\n windowsExecutableExtensions\n };\n }\n /**\n * Given an input string containing special symbol characters, this inserts the \"^\" escape\n * character to ensure the symbols are interpreted literally by the Windows shell.\n */\n static _getEscapedForWindowsShell(text) {\n const escapableCharRegExp = /[%\\^&|<> ]/g;\n return text.replace(escapableCharRegExp, (value) => '^' + value);\n }\n /**\n * Checks for characters that are unsafe to pass to a Windows batch file\n * due to the way that cmd.exe implements escaping.\n */\n static _validateArgsForWindowsShell(args) {\n const specialCharRegExp = /[%\\^&|<>\\r\\n]/g;\n for (const arg of args) {\n const match = arg.match(specialCharRegExp);\n if (match) {\n // NOTE: It is possible to escape some of these characters by prefixing them\n // with a caret (^), which allows these characters to be successfully passed\n // through to the batch file %1 variables. But they will be expanded again\n // whenever they are used. For example, NPM's binary wrapper batch files\n // use \"%*\" to pass their arguments to Node.exe, which causes them to be expanded\n // again. Unfortunately the Cmd.exe batch language provides native escaping\n // function (that could be used to insert the carets again).\n //\n // We could work around that by adding double carets, but in general there\n // is no way to predict how many times the variable will get expanded.\n // Thus, there is no generally reliable way to pass these characters.\n throw new Error(`The command line argument ${JSON.stringify(arg)} contains a` +\n ` special character ${JSON.stringify(match[0])} that cannot be escaped for the Windows shell`);\n }\n }\n }\n}\nexports.Executable = Executable;\n//# sourceMappingURL=Executable.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileError = void 0;\nconst Path_1 = require(\"./Path\");\nconst TypeUuid_1 = require(\"./TypeUuid\");\nconst uuidFileError = '37a4c772-2dc8-4c66-89ae-262f8cc1f0c1';\nconst baseFolderEnvVar = 'RUSHSTACK_FILE_ERROR_BASE_FOLDER';\n/**\n * An `Error` subclass that should be thrown to report an unexpected state that specifically references\n * a location in a file.\n *\n * @remarks The file path provided to the FileError constructor is expected to exist on disk. FileError\n * should not be used for reporting errors that are not in reference to an existing file.\n *\n * @public\n */\nclass FileError extends Error {\n /**\n * Constructs a new instance of the {@link FileError} class.\n *\n * @param message - A message describing the error.\n * @param options - Options for the error.\n */\n constructor(message, options) {\n super(message);\n this.absolutePath = options.absolutePath;\n this.projectFolder = options.projectFolder;\n this.line = options.line;\n this.column = options.column;\n // Manually set the prototype, as we can no longer extend built-in classes like Error, Array, Map, etc.\n // https://github.com/microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n //\n // Note: the prototype must also be set on any classes which extend this one\n this.__proto__ = FileError.prototype; // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n /**\n * Get the Unix-formatted the error message.\n *\n * @override\n */\n toString() {\n // Default to formatting in 'Unix' format, for consistency.\n return this.getFormattedErrorMessage();\n }\n /**\n * Get the formatted error message.\n *\n * @param options - Options for the error message format.\n */\n getFormattedErrorMessage(options) {\n return Path_1.Path.formatFileLocation({\n format: (options === null || options === void 0 ? void 0 : options.format) || 'Unix',\n baseFolder: this._evaluateBaseFolder(),\n pathToFormat: this.absolutePath,\n message: this.message,\n line: this.line,\n column: this.column\n });\n }\n _evaluateBaseFolder() {\n // Cache the sanitized environment variable. This means that we don't support changing\n // the environment variable mid-execution. This is a reasonable tradeoff for the benefit\n // of being able to cache absolute paths, since that is only able to be determined after\n // running the regex, which is expensive. Since this would be a common execution path for\n // tools like Rush, we should optimize for that.\n if (!FileError._sanitizedEnvironmentVariable && process.env[baseFolderEnvVar]) {\n // Strip leading and trailing quotes, if present.\n FileError._sanitizedEnvironmentVariable = process.env[baseFolderEnvVar].replace(/^(\"|')|(\"|')$/g, '');\n }\n if (FileError._environmentVariableIsAbsolutePath) {\n return FileError._sanitizedEnvironmentVariable;\n }\n // undefined environment variable has a mapping to the project folder\n const baseFolderFn = FileError._environmentVariableBasePathFnMap.get(FileError._sanitizedEnvironmentVariable);\n if (baseFolderFn) {\n return baseFolderFn(this);\n }\n const baseFolderTokenRegex = /{([^}]+)}/g;\n const result = baseFolderTokenRegex.exec(FileError._sanitizedEnvironmentVariable);\n if (!result) {\n // No tokens, assume absolute path\n FileError._environmentVariableIsAbsolutePath = true;\n return FileError._sanitizedEnvironmentVariable;\n }\n else if (result.index !== 0) {\n // Currently only support the token being first in the string.\n throw new Error(`The ${baseFolderEnvVar} environment variable contains text before the token \"${result[0]}\".`);\n }\n else if (result[0].length !== FileError._sanitizedEnvironmentVariable.length) {\n // Currently only support the token being the entire string.\n throw new Error(`The ${baseFolderEnvVar} environment variable contains text after the token \"${result[0]}\".`);\n }\n else {\n throw new Error(`The ${baseFolderEnvVar} environment variable contains a token \"${result[0]}\", which is not ` +\n 'supported.');\n }\n }\n static [Symbol.hasInstance](instance) {\n return TypeUuid_1.TypeUuid.isInstanceOf(instance, uuidFileError);\n }\n}\nexports.FileError = FileError;\n/** @internal */\nFileError._environmentVariableIsAbsolutePath = false;\nFileError._environmentVariableBasePathFnMap = new Map([\n [undefined, (fileError) => fileError.projectFolder],\n ['{PROJECT_FOLDER}', (fileError) => fileError.projectFolder],\n ['{ABSOLUTE_PATH}', (fileError) => undefined]\n]);\nTypeUuid_1.TypeUuid.registerClass(FileError, uuidFileError);\n//# sourceMappingURL=FileError.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileSystem = exports.AlreadyExistsBehavior = void 0;\nconst nodeJsPath = __importStar(require(\"path\"));\nconst fs = __importStar(require(\"fs\"));\nconst fsx = __importStar(require(\"fs-extra\"));\nconst Text_1 = require(\"./Text\");\nconst PosixModeBits_1 = require(\"./PosixModeBits\");\nconst LegacyAdapters_1 = require(\"./LegacyAdapters\");\n/**\n * Specifies the behavior of APIs such as {@link FileSystem.copyFile} or\n * {@link FileSystem.createSymbolicLinkFile} when the output file path already exists.\n *\n * @remarks\n * For {@link FileSystem.copyFile} and related APIs, the \"output file path\" is\n * {@link IFileSystemCopyFileOptions.destinationPath}.\n *\n * For {@link FileSystem.createSymbolicLinkFile} and related APIs, the \"output file path\" is\n * {@link IFileSystemCreateLinkOptions.newLinkPath}.\n *\n * @public\n */\nvar AlreadyExistsBehavior;\n(function (AlreadyExistsBehavior) {\n /**\n * If the output file path already exists, try to overwrite the existing object.\n *\n * @remarks\n * If overwriting the object would require recursively deleting a folder tree,\n * then the operation will fail. As an example, suppose {@link FileSystem.copyFile}\n * is copying a single file `/a/b/c` to the destination path `/d/e`, and `/d/e` is a\n * nonempty folder. In this situation, an error will be reported; specifying\n * `AlreadyExistsBehavior.Overwrite` does not help. Empty folders can be overwritten\n * depending on the details of the implementation.\n */\n AlreadyExistsBehavior[\"Overwrite\"] = \"overwrite\";\n /**\n * If the output file path already exists, the operation will fail, and an error\n * will be reported.\n */\n AlreadyExistsBehavior[\"Error\"] = \"error\";\n /**\n * If the output file path already exists, skip this item, and continue the operation.\n */\n AlreadyExistsBehavior[\"Ignore\"] = \"ignore\";\n})(AlreadyExistsBehavior || (exports.AlreadyExistsBehavior = AlreadyExistsBehavior = {}));\nconst MOVE_DEFAULT_OPTIONS = {\n overwrite: true,\n ensureFolderExists: false\n};\nconst READ_FOLDER_DEFAULT_OPTIONS = {\n absolutePaths: false\n};\nconst WRITE_FILE_DEFAULT_OPTIONS = {\n ensureFolderExists: false,\n convertLineEndings: undefined,\n encoding: Text_1.Encoding.Utf8\n};\nconst APPEND_TO_FILE_DEFAULT_OPTIONS = Object.assign({}, WRITE_FILE_DEFAULT_OPTIONS);\nconst READ_FILE_DEFAULT_OPTIONS = {\n encoding: Text_1.Encoding.Utf8,\n convertLineEndings: undefined\n};\nconst COPY_FILE_DEFAULT_OPTIONS = {\n alreadyExistsBehavior: AlreadyExistsBehavior.Overwrite\n};\nconst COPY_FILES_DEFAULT_OPTIONS = {\n alreadyExistsBehavior: AlreadyExistsBehavior.Overwrite\n};\nconst DELETE_FILE_DEFAULT_OPTIONS = {\n throwIfNotExists: false\n};\n/**\n * The FileSystem API provides a complete set of recommended operations for interacting with the file system.\n *\n * @remarks\n * We recommend to use this instead of the native `fs` API, because `fs` is a minimal set of low-level\n * primitives that must be mapped for each supported operating system. The FileSystem API takes a\n * philosophical approach of providing \"one obvious way\" to do each operation. We also prefer synchronous\n * operations except in cases where there would be a clear performance benefit for using async, since synchronous\n * code is much easier to read and debug. Also, indiscriminate parallelism has been seen to actually worsen\n * performance, versus improving it.\n *\n * Note that in the documentation, we refer to \"filesystem objects\", this can be a\n * file, folder, symbolic link, hard link, directory junction, etc.\n *\n * @public\n */\nclass FileSystem {\n // ===============\n // COMMON OPERATIONS\n // ===============\n /**\n * Returns true if the path exists on disk.\n * Behind the scenes it uses `fs.existsSync()`.\n * @remarks\n * There is a debate about the fact that after `fs.existsSync()` returns true,\n * the file might be deleted before fs.readSync() is called, which would imply that everybody\n * should catch a `readSync()` exception, and nobody should ever use `fs.existsSync()`.\n * We find this to be unpersuasive, since \"unexceptional exceptions\" really hinder the\n * break-on-exception debugging experience. Also, throwing/catching is generally slow.\n * @param path - The absolute or relative path to the filesystem object.\n */\n static exists(path) {\n return FileSystem._wrapException(() => {\n return fsx.existsSync(path);\n });\n }\n /**\n * An async version of {@link FileSystem.exists}.\n */\n static async existsAsync(path) {\n return await FileSystem._wrapExceptionAsync(() => {\n return new Promise((resolve) => {\n fsx.exists(path, resolve);\n });\n });\n }\n /**\n * Gets the statistics for a particular filesystem object.\n * If the path is a link, this function follows the link and returns statistics about the link target.\n * Behind the scenes it uses `fs.statSync()`.\n * @param path - The absolute or relative path to the filesystem object.\n */\n static getStatistics(path) {\n return FileSystem._wrapException(() => {\n return fsx.statSync(path);\n });\n }\n /**\n * An async version of {@link FileSystem.getStatistics}.\n */\n static async getStatisticsAsync(path) {\n return await FileSystem._wrapExceptionAsync(() => {\n return fsx.stat(path);\n });\n }\n /**\n * Updates the accessed and modified timestamps of the filesystem object referenced by path.\n * Behind the scenes it uses `fs.utimesSync()`.\n * The caller should specify both times in the `times` parameter.\n * @param path - The path of the file that should be modified.\n * @param times - The times that the object should be updated to reflect.\n */\n static updateTimes(path, times) {\n return FileSystem._wrapException(() => {\n fsx.utimesSync(path, times.accessedTime, times.modifiedTime);\n });\n }\n /**\n * An async version of {@link FileSystem.updateTimes}.\n */\n static async updateTimesAsync(path, times) {\n await FileSystem._wrapExceptionAsync(() => {\n // This cast is needed because the fs-extra typings require both parameters\n // to have the same type (number or Date), whereas Node.js does not require that.\n return fsx.utimes(path, times.accessedTime, times.modifiedTime);\n });\n }\n /**\n * Changes the permissions (i.e. file mode bits) for a filesystem object.\n * Behind the scenes it uses `fs.chmodSync()`.\n * @param path - The absolute or relative path to the object that should be updated.\n * @param modeBits - POSIX-style file mode bits specified using the {@link PosixModeBits} enum\n */\n static changePosixModeBits(path, modeBits) {\n FileSystem._wrapException(() => {\n fs.chmodSync(path, modeBits);\n });\n }\n /**\n * An async version of {@link FileSystem.changePosixModeBits}.\n */\n static async changePosixModeBitsAsync(path, mode) {\n await FileSystem._wrapExceptionAsync(() => {\n return fsx.chmod(path, mode);\n });\n }\n /**\n * Retrieves the permissions (i.e. file mode bits) for a filesystem object.\n * Behind the scenes it uses `fs.chmodSync()`.\n * @param path - The absolute or relative path to the object that should be updated.\n *\n * @remarks\n * This calls {@link FileSystem.getStatistics} to get the POSIX mode bits.\n * If statistics in addition to the mode bits are needed, it is more efficient\n * to call {@link FileSystem.getStatistics} directly instead.\n */\n static getPosixModeBits(path) {\n return FileSystem._wrapException(() => {\n return FileSystem.getStatistics(path).mode;\n });\n }\n /**\n * An async version of {@link FileSystem.getPosixModeBits}.\n */\n static async getPosixModeBitsAsync(path) {\n return await FileSystem._wrapExceptionAsync(async () => {\n return (await FileSystem.getStatisticsAsync(path)).mode;\n });\n }\n /**\n * Returns a 10-character string representation of a PosixModeBits value similar to what\n * would be displayed by a command such as \"ls -l\" on a POSIX-like operating system.\n * @remarks\n * For example, `PosixModeBits.AllRead | PosixModeBits.AllWrite` would be formatted as \"-rw-rw-rw-\".\n * @param modeBits - POSIX-style file mode bits specified using the {@link PosixModeBits} enum\n */\n static formatPosixModeBits(modeBits) {\n let result = '-'; // (later we may add support for additional states such as S_IFDIR or S_ISUID)\n result += modeBits & PosixModeBits_1.PosixModeBits.UserRead ? 'r' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.UserWrite ? 'w' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.UserExecute ? 'x' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.GroupRead ? 'r' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.GroupWrite ? 'w' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.GroupExecute ? 'x' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.OthersRead ? 'r' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.OthersWrite ? 'w' : '-';\n result += modeBits & PosixModeBits_1.PosixModeBits.OthersExecute ? 'x' : '-';\n return result;\n }\n /**\n * Moves a file. The folder must exist, unless the `ensureFolderExists` option is provided.\n * Behind the scenes it uses `fs-extra.moveSync()`\n */\n static move(options) {\n FileSystem._wrapException(() => {\n options = Object.assign(Object.assign({}, MOVE_DEFAULT_OPTIONS), options);\n try {\n fsx.moveSync(options.sourcePath, options.destinationPath, { overwrite: options.overwrite });\n }\n catch (error) {\n if (options.ensureFolderExists) {\n if (!FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(options.destinationPath);\n FileSystem.ensureFolder(folderPath);\n fsx.moveSync(options.sourcePath, options.destinationPath, { overwrite: options.overwrite });\n }\n else {\n throw error;\n }\n }\n });\n }\n /**\n * An async version of {@link FileSystem.move}.\n */\n static async moveAsync(options) {\n await FileSystem._wrapExceptionAsync(async () => {\n options = Object.assign(Object.assign({}, MOVE_DEFAULT_OPTIONS), options);\n try {\n await fsx.move(options.sourcePath, options.destinationPath, { overwrite: options.overwrite });\n }\n catch (error) {\n if (options.ensureFolderExists) {\n if (!FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(options.destinationPath);\n await FileSystem.ensureFolderAsync(nodeJsPath.dirname(folderPath));\n await fsx.move(options.sourcePath, options.destinationPath, { overwrite: options.overwrite });\n }\n else {\n throw error;\n }\n }\n });\n }\n // ===============\n // FOLDER OPERATIONS\n // ===============\n /**\n * Recursively creates a folder at a given path.\n * Behind the scenes is uses `fs-extra.ensureDirSync()`.\n * @remarks\n * Throws an exception if anything in the folderPath is not a folder.\n * @param folderPath - The absolute or relative path of the folder which should be created.\n */\n static ensureFolder(folderPath) {\n FileSystem._wrapException(() => {\n fsx.ensureDirSync(folderPath);\n });\n }\n /**\n * An async version of {@link FileSystem.ensureFolder}.\n */\n static async ensureFolderAsync(folderPath) {\n await FileSystem._wrapExceptionAsync(() => {\n return fsx.ensureDir(folderPath);\n });\n }\n /**\n * Reads the names of folder entries, not including \".\" or \"..\".\n * Behind the scenes it uses `fs.readdirSync()`.\n * @param folderPath - The absolute or relative path to the folder which should be read.\n * @param options - Optional settings that can change the behavior. Type: `IReadFolderOptions`\n */\n static readFolderItemNames(folderPath, options) {\n return FileSystem._wrapException(() => {\n options = Object.assign(Object.assign({}, READ_FOLDER_DEFAULT_OPTIONS), options);\n const fileNames = fsx.readdirSync(folderPath);\n if (options.absolutePaths) {\n return fileNames.map((fileName) => nodeJsPath.resolve(folderPath, fileName));\n }\n else {\n return fileNames;\n }\n });\n }\n /**\n * An async version of {@link FileSystem.readFolderItemNames}.\n */\n static async readFolderItemNamesAsync(folderPath, options) {\n return await FileSystem._wrapExceptionAsync(async () => {\n options = Object.assign(Object.assign({}, READ_FOLDER_DEFAULT_OPTIONS), options);\n const fileNames = await fsx.readdir(folderPath);\n if (options.absolutePaths) {\n return fileNames.map((fileName) => nodeJsPath.resolve(folderPath, fileName));\n }\n else {\n return fileNames;\n }\n });\n }\n /**\n * Reads the contents of the folder, not including \".\" or \"..\", returning objects including the\n * entry names and types.\n * Behind the scenes it uses `fs.readdirSync()`.\n * @param folderPath - The absolute or relative path to the folder which should be read.\n * @param options - Optional settings that can change the behavior. Type: `IReadFolderOptions`\n */\n static readFolderItems(folderPath, options) {\n return FileSystem._wrapException(() => {\n options = Object.assign(Object.assign({}, READ_FOLDER_DEFAULT_OPTIONS), options);\n const folderEntries = fsx.readdirSync(folderPath, { withFileTypes: true });\n if (options.absolutePaths) {\n return folderEntries.map((folderEntry) => {\n folderEntry.name = nodeJsPath.resolve(folderPath, folderEntry.name);\n return folderEntry;\n });\n }\n else {\n return folderEntries;\n }\n });\n }\n /**\n * An async version of {@link FileSystem.readFolderItems}.\n */\n static async readFolderItemsAsync(folderPath, options) {\n return await FileSystem._wrapExceptionAsync(async () => {\n options = Object.assign(Object.assign({}, READ_FOLDER_DEFAULT_OPTIONS), options);\n const folderEntries = await LegacyAdapters_1.LegacyAdapters.convertCallbackToPromise(fs.readdir, folderPath, { withFileTypes: true });\n if (options.absolutePaths) {\n return folderEntries.map((folderEntry) => {\n folderEntry.name = nodeJsPath.resolve(folderPath, folderEntry.name);\n return folderEntry;\n });\n }\n else {\n return folderEntries;\n }\n });\n }\n /**\n * Deletes a folder, including all of its contents.\n * Behind the scenes is uses `fs-extra.removeSync()`.\n * @remarks\n * Does not throw if the folderPath does not exist.\n * @param folderPath - The absolute or relative path to the folder which should be deleted.\n */\n static deleteFolder(folderPath) {\n FileSystem._wrapException(() => {\n fsx.removeSync(folderPath);\n });\n }\n /**\n * An async version of {@link FileSystem.deleteFolder}.\n */\n static async deleteFolderAsync(folderPath) {\n await FileSystem._wrapExceptionAsync(() => {\n return fsx.remove(folderPath);\n });\n }\n /**\n * Deletes the content of a folder, but not the folder itself. Also ensures the folder exists.\n * Behind the scenes it uses `fs-extra.emptyDirSync()`.\n * @remarks\n * This is a workaround for a common race condition, where the virus scanner holds a lock on the folder\n * for a brief period after it was deleted, causing EBUSY errors for any code that tries to recreate the folder.\n * @param folderPath - The absolute or relative path to the folder which should have its contents deleted.\n */\n static ensureEmptyFolder(folderPath) {\n FileSystem._wrapException(() => {\n fsx.emptyDirSync(folderPath);\n });\n }\n /**\n * An async version of {@link FileSystem.ensureEmptyFolder}.\n */\n static async ensureEmptyFolderAsync(folderPath) {\n await FileSystem._wrapExceptionAsync(() => {\n return fsx.emptyDir(folderPath);\n });\n }\n // ===============\n // FILE OPERATIONS\n // ===============\n /**\n * Writes a text string to a file on disk, overwriting the file if it already exists.\n * Behind the scenes it uses `fs.writeFileSync()`.\n * @remarks\n * Throws an error if the folder doesn't exist, unless ensureFolder=true.\n * @param filePath - The absolute or relative path of the file.\n * @param contents - The text that should be written to the file.\n * @param options - Optional settings that can change the behavior. Type: `IWriteFileOptions`\n */\n static writeFile(filePath, contents, options) {\n FileSystem._wrapException(() => {\n options = Object.assign(Object.assign({}, WRITE_FILE_DEFAULT_OPTIONS), options);\n if (options.convertLineEndings) {\n contents = Text_1.Text.convertTo(contents.toString(), options.convertLineEndings);\n }\n try {\n fsx.writeFileSync(filePath, contents, { encoding: options.encoding });\n }\n catch (error) {\n if (options.ensureFolderExists) {\n if (!FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(filePath);\n FileSystem.ensureFolder(folderPath);\n fsx.writeFileSync(filePath, contents, { encoding: options.encoding });\n }\n else {\n throw error;\n }\n }\n });\n }\n /**\n * Writes the contents of multiple Uint8Arrays to a file on disk, overwriting the file if it already exists.\n * Behind the scenes it uses `fs.writevSync()`.\n *\n * This API is useful for writing large files efficiently, especially if the input is being concatenated from\n * multiple sources.\n *\n * @remarks\n * Throws an error if the folder doesn't exist, unless ensureFolder=true.\n * @param filePath - The absolute or relative path of the file.\n * @param contents - The content that should be written to the file.\n * @param options - Optional settings that can change the behavior.\n */\n static writeBuffersToFile(filePath, contents, options) {\n FileSystem._wrapException(() => {\n // Need a mutable copy of the iterable to handle incomplete writes,\n // since writev() doesn't take an argument for where to start writing.\n const toCopy = [...contents];\n let fd;\n try {\n fd = fsx.openSync(filePath, 'w');\n }\n catch (error) {\n if (!(options === null || options === void 0 ? void 0 : options.ensureFolderExists) || !FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(filePath);\n FileSystem.ensureFolder(folderPath);\n fd = fsx.openSync(filePath, 'w');\n }\n try {\n // In practice this loop will have exactly 1 iteration, but the spec allows\n // for a writev call to write fewer bytes than requested\n while (toCopy.length) {\n let bytesWritten = fsx.writevSync(fd, toCopy);\n let buffersWritten = 0;\n while (buffersWritten < toCopy.length) {\n const bytesInCurrentBuffer = toCopy[buffersWritten].byteLength;\n if (bytesWritten < bytesInCurrentBuffer) {\n // This buffer was partially written.\n toCopy[buffersWritten] = toCopy[buffersWritten].subarray(bytesWritten);\n break;\n }\n bytesWritten -= bytesInCurrentBuffer;\n buffersWritten++;\n }\n if (buffersWritten > 0) {\n // Avoid cost of shifting the array more than needed.\n toCopy.splice(0, buffersWritten);\n }\n }\n }\n finally {\n fsx.closeSync(fd);\n }\n });\n }\n /**\n * An async version of {@link FileSystem.writeFile}.\n */\n static async writeFileAsync(filePath, contents, options) {\n await FileSystem._wrapExceptionAsync(async () => {\n options = Object.assign(Object.assign({}, WRITE_FILE_DEFAULT_OPTIONS), options);\n if (options.convertLineEndings) {\n contents = Text_1.Text.convertTo(contents.toString(), options.convertLineEndings);\n }\n try {\n await fsx.writeFile(filePath, contents, { encoding: options.encoding });\n }\n catch (error) {\n if (options.ensureFolderExists) {\n if (!FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(filePath);\n await FileSystem.ensureFolderAsync(folderPath);\n await fsx.writeFile(filePath, contents, { encoding: options.encoding });\n }\n else {\n throw error;\n }\n }\n });\n }\n /**\n * An async version of {@link FileSystem.writeBuffersToFile}.\n */\n static async writeBuffersToFileAsync(filePath, contents, options) {\n await FileSystem._wrapExceptionAsync(async () => {\n // Need a mutable copy of the iterable to handle incomplete writes,\n // since writev() doesn't take an argument for where to start writing.\n const toCopy = [...contents];\n let handle;\n try {\n handle = await fs.promises.open(filePath, 'w');\n }\n catch (error) {\n if (!(options === null || options === void 0 ? void 0 : options.ensureFolderExists) || !FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(filePath);\n await FileSystem.ensureFolderAsync(folderPath);\n handle = await fs.promises.open(filePath, 'w');\n }\n try {\n // In practice this loop will have exactly 1 iteration, but the spec allows\n // for a writev call to write fewer bytes than requested\n while (toCopy.length) {\n let bytesWritten = (await handle.writev(toCopy)).bytesWritten;\n let buffersWritten = 0;\n while (buffersWritten < toCopy.length) {\n const bytesInCurrentBuffer = toCopy[buffersWritten].byteLength;\n if (bytesWritten < bytesInCurrentBuffer) {\n // This buffer was partially written.\n toCopy[buffersWritten] = toCopy[buffersWritten].subarray(bytesWritten);\n break;\n }\n bytesWritten -= bytesInCurrentBuffer;\n buffersWritten++;\n }\n if (buffersWritten > 0) {\n // Avoid cost of shifting the array more than needed.\n toCopy.splice(0, buffersWritten);\n }\n }\n }\n finally {\n await handle.close();\n }\n });\n }\n /**\n * Writes a text string to a file on disk, appending to the file if it already exists.\n * Behind the scenes it uses `fs.appendFileSync()`.\n * @remarks\n * Throws an error if the folder doesn't exist, unless ensureFolder=true.\n * @param filePath - The absolute or relative path of the file.\n * @param contents - The text that should be written to the file.\n * @param options - Optional settings that can change the behavior. Type: `IWriteFileOptions`\n */\n static appendToFile(filePath, contents, options) {\n FileSystem._wrapException(() => {\n options = Object.assign(Object.assign({}, APPEND_TO_FILE_DEFAULT_OPTIONS), options);\n if (options.convertLineEndings) {\n contents = Text_1.Text.convertTo(contents.toString(), options.convertLineEndings);\n }\n try {\n fsx.appendFileSync(filePath, contents, { encoding: options.encoding });\n }\n catch (error) {\n if (options.ensureFolderExists) {\n if (!FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(filePath);\n FileSystem.ensureFolder(folderPath);\n fsx.appendFileSync(filePath, contents, { encoding: options.encoding });\n }\n else {\n throw error;\n }\n }\n });\n }\n /**\n * An async version of {@link FileSystem.appendToFile}.\n */\n static async appendToFileAsync(filePath, contents, options) {\n await FileSystem._wrapExceptionAsync(async () => {\n options = Object.assign(Object.assign({}, APPEND_TO_FILE_DEFAULT_OPTIONS), options);\n if (options.convertLineEndings) {\n contents = Text_1.Text.convertTo(contents.toString(), options.convertLineEndings);\n }\n try {\n await fsx.appendFile(filePath, contents, { encoding: options.encoding });\n }\n catch (error) {\n if (options.ensureFolderExists) {\n if (!FileSystem.isNotExistError(error)) {\n throw error;\n }\n const folderPath = nodeJsPath.dirname(filePath);\n await FileSystem.ensureFolderAsync(folderPath);\n await fsx.appendFile(filePath, contents, { encoding: options.encoding });\n }\n else {\n throw error;\n }\n }\n });\n }\n /**\n * Reads the contents of a file into a string.\n * Behind the scenes it uses `fs.readFileSync()`.\n * @param filePath - The relative or absolute path to the file whose contents should be read.\n * @param options - Optional settings that can change the behavior. Type: `IReadFileOptions`\n */\n static readFile(filePath, options) {\n return FileSystem._wrapException(() => {\n options = Object.assign(Object.assign({}, READ_FILE_DEFAULT_OPTIONS), options);\n let contents = FileSystem.readFileToBuffer(filePath).toString(options.encoding);\n if (options.convertLineEndings) {\n contents = Text_1.Text.convertTo(contents, options.convertLineEndings);\n }\n return contents;\n });\n }\n /**\n * An async version of {@link FileSystem.readFile}.\n */\n static async readFileAsync(filePath, options) {\n return await FileSystem._wrapExceptionAsync(async () => {\n options = Object.assign(Object.assign({}, READ_FILE_DEFAULT_OPTIONS), options);\n let contents = (await FileSystem.readFileToBufferAsync(filePath)).toString(options.encoding);\n if (options.convertLineEndings) {\n contents = Text_1.Text.convertTo(contents, options.convertLineEndings);\n }\n return contents;\n });\n }\n /**\n * Reads the contents of a file into a buffer.\n * Behind the scenes is uses `fs.readFileSync()`.\n * @param filePath - The relative or absolute path to the file whose contents should be read.\n */\n static readFileToBuffer(filePath) {\n return FileSystem._wrapException(() => {\n return fsx.readFileSync(filePath);\n });\n }\n /**\n * An async version of {@link FileSystem.readFileToBuffer}.\n */\n static async readFileToBufferAsync(filePath) {\n return await FileSystem._wrapExceptionAsync(() => {\n return fsx.readFile(filePath);\n });\n }\n /**\n * Copies a single file from one location to another.\n * By default, destinationPath is overwritten if it already exists.\n *\n * @remarks\n * The `copyFile()` API cannot be used to copy folders. It copies at most one file.\n * Use {@link FileSystem.copyFiles} if you need to recursively copy a tree of folders.\n *\n * The implementation is based on `copySync()` from the `fs-extra` package.\n */\n static copyFile(options) {\n options = Object.assign(Object.assign({}, COPY_FILE_DEFAULT_OPTIONS), options);\n if (FileSystem.getStatistics(options.sourcePath).isDirectory()) {\n throw new Error('The specified path refers to a folder; this operation expects a file object:\\n' + options.sourcePath);\n }\n FileSystem._wrapException(() => {\n fsx.copySync(options.sourcePath, options.destinationPath, {\n errorOnExist: options.alreadyExistsBehavior === AlreadyExistsBehavior.Error,\n overwrite: options.alreadyExistsBehavior === AlreadyExistsBehavior.Overwrite\n });\n });\n }\n /**\n * An async version of {@link FileSystem.copyFile}.\n */\n static async copyFileAsync(options) {\n options = Object.assign(Object.assign({}, COPY_FILE_DEFAULT_OPTIONS), options);\n if ((await FileSystem.getStatisticsAsync(options.sourcePath)).isDirectory()) {\n throw new Error('The specified path refers to a folder; this operation expects a file object:\\n' + options.sourcePath);\n }\n await FileSystem._wrapExceptionAsync(() => {\n return fsx.copy(options.sourcePath, options.destinationPath, {\n errorOnExist: options.alreadyExistsBehavior === AlreadyExistsBehavior.Error,\n overwrite: options.alreadyExistsBehavior === AlreadyExistsBehavior.Overwrite\n });\n });\n }\n /**\n * Copies a file or folder from one location to another, recursively copying any folder contents.\n * By default, destinationPath is overwritten if it already exists.\n *\n * @remarks\n * If you only intend to copy a single file, it is recommended to use {@link FileSystem.copyFile}\n * instead to more clearly communicate the intended operation.\n *\n * The implementation is based on `copySync()` from the `fs-extra` package.\n */\n static copyFiles(options) {\n options = Object.assign(Object.assign({}, COPY_FILES_DEFAULT_OPTIONS), options);\n FileSystem._wrapException(() => {\n fsx.copySync(options.sourcePath, options.destinationPath, {\n dereference: !!options.dereferenceSymlinks,\n errorOnExist: options.alreadyExistsBehavior === AlreadyExistsBehavior.Error,\n overwrite: options.alreadyExistsBehavior === AlreadyExistsBehavior.Overwrite,\n preserveTimestamps: !!options.preserveTimestamps,\n filter: options.filter\n });\n });\n }\n /**\n * An async version of {@link FileSystem.copyFiles}.\n */\n static async copyFilesAsync(options) {\n options = Object.assign(Object.assign({}, COPY_FILES_DEFAULT_OPTIONS), options);\n await FileSystem._wrapExceptionAsync(async () => {\n await fsx.copy(options.sourcePath, options.destinationPath, {\n dereference: !!options.dereferenceSymlinks,\n errorOnExist: options.alreadyExistsBehavior === AlreadyExistsBehavior.Error,\n overwrite: options.alreadyExistsBehavior === AlreadyExistsBehavior.Overwrite,\n preserveTimestamps: !!options.preserveTimestamps,\n filter: options.filter\n });\n });\n }\n /**\n * Deletes a file. Can optionally throw if the file doesn't exist.\n * Behind the scenes it uses `fs.unlinkSync()`.\n * @param filePath - The absolute or relative path to the file that should be deleted.\n * @param options - Optional settings that can change the behavior. Type: `IDeleteFileOptions`\n */\n static deleteFile(filePath, options) {\n FileSystem._wrapException(() => {\n options = Object.assign(Object.assign({}, DELETE_FILE_DEFAULT_OPTIONS), options);\n try {\n fsx.unlinkSync(filePath);\n }\n catch (error) {\n if (options.throwIfNotExists || !FileSystem.isNotExistError(error)) {\n throw error;\n }\n }\n });\n }\n /**\n * An async version of {@link FileSystem.deleteFile}.\n */\n static async deleteFileAsync(filePath, options) {\n await FileSystem._wrapExceptionAsync(async () => {\n options = Object.assign(Object.assign({}, DELETE_FILE_DEFAULT_OPTIONS), options);\n try {\n await fsx.unlink(filePath);\n }\n catch (error) {\n if (options.throwIfNotExists || !FileSystem.isNotExistError(error)) {\n throw error;\n }\n }\n });\n }\n // ===============\n // LINK OPERATIONS\n // ===============\n /**\n * Gets the statistics of a filesystem object. Does NOT follow the link to its target.\n * Behind the scenes it uses `fs.lstatSync()`.\n * @param path - The absolute or relative path to the filesystem object.\n */\n static getLinkStatistics(path) {\n return FileSystem._wrapException(() => {\n return fsx.lstatSync(path);\n });\n }\n /**\n * An async version of {@link FileSystem.getLinkStatistics}.\n */\n static async getLinkStatisticsAsync(path) {\n return await FileSystem._wrapExceptionAsync(() => {\n return fsx.lstat(path);\n });\n }\n /**\n * If `path` refers to a symbolic link, this returns the path of the link target, which may be\n * an absolute or relative path.\n *\n * @remarks\n * If `path` refers to a filesystem object that is not a symbolic link, then an `ErrnoException` is thrown\n * with code 'UNKNOWN'. If `path` does not exist, then an `ErrnoException` is thrown with code `ENOENT`.\n *\n * @param path - The absolute or relative path to the symbolic link.\n * @returns the path of the link target\n */\n static readLink(path) {\n return FileSystem._wrapException(() => {\n return fsx.readlinkSync(path);\n });\n }\n /**\n * An async version of {@link FileSystem.readLink}.\n */\n static async readLinkAsync(path) {\n return await FileSystem._wrapExceptionAsync(() => {\n return fsx.readlink(path);\n });\n }\n /**\n * Creates an NTFS \"directory junction\" on Windows operating systems; for other operating systems, it\n * creates a regular symbolic link. The link target must be a folder, not a file.\n * Behind the scenes it uses `fs.symlinkSync()`.\n *\n * @remarks\n * For security reasons, Windows operating systems by default require administrator elevation to create\n * symbolic links. As a result, on Windows it's generally recommended for Node.js tools to use hard links\n * (for files) or NTFS directory junctions (for folders), since regular users are allowed to create them.\n * Hard links and junctions are less vulnerable to symlink attacks because they cannot reference a network share,\n * and their target must exist at the time of link creation. Non-Windows operating systems generally don't\n * restrict symlink creation, and as such are more vulnerable to symlink attacks. Note that Windows can be\n * configured to permit regular users to create symlinks, for example by enabling Windows 10 \"developer mode.\"\n *\n * A directory junction requires the link source and target to both be located on local disk volumes;\n * if not, use a symbolic link instead.\n */\n static createSymbolicLinkJunction(options) {\n FileSystem._wrapException(() => {\n return FileSystem._handleLink(() => {\n // For directories, we use a Windows \"junction\". On POSIX operating systems, this produces a regular symlink.\n return fsx.symlinkSync(options.linkTargetPath, options.newLinkPath, 'junction');\n }, options);\n });\n }\n /**\n * An async version of {@link FileSystem.createSymbolicLinkJunction}.\n */\n static async createSymbolicLinkJunctionAsync(options) {\n await FileSystem._wrapExceptionAsync(() => {\n return FileSystem._handleLinkAsync(() => {\n // For directories, we use a Windows \"junction\". On POSIX operating systems, this produces a regular symlink.\n return fsx.symlink(options.linkTargetPath, options.newLinkPath, 'junction');\n }, options);\n });\n }\n /**\n * Creates a symbolic link to a file. On Windows operating systems, this may require administrator elevation.\n * Behind the scenes it uses `fs.symlinkSync()`.\n *\n * @remarks\n * To avoid administrator elevation on Windows, use {@link FileSystem.createHardLink} instead.\n *\n * On Windows operating systems, the NTFS file system distinguishes file symlinks versus directory symlinks:\n * If the target is not the correct type, the symlink will be created successfully, but will fail to resolve.\n * Other operating systems do not make this distinction, in which case {@link FileSystem.createSymbolicLinkFile}\n * and {@link FileSystem.createSymbolicLinkFolder} can be used interchangeably, but doing so will make your\n * tool incompatible with Windows.\n */\n static createSymbolicLinkFile(options) {\n FileSystem._wrapException(() => {\n return FileSystem._handleLink(() => {\n return fsx.symlinkSync(options.linkTargetPath, options.newLinkPath, 'file');\n }, options);\n });\n }\n /**\n * An async version of {@link FileSystem.createSymbolicLinkFile}.\n */\n static async createSymbolicLinkFileAsync(options) {\n await FileSystem._wrapExceptionAsync(() => {\n return FileSystem._handleLinkAsync(() => {\n return fsx.symlink(options.linkTargetPath, options.newLinkPath, 'file');\n }, options);\n });\n }\n /**\n * Creates a symbolic link to a folder. On Windows operating systems, this may require administrator elevation.\n * Behind the scenes it uses `fs.symlinkSync()`.\n *\n * @remarks\n * To avoid administrator elevation on Windows, use {@link FileSystem.createSymbolicLinkJunction} instead.\n *\n * On Windows operating systems, the NTFS file system distinguishes file symlinks versus directory symlinks:\n * If the target is not the correct type, the symlink will be created successfully, but will fail to resolve.\n * Other operating systems do not make this distinction, in which case {@link FileSystem.createSymbolicLinkFile}\n * and {@link FileSystem.createSymbolicLinkFolder} can be used interchangeably, but doing so will make your\n * tool incompatible with Windows.\n */\n static createSymbolicLinkFolder(options) {\n FileSystem._wrapException(() => {\n return FileSystem._handleLink(() => {\n return fsx.symlinkSync(options.linkTargetPath, options.newLinkPath, 'dir');\n }, options);\n });\n }\n /**\n * An async version of {@link FileSystem.createSymbolicLinkFolder}.\n */\n static async createSymbolicLinkFolderAsync(options) {\n await FileSystem._wrapExceptionAsync(() => {\n return FileSystem._handleLinkAsync(() => {\n return fsx.symlink(options.linkTargetPath, options.newLinkPath, 'dir');\n }, options);\n });\n }\n /**\n * Creates a hard link. The link target must be a file, not a folder.\n * Behind the scenes it uses `fs.linkSync()`.\n *\n * @remarks\n * For security reasons, Windows operating systems by default require administrator elevation to create\n * symbolic links. As a result, on Windows it's generally recommended for Node.js tools to use hard links\n * (for files) or NTFS directory junctions (for folders), since regular users are allowed to create them.\n * Hard links and junctions are less vulnerable to symlink attacks because they cannot reference a network share,\n * and their target must exist at the time of link creation. Non-Windows operating systems generally don't\n * restrict symlink creation, and as such are more vulnerable to symlink attacks. Note that Windows can be\n * configured to permit regular users to create symlinks, for example by enabling Windows 10 \"developer mode.\"\n *\n * A hard link requires the link source and target to both be located on same disk volume;\n * if not, use a symbolic link instead.\n */\n static createHardLink(options) {\n FileSystem._wrapException(() => {\n return FileSystem._handleLink(() => {\n return fsx.linkSync(options.linkTargetPath, options.newLinkPath);\n }, Object.assign(Object.assign({}, options), { linkTargetMustExist: true }));\n });\n }\n /**\n * An async version of {@link FileSystem.createHardLink}.\n */\n static async createHardLinkAsync(options) {\n await FileSystem._wrapExceptionAsync(() => {\n return FileSystem._handleLinkAsync(() => {\n return fsx.link(options.linkTargetPath, options.newLinkPath);\n }, Object.assign(Object.assign({}, options), { linkTargetMustExist: true }));\n });\n }\n /**\n * Follows a link to its destination and returns the absolute path to the final target of the link.\n * Behind the scenes it uses `fs.realpathSync()`.\n * @param linkPath - The path to the link.\n */\n static getRealPath(linkPath) {\n return FileSystem._wrapException(() => {\n return fsx.realpathSync(linkPath);\n });\n }\n /**\n * An async version of {@link FileSystem.getRealPath}.\n */\n static async getRealPathAsync(linkPath) {\n return await FileSystem._wrapExceptionAsync(() => {\n return fsx.realpath(linkPath);\n });\n }\n // ===============\n // UTILITY FUNCTIONS\n // ===============\n /**\n * Returns true if the error object indicates the file or folder already exists (`EEXIST`).\n */\n static isExistError(error) {\n return FileSystem.isErrnoException(error) && error.code === 'EEXIST';\n }\n /**\n * Returns true if the error object indicates the file or folder does not exist (`ENOENT` or `ENOTDIR`)\n */\n static isNotExistError(error) {\n return FileSystem.isFileDoesNotExistError(error) || FileSystem.isFolderDoesNotExistError(error);\n }\n /**\n * Returns true if the error object indicates the file does not exist (`ENOENT`).\n */\n static isFileDoesNotExistError(error) {\n return FileSystem.isErrnoException(error) && error.code === 'ENOENT';\n }\n /**\n * Returns true if the error object indicates the folder does not exist (`ENOTDIR`).\n */\n static isFolderDoesNotExistError(error) {\n return FileSystem.isErrnoException(error) && error.code === 'ENOTDIR';\n }\n /**\n * Returns true if the error object indicates the target is a directory (`EISDIR`).\n */\n static isDirectoryError(error) {\n return FileSystem.isErrnoException(error) && error.code === 'EISDIR';\n }\n /**\n * Returns true if the error object indicates the target is not a directory (`ENOTDIR`).\n */\n static isNotDirectoryError(error) {\n return FileSystem.isErrnoException(error) && error.code === 'ENOTDIR';\n }\n /**\n * Returns true if the error object indicates that the `unlink` system call failed\n * due to a permissions issue (`EPERM`).\n */\n static isUnlinkNotPermittedError(error) {\n return FileSystem.isErrnoException(error) && error.code === 'EPERM' && error.syscall === 'unlink';\n }\n /**\n * Detects if the provided error object is a `NodeJS.ErrnoException`\n */\n static isErrnoException(error) {\n const typedError = error;\n return (typeof typedError.code === 'string' &&\n typeof typedError.errno === 'number' &&\n typeof typedError.path === 'string' &&\n typeof typedError.syscall === 'string');\n }\n static _handleLink(linkFn, options) {\n try {\n linkFn();\n }\n catch (error) {\n if (FileSystem.isExistError(error)) {\n // Link exists, handle it\n switch (options.alreadyExistsBehavior) {\n case AlreadyExistsBehavior.Ignore:\n break;\n case AlreadyExistsBehavior.Overwrite:\n // fsx.linkSync does not allow overwriting so we must manually delete. If it's\n // a folder, it will throw an error.\n this.deleteFile(options.newLinkPath);\n linkFn();\n break;\n case AlreadyExistsBehavior.Error:\n default:\n throw error;\n }\n }\n else {\n // When attempting to create a link in a directory that does not exist, an ENOENT\n // or ENOTDIR error is thrown, so we should ensure the directory exists before\n // retrying. There are also cases where the target file must exist, so validate in\n // those cases to avoid confusing the missing directory with the missing target file.\n if (FileSystem.isNotExistError(error) &&\n (!options.linkTargetMustExist || FileSystem.exists(options.linkTargetPath))) {\n this.ensureFolder(nodeJsPath.dirname(options.newLinkPath));\n linkFn();\n }\n else {\n throw error;\n }\n }\n }\n }\n static async _handleLinkAsync(linkFn, options) {\n try {\n await linkFn();\n }\n catch (error) {\n if (FileSystem.isExistError(error)) {\n // Link exists, handle it\n switch (options.alreadyExistsBehavior) {\n case AlreadyExistsBehavior.Ignore:\n break;\n case AlreadyExistsBehavior.Overwrite:\n // fsx.linkSync does not allow overwriting so we must manually delete. If it's\n // a folder, it will throw an error.\n await this.deleteFileAsync(options.newLinkPath);\n await linkFn();\n break;\n case AlreadyExistsBehavior.Error:\n default:\n throw error;\n }\n }\n else {\n // When attempting to create a link in a directory that does not exist, an ENOENT\n // or ENOTDIR error is thrown, so we should ensure the directory exists before\n // retrying. There are also cases where the target file must exist, so validate in\n // those cases to avoid confusing the missing directory with the missing target file.\n if (FileSystem.isNotExistError(error) &&\n (!options.linkTargetMustExist || (await FileSystem.existsAsync(options.linkTargetPath)))) {\n await this.ensureFolderAsync(nodeJsPath.dirname(options.newLinkPath));\n await linkFn();\n }\n else {\n throw error;\n }\n }\n }\n }\n static _wrapException(fn) {\n try {\n return fn();\n }\n catch (error) {\n FileSystem._updateErrorMessage(error);\n throw error;\n }\n }\n static async _wrapExceptionAsync(fn) {\n try {\n return await fn();\n }\n catch (error) {\n FileSystem._updateErrorMessage(error);\n throw error;\n }\n }\n static _updateErrorMessage(error) {\n if (FileSystem.isErrnoException(error)) {\n if (FileSystem.isFileDoesNotExistError(error)) {\n // eslint-disable-line @typescript-eslint/no-use-before-define\n error.message = `File does not exist: ${error.path}\\n${error.message}`;\n }\n else if (FileSystem.isFolderDoesNotExistError(error)) {\n // eslint-disable-line @typescript-eslint/no-use-before-define\n error.message = `Folder does not exist: ${error.path}\\n${error.message}`;\n }\n else if (FileSystem.isExistError(error)) {\n // Oddly, the typing does not include the `dest` property even though the documentation\n // indicates it is there: https://nodejs.org/docs/latest-v10.x/api/errors.html#errors_error_dest\n const extendedError = error;\n // eslint-disable-line @typescript-eslint/no-use-before-define\n error.message = `File or folder already exists: ${extendedError.dest}\\n${error.message}`;\n }\n else if (FileSystem.isUnlinkNotPermittedError(error)) {\n // eslint-disable-line @typescript-eslint/no-use-before-define\n error.message = `File or folder could not be deleted: ${error.path}\\n${error.message}`;\n }\n else if (FileSystem.isDirectoryError(error)) {\n // eslint-disable-line @typescript-eslint/no-use-before-define\n error.message = `Target is a folder, not a file: ${error.path}\\n${error.message}`;\n }\n else if (FileSystem.isNotDirectoryError(error)) {\n // eslint-disable-line @typescript-eslint/no-use-before-define\n error.message = `Target is not a folder: ${error.path}\\n${error.message}`;\n }\n }\n }\n}\nexports.FileSystem = FileSystem;\n//# sourceMappingURL=FileSystem.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileWriter = void 0;\nconst Import_1 = require(\"./Import\");\nconst fsx = Import_1.Import.lazy('fs-extra', require);\n/**\n * API for interacting with file handles.\n * @public\n */\nclass FileWriter {\n constructor(fileDescriptor, filePath) {\n this._fileDescriptor = fileDescriptor;\n this.filePath = filePath;\n }\n /**\n * Opens a new file handle to the file at the specified path and given mode.\n * Behind the scenes it uses `fs.openSync()`.\n * The behaviour of this function is platform specific.\n * See: https://nodejs.org/docs/latest-v8.x/api/fs.html#fs_fs_open_path_flags_mode_callback\n * @param filePath - The absolute or relative path to the file handle that should be opened.\n * @param flags - The flags for opening the handle\n */\n static open(filePath, flags) {\n return new FileWriter(fsx.openSync(filePath, FileWriter._convertFlagsForNode(flags)), filePath);\n }\n /**\n * Helper function to convert the file writer array to a Node.js style string (e.g. \"wx\" or \"a\").\n * @param flags - The flags that should be converted.\n */\n static _convertFlagsForNode(flags) {\n flags = Object.assign({ append: false, exclusive: false }, flags);\n return [flags.append ? 'a' : 'w', flags.exclusive ? 'x' : ''].join('');\n }\n /**\n * Writes some text to the given file handle. Throws if the file handle has been closed.\n * Behind the scenes it uses `fs.writeSync()`.\n * @param text - The text to write to the file.\n */\n write(text) {\n if (!this._fileDescriptor) {\n throw new Error(`Cannot write to file, file descriptor has already been released.`);\n }\n fsx.writeSync(this._fileDescriptor, text);\n }\n /**\n * Closes the file handle permanently. No operations can be made on this file handle after calling this.\n * Behind the scenes it uses `fs.closeSync()` and releases the file descriptor to be re-used.\n *\n * @remarks\n * The `close()` method can be called more than once; additional calls are ignored.\n */\n close() {\n const fd = this._fileDescriptor;\n if (fd) {\n this._fileDescriptor = undefined;\n fsx.closeSync(fd);\n }\n }\n /**\n * Gets the statistics for the given file handle. Throws if the file handle has been closed.\n * Behind the scenes it uses `fs.statSync()`.\n */\n getStatistics() {\n if (!this._fileDescriptor) {\n throw new Error(`Cannot get file statistics, file descriptor has already been released.`);\n }\n return fsx.fstatSync(this._fileDescriptor);\n }\n}\nexports.FileWriter = FileWriter;\n//# sourceMappingURL=FileWriter.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Import = void 0;\nconst path = __importStar(require(\"path\"));\nconst importLazy = require(\"import-lazy\");\nconst Resolve = __importStar(require(\"resolve\"));\nconst nodeModule = require(\"module\");\nconst PackageJsonLookup_1 = require(\"./PackageJsonLookup\");\nconst FileSystem_1 = require(\"./FileSystem\");\nconst PackageName_1 = require(\"./PackageName\");\n/**\n * Helpers for resolving and importing Node.js modules.\n * @public\n */\nclass Import {\n static get _builtInModules() {\n if (!Import.__builtInModules) {\n Import.__builtInModules = new Set(nodeModule.builtinModules);\n }\n return Import.__builtInModules;\n }\n /**\n * Provides a way to improve process startup times by lazy-loading imported modules.\n *\n * @remarks\n * This is a more structured wrapper for the {@link https://www.npmjs.com/package/import-lazy|import-lazy}\n * package. It enables you to replace an import like this:\n *\n * ```ts\n * import * as example from 'example'; // <-- 100ms load time\n *\n * if (condition) {\n * example.doSomething();\n * }\n * ```\n *\n * ...with a pattern like this:\n *\n * ```ts\n * const example: typeof import('example') = Import.lazy('example', require);\n *\n * if (condition) {\n * example.doSomething(); // <-- 100ms load time occurs here, only if needed\n * }\n * ```\n *\n * The implementation relies on JavaScript's `Proxy` feature to intercept access to object members. Thus\n * it will only work correctly with certain types of module exports. If a particular export isn't well behaved,\n * you may need to find (or introduce) some other module in your dependency graph to apply the optimization to.\n *\n * Usage guidelines:\n *\n * - Always specify types using `typeof` as shown above.\n *\n * - Never apply lazy-loading in a way that would convert the module's type to `any`. Losing type safety\n * seriously impacts the maintainability of the code base.\n *\n * - In cases where the non-runtime types are needed, import them separately using the `Types` suffix:\n *\n * ```ts\n * const example: typeof import('example') = Import.lazy('example', require);\n * import type * as exampleTypes from 'example';\n * ```\n *\n * - If the imported module confusingly has the same name as its export, then use the Module suffix:\n *\n * ```ts\n * const exampleModule: typeof import('../../logic/Example') = Import.lazy(\n * '../../logic/Example', require);\n * import type * as exampleTypes from '../../logic/Example';\n * ```\n *\n * - If the exports cause a lot of awkwardness (e.g. too many expressions need to have `exampleModule.` inserted\n * into them), or if some exports cannot be proxied (e.g. `Import.lazy('example', require)` returns a function\n * signature), then do not lazy-load that module. Instead, apply lazy-loading to some other module which is\n * better behaved.\n *\n * - It's recommended to sort imports in a standard ordering:\n *\n * ```ts\n * // 1. external imports\n * import * as path from 'path';\n * import { Import, JsonFile, JsonObject } from '@rushstack/node-core-library';\n *\n * // 2. local imports\n * import { LocalFile } from './path/LocalFile';\n *\n * // 3. lazy-imports (which are technically variables, not imports)\n * const semver: typeof import('semver') = Import.lazy('semver', require);\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static lazy(moduleName, require) {\n const importLazyLocal = importLazy(require);\n return importLazyLocal(moduleName);\n }\n /**\n * This resolves a module path using similar logic as the Node.js `require.resolve()` API,\n * but supporting extra features such as specifying the base folder.\n *\n * @remarks\n * A module path is a text string that might appear in a statement such as\n * `import { X } from \"____\";` or `const x = require(\"___\");`. The implementation is based\n * on the popular `resolve` NPM package.\n *\n * Suppose `example` is an NPM package whose entry point is `lib/index.js`:\n * ```ts\n * // Returns \"/path/to/project/node_modules/example/lib/index.js\"\n * Import.resolveModule({ modulePath: 'example' });\n *\n * // Returns \"/path/to/project/node_modules/example/lib/other.js\"\n * Import.resolveModule({ modulePath: 'example/lib/other' });\n * ```\n * If you need to determine the containing package folder\n * (`/path/to/project/node_modules/example`), use {@link Import.resolvePackage} instead.\n *\n * @returns the absolute path of the resolved module.\n * If {@link IImportResolveOptions.includeSystemModules} is specified\n * and a system module is found, then its name is returned without any file path.\n */\n static resolveModule(options) {\n const { modulePath, baseFolderPath, includeSystemModules, allowSelfReference, getRealPath } = options;\n if (path.isAbsolute(modulePath)) {\n return modulePath;\n }\n const normalizedRootPath = (getRealPath || FileSystem_1.FileSystem.getRealPath)(baseFolderPath);\n if (modulePath.startsWith('.')) {\n // This looks like a conventional relative path\n return path.resolve(normalizedRootPath, modulePath);\n }\n // Built-in modules do not have a scope, so if there is a slash, then we need to check\n // against the first path segment\n const slashIndex = modulePath.indexOf('/');\n const moduleName = slashIndex === -1 ? modulePath : modulePath.slice(0, slashIndex);\n if (!includeSystemModules && Import._builtInModules.has(moduleName)) {\n throw new Error(`Cannot find module \"${modulePath}\" from \"${options.baseFolderPath}\".`);\n }\n if (allowSelfReference === true) {\n const ownPackage = Import._getPackageName(normalizedRootPath);\n if (ownPackage &&\n (modulePath === ownPackage.packageName || modulePath.startsWith(`${ownPackage.packageName}/`))) {\n const packagePath = modulePath.slice(ownPackage.packageName.length + 1);\n return path.resolve(ownPackage.packageRootPath, packagePath);\n }\n }\n try {\n return Resolve.sync(modulePath, {\n basedir: normalizedRootPath,\n preserveSymlinks: false,\n realpathSync: getRealPath\n });\n }\n catch (e) {\n throw new Error(`Cannot find module \"${modulePath}\" from \"${options.baseFolderPath}\": ${e}`);\n }\n }\n /**\n * Async version of {@link Import.resolveModule}.\n */\n static async resolveModuleAsync(options) {\n const { modulePath, baseFolderPath, includeSystemModules, allowSelfReference, getRealPath, getRealPathAsync } = options;\n if (path.isAbsolute(modulePath)) {\n return modulePath;\n }\n const normalizedRootPath = await (getRealPathAsync || getRealPath || FileSystem_1.FileSystem.getRealPathAsync)(baseFolderPath);\n if (modulePath.startsWith('.')) {\n // This looks like a conventional relative path\n return path.resolve(normalizedRootPath, modulePath);\n }\n // Built-in modules do not have a scope, so if there is a slash, then we need to check\n // against the first path segment\n const slashIndex = modulePath.indexOf('/');\n const moduleName = slashIndex === -1 ? modulePath : modulePath.slice(0, slashIndex);\n if (!includeSystemModules && Import._builtInModules.has(moduleName)) {\n throw new Error(`Cannot find module \"${modulePath}\" from \"${options.baseFolderPath}\".`);\n }\n if (allowSelfReference === true) {\n const ownPackage = Import._getPackageName(normalizedRootPath);\n if (ownPackage &&\n (modulePath === ownPackage.packageName || modulePath.startsWith(`${ownPackage.packageName}/`))) {\n const packagePath = modulePath.slice(ownPackage.packageName.length + 1);\n return path.resolve(ownPackage.packageRootPath, packagePath);\n }\n }\n try {\n const resolvePromise = new Promise((resolve, reject) => {\n const realPathFn = getRealPathAsync || getRealPath\n ? (filePath, callback) => {\n if (getRealPathAsync) {\n getRealPathAsync(filePath)\n .then((resolvedPath) => callback(null, resolvedPath))\n .catch((error) => callback(error));\n }\n else {\n try {\n const resolvedPath = getRealPath(filePath);\n callback(null, resolvedPath);\n }\n catch (error) {\n callback(error);\n }\n }\n }\n : undefined;\n Resolve.default(modulePath, {\n basedir: normalizedRootPath,\n preserveSymlinks: false,\n realpath: realPathFn\n }, (error, resolvedPath) => {\n if (error) {\n reject(error);\n }\n else {\n // Resolve docs state that either an error will be returned, or the resolved path.\n // In this case, the resolved path should always be populated.\n resolve(resolvedPath);\n }\n });\n });\n return await resolvePromise;\n }\n catch (e) {\n throw new Error(`Cannot find module \"${modulePath}\" from \"${options.baseFolderPath}\": ${e}`);\n }\n }\n /**\n * Performs module resolution to determine the folder where a package is installed.\n *\n * @remarks\n * Suppose `example` is an NPM package whose entry point is `lib/index.js`:\n * ```ts\n * // Returns \"/path/to/project/node_modules/example\"\n * Import.resolvePackage({ packageName: 'example' });\n * ```\n *\n * If you need to resolve a module path, use {@link Import.resolveModule} instead:\n * ```ts\n * // Returns \"/path/to/project/node_modules/example/lib/index.js\"\n * Import.resolveModule({ modulePath: 'example' });\n * ```\n *\n * @returns the absolute path of the package folder.\n * If {@link IImportResolveOptions.includeSystemModules} is specified\n * and a system module is found, then its name is returned without any file path.\n */\n static resolvePackage(options) {\n const { packageName, includeSystemModules, baseFolderPath, allowSelfReference, getRealPath } = options;\n if (includeSystemModules && Import._builtInModules.has(packageName)) {\n return packageName;\n }\n const normalizedRootPath = (getRealPath || FileSystem_1.FileSystem.getRealPath)(baseFolderPath);\n if (allowSelfReference) {\n const ownPackage = Import._getPackageName(normalizedRootPath);\n if (ownPackage && ownPackage.packageName === packageName) {\n return ownPackage.packageRootPath;\n }\n }\n PackageName_1.PackageName.parse(packageName); // Ensure the package name is valid and doesn't contain a path\n try {\n // Append a slash to the package name to ensure `resolve.sync` doesn't attempt to return a system package\n const resolvedPath = Resolve.sync(`${packageName}/`, {\n basedir: normalizedRootPath,\n preserveSymlinks: false,\n packageFilter: (pkg, pkgFile, dir) => {\n // Hardwire \"main\" to point to a file that is guaranteed to exist.\n // This helps resolve packages such as @types/node that have no entry point.\n // And then we can use path.dirname() below to locate the package folder,\n // even if the real entry point was in an subfolder with arbitrary nesting.\n pkg.main = 'package.json';\n return pkg;\n },\n realpathSync: getRealPath\n });\n const packagePath = path.dirname(resolvedPath);\n return packagePath;\n }\n catch (e) {\n throw new Error(`Cannot find package \"${packageName}\" from \"${baseFolderPath}\": ${e}.`);\n }\n }\n /**\n * Async version of {@link Import.resolvePackage}.\n */\n static async resolvePackageAsync(options) {\n const { packageName, includeSystemModules, baseFolderPath, allowSelfReference, getRealPath, getRealPathAsync } = options;\n if (includeSystemModules && Import._builtInModules.has(packageName)) {\n return packageName;\n }\n const normalizedRootPath = await (getRealPathAsync || getRealPath || FileSystem_1.FileSystem.getRealPathAsync)(baseFolderPath);\n if (allowSelfReference) {\n const ownPackage = Import._getPackageName(normalizedRootPath);\n if (ownPackage && ownPackage.packageName === packageName) {\n return ownPackage.packageRootPath;\n }\n }\n PackageName_1.PackageName.parse(packageName); // Ensure the package name is valid and doesn't contain a path\n try {\n const resolvePromise = new Promise((resolve, reject) => {\n const realPathFn = getRealPathAsync || getRealPath\n ? (filePath, callback) => {\n if (getRealPathAsync) {\n getRealPathAsync(filePath)\n .then((resolvedPath) => callback(null, resolvedPath))\n .catch((error) => callback(error));\n }\n else {\n try {\n const resolvedPath = getRealPath(filePath);\n callback(null, resolvedPath);\n }\n catch (error) {\n callback(error);\n }\n }\n }\n : undefined;\n Resolve.default(\n // Append a slash to the package name to ensure `resolve` doesn't attempt to return a system package\n `${packageName}/`, {\n basedir: normalizedRootPath,\n preserveSymlinks: false,\n packageFilter: (pkg, pkgFile, dir) => {\n // Hardwire \"main\" to point to a file that is guaranteed to exist.\n // This helps resolve packages such as @types/node that have no entry point.\n // And then we can use path.dirname() below to locate the package folder,\n // even if the real entry point was in an subfolder with arbitrary nesting.\n pkg.main = 'package.json';\n return pkg;\n },\n realpath: realPathFn\n }, (error, resolvedPath) => {\n if (error) {\n reject(error);\n }\n else {\n // Resolve docs state that either an error will be returned, or the resolved path.\n // In this case, the resolved path should always be populated.\n resolve(resolvedPath);\n }\n });\n });\n const resolvedPath = await resolvePromise;\n const packagePath = path.dirname(resolvedPath);\n return packagePath;\n }\n catch (e) {\n throw new Error(`Cannot find package \"${packageName}\" from \"${baseFolderPath}\": ${e}`);\n }\n }\n static _getPackageName(rootPath) {\n const packageJsonPath = PackageJsonLookup_1.PackageJsonLookup.instance.tryGetPackageJsonFilePathFor(rootPath);\n if (packageJsonPath) {\n const packageJson = PackageJsonLookup_1.PackageJsonLookup.instance.loadPackageJson(packageJsonPath);\n return {\n packageRootPath: path.dirname(packageJsonPath),\n packageName: packageJson.name\n };\n }\n else {\n return undefined;\n }\n }\n}\nexports.Import = Import;\n//# sourceMappingURL=Import.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InternalError = void 0;\n/**\n * An `Error` subclass that should be thrown to report an unexpected state that may indicate a software defect.\n * An application may handle this error by instructing the end user to report an issue to the application maintainers.\n *\n * @remarks\n * Do not use this class unless you intend to solicit bug reports from end users.\n *\n * @public\n */\nclass InternalError extends Error {\n /**\n * Constructs a new instance of the {@link InternalError} class.\n *\n * @param message - A message describing the error. This will be assigned to\n * {@link InternalError.unformattedMessage}. The `Error.message` field will have additional boilerplate\n * explaining that the user has encountered a software defect.\n */\n constructor(message) {\n super(InternalError._formatMessage(message));\n // Manually set the prototype, as we can no longer extend built-in classes like Error, Array, Map, etc.\n // https://github.com/microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n //\n // Note: the prototype must also be set on any classes which extend this one\n this.__proto__ = InternalError.prototype; // eslint-disable-line @typescript-eslint/no-explicit-any\n this.unformattedMessage = message;\n if (InternalError.breakInDebugger) {\n // eslint-disable-next-line no-debugger\n debugger;\n }\n }\n static _formatMessage(unformattedMessage) {\n return (`Internal Error: ${unformattedMessage}\\n\\nYou have encountered a software defect. Please consider` +\n ` reporting the issue to the maintainers of this application.`);\n }\n /** @override */\n toString() {\n return this.message; // Avoid adding the \"Error:\" prefix\n }\n}\nexports.InternalError = InternalError;\n/**\n * If true, a JavScript `debugger;` statement will be invoked whenever the `InternalError` constructor is called.\n *\n * @remarks\n * Generally applications should not be catching and ignoring an `InternalError`. Instead, the error should\n * be reported and typically the application will terminate. Thus, if `InternalError` is constructed, it's\n * almost always something we want to examine in a debugger.\n */\nInternalError.breakInDebugger = true;\n//# sourceMappingURL=InternalError.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonFile = exports.JsonSyntax = void 0;\nconst os = __importStar(require(\"os\"));\nconst jju = __importStar(require(\"jju\"));\nconst Text_1 = require(\"./Text\");\nconst FileSystem_1 = require(\"./FileSystem\");\n/**\n * Specifies the variant of JSON syntax to be used.\n *\n * @public\n */\nvar JsonSyntax;\n(function (JsonSyntax) {\n /**\n * Specifies the exact RFC 8259 format as implemented by the `JSON.parse()` system API.\n * This format was designed for machine generated inputs such as an HTTP payload.\n * It is not a recommend choice for human-authored files, because it does not support\n * code comments.\n *\n * @remarks\n *\n * A well-known quote from Douglas Crockford, the inventor of JSON:\n *\n * \"I removed comments from JSON because I saw people were using them to hold parsing directives,\n * a practice which would have destroyed interoperability. I know that the lack of comments makes\n * some people sad, but it shouldn't. Suppose you are using JSON to keep configuration files,\n * which you would like to annotate. Go ahead and insert all the comments you like.\n * Then pipe it through JSMin before handing it to your JSON parser.\"\n *\n * @see {@link https://datatracker.ietf.org/doc/html/rfc8259 | RFC 8259}\n */\n JsonSyntax[\"Strict\"] = \"strict\";\n /**\n * `JsonSyntax.JsonWithComments` is the recommended format for human-authored config files.\n * It is a minimal extension to `JsonSyntax.Strict` adding support for code comments\n * using `//` and `/*`.\n *\n * @remarks\n *\n * VS Code calls this format `jsonc`, but it should not be confused with unrelated file formats\n * and libraries that also use the name \"JSONC\".\n *\n * To fix VS Code syntax highlighting, add this setting:\n * `\"files.associations\": { \"*.json\": \"jsonc\" }`\n *\n * To fix GitHub syntax highlighting, add this to your `.gitattributes`:\n * `*.json linguist-language=JSON-with-Comments`\n */\n JsonSyntax[\"JsonWithComments\"] = \"jsonWithComments\";\n /**\n * JSON5 is a project that proposes a JSON-like format supplemented with ECMAScript 5.1\n * notations for objects, numbers, comments, and more.\n *\n * @remarks\n * Files using this format should use the `.json5` file extension instead of `.json`.\n *\n * JSON5 has substantial differences from JSON: object keys may be unquoted, trailing commas\n * are allowed, and strings may span multiple lines. Whereas {@link JsonSyntax.JsonWithComments} can\n * be cheaply converted to standard JSON by stripping comments, parsing JSON5 requires a\n * nontrivial algorithm that may not be easily available in some contexts or programming languages.\n *\n * @see {@link https://json5.org/ | JSON5 project website}\n */\n JsonSyntax[\"Json5\"] = \"json5\";\n})(JsonSyntax || (exports.JsonSyntax = JsonSyntax = {}));\nconst DEFAULT_ENCODING = 'utf8';\n/**\n * Utilities for reading/writing JSON files.\n * @public\n */\nclass JsonFile {\n /**\n * Loads a JSON file.\n */\n static load(jsonFilename, options) {\n try {\n const contents = FileSystem_1.FileSystem.readFile(jsonFilename);\n const parseOptions = JsonFile._buildJjuParseOptions(options);\n return jju.parse(contents, parseOptions);\n }\n catch (error) {\n if (FileSystem_1.FileSystem.isNotExistError(error)) {\n throw error;\n }\n else {\n throw new Error(`Error reading \"${JsonFile._formatPathForError(jsonFilename)}\":` +\n os.EOL +\n ` ${error.message}`);\n }\n }\n }\n /**\n * An async version of {@link JsonFile.load}.\n */\n static async loadAsync(jsonFilename, options) {\n try {\n const contents = await FileSystem_1.FileSystem.readFileAsync(jsonFilename);\n const parseOptions = JsonFile._buildJjuParseOptions(options);\n return jju.parse(contents, parseOptions);\n }\n catch (error) {\n if (FileSystem_1.FileSystem.isNotExistError(error)) {\n throw error;\n }\n else {\n throw new Error(`Error reading \"${JsonFile._formatPathForError(jsonFilename)}\":` +\n os.EOL +\n ` ${error.message}`);\n }\n }\n }\n /**\n * Parses a JSON file's contents.\n */\n static parseString(jsonContents, options) {\n const parseOptions = JsonFile._buildJjuParseOptions(options);\n return jju.parse(jsonContents, parseOptions);\n }\n /**\n * Loads a JSON file and validate its schema.\n */\n static loadAndValidate(jsonFilename, jsonSchema, options) {\n const jsonObject = JsonFile.load(jsonFilename, options);\n jsonSchema.validateObject(jsonObject, jsonFilename, options);\n return jsonObject;\n }\n /**\n * An async version of {@link JsonFile.loadAndValidate}.\n */\n static async loadAndValidateAsync(jsonFilename, jsonSchema, options) {\n const jsonObject = await JsonFile.loadAsync(jsonFilename, options);\n jsonSchema.validateObject(jsonObject, jsonFilename, options);\n return jsonObject;\n }\n /**\n * Loads a JSON file and validate its schema, reporting errors using a callback\n * @remarks\n * See JsonSchema.validateObjectWithCallback() for more info.\n */\n static loadAndValidateWithCallback(jsonFilename, jsonSchema, errorCallback, options) {\n const jsonObject = JsonFile.load(jsonFilename, options);\n jsonSchema.validateObjectWithCallback(jsonObject, errorCallback);\n return jsonObject;\n }\n /**\n * An async version of {@link JsonFile.loadAndValidateWithCallback}.\n */\n static async loadAndValidateWithCallbackAsync(jsonFilename, jsonSchema, errorCallback, options) {\n const jsonObject = await JsonFile.loadAsync(jsonFilename, options);\n jsonSchema.validateObjectWithCallback(jsonObject, errorCallback);\n return jsonObject;\n }\n /**\n * Serializes the specified JSON object to a string buffer.\n * @param jsonObject - the object to be serialized\n * @param options - other settings that control serialization\n * @returns a JSON string, with newlines, and indented with two spaces\n */\n static stringify(jsonObject, options) {\n return JsonFile.updateString('', jsonObject, options);\n }\n /**\n * Serializes the specified JSON object to a string buffer.\n * @param previousJson - the previous JSON string, which will be updated\n * @param newJsonObject - the object to be serialized\n * @param options - other settings that control serialization\n * @returns a JSON string, with newlines, and indented with two spaces\n */\n static updateString(previousJson, newJsonObject, options = {}) {\n if (!options.ignoreUndefinedValues) {\n // Standard handling of `undefined` in JSON stringification is to discard the key.\n JsonFile.validateNoUndefinedMembers(newJsonObject);\n }\n let explicitMode = undefined;\n switch (options.jsonSyntax) {\n case JsonSyntax.Strict:\n explicitMode = 'json';\n break;\n case JsonSyntax.JsonWithComments:\n explicitMode = 'cjson';\n break;\n case JsonSyntax.Json5:\n explicitMode = 'json5';\n break;\n }\n let stringified;\n if (previousJson !== '') {\n // NOTE: We don't use mode=json here because comments aren't allowed by strict JSON\n stringified = jju.update(previousJson, newJsonObject, {\n mode: explicitMode !== null && explicitMode !== void 0 ? explicitMode : JsonSyntax.Json5,\n indent: 2\n });\n }\n else if (options.prettyFormatting) {\n stringified = jju.stringify(newJsonObject, {\n mode: explicitMode !== null && explicitMode !== void 0 ? explicitMode : 'json',\n indent: 2\n });\n if (options.headerComment !== undefined) {\n stringified = JsonFile._formatJsonHeaderComment(options.headerComment) + stringified;\n }\n }\n else {\n stringified = JSON.stringify(newJsonObject, undefined, 2);\n if (options.headerComment !== undefined) {\n stringified = JsonFile._formatJsonHeaderComment(options.headerComment) + stringified;\n }\n }\n // Add the trailing newline\n stringified = Text_1.Text.ensureTrailingNewline(stringified);\n if (options.newlineConversion) {\n stringified = Text_1.Text.convertTo(stringified, options.newlineConversion);\n }\n return stringified;\n }\n /**\n * Saves the file to disk. Returns false if nothing was written due to options.onlyIfChanged.\n * @param jsonObject - the object to be saved\n * @param jsonFilename - the file path to write\n * @param options - other settings that control how the file is saved\n * @returns false if ISaveJsonFileOptions.onlyIfChanged didn't save anything; true otherwise\n */\n static save(jsonObject, jsonFilename, options = {}) {\n // Do we need to read the previous file contents?\n let oldBuffer = undefined;\n if (options.updateExistingFile || options.onlyIfChanged) {\n try {\n oldBuffer = FileSystem_1.FileSystem.readFileToBuffer(jsonFilename);\n }\n catch (error) {\n if (!FileSystem_1.FileSystem.isNotExistError(error)) {\n throw error;\n }\n }\n }\n let jsonToUpdate = '';\n if (options.updateExistingFile && oldBuffer) {\n jsonToUpdate = oldBuffer.toString(DEFAULT_ENCODING);\n }\n const newJson = JsonFile.updateString(jsonToUpdate, jsonObject, options);\n const newBuffer = Buffer.from(newJson, DEFAULT_ENCODING);\n if (options.onlyIfChanged) {\n // Has the file changed?\n if (oldBuffer && Buffer.compare(newBuffer, oldBuffer) === 0) {\n // Nothing has changed, so don't touch the file\n return false;\n }\n }\n FileSystem_1.FileSystem.writeFile(jsonFilename, newBuffer, {\n ensureFolderExists: options.ensureFolderExists\n });\n // TEST CODE: Used to verify that onlyIfChanged isn't broken by a hidden transformation during saving.\n /*\n const oldBuffer2: Buffer = FileSystem.readFileToBuffer(jsonFilename);\n if (Buffer.compare(buffer, oldBuffer2) !== 0) {\n console.log('new:' + buffer.toString('hex'));\n console.log('old:' + oldBuffer2.toString('hex'));\n \n throw new Error('onlyIfChanged logic is broken');\n }\n */\n return true;\n }\n /**\n * An async version of {@link JsonFile.save}.\n */\n static async saveAsync(jsonObject, jsonFilename, options = {}) {\n // Do we need to read the previous file contents?\n let oldBuffer = undefined;\n if (options.updateExistingFile || options.onlyIfChanged) {\n try {\n oldBuffer = await FileSystem_1.FileSystem.readFileToBufferAsync(jsonFilename);\n }\n catch (error) {\n if (!FileSystem_1.FileSystem.isNotExistError(error)) {\n throw error;\n }\n }\n }\n let jsonToUpdate = '';\n if (options.updateExistingFile && oldBuffer) {\n jsonToUpdate = oldBuffer.toString(DEFAULT_ENCODING);\n }\n const newJson = JsonFile.updateString(jsonToUpdate, jsonObject, options);\n const newBuffer = Buffer.from(newJson, DEFAULT_ENCODING);\n if (options.onlyIfChanged) {\n // Has the file changed?\n if (oldBuffer && Buffer.compare(newBuffer, oldBuffer) === 0) {\n // Nothing has changed, so don't touch the file\n return false;\n }\n }\n await FileSystem_1.FileSystem.writeFileAsync(jsonFilename, newBuffer, {\n ensureFolderExists: options.ensureFolderExists\n });\n // TEST CODE: Used to verify that onlyIfChanged isn't broken by a hidden transformation during saving.\n /*\n const oldBuffer2: Buffer = await FileSystem.readFileToBufferAsync(jsonFilename);\n if (Buffer.compare(buffer, oldBuffer2) !== 0) {\n console.log('new:' + buffer.toString('hex'));\n console.log('old:' + oldBuffer2.toString('hex'));\n \n throw new Error('onlyIfChanged logic is broken');\n }\n */\n return true;\n }\n /**\n * Used to validate a data structure before writing. Reports an error if there\n * are any undefined members.\n */\n static validateNoUndefinedMembers(jsonObject) {\n return JsonFile._validateNoUndefinedMembers(jsonObject, []);\n }\n // Private implementation of validateNoUndefinedMembers()\n static _validateNoUndefinedMembers(jsonObject, keyPath) {\n if (!jsonObject) {\n return;\n }\n if (typeof jsonObject === 'object') {\n for (const key of Object.keys(jsonObject)) {\n keyPath.push(key);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const value = jsonObject[key];\n if (value === undefined) {\n const fullPath = JsonFile._formatKeyPath(keyPath);\n throw new Error(`The value for ${fullPath} is \"undefined\" and cannot be serialized as JSON`);\n }\n JsonFile._validateNoUndefinedMembers(value, keyPath);\n keyPath.pop();\n }\n }\n }\n // Given this input: ['items', '4', 'syntax', 'parameters', 'string \"with\" symbols\", 'type']\n // Return this string: items[4].syntax.parameters[\"string \\\"with\\\" symbols\"].type\n static _formatKeyPath(keyPath) {\n let result = '';\n for (const key of keyPath) {\n if (/^[0-9]+$/.test(key)) {\n // It's an integer, so display like this: parent[123]\n result += `[${key}]`;\n }\n else if (/^[a-z_][a-z_0-9]*$/i.test(key)) {\n // It's an alphanumeric identifier, so display like this: parent.name\n if (result) {\n result += '.';\n }\n result += `${key}`;\n }\n else {\n // It's a freeform string, so display like this: parent[\"A path: \\\"C:\\\\file\\\"\"]\n // Convert this: A path: \"C:\\file\"\n // To this: A path: \\\"C:\\\\file\\\"\n const escapedKey = key\n .replace(/[\\\\]/g, '\\\\\\\\') // escape backslashes\n .replace(/[\"]/g, '\\\\'); // escape quotes\n result += `[\"${escapedKey}\"]`;\n }\n }\n return result;\n }\n static _formatJsonHeaderComment(headerComment) {\n if (headerComment === '') {\n return '';\n }\n const lines = headerComment.split('\\n');\n const result = [];\n for (const line of lines) {\n if (!/^\\s*$/.test(line) && !/^\\s*\\/\\//.test(line)) {\n throw new Error('The headerComment lines must be blank or start with the \"//\" prefix.\\n' +\n 'Invalid line' +\n JSON.stringify(line));\n }\n result.push(Text_1.Text.replaceAll(line, '\\r', ''));\n }\n return lines.join('\\n') + '\\n';\n }\n static _buildJjuParseOptions(options = {}) {\n const parseOptions = {\n reserved_keys: 'replace'\n };\n switch (options.jsonSyntax) {\n case JsonSyntax.Strict:\n parseOptions.mode = 'json';\n break;\n case JsonSyntax.JsonWithComments:\n parseOptions.mode = 'cjson';\n break;\n case JsonSyntax.Json5:\n default:\n parseOptions.mode = 'json5';\n break;\n }\n return parseOptions;\n }\n}\nexports.JsonFile = JsonFile;\n/**\n * @internal\n */\nJsonFile._formatPathForError = (path) => path;\n//# sourceMappingURL=JsonFile.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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 __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonSchema = void 0;\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst FileSystem_1 = require(\"./FileSystem\");\nconst JsonFile_1 = require(\"./JsonFile\");\nconst ajv_1 = __importDefault(require(\"ajv\"));\nconst ajv_draft_04_1 = __importDefault(require(\"ajv-draft-04\"));\nconst ajv_formats_1 = __importDefault(require(\"ajv-formats\"));\nconst JSON_SCHEMA_URL_PREFIX_BY_JSON_SCHEMA_VERSION = new Map([\n ['draft-04', 'http://json-schema.org/draft-04/schema'],\n ['draft-07', 'http://json-schema.org/draft-07/schema']\n]);\n/**\n * Helper function to determine the json-schema version to target for validation.\n */\nfunction _inferJsonSchemaVersion({ $schema }) {\n if ($schema) {\n for (const [jsonSchemaVersion, urlPrefix] of JSON_SCHEMA_URL_PREFIX_BY_JSON_SCHEMA_VERSION) {\n if ($schema.startsWith(urlPrefix)) {\n return jsonSchemaVersion;\n }\n }\n }\n}\n/**\n * Represents a JSON schema that can be used to validate JSON data files loaded by the JsonFile class.\n * @remarks\n * The schema itself is normally loaded and compiled later, only if it is actually required to validate\n * an input. To avoid schema errors at runtime, it's recommended to create a unit test that calls\n * JsonSchema.ensureCompiled() for each of your schema objects.\n *\n * @public\n */\nclass JsonSchema {\n constructor() {\n this._dependentSchemas = [];\n this._filename = '';\n this._validator = undefined;\n this._schemaObject = undefined;\n this._schemaVersion = undefined;\n this._customFormats = undefined;\n }\n /**\n * Registers a JsonSchema that will be loaded from a file on disk.\n * @remarks\n * NOTE: An error occurs if the file does not exist; however, the file itself is not loaded or validated\n * until it the schema is actually used.\n */\n static fromFile(filename, options) {\n // This is a quick and inexpensive test to avoid the catch the most common errors early.\n // Full validation will happen later in JsonSchema.compile().\n if (!FileSystem_1.FileSystem.exists(filename)) {\n throw new Error('Schema file not found: ' + filename);\n }\n const schema = new JsonSchema();\n schema._filename = filename;\n if (options) {\n schema._dependentSchemas = options.dependentSchemas || [];\n schema._schemaVersion = options.schemaVersion;\n schema._customFormats = options.customFormats;\n }\n return schema;\n }\n /**\n * Registers a JsonSchema that will be loaded from an object.\n */\n static fromLoadedObject(schemaObject, options) {\n const schema = new JsonSchema();\n schema._schemaObject = schemaObject;\n if (options) {\n schema._dependentSchemas = options.dependentSchemas || [];\n schema._schemaVersion = options.schemaVersion;\n schema._customFormats = options.customFormats;\n }\n return schema;\n }\n static _collectDependentSchemas(collectedSchemas, dependentSchemas, seenObjects, seenIds) {\n for (const dependentSchema of dependentSchemas) {\n // It's okay for the same schema to appear multiple times in the tree, but we only process it once\n if (seenObjects.has(dependentSchema)) {\n continue;\n }\n seenObjects.add(dependentSchema);\n const schemaId = dependentSchema._ensureLoaded();\n if (schemaId === '') {\n throw new Error(`This schema ${dependentSchema.shortName} cannot be referenced` +\n ' because is missing the \"id\" (draft-04) or \"$id\" field');\n }\n if (seenIds.has(schemaId)) {\n throw new Error(`This schema ${dependentSchema.shortName} has the same \"id\" (draft-04) or \"$id\" as another schema in this set`);\n }\n seenIds.add(schemaId);\n collectedSchemas.push(dependentSchema);\n JsonSchema._collectDependentSchemas(collectedSchemas, dependentSchema._dependentSchemas, seenObjects, seenIds);\n }\n }\n /**\n * Used to nicely format the ZSchema error tree.\n */\n static _formatErrorDetails(errorDetails) {\n return JsonSchema._formatErrorDetailsHelper(errorDetails, '', '');\n }\n /**\n * Used by _formatErrorDetails.\n */\n static _formatErrorDetailsHelper(errorDetails, indent, buffer) {\n var _a, _b;\n for (const errorDetail of errorDetails) {\n buffer += os.EOL + indent + `Error: #${errorDetail.instancePath}`;\n buffer += os.EOL + indent + ` ${errorDetail.message}`;\n if ((_a = errorDetail.params) === null || _a === void 0 ? void 0 : _a.additionalProperty) {\n buffer += `: ${(_b = errorDetail.params) === null || _b === void 0 ? void 0 : _b.additionalProperty}`;\n }\n }\n return buffer;\n }\n /**\n * Returns a short name for this schema, for use in error messages.\n * @remarks\n * If the schema was loaded from a file, then the base filename is used. Otherwise, the \"$id\"\n * field is used if available.\n */\n get shortName() {\n if (!this._filename) {\n if (this._schemaObject) {\n const schemaWithId = this._schemaObject;\n if (schemaWithId.id) {\n return schemaWithId.id;\n }\n else if (schemaWithId.$id) {\n return schemaWithId.$id;\n }\n }\n return '(anonymous schema)';\n }\n else {\n return path.basename(this._filename);\n }\n }\n /**\n * If not already done, this loads the schema from disk and compiles it.\n * @remarks\n * Any dependencies will be compiled as well.\n */\n ensureCompiled() {\n var _a;\n this._ensureLoaded();\n if (!this._validator) {\n const targetSchemaVersion = (_a = this._schemaVersion) !== null && _a !== void 0 ? _a : _inferJsonSchemaVersion(this._schemaObject);\n const validatorOptions = {\n strictSchema: true,\n allowUnionTypes: true\n };\n let validator;\n // Keep legacy support for older draft-04 schema\n switch (targetSchemaVersion) {\n case 'draft-04': {\n validator = new ajv_draft_04_1.default(validatorOptions);\n break;\n }\n case 'draft-07':\n default: {\n validator = new ajv_1.default(validatorOptions);\n break;\n }\n }\n // Enable json-schema format validation\n // https://ajv.js.org/packages/ajv-formats.html\n (0, ajv_formats_1.default)(validator);\n if (this._customFormats) {\n for (const [name, format] of Object.entries(this._customFormats)) {\n validator.addFormat(name, Object.assign(Object.assign({}, format), { async: false }));\n }\n }\n const collectedSchemas = [];\n const seenObjects = new Set();\n const seenIds = new Set();\n JsonSchema._collectDependentSchemas(collectedSchemas, this._dependentSchemas, seenObjects, seenIds);\n // Validate each schema in order. We specifically do not supply them all together, because we want\n // to make sure that circular references will fail to validate.\n for (const collectedSchema of collectedSchemas) {\n validator.validateSchema(collectedSchema._schemaObject);\n if (validator.errors && validator.errors.length > 0) {\n throw new Error(`Failed to validate schema \"${collectedSchema.shortName}\":` +\n os.EOL +\n JsonSchema._formatErrorDetails(validator.errors));\n }\n validator.addSchema(collectedSchema._schemaObject);\n }\n this._validator = validator.compile(this._schemaObject);\n }\n }\n /**\n * Validates the specified JSON object against this JSON schema. If the validation fails,\n * an exception will be thrown.\n * @param jsonObject - The JSON data to be validated\n * @param filenameForErrors - The filename that the JSON data was available, or an empty string\n * if not applicable\n * @param options - Other options that control the validation\n */\n validateObject(jsonObject, filenameForErrors, options) {\n this.validateObjectWithCallback(jsonObject, (errorInfo) => {\n var _a;\n const prefix = (_a = options === null || options === void 0 ? void 0 : options.customErrorHeader) !== null && _a !== void 0 ? _a : 'JSON validation failed:';\n throw new Error(prefix + os.EOL + filenameForErrors + os.EOL + errorInfo.details);\n }, options);\n }\n /**\n * Validates the specified JSON object against this JSON schema. If the validation fails,\n * a callback is called for each validation error.\n */\n validateObjectWithCallback(jsonObject, errorCallback, options) {\n this.ensureCompiled();\n if (options === null || options === void 0 ? void 0 : options.ignoreSchemaField) {\n const { \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n $schema } = jsonObject, remainder = __rest(jsonObject, [\"$schema\"]);\n jsonObject = remainder;\n }\n if (this._validator && !this._validator(jsonObject)) {\n const errorDetails = JsonSchema._formatErrorDetails(this._validator.errors);\n const args = {\n details: errorDetails\n };\n errorCallback(args);\n }\n }\n _ensureLoaded() {\n if (!this._schemaObject) {\n this._schemaObject = JsonFile_1.JsonFile.load(this._filename);\n }\n return this._schemaObject.id || this._schemaObject.$id || '';\n }\n}\nexports.JsonSchema = JsonSchema;\n//# sourceMappingURL=JsonSchema.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LegacyAdapters = void 0;\n/**\n * Helper functions used when interacting with APIs that do not follow modern coding practices.\n * @public\n */\nclass LegacyAdapters {\n static convertCallbackToPromise(fn, arg1, arg2, arg3, arg4) {\n return new Promise((resolve, reject) => {\n const cb = (error, result) => {\n if (error) {\n reject(LegacyAdapters.scrubError(error));\n }\n else {\n resolve(result);\n }\n };\n try {\n if (arg1 !== undefined && arg2 !== undefined && arg3 !== undefined && arg4 !== undefined) {\n fn(arg1, arg2, arg3, arg4, cb);\n }\n else if (arg1 !== undefined && arg2 !== undefined && arg3 !== undefined) {\n fn(arg1, arg2, arg3, cb);\n }\n else if (arg1 !== undefined && arg2 !== undefined) {\n fn(arg1, arg2, cb);\n }\n else if (arg1 !== undefined) {\n fn(arg1, cb);\n }\n else {\n fn(cb);\n }\n }\n catch (e) {\n reject(e);\n }\n });\n }\n /**\n * Normalizes an object into an `Error` object.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static scrubError(error) {\n if (error instanceof Error) {\n return error;\n }\n else if (typeof error === 'string') {\n return new Error(error);\n }\n else {\n const errorObject = new Error('An error occurred.');\n errorObject.errorData = error; // eslint-disable-line @typescript-eslint/no-explicit-any\n return errorObject;\n }\n }\n}\nexports.LegacyAdapters = LegacyAdapters;\n//# sourceMappingURL=LegacyAdapters.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LockFile = exports.getProcessStartTime = exports.getProcessStartTimeFromProcStat = void 0;\nconst path = __importStar(require(\"path\"));\nconst child_process = __importStar(require(\"child_process\"));\nconst FileSystem_1 = require(\"./FileSystem\");\nconst FileWriter_1 = require(\"./FileWriter\");\nconst Async_1 = require(\"./Async\");\n/**\n * http://man7.org/linux/man-pages/man5/proc.5.html\n * (22) starttime %llu\n * The time the process started after system boot. In kernels before Linux 2.6, this value was\n * expressed in jiffies. Since Linux 2.6, the value is expressed in clock ticks (divide by\n * sysconf(_SC_CLK_TCK)).\n * The format for this field was %lu before Linux 2.6.\n */\nconst procStatStartTimePos = 22;\n/**\n * Parses the process start time from the contents of a linux /proc/[pid]/stat file.\n * @param stat - The contents of a linux /proc/[pid]/stat file.\n * @returns The process start time in jiffies, or undefined if stat has an unexpected format.\n */\nfunction getProcessStartTimeFromProcStat(stat) {\n // Parse the value at position procStatStartTimePos.\n // We cannot just split stat on spaces, because value 2 may contain spaces.\n // For example, when running the following Shell commands:\n // > cp \"$(which bash)\" ./'bash 2)('\n // > ./'bash 2)(' -c 'OWNPID=$BASHPID;cat /proc/$OWNPID/stat'\n // 59389 (bash 2)() S 59358 59389 59358 34818 59389 4202496 329 0 0 0 0 0 0 0 20 0 1 0\n // > rm -rf ./'bash 2)('\n // The output shows a stat file such that value 2 contains spaces.\n // To still umambiguously parse such output we assume no values after the second ends with a right parenthesis...\n // trimRight to remove the trailing line terminator.\n let values = stat.trimRight().split(' ');\n let i = values.length - 1;\n while (i >= 0 &&\n // charAt returns an empty string if the index is out of bounds.\n values[i].charAt(values[i].length - 1) !== ')') {\n i -= 1;\n }\n // i is the index of the last part of the second value (but i need not be 1).\n if (i < 1) {\n // Format of stat has changed.\n return undefined;\n }\n const value2 = values.slice(1, i + 1).join(' ');\n values = [values[0], value2].concat(values.slice(i + 1));\n if (values.length < procStatStartTimePos) {\n // Older version of linux, or non-standard configuration of linux.\n return undefined;\n }\n const startTimeJiffies = values[procStatStartTimePos - 1];\n // In theory, the representations of start time returned by `cat /proc/[pid]/stat` and `ps -o lstart` can change\n // while the system is running, but we assume this does not happen.\n // So the caller can safely use this value as part of a unique process id (on the machine, without comparing\n // across reboots).\n return startTimeJiffies;\n}\nexports.getProcessStartTimeFromProcStat = getProcessStartTimeFromProcStat;\n/**\n * Helper function that is exported for unit tests only.\n * Returns undefined if the process doesn't exist with that pid.\n */\nfunction getProcessStartTime(pid) {\n const pidString = pid.toString();\n if (pid < 0 || pidString.indexOf('e') >= 0 || pidString.indexOf('E') >= 0) {\n throw new Error(`\"pid\" is negative or too large`);\n }\n let args;\n if (process.platform === 'darwin') {\n args = [`-p ${pidString}`, '-o lstart'];\n }\n else if (process.platform === 'linux') {\n args = ['-p', pidString, '-o', 'lstart'];\n }\n else {\n throw new Error(`Unsupported system: ${process.platform}`);\n }\n const psResult = child_process.spawnSync('ps', args, {\n encoding: 'utf8'\n });\n const psStdout = psResult.stdout;\n // If no process with PID pid exists then the exit code is non-zero on linux but stdout is not empty.\n // But if no process exists we do not want to fall back on /proc/*/stat to determine the process\n // start time, so we we additionally test for !psStdout. NOTE: !psStdout evaluates to true if\n // zero bytes are written to stdout.\n if (psResult.status !== 0 && !psStdout && process.platform === 'linux') {\n // Try to read /proc/[pid]/stat and get the value at position procStatStartTimePos.\n let stat;\n try {\n stat = FileSystem_1.FileSystem.readFile(`/proc/${pidString}/stat`);\n }\n catch (error) {\n if (error.code !== 'ENOENT') {\n throw error;\n }\n // Either no process with PID pid exists, or this version/configuration of linux is non-standard.\n // We assume the former.\n return undefined;\n }\n if (stat !== undefined) {\n const startTimeJiffies = getProcessStartTimeFromProcStat(stat);\n if (startTimeJiffies === undefined) {\n throw new Error(`Could not retrieve the start time of process ${pidString} from the OS because the ` +\n `contents of /proc/${pidString}/stat have an unexpected format`);\n }\n return startTimeJiffies;\n }\n }\n // there was an error executing ps (zero bytes were written to stdout).\n if (!psStdout) {\n throw new Error(`Unexpected output from \"ps\" command`);\n }\n const psSplit = psStdout.split('\\n');\n // successfully able to run \"ps\", but no process was found\n if (psSplit[1] === '') {\n return undefined;\n }\n if (psSplit[1]) {\n const trimmed = psSplit[1].trim();\n if (trimmed.length > 10) {\n return trimmed;\n }\n }\n throw new Error(`Unexpected output from the \"ps\" command`);\n}\nexports.getProcessStartTime = getProcessStartTime;\n// A set of locks that currently exist in the current process, to be used when\n// multiple locks are acquired in the same process.\nconst IN_PROC_LOCKS = new Set();\n/**\n * The `LockFile` implements a file-based mutex for synchronizing access to a shared resource\n * between multiple Node.js processes. It is not recommended for synchronization solely within\n * a single Node.js process.\n * @remarks\n * The implementation works on Windows, Mac, and Linux without requiring any native helpers.\n * On non-Windows systems, the algorithm requires access to the `ps` shell command. On Linux,\n * it requires access the `/proc/${pidString}/stat` filesystem.\n * @public\n */\nclass LockFile {\n constructor(fileWriter, filePath, dirtyWhenAcquired) {\n this._fileWriter = fileWriter;\n this._filePath = filePath;\n this._dirtyWhenAcquired = dirtyWhenAcquired;\n IN_PROC_LOCKS.add(filePath);\n }\n /**\n * Returns the path of the lockfile that will be created when a lock is successfully acquired.\n * @param resourceFolder - The folder where the lock file will be created\n * @param resourceName - An alphanumeric name that describes the resource being locked. This will become\n * the filename of the temporary file created to manage the lock.\n * @param pid - The PID for the current Node.js process (`process.pid`), which is used by the locking algorithm.\n */\n static getLockFilePath(resourceFolder, resourceName, pid = process.pid) {\n if (!resourceName.match(/^[a-zA-Z0-9][a-zA-Z0-9-.]+[a-zA-Z0-9]$/)) {\n throw new Error(`The resource name \"${resourceName}\" is invalid.` +\n ` It must be an alphanumeric string with only \"-\" or \".\" It must start and end with an alphanumeric character.`);\n }\n switch (process.platform) {\n case 'win32': {\n return path.resolve(resourceFolder, `${resourceName}.lock`);\n }\n case 'linux':\n case 'darwin': {\n return path.resolve(resourceFolder, `${resourceName}#${pid}.lock`);\n }\n default: {\n throw new Error(`File locking not implemented for platform: \"${process.platform}\"`);\n }\n }\n }\n /**\n * Attempts to create a lockfile with the given filePath.\n * @param resourceFolder - The folder where the lock file will be created\n * @param resourceName - An alphanumeric name that describes the resource being locked. This will become\n * the filename of the temporary file created to manage the lock.\n * @returns If successful, returns a `LockFile` instance. If unable to get a lock, returns `undefined`.\n */\n static tryAcquire(resourceFolder, resourceName) {\n FileSystem_1.FileSystem.ensureFolder(resourceFolder);\n const lockFilePath = LockFile.getLockFilePath(resourceFolder, resourceName);\n return LockFile._tryAcquireInner(resourceFolder, resourceName, lockFilePath);\n }\n /**\n * @deprecated Use {@link LockFile.acquireAsync} instead.\n */\n static acquire(resourceFolder, resourceName, maxWaitMs) {\n return LockFile.acquireAsync(resourceFolder, resourceName, maxWaitMs);\n }\n /**\n * Attempts to create the lockfile. Will continue to loop at every 100ms until the lock becomes available\n * or the maxWaitMs is surpassed.\n *\n * @remarks\n * This function is subject to starvation, whereby it does not ensure that the process that has been\n * waiting the longest to acquire the lock will get it first. This means that a process could theoretically\n * wait for the lock forever, while other processes skipped it in line and acquired the lock first.\n *\n * @param resourceFolder - The folder where the lock file will be created\n * @param resourceName - An alphanumeric name that describes the resource being locked. This will become\n * the filename of the temporary file created to manage the lock.\n * @param maxWaitMs - The maximum number of milliseconds to wait for the lock before reporting an error\n */\n static async acquireAsync(resourceFolder, resourceName, maxWaitMs) {\n const interval = 100;\n const startTime = Date.now();\n const timeoutTime = maxWaitMs ? startTime + maxWaitMs : undefined;\n await FileSystem_1.FileSystem.ensureFolderAsync(resourceFolder);\n const lockFilePath = LockFile.getLockFilePath(resourceFolder, resourceName);\n // eslint-disable-next-line no-unmodified-loop-condition\n while (!timeoutTime || Date.now() <= timeoutTime) {\n const lock = LockFile._tryAcquireInner(resourceFolder, resourceName, lockFilePath);\n if (lock) {\n return lock;\n }\n await Async_1.Async.sleepAsync(interval);\n }\n throw new Error(`Exceeded maximum wait time to acquire lock for resource \"${resourceName}\"`);\n }\n static _tryAcquireInner(resourceFolder, resourceName, lockFilePath) {\n if (!IN_PROC_LOCKS.has(lockFilePath)) {\n switch (process.platform) {\n case 'win32': {\n return LockFile._tryAcquireWindows(lockFilePath);\n }\n case 'linux':\n case 'darwin': {\n return LockFile._tryAcquireMacOrLinux(resourceFolder, resourceName, lockFilePath);\n }\n default: {\n throw new Error(`File locking not implemented for platform: \"${process.platform}\"`);\n }\n }\n }\n }\n /**\n * Attempts to acquire the lock on a Linux or OSX machine\n */\n static _tryAcquireMacOrLinux(resourceFolder, resourceName, pidLockFilePath) {\n let dirtyWhenAcquired = false;\n // get the current process' pid\n const pid = process.pid;\n const startTime = LockFile._getStartTime(pid);\n if (!startTime) {\n throw new Error(`Unable to calculate start time for current process.`);\n }\n let lockFileHandle;\n let lockFile;\n try {\n // open in write mode since if this file exists, it cannot be from the current process\n // TODO: This will malfunction if the same process tries to acquire two locks on the same file.\n // We should ideally maintain a dictionary of normalized acquired filenames\n lockFileHandle = FileWriter_1.FileWriter.open(pidLockFilePath);\n lockFileHandle.write(startTime);\n const currentBirthTimeMs = lockFileHandle.getStatistics().birthtime.getTime();\n let smallestBirthTimeMs = currentBirthTimeMs;\n let smallestBirthTimePid = pid.toString();\n // now, scan the directory for all lockfiles\n const files = FileSystem_1.FileSystem.readFolderItemNames(resourceFolder);\n // look for anything ending with # then numbers and \".lock\"\n const lockFileRegExp = /^(.+)#([0-9]+)\\.lock$/;\n let match;\n let otherPid;\n for (const fileInFolder of files) {\n if ((match = fileInFolder.match(lockFileRegExp)) &&\n match[1] === resourceName &&\n (otherPid = match[2]) !== pid.toString()) {\n // we found at least one lockfile hanging around that isn't ours\n const fileInFolderPath = `${resourceFolder}/${fileInFolder}`;\n dirtyWhenAcquired = true;\n // console.log(`FOUND OTHER LOCKFILE: ${otherPid}`);\n const otherPidCurrentStartTime = LockFile._getStartTime(parseInt(otherPid, 10));\n let otherPidOldStartTime;\n let otherBirthtimeMs;\n try {\n otherPidOldStartTime = FileSystem_1.FileSystem.readFile(fileInFolderPath);\n // check the timestamp of the file\n otherBirthtimeMs = FileSystem_1.FileSystem.getStatistics(fileInFolderPath).birthtime.getTime();\n }\n catch (error) {\n if (FileSystem_1.FileSystem.isNotExistError(error)) {\n // the file is already deleted by other process, skip it\n continue;\n }\n }\n // if the otherPidOldStartTime is invalid, then we should look at the timestamp,\n // if this file was created after us, ignore it\n // if it was created within 1 second before us, then it could be good, so we\n // will conservatively fail\n // otherwise it is an old lock file and will be deleted\n if (otherPidOldStartTime === '' && otherBirthtimeMs !== undefined) {\n if (otherBirthtimeMs > currentBirthTimeMs) {\n // ignore this file, he will be unable to get the lock since this process\n // will hold it\n // console.log(`Ignoring lock for pid ${otherPid} because its lockfile is newer than ours.`);\n continue;\n }\n else if (otherBirthtimeMs - currentBirthTimeMs < 0 && // it was created before us AND\n otherBirthtimeMs - currentBirthTimeMs > -1000) {\n // it was created less than a second before\n // conservatively be unable to keep the lock\n return undefined;\n }\n }\n // console.log(`Other pid ${otherPid} lockfile has start time: \"${otherPidOldStartTime}\"`);\n // console.log(`Other pid ${otherPid} actually has start time: \"${otherPidCurrentStartTime}\"`);\n // this means the process is no longer executing, delete the file\n if (!otherPidCurrentStartTime || otherPidOldStartTime !== otherPidCurrentStartTime) {\n // console.log(`Other pid ${otherPid} is no longer executing!`);\n FileSystem_1.FileSystem.deleteFile(fileInFolderPath);\n continue;\n }\n // console.log(`Pid ${otherPid} lockfile has birth time: ${otherBirthtimeMs}`);\n // console.log(`Pid ${pid} lockfile has birth time: ${currentBirthTimeMs}`);\n // this is a lockfile pointing at something valid\n if (otherBirthtimeMs !== undefined) {\n // the other lock file was created before the current earliest lock file\n // or the other lock file was created at the same exact time, but has earlier pid\n // note that it is acceptable to do a direct comparison of the PIDs in this case\n // since we are establishing a consistent order to apply to the lock files in all\n // execution instances.\n // it doesn't matter that the PIDs roll over, we've already\n // established that these processes all started at the same time, so we just\n // need to get all instances of the lock test to agree which one won.\n if (otherBirthtimeMs < smallestBirthTimeMs ||\n (otherBirthtimeMs === smallestBirthTimeMs && otherPid < smallestBirthTimePid)) {\n smallestBirthTimeMs = otherBirthtimeMs;\n smallestBirthTimePid = otherPid;\n }\n }\n }\n }\n if (smallestBirthTimePid !== pid.toString()) {\n // we do not have the lock\n return undefined;\n }\n // we have the lock!\n lockFile = new LockFile(lockFileHandle, pidLockFilePath, dirtyWhenAcquired);\n lockFileHandle = undefined; // we have handed the descriptor off to the instance\n }\n finally {\n if (lockFileHandle) {\n // ensure our lock is closed\n lockFileHandle.close();\n FileSystem_1.FileSystem.deleteFile(pidLockFilePath);\n }\n }\n return lockFile;\n }\n /**\n * Attempts to acquire the lock using Windows\n * This algorithm is much simpler since we can rely on the operating system\n */\n static _tryAcquireWindows(lockFilePath) {\n let dirtyWhenAcquired = false;\n let fileHandle;\n let lockFile;\n try {\n if (FileSystem_1.FileSystem.exists(lockFilePath)) {\n dirtyWhenAcquired = true;\n // If the lockfile is held by an process with an exclusive lock, then removing it will\n // silently fail. OpenSync() below will then fail and we will be unable to create a lock.\n // Otherwise, the lockfile is sitting on disk, but nothing is holding it, implying that\n // the last process to hold it died.\n FileSystem_1.FileSystem.deleteFile(lockFilePath);\n }\n try {\n // Attempt to open an exclusive lockfile\n fileHandle = FileWriter_1.FileWriter.open(lockFilePath, { exclusive: true });\n }\n catch (error) {\n // we tried to delete the lock, but something else is holding it,\n // (probably an active process), therefore we are unable to create a lock\n return undefined;\n }\n // Ensure we can hand off the file descriptor to the lockfile\n lockFile = new LockFile(fileHandle, lockFilePath, dirtyWhenAcquired);\n fileHandle = undefined;\n }\n finally {\n if (fileHandle) {\n fileHandle.close();\n }\n }\n return lockFile;\n }\n /**\n * Unlocks a file and optionally removes it from disk.\n * This can only be called once.\n *\n * @param deleteFile - Whether to delete the lockfile from disk. Defaults to true.\n */\n release(deleteFile = true) {\n if (this.isReleased) {\n throw new Error(`The lock for file \"${path.basename(this._filePath)}\" has already been released.`);\n }\n IN_PROC_LOCKS.delete(this._filePath);\n this._fileWriter.close();\n if (deleteFile) {\n FileSystem_1.FileSystem.deleteFile(this._filePath);\n }\n this._fileWriter = undefined;\n }\n /**\n * Returns the initial state of the lock.\n * This can be used to detect if the previous process was terminated before releasing the resource.\n */\n get dirtyWhenAcquired() {\n return this._dirtyWhenAcquired;\n }\n /**\n * Returns the absolute path to the lockfile\n */\n get filePath() {\n return this._filePath;\n }\n /**\n * Returns true if this lock is currently being held.\n */\n get isReleased() {\n return this._fileWriter === undefined;\n }\n}\nexports.LockFile = LockFile;\nLockFile._getStartTime = getProcessStartTime;\n//# sourceMappingURL=LockFile.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MapExtensions = void 0;\n/**\n * Helper functions for working with the `Map<K, V>` data type.\n *\n * @public\n */\nclass MapExtensions {\n /**\n * Adds all the (key, value) pairs from the source map into the target map.\n * @remarks\n * This function modifies targetMap. Any existing keys will be overwritten.\n * @param targetMap - The map that entries will be added to\n * @param sourceMap - The map containing the entries to be added\n */\n static mergeFromMap(targetMap, sourceMap) {\n for (const pair of sourceMap.entries()) {\n targetMap.set(pair[0], pair[1]);\n }\n }\n /**\n * Converts a string-keyed map to an object.\n * @remarks\n * This function has the same effect as Object.fromEntries(map.entries())\n * in supported versions of Node (\\>= 12.0.0).\n * @param map - The map that the object properties will be sourced from\n */\n static toObject(map) {\n const object = {};\n for (const [key, value] of map.entries()) {\n object[key] = value;\n }\n return object;\n }\n}\nexports.MapExtensions = MapExtensions;\n//# sourceMappingURL=MapExtensions.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MinimumHeap = void 0;\n/**\n * Implements a standard heap data structure for items of type T and a custom comparator.\n * The root will always be the minimum value as determined by the comparator.\n *\n * @public\n */\nclass MinimumHeap {\n /**\n * Constructs a new MinimumHeap instance.\n * @param comparator - a comparator function that determines the order of the items in the heap.\n * If the comparator returns a value less than zero, then `a` will be considered less than `b`.\n * If the comparator returns zero, then `a` and `b` are considered equal.\n * Otherwise, `a` will be considered greater than `b`.\n */\n constructor(comparator) {\n this._items = [];\n this._comparator = comparator;\n }\n /**\n * Returns the number of items in the heap.\n * @returns the number of items in the heap.\n */\n get size() {\n return this._items.length;\n }\n /**\n * Retrieves the root item from the heap without removing it.\n * @returns the root item, or `undefined` if the heap is empty\n */\n peek() {\n return this._items[0];\n }\n /**\n * Retrieves and removes the root item from the heap. The next smallest item will become the new root.\n * @returns the root item, or `undefined` if the heap is empty\n */\n poll() {\n if (this.size > 0) {\n const result = this._items[0];\n const item = this._items.pop();\n const size = this.size;\n if (size === 0) {\n // Short circuit in the trivial case\n return result;\n }\n let index = 0;\n let smallerChildIndex = 1;\n while (smallerChildIndex < size) {\n let smallerChild = this._items[smallerChildIndex];\n const rightChildIndex = smallerChildIndex + 1;\n if (rightChildIndex < size) {\n const rightChild = this._items[rightChildIndex];\n if (this._comparator(rightChild, smallerChild) < 0) {\n smallerChildIndex = rightChildIndex;\n smallerChild = rightChild;\n }\n }\n if (this._comparator(smallerChild, item) < 0) {\n this._items[index] = smallerChild;\n index = smallerChildIndex;\n smallerChildIndex = index * 2 + 1;\n }\n else {\n break;\n }\n }\n // Place the item in its final location satisfying the heap property\n this._items[index] = item;\n return result;\n }\n }\n /**\n * Pushes an item into the heap.\n * @param item - the item to push\n */\n push(item) {\n let index = this.size;\n while (index > 0) {\n // Due to zero-based indexing the parent is not exactly a bit shift\n const parentIndex = ((index + 1) >> 1) - 1;\n const parent = this._items[parentIndex];\n if (this._comparator(item, parent) < 0) {\n this._items[index] = parent;\n index = parentIndex;\n }\n else {\n break;\n }\n }\n this._items[index] = item;\n }\n}\nexports.MinimumHeap = MinimumHeap;\n//# sourceMappingURL=MinimumHeap.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PackageJsonLookup = void 0;\nconst path = __importStar(require(\"path\"));\nconst JsonFile_1 = require(\"./JsonFile\");\nconst Constants_1 = require(\"./Constants\");\nconst FileSystem_1 = require(\"./FileSystem\");\n/**\n * This class provides methods for finding the nearest \"package.json\" for a folder\n * and retrieving the name of the package. The results are cached.\n *\n * @public\n */\nclass PackageJsonLookup {\n /**\n * A singleton instance of `PackageJsonLookup`, which is useful for short-lived processes\n * that can reasonably assume that the file system will not be modified after the cache\n * is populated.\n *\n * @remarks\n * For long-running processes that need to clear the cache at appropriate times,\n * it is recommended to create your own instance of `PackageJsonLookup` instead\n * of relying on this instance.\n */\n static get instance() {\n if (!PackageJsonLookup._instance) {\n PackageJsonLookup._instance = new PackageJsonLookup({ loadExtraFields: true });\n }\n return PackageJsonLookup._instance;\n }\n constructor(parameters) {\n this._loadExtraFields = false;\n if (parameters) {\n if (parameters.loadExtraFields) {\n this._loadExtraFields = parameters.loadExtraFields;\n }\n }\n this.clearCache();\n }\n /**\n * A helper for loading the caller's own package.json file.\n *\n * @remarks\n *\n * This function provides a concise and efficient way for an NPM package to report metadata about itself.\n * For example, a tool might want to report its version.\n *\n * The `loadOwnPackageJson()` probes upwards from the caller's folder, expecting to find a package.json file,\n * which is assumed to be the caller's package. The result is cached, under the assumption that a tool's\n * own package.json (and intermediary folders) will never change during the lifetime of the process.\n *\n * @example\n * ```ts\n * // Report the version of our NPM package\n * const myPackageVersion: string = PackageJsonLookup.loadOwnPackageJson(__dirname).version;\n * console.log(`Cool Tool - Version ${myPackageVersion}`);\n * ```\n *\n * @param dirnameOfCaller - The NodeJS `__dirname` macro for the caller.\n * @returns This function always returns a valid `IPackageJson` object. If any problems are encountered during\n * loading, an exception will be thrown instead.\n */\n static loadOwnPackageJson(dirnameOfCaller) {\n const packageJson = PackageJsonLookup.instance.tryLoadPackageJsonFor(dirnameOfCaller);\n if (packageJson === undefined) {\n throw new Error(`PackageJsonLookup.loadOwnPackageJson() failed to find the caller's package.json.` +\n ` The __dirname was: ${dirnameOfCaller}`);\n }\n if (packageJson.version !== undefined) {\n return packageJson;\n }\n const errorPath = PackageJsonLookup.instance.tryGetPackageJsonFilePathFor(dirnameOfCaller) || 'package.json';\n throw new Error(`PackageJsonLookup.loadOwnPackageJson() failed because the \"version\" field is missing in` +\n ` ${errorPath}`);\n }\n /**\n * Clears the internal file cache.\n * @remarks\n * Call this method if changes have been made to the package.json files on disk.\n */\n clearCache() {\n this._packageFolderCache = new Map();\n this._packageJsonCache = new Map();\n }\n /**\n * Returns the absolute path of a folder containing a package.json file, by looking\n * upwards from the specified fileOrFolderPath. If no package.json can be found,\n * undefined is returned.\n *\n * @remarks\n * The fileOrFolderPath is not required to actually exist on disk.\n * The fileOrFolderPath itself can be the return value, if it is a folder containing\n * a package.json file.\n * Both positive and negative lookup results are cached.\n *\n * @param fileOrFolderPath - a relative or absolute path to a source file or folder\n * that may be part of a package\n * @returns an absolute path to a folder containing a package.json file\n */\n tryGetPackageFolderFor(fileOrFolderPath) {\n // Convert it to an absolute path\n const resolvedFileOrFolderPath = path.resolve(fileOrFolderPath);\n // Optimistically hope that the starting string is already in the cache,\n // in which case we can avoid disk access entirely.\n //\n // (Two lookups are required, because get() cannot distinguish the undefined value\n // versus a missing key.)\n if (this._packageFolderCache.has(resolvedFileOrFolderPath)) {\n return this._packageFolderCache.get(resolvedFileOrFolderPath);\n }\n // Now call the recursive part of the algorithm\n return this._tryGetPackageFolderFor(resolvedFileOrFolderPath);\n }\n /**\n * If the specified file or folder is part of a package, this returns the absolute path\n * to the associated package.json file.\n *\n * @remarks\n * The package folder is determined using the same algorithm\n * as {@link PackageJsonLookup.tryGetPackageFolderFor}.\n *\n * @param fileOrFolderPath - a relative or absolute path to a source file or folder\n * that may be part of a package\n * @returns an absolute path to * package.json file\n */\n tryGetPackageJsonFilePathFor(fileOrFolderPath) {\n const packageJsonFolder = this.tryGetPackageFolderFor(fileOrFolderPath);\n if (!packageJsonFolder) {\n return undefined;\n }\n return path.join(packageJsonFolder, Constants_1.FileConstants.PackageJson);\n }\n /**\n * If the specified file or folder is part of a package, this loads and returns the\n * associated package.json file.\n *\n * @remarks\n * The package folder is determined using the same algorithm\n * as {@link PackageJsonLookup.tryGetPackageFolderFor}.\n *\n * @param fileOrFolderPath - a relative or absolute path to a source file or folder\n * that may be part of a package\n * @returns an IPackageJson object, or undefined if the fileOrFolderPath does not\n * belong to a package\n */\n tryLoadPackageJsonFor(fileOrFolderPath) {\n const packageJsonFilePath = this.tryGetPackageJsonFilePathFor(fileOrFolderPath);\n if (!packageJsonFilePath) {\n return undefined;\n }\n return this.loadPackageJson(packageJsonFilePath);\n }\n /**\n * This function is similar to {@link PackageJsonLookup.tryLoadPackageJsonFor}, except that it does not report\n * an error if the `version` field is missing from the package.json file.\n */\n tryLoadNodePackageJsonFor(fileOrFolderPath) {\n const packageJsonFilePath = this.tryGetPackageJsonFilePathFor(fileOrFolderPath);\n if (!packageJsonFilePath) {\n return undefined;\n }\n return this.loadNodePackageJson(packageJsonFilePath);\n }\n /**\n * Loads the specified package.json file, if it is not already present in the cache.\n *\n * @remarks\n * Unless {@link IPackageJsonLookupParameters.loadExtraFields} was specified,\n * the returned IPackageJson object will contain a subset of essential fields.\n * The returned object should be considered to be immutable; the caller must never\n * modify it.\n *\n * @param jsonFilename - a relative or absolute path to a package.json file\n */\n loadPackageJson(jsonFilename) {\n const packageJson = this.loadNodePackageJson(jsonFilename);\n if (!packageJson.version) {\n throw new Error(`Error reading \"${jsonFilename}\":\\n The required field \"version\" was not found`);\n }\n return packageJson;\n }\n /**\n * This function is similar to {@link PackageJsonLookup.loadPackageJson}, except that it does not report an error\n * if the `version` field is missing from the package.json file.\n */\n loadNodePackageJson(jsonFilename) {\n return this._loadPackageJsonInner(jsonFilename);\n }\n _loadPackageJsonInner(jsonFilename, errorsToIgnore) {\n const loadResult = this._tryLoadNodePackageJsonInner(jsonFilename);\n if (loadResult.error && (errorsToIgnore === null || errorsToIgnore === void 0 ? void 0 : errorsToIgnore.has(loadResult.error))) {\n return undefined;\n }\n switch (loadResult.error) {\n case 'FILE_NOT_FOUND': {\n throw new Error(`Input file not found: ${jsonFilename}`);\n }\n case 'MISSING_NAME_FIELD': {\n throw new Error(`Error reading \"${jsonFilename}\":\\n The required field \"name\" was not found`);\n }\n case 'OTHER_ERROR': {\n throw loadResult.errorObject;\n }\n default: {\n return loadResult.packageJson;\n }\n }\n }\n /**\n * Try to load a package.json file as an INodePackageJson,\n * returning undefined if the found file does not contain a `name` field.\n */\n _tryLoadNodePackageJsonInner(jsonFilename) {\n // Since this will be a cache key, follow any symlinks and get an absolute path\n // to minimize duplication. (Note that duplication can still occur due to e.g. character case.)\n let normalizedFilePath;\n try {\n normalizedFilePath = FileSystem_1.FileSystem.getRealPath(jsonFilename);\n }\n catch (e) {\n if (FileSystem_1.FileSystem.isNotExistError(e)) {\n return {\n error: 'FILE_NOT_FOUND'\n };\n }\n else {\n return {\n error: 'OTHER_ERROR',\n errorObject: e\n };\n }\n }\n let packageJson = this._packageJsonCache.get(normalizedFilePath);\n if (!packageJson) {\n const loadedPackageJson = JsonFile_1.JsonFile.load(normalizedFilePath);\n // Make sure this is really a package.json file. CommonJS has fairly strict requirements,\n // but NPM only requires \"name\" and \"version\"\n if (!loadedPackageJson.name) {\n return {\n error: 'MISSING_NAME_FIELD'\n };\n }\n if (this._loadExtraFields) {\n packageJson = loadedPackageJson;\n }\n else {\n packageJson = {};\n // Unless \"loadExtraFields\" was requested, copy over the essential fields only\n packageJson.bin = loadedPackageJson.bin;\n packageJson.dependencies = loadedPackageJson.dependencies;\n packageJson.description = loadedPackageJson.description;\n packageJson.devDependencies = loadedPackageJson.devDependencies;\n packageJson.exports = loadedPackageJson.exports;\n packageJson.homepage = loadedPackageJson.homepage;\n packageJson.license = loadedPackageJson.license;\n packageJson.main = loadedPackageJson.main;\n packageJson.name = loadedPackageJson.name;\n packageJson.optionalDependencies = loadedPackageJson.optionalDependencies;\n packageJson.peerDependencies = loadedPackageJson.peerDependencies;\n packageJson.private = loadedPackageJson.private;\n packageJson.scripts = loadedPackageJson.scripts;\n packageJson.tsdocMetadata = loadedPackageJson.tsdocMetadata;\n packageJson.typings = loadedPackageJson.typings || loadedPackageJson.types;\n packageJson.version = loadedPackageJson.version;\n }\n Object.freeze(packageJson);\n this._packageJsonCache.set(normalizedFilePath, packageJson);\n }\n return {\n packageJson\n };\n }\n // Recursive part of the algorithm from tryGetPackageFolderFor()\n _tryGetPackageFolderFor(resolvedFileOrFolderPath) {\n // Two lookups are required, because get() cannot distinguish the undefined value\n // versus a missing key.\n if (this._packageFolderCache.has(resolvedFileOrFolderPath)) {\n return this._packageFolderCache.get(resolvedFileOrFolderPath);\n }\n // Is resolvedFileOrFolderPath itself a folder with a valid package.json file? If so, return it.\n const packageJsonFilePath = `${resolvedFileOrFolderPath}/${Constants_1.FileConstants.PackageJson}`;\n const packageJson = this._loadPackageJsonInner(packageJsonFilePath, new Set(['FILE_NOT_FOUND', 'MISSING_NAME_FIELD']));\n if (packageJson) {\n this._packageFolderCache.set(resolvedFileOrFolderPath, resolvedFileOrFolderPath);\n return resolvedFileOrFolderPath;\n }\n // Otherwise go up one level\n const parentFolder = path.dirname(resolvedFileOrFolderPath);\n if (!parentFolder || parentFolder === resolvedFileOrFolderPath) {\n // We reached the root directory without finding a package.json file,\n // so cache the negative result\n this._packageFolderCache.set(resolvedFileOrFolderPath, undefined);\n return undefined; // no match\n }\n // Recurse upwards, caching every step along the way\n const parentResult = this._tryGetPackageFolderFor(parentFolder);\n // Cache the parent's answer as well\n this._packageFolderCache.set(resolvedFileOrFolderPath, parentResult);\n return parentResult;\n }\n}\nexports.PackageJsonLookup = PackageJsonLookup;\n//# sourceMappingURL=PackageJsonLookup.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PackageName = exports.PackageNameParser = void 0;\n/**\n * A configurable parser for validating and manipulating NPM package names such as `my-package` or `@scope/my-package`.\n *\n * @remarks\n * If you do not need to customize the parser configuration, it is recommended to use {@link PackageName}\n * which exposes these operations as a simple static class.\n *\n * @public\n */\nclass PackageNameParser {\n constructor(options = {}) {\n this._options = Object.assign({}, options);\n }\n /**\n * This attempts to parse a package name that may include a scope component.\n * The packageName must not be an empty string.\n * @remarks\n * This function will not throw an exception.\n *\n * @returns an {@link IParsedPackageNameOrError} structure whose `error` property will be\n * nonempty if the string could not be parsed.\n */\n tryParse(packageName) {\n const result = {\n scope: '',\n unscopedName: '',\n error: ''\n };\n let input = packageName;\n if (input === null || input === undefined) {\n result.error = 'The package name must not be null or undefined';\n return result;\n }\n // Rule from npmjs.com:\n // \"The name must be less than or equal to 214 characters. This includes the scope for scoped packages.\"\n if (packageName.length > 214) {\n // Don't attempt to parse a ridiculously long input\n result.error = 'The package name cannot be longer than 214 characters';\n return result;\n }\n if (input[0] === '@') {\n const indexOfScopeSlash = input.indexOf('/');\n if (indexOfScopeSlash <= 0) {\n result.scope = input;\n result.error = `Error parsing \"${packageName}\": The scope must be followed by a slash`;\n return result;\n }\n // Extract the scope substring\n result.scope = input.substr(0, indexOfScopeSlash);\n input = input.substr(indexOfScopeSlash + 1);\n }\n result.unscopedName = input;\n if (result.scope === '@') {\n result.error = `Error parsing \"${packageName}\": The scope name cannot be empty`;\n return result;\n }\n if (result.unscopedName === '') {\n result.error = 'The package name must not be empty';\n return result;\n }\n // Rule from npmjs.com:\n // \"The name can't start with a dot or an underscore.\"\n if (result.unscopedName[0] === '.' || result.unscopedName[0] === '_') {\n result.error = `The package name \"${packageName}\" starts with an invalid character`;\n return result;\n }\n // Convert \"@scope/unscoped-name\" --> \"scopeunscoped-name\"\n const nameWithoutScopeSymbols = (result.scope ? result.scope.slice(1, -1) : '') + result.unscopedName;\n if (!this._options.allowUpperCase) {\n // \"New packages must not have uppercase letters in the name.\"\n // This can't be enforced because \"old\" packages are still actively maintained.\n // Example: https://www.npmjs.com/package/Base64\n // However it's pretty reasonable to require the scope to be lower case\n if (result.scope !== result.scope.toLowerCase()) {\n result.error = `The package scope \"${result.scope}\" must not contain upper case characters`;\n return result;\n }\n }\n // \"The name ends up being part of a URL, an argument on the command line, and a folder name.\n // Therefore, the name can't contain any non-URL-safe characters\"\n const match = nameWithoutScopeSymbols.match(PackageNameParser._invalidNameCharactersRegExp);\n if (match) {\n result.error = `The package name \"${packageName}\" contains an invalid character: \"${match[0]}\"`;\n return result;\n }\n return result;\n }\n /**\n * Same as {@link PackageName.tryParse}, except this throws an exception if the input\n * cannot be parsed.\n * @remarks\n * The packageName must not be an empty string.\n */\n parse(packageName) {\n const result = this.tryParse(packageName);\n if (result.error) {\n throw new Error(result.error);\n }\n return result;\n }\n /**\n * {@inheritDoc IParsedPackageName.scope}\n */\n getScope(packageName) {\n return this.parse(packageName).scope;\n }\n /**\n * {@inheritDoc IParsedPackageName.unscopedName}\n */\n getUnscopedName(packageName) {\n return this.parse(packageName).unscopedName;\n }\n /**\n * Returns true if the specified package name is valid, or false otherwise.\n * @remarks\n * This function will not throw an exception.\n */\n isValidName(packageName) {\n const result = this.tryParse(packageName);\n return !result.error;\n }\n /**\n * Throws an exception if the specified name is not a valid package name.\n * The packageName must not be an empty string.\n */\n validate(packageName) {\n this.parse(packageName);\n }\n /**\n * Combines an optional package scope with an unscoped root name.\n * @param scope - Must be either an empty string, or a scope name such as \"\\@example\"\n * @param unscopedName - Must be a nonempty package name that does not contain a scope\n * @returns A full package name such as \"\\@example/some-library\".\n */\n combineParts(scope, unscopedName) {\n if (scope !== '') {\n if (scope[0] !== '@') {\n throw new Error('The scope must start with an \"@\" character');\n }\n }\n if (scope.indexOf('/') >= 0) {\n throw new Error('The scope must not contain a \"/\" character');\n }\n if (unscopedName[0] === '@') {\n throw new Error('The unscopedName cannot start with an \"@\" character');\n }\n if (unscopedName.indexOf('/') >= 0) {\n throw new Error('The unscopedName must not contain a \"/\" character');\n }\n let result;\n if (scope === '') {\n result = unscopedName;\n }\n else {\n result = scope + '/' + unscopedName;\n }\n // Make sure the result is a valid package name\n this.validate(result);\n return result;\n }\n}\nexports.PackageNameParser = PackageNameParser;\n// encodeURIComponent() escapes all characters except: A-Z a-z 0-9 - _ . ! ~ * ' ( )\n// However, these are disallowed because they are shell characters: ! ~ * ' ( )\nPackageNameParser._invalidNameCharactersRegExp = /[^A-Za-z0-9\\-_\\.]/;\n/**\n * Provides basic operations for validating and manipulating NPM package names such as `my-package`\n * or `@scope/my-package`.\n *\n * @remarks\n * This is the default implementation of {@link PackageNameParser}, exposed as a convenient static class.\n * If you need to configure the parsing rules, use `PackageNameParser` instead.\n *\n * @public\n */\nclass PackageName {\n /** {@inheritDoc PackageNameParser.tryParse} */\n static tryParse(packageName) {\n return PackageName._parser.tryParse(packageName);\n }\n /** {@inheritDoc PackageNameParser.parse} */\n static parse(packageName) {\n return this._parser.parse(packageName);\n }\n /** {@inheritDoc PackageNameParser.getScope} */\n static getScope(packageName) {\n return this._parser.getScope(packageName);\n }\n /** {@inheritDoc PackageNameParser.getUnscopedName} */\n static getUnscopedName(packageName) {\n return this._parser.getUnscopedName(packageName);\n }\n /** {@inheritDoc PackageNameParser.isValidName} */\n static isValidName(packageName) {\n return this._parser.isValidName(packageName);\n }\n /** {@inheritDoc PackageNameParser.validate} */\n static validate(packageName) {\n return this._parser.validate(packageName);\n }\n /** {@inheritDoc PackageNameParser.combineParts} */\n static combineParts(scope, unscopedName) {\n return this._parser.combineParts(scope, unscopedName);\n }\n}\nexports.PackageName = PackageName;\nPackageName._parser = new PackageNameParser();\n//# sourceMappingURL=PackageName.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Path = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * Common operations for manipulating file and directory paths.\n * @remarks\n * This API is intended to eventually be a complete replacement for the NodeJS \"path\" API.\n * @public\n */\nclass Path {\n /**\n * Returns true if \"childPath\" is located inside the \"parentFolderPath\" folder\n * or one of its child folders. Note that \"parentFolderPath\" is not considered to be\n * under itself. The \"childPath\" can refer to any type of file system object.\n *\n * @remarks\n * The indicated file/folder objects are not required to actually exist on disk.\n * For example, \"parentFolderPath\" is interpreted as a folder name even if it refers to a file.\n * If the paths are relative, they will first be resolved using path.resolve().\n */\n static isUnder(childPath, parentFolderPath) {\n // If childPath is under parentPath, then relativePath will be something like\n // \"../..\" or \"..\\\\..\", which consists entirely of periods and slashes.\n // (Note that something like \"....t\" is actually a valid filename, but \"....\" is not.)\n const relativePath = path.relative(childPath, parentFolderPath);\n return Path._relativePathRegex.test(relativePath);\n }\n /**\n * Returns true if \"childPath\" is equal to \"parentFolderPath\", or if it is inside that folder\n * or one of its children. The \"childPath\" can refer to any type of file system object.\n *\n * @remarks\n * The indicated file/folder objects are not required to actually exist on disk.\n * For example, \"parentFolderPath\" is interpreted as a folder name even if it refers to a file.\n * If the paths are relative, they will first be resolved using path.resolve().\n */\n static isUnderOrEqual(childPath, parentFolderPath) {\n const relativePath = path.relative(childPath, parentFolderPath);\n return relativePath === '' || Path._relativePathRegex.test(relativePath);\n }\n /**\n * Returns true if `path1` and `path2` refer to the same underlying path.\n *\n * @remarks\n *\n * The comparison is performed using `path.relative()`.\n */\n static isEqual(path1, path2) {\n return path.relative(path1, path2) === '';\n }\n /**\n * Formats a path to look nice for reporting purposes.\n * @remarks\n * If `pathToConvert` is under the `baseFolder`, then it will be converted to a relative with the `./` prefix\n * unless the {@link IPathFormatConciselyOptions.trimLeadingDotSlash} option is set to `true`.\n * Otherwise, it will be converted to an absolute path.\n *\n * Backslashes will be converted to slashes, unless the path starts with an OS-specific string like `C:\\`.\n */\n static formatConcisely(options) {\n // Same logic as Path.isUnderOrEqual()\n const relativePath = path.relative(options.pathToConvert, options.baseFolder);\n const isUnderOrEqual = relativePath === '' || Path._relativePathRegex.test(relativePath);\n if (isUnderOrEqual) {\n // Note that isUnderOrEqual()'s relativePath is the reverse direction\n const convertedPath = Path.convertToSlashes(path.relative(options.baseFolder, options.pathToConvert));\n if (options.trimLeadingDotSlash) {\n return convertedPath;\n }\n else {\n return `./${convertedPath}`;\n }\n }\n const absolutePath = path.resolve(options.pathToConvert);\n return absolutePath;\n }\n /**\n * Formats a file location to look nice for reporting purposes.\n * @remarks\n * If `pathToFormat` is under the `baseFolder`, then it will be converted to a relative with the `./` prefix.\n * Otherwise, it will be converted to an absolute path.\n *\n * Backslashes will be converted to slashes, unless the path starts with an OS-specific string like `C:\\`.\n */\n static formatFileLocation(options) {\n const { message, format, pathToFormat, baseFolder, line, column } = options;\n // Convert the path to be relative to the base folder, if specified. Otherwise, use\n // the path as-is.\n const filePath = baseFolder\n ? Path.formatConcisely({\n pathToConvert: pathToFormat,\n baseFolder,\n trimLeadingDotSlash: true\n })\n : path.resolve(pathToFormat);\n let formattedFileLocation;\n switch (format) {\n case 'Unix': {\n if (line !== undefined && column !== undefined) {\n formattedFileLocation = `:${line}:${column}`;\n }\n else if (line !== undefined) {\n formattedFileLocation = `:${line}`;\n }\n else {\n formattedFileLocation = '';\n }\n break;\n }\n case 'VisualStudio': {\n if (line !== undefined && column !== undefined) {\n formattedFileLocation = `(${line},${column})`;\n }\n else if (line !== undefined) {\n formattedFileLocation = `(${line})`;\n }\n else {\n formattedFileLocation = '';\n }\n break;\n }\n default: {\n throw new Error(`Unknown format: ${format}`);\n }\n }\n return `${filePath}${formattedFileLocation} - ${message}`;\n }\n /**\n * Replaces Windows-style backslashes with POSIX-style slashes.\n *\n * @remarks\n * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.\n */\n static convertToSlashes(inputPath) {\n return inputPath.replace(/\\\\/g, '/');\n }\n /**\n * Replaces POSIX-style slashes with Windows-style backslashes\n *\n * @remarks\n * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.\n */\n static convertToBackslashes(inputPath) {\n return inputPath.replace(/\\//g, '\\\\');\n }\n /**\n * Replaces slashes or backslashes with the appropriate slash for the current operating system.\n */\n static convertToPlatformDefault(inputPath) {\n return path.sep === '/' ? Path.convertToSlashes(inputPath) : Path.convertToBackslashes(inputPath);\n }\n /**\n * Returns true if the specified path is a relative path and does not use `..` to walk upwards.\n *\n * @example\n * ```ts\n * // These evaluate to true\n * isDownwardRelative('folder');\n * isDownwardRelative('file');\n * isDownwardRelative('folder/');\n * isDownwardRelative('./folder/');\n * isDownwardRelative('./folder/file');\n *\n * // These evaluate to false\n * isDownwardRelative('../folder');\n * isDownwardRelative('folder/../file');\n * isDownwardRelative('/folder/file');\n * ```\n */\n static isDownwardRelative(inputPath) {\n if (path.isAbsolute(inputPath)) {\n return false;\n }\n // Does it contain \"..\"\n if (Path._upwardPathSegmentRegex.test(inputPath)) {\n return false;\n }\n return true;\n }\n}\nexports.Path = Path;\n// Matches a relative path consisting entirely of periods and slashes\n// Example: \".\", \"..\", \"../..\", etc\nPath._relativePathRegex = /^[.\\/\\\\]+$/;\n// Matches a relative path segment that traverses upwards\n// Example: \"a/../b\"\nPath._upwardPathSegmentRegex = /([\\/\\\\]|^)\\.\\.([\\/\\\\]|$)/;\n//# sourceMappingURL=Path.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PosixModeBits = void 0;\n// The PosixModeBits are intended to be used with bitwise operations.\n/* eslint-disable no-bitwise */\n/**\n * An integer value used to specify file permissions for POSIX-like operating systems.\n *\n * @remarks\n *\n * This bitfield corresponds to the \"mode_t\" structure described in this document:\n * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html\n *\n * It is used with NodeJS APIs such as fs.Stat.mode and fs.chmodSync(). These values\n * represent a set of permissions and can be combined using bitwise arithmetic.\n *\n * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.\n *\n * @public\n */\nvar PosixModeBits;\n(function (PosixModeBits) {\n // The bits\n /**\n * Indicates that the item's owner can read the item.\n */\n PosixModeBits[PosixModeBits[\"UserRead\"] = 256] = \"UserRead\";\n /**\n * Indicates that the item's owner can modify the item.\n */\n PosixModeBits[PosixModeBits[\"UserWrite\"] = 128] = \"UserWrite\";\n /**\n * Indicates that the item's owner can execute the item (if it is a file)\n * or search the item (if it is a directory).\n */\n PosixModeBits[PosixModeBits[\"UserExecute\"] = 64] = \"UserExecute\";\n /**\n * Indicates that users belonging to the item's group can read the item.\n */\n PosixModeBits[PosixModeBits[\"GroupRead\"] = 32] = \"GroupRead\";\n /**\n * Indicates that users belonging to the item's group can modify the item.\n */\n PosixModeBits[PosixModeBits[\"GroupWrite\"] = 16] = \"GroupWrite\";\n /**\n * Indicates that users belonging to the item's group can execute the item (if it is a file)\n * or search the item (if it is a directory).\n */\n PosixModeBits[PosixModeBits[\"GroupExecute\"] = 8] = \"GroupExecute\";\n /**\n * Indicates that other users (besides the item's owner user or group) can read the item.\n */\n PosixModeBits[PosixModeBits[\"OthersRead\"] = 4] = \"OthersRead\";\n /**\n * Indicates that other users (besides the item's owner user or group) can modify the item.\n */\n PosixModeBits[PosixModeBits[\"OthersWrite\"] = 2] = \"OthersWrite\";\n /**\n * Indicates that other users (besides the item's owner user or group) can execute the item (if it is a file)\n * or search the item (if it is a directory).\n */\n PosixModeBits[PosixModeBits[\"OthersExecute\"] = 1] = \"OthersExecute\";\n // Helpful aliases\n /**\n * A zero value where no permissions bits are set.\n */\n PosixModeBits[PosixModeBits[\"None\"] = 0] = \"None\";\n /**\n * An alias combining OthersRead, GroupRead, and UserRead permission bits.\n */\n PosixModeBits[PosixModeBits[\"AllRead\"] = 292] = \"AllRead\";\n /**\n * An alias combining OthersWrite, GroupWrite, and UserWrite permission bits.\n */\n PosixModeBits[PosixModeBits[\"AllWrite\"] = 146] = \"AllWrite\";\n /**\n * An alias combining OthersExecute, GroupExecute, and UserExecute permission bits.\n */\n PosixModeBits[PosixModeBits[\"AllExecute\"] = 73] = \"AllExecute\";\n})(PosixModeBits || (exports.PosixModeBits = PosixModeBits = {}));\n//# sourceMappingURL=PosixModeBits.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProtectableMap = void 0;\nconst ProtectableMapView_1 = require(\"./ProtectableMapView\");\n/**\n * The ProtectableMap provides an easy way for an API to expose a `Map<K, V>` property\n * while intercepting and validating any write operations that are performed by\n * consumers of the API.\n *\n * @remarks\n * The ProtectableMap itself is intended to be a private object that only its owner\n * can access directly. Any operations performed directly on the ProtectableMap will\n * bypass the hooks and any validation they perform. The public property that is exposed\n * to API consumers should return {@link ProtectableMap.protectedView} instead.\n *\n * For example, suppose you want to share your `Map<string, number>` data structure,\n * but you want to enforce that the key must always be an upper case string:\n * You could use the onSet() hook to validate the keys and throw an exception\n * if the key is not uppercase.\n *\n * @public\n */\nclass ProtectableMap {\n constructor(parameters) {\n this._protectedView = new ProtectableMapView_1.ProtectableMapView(this, parameters);\n }\n /**\n * The owner of the protectable map should return this object via its public API.\n */\n get protectedView() {\n return this._protectedView;\n }\n // ---------------------------------------------------------------------------\n // lib.es2015.collections contract - write operations\n /**\n * Removes all entries from the map.\n * This operation does NOT invoke the ProtectableMap onClear() hook.\n */\n clear() {\n this._protectedView._clearUnprotected();\n }\n /**\n * Removes the specified key from the map.\n * This operation does NOT invoke the ProtectableMap onDelete() hook.\n */\n delete(key) {\n return this._protectedView._deleteUnprotected(key);\n }\n /**\n * Sets a value for the specified key.\n * This operation does NOT invoke the ProtectableMap onSet() hook.\n */\n set(key, value) {\n this._protectedView._setUnprotected(key, value);\n return this;\n }\n // ---------------------------------------------------------------------------\n // lib.es2015.collections contract - read operations\n /**\n * Performs an operation for each (key, value) entries in the map.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n forEach(callbackfn, thisArg) {\n this._protectedView.forEach(callbackfn);\n }\n /**\n * Retrieves the value for the specified key.\n * @returns undefined if the value is undefined OR if the key is missing;\n * otherwise returns the value associated with the key.\n */\n get(key) {\n return this._protectedView.get(key);\n }\n /**\n * Returns true if the specified key belongs to the map.\n */\n has(key) {\n return this._protectedView.has(key);\n }\n /**\n * Returns the number of (key, value) entries in the map.\n */\n get size() {\n return this._protectedView.size;\n }\n}\nexports.ProtectableMap = ProtectableMap;\n//# sourceMappingURL=ProtectableMap.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProtectableMapView = void 0;\n/**\n * The internal wrapper used by ProtectableMap. It extends the real `Map<K, V>` base class,\n * but hooks the destructive operations (clear/delete/set) to give the owner a chance\n * to block them.\n *\n * NOTE: This is not a public API.\n */\nclass ProtectableMapView extends Map {\n constructor(owner, parameters) {\n super();\n this._owner = owner;\n this._parameters = parameters;\n }\n clear() {\n // override\n if (this._parameters.onClear) {\n this._parameters.onClear(this._owner);\n }\n super.clear();\n }\n delete(key) {\n // override\n if (this._parameters.onDelete) {\n this._parameters.onDelete(this._owner, key);\n }\n return super.delete(key);\n }\n set(key, value) {\n // override\n let modifiedValue = value;\n if (this._parameters.onSet) {\n modifiedValue = this._parameters.onSet(this._owner, key, modifiedValue);\n }\n super.set(key, modifiedValue);\n return this;\n }\n // INTERNAL USAGE ONLY\n _clearUnprotected() {\n super.clear();\n }\n // INTERNAL USAGE ONLY\n _deleteUnprotected(key) {\n return super.delete(key);\n }\n // INTERNAL USAGE ONLY\n _setUnprotected(key, value) {\n super.set(key, value);\n }\n}\nexports.ProtectableMapView = ProtectableMapView;\n//# sourceMappingURL=ProtectableMapView.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Sort = void 0;\n/**\n * Operations for sorting collections.\n *\n * @public\n */\nclass Sort {\n /**\n * Compares `x` and `y` using the JavaScript `>` and `<` operators. This function is suitable for usage as\n * the callback for `array.sort()`.\n *\n * @remarks\n *\n * The JavaScript ordering is generalized so that `undefined` \\< `null` \\< all other values.\n *\n * @returns -1 if `x` is smaller than `y`, 1 if `x` is greater than `y`, or 0 if the values are equal.\n *\n * @example\n *\n * ```ts\n * let array: number[] = [3, 6, 2];\n * array.sort(Sort.compareByValue); // [2, 3, 6]\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static compareByValue(x, y) {\n if (x === y) {\n return 0;\n }\n // Undefined is smaller than anything else\n if (x === undefined) {\n return -1;\n }\n if (y === undefined) {\n return 1;\n }\n // Null is smaller than anything except undefined\n if (x === null) {\n return -1;\n }\n if (y === null) {\n return 1;\n }\n // These comparisons always return false if either of the arguments is \"undefined\".\n // These comparisons return nonsense for \"null\" (true for \"null > -1\", but false for \"null < 0\" and \"null > 0\")\n if (x < y) {\n return -1;\n }\n if (x > y) {\n return 1;\n }\n return 0;\n }\n /**\n * Sorts the array according to a key which is obtained from the array elements.\n * The result is guaranteed to be a stable sort.\n *\n * @example\n *\n * ```ts\n * let array: string[] = [ 'aaa', 'bb', 'c' ];\n * Sort.sortBy(array, x => x.length); // [ 'c', 'bb', 'aaa' ]\n * ```\n */\n static sortBy(array, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n keySelector, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n comparer = Sort.compareByValue) {\n array.sort((x, y) => comparer(keySelector(x), keySelector(y)));\n }\n /**\n * Returns true if the collection is already sorted.\n */\n static isSorted(collection, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n comparer = Sort.compareByValue) {\n let isFirst = true;\n let previous = undefined;\n for (const element of collection) {\n if (isFirst) {\n // Don't start by comparing against undefined.\n isFirst = false;\n }\n else if (comparer(previous, element) > 0) {\n return false;\n }\n previous = element;\n }\n return true;\n }\n /**\n * Returns true if the collection is already sorted by the specified key.\n *\n * @example\n *\n * ```ts\n * let array: string[] = [ 'a', 'bb', 'ccc' ];\n * Sort.isSortedBy(array, x => x.length); // true\n * ```\n */\n static isSortedBy(collection, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n keySelector, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n comparer = Sort.compareByValue) {\n let isFirst = true;\n let previousKey = undefined;\n for (const element of collection) {\n const key = keySelector(element);\n if (isFirst) {\n // Don't start by comparing against undefined.\n isFirst = false;\n }\n else if (comparer(previousKey, key) > 0) {\n return false;\n }\n previousKey = key;\n }\n return true;\n }\n /**\n * Sorts the entries in a Map object according to the map keys.\n * The result is guaranteed to be a stable sort.\n *\n * @example\n *\n * ```ts\n * let map: Map<string, number> = new Map<string, number>();\n * map.set('zebra', 1);\n * map.set('goose', 2);\n * map.set('aardvark', 3);\n * Sort.sortMapKeys(map);\n * console.log(JSON.stringify(Array.from(map.keys()))); // [\"aardvark\",\"goose\",\"zebra\"]\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static sortMapKeys(map, keyComparer = Sort.compareByValue) {\n // Sorting a map is expensive, so first check whether it's already sorted.\n if (Sort.isSorted(map.keys(), keyComparer)) {\n return;\n }\n const pairs = Array.from(map.entries());\n Sort.sortBy(pairs, (x) => x[0], keyComparer);\n map.clear();\n for (const pair of pairs) {\n map.set(pair[0], pair[1]);\n }\n }\n /**\n * Sorts the entries in a Set object according to the specified keys.\n * The result is guaranteed to be a stable sort.\n *\n * @example\n *\n * ```ts\n * let set: Set<string> = new Set<string>();\n * set.add('aaa');\n * set.add('bb');\n * set.add('c');\n * Sort.sortSetBy(set, x => x.length);\n * console.log(Array.from(set)); // ['c', 'bb', 'aaa']\n * ```\n */\n static sortSetBy(set, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n keySelector, keyComparer = Sort.compareByValue) {\n // Sorting a set is expensive, so first check whether it's already sorted.\n if (Sort.isSortedBy(set, keySelector, keyComparer)) {\n return;\n }\n const array = Array.from(set);\n array.sort((x, y) => keyComparer(keySelector(x), keySelector(y)));\n set.clear();\n for (const item of array) {\n set.add(item);\n }\n }\n /**\n * Sorts the entries in a Set object. The result is guaranteed to be a stable sort.\n *\n * @example\n *\n * ```ts\n * let set: Set<string> = new Set<string>();\n * set.add('zebra');\n * set.add('goose');\n * set.add('aardvark');\n * Sort.sortSet(set);\n * console.log(Array.from(set)); // ['aardvark', 'goose', 'zebra']\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static sortSet(set, comparer = Sort.compareByValue) {\n // Sorting a set is expensive, so first check whether it's already sorted.\n if (Sort.isSorted(set, comparer)) {\n return;\n }\n const array = Array.from(set);\n array.sort((x, y) => comparer(x, y));\n set.clear();\n for (const item of array) {\n set.add(item);\n }\n }\n /**\n * Sort the keys deeply given an object or an array.\n *\n * Doesn't handle cyclic reference.\n *\n * @param object - The object to be sorted\n *\n * @example\n *\n * ```ts\n * console.log(Sort.sortKeys({ c: 3, b: 2, a: 1 })); // { a: 1, b: 2, c: 3}\n * ```\n */\n static sortKeys(object) {\n if (!isPlainObject(object) && !Array.isArray(object)) {\n throw new TypeError(`Expected object or array`);\n }\n return Array.isArray(object) ? innerSortArray(object) : innerSortKeys(object);\n }\n}\nexports.Sort = Sort;\nfunction isPlainObject(obj) {\n return obj !== null && typeof obj === 'object';\n}\nfunction innerSortArray(arr) {\n const result = [];\n for (const entry of arr) {\n if (Array.isArray(entry)) {\n result.push(innerSortArray(entry));\n }\n else if (isPlainObject(entry)) {\n result.push(innerSortKeys(entry));\n }\n else {\n result.push(entry);\n }\n }\n return result;\n}\nfunction innerSortKeys(obj) {\n const result = {};\n const keys = Object.keys(obj).sort();\n for (const key of keys) {\n const value = obj[key];\n if (Array.isArray(value)) {\n result[key] = innerSortArray(value);\n }\n else if (isPlainObject(value)) {\n result[key] = innerSortKeys(value);\n }\n else {\n result[key] = value;\n }\n }\n return result;\n}\n//# sourceMappingURL=Sort.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StringBuilder = void 0;\n/**\n * This class allows a large text string to be constructed incrementally by appending small chunks. The final\n * string can be obtained by calling StringBuilder.toString().\n *\n * @remarks\n * A naive approach might use the `+=` operator to append strings: This would have the downside of copying\n * the entire string each time a chunk is appended, resulting in `O(n^2)` bytes of memory being allocated\n * (and later freed by the garbage collector), and many of the allocations could be very large objects.\n * StringBuilder avoids this overhead by accumulating the chunks in an array, and efficiently joining them\n * when `getText()` is finally called.\n *\n * @public\n */\nclass StringBuilder {\n constructor() {\n this._chunks = [];\n }\n /** {@inheritDoc IStringBuilder.append} */\n append(text) {\n this._chunks.push(text);\n }\n /** {@inheritDoc IStringBuilder.toString} */\n toString() {\n if (this._chunks.length === 0) {\n return '';\n }\n if (this._chunks.length > 1) {\n const joined = this._chunks.join('');\n this._chunks.length = 1;\n this._chunks[0] = joined;\n }\n return this._chunks[0];\n }\n}\nexports.StringBuilder = StringBuilder;\n//# sourceMappingURL=StringBuilder.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubprocessTerminator = void 0;\nconst process_1 = __importDefault(require(\"process\"));\nconst Executable_1 = require(\"./Executable\");\n/**\n * When a child process is created, registering it with the SubprocessTerminator will ensure\n * that the child gets terminated when the current process terminates.\n *\n * @remarks\n * This works by hooking the current process's events for SIGTERM/SIGINT/exit, and ensuring the\n * child process gets terminated in those cases.\n *\n * SubprocessTerminator doesn't do anything on Windows, since by default Windows automatically\n * terminates child processes when their parent is terminated.\n *\n * @beta\n */\nclass SubprocessTerminator {\n /**\n * Registers a child process so that it will be terminated automatically if the current process\n * is terminated.\n */\n static killProcessTreeOnExit(subprocess, subprocessOptions) {\n if (typeof subprocess.exitCode === 'number') {\n // Process has already been killed\n return;\n }\n SubprocessTerminator._validateSubprocessOptions(subprocessOptions);\n SubprocessTerminator._ensureInitialized();\n // Closure variable\n const pid = subprocess.pid;\n if (pid === undefined) {\n // The process failed to spawn.\n return;\n }\n subprocess.on('close', (exitCode, signal) => {\n if (SubprocessTerminator._subprocessesByPid.delete(pid)) {\n SubprocessTerminator._logDebug(`untracking #${pid}`);\n }\n });\n SubprocessTerminator._subprocessesByPid.set(pid, {\n subprocess,\n subprocessOptions\n });\n SubprocessTerminator._logDebug(`tracking #${pid}`);\n }\n /**\n * Terminate the child process and all of its children.\n */\n static killProcessTree(subprocess, subprocessOptions) {\n const pid = subprocess.pid;\n if (pid === undefined) {\n // The process failed to spawn.\n return;\n }\n // Don't attempt to kill the same process twice\n if (SubprocessTerminator._subprocessesByPid.delete(pid)) {\n SubprocessTerminator._logDebug(`untracking #${pid} via killProcessTree()`);\n }\n SubprocessTerminator._validateSubprocessOptions(subprocessOptions);\n if (typeof subprocess.exitCode === 'number') {\n // Process has already been killed\n return;\n }\n SubprocessTerminator._logDebug(`terminating #${pid}`);\n if (SubprocessTerminator._isWindows) {\n // On Windows we have a problem that CMD.exe launches child processes, but when CMD.exe is killed\n // the child processes may continue running. Also if we send signals to CMD.exe the child processes\n // will not receive them. The safest solution is not to attempt a graceful shutdown, but simply\n // kill the entire process tree.\n const result = Executable_1.Executable.spawnSync('TaskKill.exe', [\n '/T', // \"Terminates the specified process and any child processes which were started by it.\"\n '/F', // Without this, TaskKill will try to use WM_CLOSE which doesn't work with CLI tools\n '/PID',\n pid.toString()\n ]);\n if (result.status) {\n const output = result.output.join('\\n');\n // Nonzero exit code\n if (output.indexOf('not found') >= 0) {\n // The PID does not exist\n }\n else {\n // Another error occurred, for example TaskKill.exe does not support\n // the expected CLI syntax\n throw new Error(`TaskKill.exe returned exit code ${result.status}:\\n` + output + '\\n');\n }\n }\n }\n else {\n // Passing a negative PID terminates the entire group instead of just the one process\n process_1.default.kill(-pid, 'SIGKILL');\n }\n }\n // Install the hooks\n static _ensureInitialized() {\n if (!SubprocessTerminator._initialized) {\n SubprocessTerminator._initialized = true;\n SubprocessTerminator._logDebug('initialize');\n process_1.default.prependListener('SIGTERM', SubprocessTerminator._onTerminateSignal);\n process_1.default.prependListener('SIGINT', SubprocessTerminator._onTerminateSignal);\n process_1.default.prependListener('exit', SubprocessTerminator._onExit);\n }\n }\n // Uninstall the hooks and perform cleanup\n static _cleanupChildProcesses() {\n if (SubprocessTerminator._initialized) {\n SubprocessTerminator._initialized = false;\n process_1.default.removeListener('SIGTERM', SubprocessTerminator._onTerminateSignal);\n process_1.default.removeListener('SIGINT', SubprocessTerminator._onTerminateSignal);\n const trackedSubprocesses = Array.from(SubprocessTerminator._subprocessesByPid.values());\n let firstError = undefined;\n for (const trackedSubprocess of trackedSubprocesses) {\n try {\n SubprocessTerminator.killProcessTree(trackedSubprocess.subprocess, { detached: true });\n }\n catch (error) {\n if (firstError === undefined) {\n firstError = error;\n }\n }\n }\n if (firstError !== undefined) {\n // This is generally an unexpected error such as the TaskKill.exe command not being found,\n // not a trivial issue such as a nonexistent PID. Since this occurs during process shutdown,\n // we should not interfere with control flow by throwing an exception or calling process.exit().\n // So simply write to STDERR and ensure our exit code indicates the problem.\n // eslint-disable-next-line no-console\n console.error('\\nAn unexpected error was encountered while attempting to clean up child processes:');\n // eslint-disable-next-line no-console\n console.error(firstError.toString());\n if (!process_1.default.exitCode) {\n process_1.default.exitCode = 1;\n }\n }\n }\n }\n static _validateSubprocessOptions(subprocessOptions) {\n if (!SubprocessTerminator._isWindows) {\n if (!subprocessOptions.detached) {\n // Setting detached=true is what creates the process group that we use to kill the children\n throw new Error('killProcessTree() requires detached=true on this operating system');\n }\n }\n }\n static _onExit(exitCode) {\n SubprocessTerminator._logDebug(`received exit(${exitCode})`);\n SubprocessTerminator._cleanupChildProcesses();\n SubprocessTerminator._logDebug(`finished exit()`);\n }\n static _onTerminateSignal(signal) {\n SubprocessTerminator._logDebug(`received signal ${signal}`);\n SubprocessTerminator._cleanupChildProcesses();\n // When a listener is added to SIGTERM, Node.js strangely provides no way to reference\n // the original handler. But we can invoke it by removing our listener and then resending\n // the signal to our own process.\n SubprocessTerminator._logDebug(`relaying ${signal}`);\n process_1.default.kill(process_1.default.pid, signal);\n }\n // For debugging\n static _logDebug(message) {\n //const logLine: string = `SubprocessTerminator: [${process.pid}] ${message}`;\n // fs.writeFileSync('trace.log', logLine + '\\n', { flag: 'a' });\n //console.log(logLine);\n }\n}\nexports.SubprocessTerminator = SubprocessTerminator;\n/**\n * Whether the hooks are installed\n */\nSubprocessTerminator._initialized = false;\n/**\n * The list of registered child processes. Processes are removed from this set if they\n * terminate on their own.\n */\nSubprocessTerminator._subprocessesByPid = new Map();\nSubprocessTerminator._isWindows = process_1.default.platform === 'win32';\n/**\n * The recommended options when creating a child process.\n */\nSubprocessTerminator.RECOMMENDED_OPTIONS = {\n detached: process_1.default.platform !== 'win32'\n};\n//# sourceMappingURL=SubprocessTerminator.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\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 __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nvar __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\nvar __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n};\nvar __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Text = exports.NewlineKind = exports.Encoding = void 0;\nconst os = __importStar(require(\"os\"));\n/**\n * The allowed types of encodings, as supported by Node.js\n * @public\n */\nvar Encoding;\n(function (Encoding) {\n Encoding[\"Utf8\"] = \"utf8\";\n})(Encoding || (exports.Encoding = Encoding = {}));\n/**\n * Enumeration controlling conversion of newline characters.\n * @public\n */\nvar NewlineKind;\n(function (NewlineKind) {\n /**\n * Windows-style newlines\n */\n NewlineKind[\"CrLf\"] = \"\\r\\n\";\n /**\n * POSIX-style newlines\n *\n * @remarks\n * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.\n */\n NewlineKind[\"Lf\"] = \"\\n\";\n /**\n * Default newline type for this operating system (`os.EOL`).\n */\n NewlineKind[\"OsDefault\"] = \"os\";\n})(NewlineKind || (exports.NewlineKind = NewlineKind = {}));\nconst NEWLINE_REGEX = /\\r\\n|\\n\\r|\\r|\\n/g;\nconst NEWLINE_AT_END_REGEX = /(\\r\\n|\\n\\r|\\r|\\n)$/;\nfunction* readLinesFromChunk(\n// eslint-disable-next-line @rushstack/no-new-null\nchunk, encoding, ignoreEmptyLines, state) {\n if (!chunk) {\n return;\n }\n const remaining = state.remaining + (typeof chunk === 'string' ? chunk : chunk.toString(encoding));\n let startIndex = 0;\n const matches = remaining.matchAll(NEWLINE_REGEX);\n for (const match of matches) {\n const endIndex = match.index;\n if (startIndex !== endIndex || !ignoreEmptyLines) {\n yield remaining.substring(startIndex, endIndex);\n }\n startIndex = endIndex + match[0].length;\n }\n state.remaining = remaining.substring(startIndex);\n}\n/**\n * Operations for working with strings that contain text.\n *\n * @remarks\n * The utilities provided by this class are intended to be simple, small, and very\n * broadly applicable.\n *\n * @public\n */\nclass Text {\n /**\n * Returns the same thing as targetString.replace(searchValue, replaceValue), except that\n * all matches are replaced, rather than just the first match.\n * @param input - The string to be modified\n * @param searchValue - The value to search for\n * @param replaceValue - The replacement text\n */\n static replaceAll(input, searchValue, replaceValue) {\n return input.split(searchValue).join(replaceValue);\n }\n /**\n * Converts all newlines in the provided string to use Windows-style CRLF end of line characters.\n */\n static convertToCrLf(input) {\n return input.replace(Text._newLineRegEx, '\\r\\n');\n }\n /**\n * Converts all newlines in the provided string to use POSIX-style LF end of line characters.\n *\n * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.\n */\n static convertToLf(input) {\n return input.replace(Text._newLineRegEx, '\\n');\n }\n /**\n * Converts all newlines in the provided string to use the specified newline type.\n */\n static convertTo(input, newlineKind) {\n return input.replace(Text._newLineRegEx, Text.getNewline(newlineKind));\n }\n /**\n * Returns the newline character sequence for the specified `NewlineKind`.\n */\n static getNewline(newlineKind) {\n switch (newlineKind) {\n case NewlineKind.CrLf:\n return '\\r\\n';\n case NewlineKind.Lf:\n return '\\n';\n case NewlineKind.OsDefault:\n return os.EOL;\n default:\n throw new Error('Unsupported newline kind');\n }\n }\n /**\n * Append characters to the end of a string to ensure the result has a minimum length.\n * @remarks\n * If the string length already exceeds the minimum length, then the string is unchanged.\n * The string is not truncated.\n */\n static padEnd(s, minimumLength, paddingCharacter = ' ') {\n if (paddingCharacter.length !== 1) {\n throw new Error('The paddingCharacter parameter must be a single character.');\n }\n if (s.length < minimumLength) {\n const paddingArray = new Array(minimumLength - s.length);\n paddingArray.unshift(s);\n return paddingArray.join(paddingCharacter);\n }\n else {\n return s;\n }\n }\n /**\n * Append characters to the start of a string to ensure the result has a minimum length.\n * @remarks\n * If the string length already exceeds the minimum length, then the string is unchanged.\n * The string is not truncated.\n */\n static padStart(s, minimumLength, paddingCharacter = ' ') {\n if (paddingCharacter.length !== 1) {\n throw new Error('The paddingCharacter parameter must be a single character.');\n }\n if (s.length < minimumLength) {\n const paddingArray = new Array(minimumLength - s.length);\n paddingArray.push(s);\n return paddingArray.join(paddingCharacter);\n }\n else {\n return s;\n }\n }\n /**\n * If the string is longer than maximumLength characters, truncate it to that length\n * using \"...\" to indicate the truncation.\n *\n * @remarks\n * For example truncateWithEllipsis('1234578', 5) would produce '12...'.\n */\n static truncateWithEllipsis(s, maximumLength) {\n if (maximumLength < 0) {\n throw new Error('The maximumLength cannot be a negative number');\n }\n if (s.length <= maximumLength) {\n return s;\n }\n if (s.length <= 3) {\n return s.substring(0, maximumLength);\n }\n return s.substring(0, maximumLength - 3) + '...';\n }\n /**\n * Returns the input string with a trailing `\\n` character appended, if not already present.\n */\n static ensureTrailingNewline(s, newlineKind = NewlineKind.Lf) {\n // Is there already a newline?\n if (Text._newLineAtEndRegEx.test(s)) {\n return s; // yes, no change\n }\n return s + newlineKind; // no, add it\n }\n /**\n * Escapes a string so that it can be treated as a literal string when used in a regular expression.\n */\n static escapeRegExp(literal) {\n return literal.replace(/[^A-Za-z0-9_]/g, '\\\\$&');\n }\n /**\n * Read lines from an iterable object that returns strings or buffers, and return a generator that\n * produces the lines as strings. The lines will not include the newline characters.\n *\n * @param iterable - An iterable object that returns strings or buffers\n * @param options - Options used when reading the lines from the provided iterable\n */\n static readLinesFromIterableAsync(iterable_1) {\n return __asyncGenerator(this, arguments, function* readLinesFromIterableAsync_1(iterable, options = {}) {\n var _a, e_1, _b, _c;\n const { encoding = Encoding.Utf8, ignoreEmptyLines = false } = options;\n const state = { remaining: '' };\n try {\n for (var _d = true, iterable_2 = __asyncValues(iterable), iterable_2_1; iterable_2_1 = yield __await(iterable_2.next()), _a = iterable_2_1.done, !_a; _d = true) {\n _c = iterable_2_1.value;\n _d = false;\n const chunk = _c;\n yield __await(yield* __asyncDelegator(__asyncValues(readLinesFromChunk(chunk, encoding, ignoreEmptyLines, state))));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = iterable_2.return)) yield __await(_b.call(iterable_2));\n }\n finally { if (e_1) throw e_1.error; }\n }\n const remaining = state.remaining;\n if (remaining.length) {\n yield yield __await(remaining);\n }\n });\n }\n /**\n * Read lines from an iterable object that returns strings or buffers, and return a generator that\n * produces the lines as strings. The lines will not include the newline characters.\n *\n * @param iterable - An iterable object that returns strings or buffers\n * @param options - Options used when reading the lines from the provided iterable\n */\n static *readLinesFromIterable(\n // eslint-disable-next-line @rushstack/no-new-null\n iterable, options = {}) {\n const { encoding = Encoding.Utf8, ignoreEmptyLines = false } = options;\n const state = { remaining: '' };\n for (const chunk of iterable) {\n yield* readLinesFromChunk(chunk, encoding, ignoreEmptyLines, state);\n }\n const remaining = state.remaining;\n if (remaining.length) {\n yield remaining;\n }\n }\n /**\n * Returns a new string that is the input string with the order of characters reversed.\n */\n static reverse(s) {\n // Benchmarks of several algorithms: https://jsbench.me/4bkfflcm2z\n return s.split('').reduce((newString, char) => char + newString, '');\n }\n static splitByNewLines(s) {\n return s === null || s === void 0 ? void 0 : s.split(/\\r?\\n/);\n }\n}\nexports.Text = Text;\nText._newLineRegEx = NEWLINE_REGEX;\nText._newLineAtEndRegEx = NEWLINE_AT_END_REGEX;\n//# sourceMappingURL=Text.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeUuid = void 0;\nconst InternalError_1 = require(\"./InternalError\");\nconst classPrototypeUuidSymbol = Symbol.for('TypeUuid.classPrototypeUuid');\n/**\n * Provides a version-independent implementation of the JavaScript `instanceof` operator.\n *\n * @remarks\n * The JavaScript `instanceof` operator normally only identifies objects from a particular library instance.\n * For example, suppose the NPM package `example-lib` has two published versions 1.2.0 and 1.3.0, and\n * it exports a class called `A`. Suppose some code consumes version `1.3.0` of the library, but it receives\n * an object that was constructed using version `1.2.0`. In this situation `a instanceof A` will return `false`,\n * even though `a` is an instance of `A`. The reason is that there are two prototypes for `A`; one for each\n * version.\n *\n * The `TypeUuid` facility provides a way to make `a instanceof A` return true for both prototypes of `A`,\n * by instead using a universally unique identifier (UUID) to detect object instances.\n *\n * You can use `Symbol.hasInstance` to enable the system `instanceof` operator to recognize type UUID equivalence:\n * ```ts\n * const uuidWidget: string = '9c340ef0-d29f-4e2e-a09f-42bacc59024b';\n * class Widget {\n * public static [Symbol.hasInstance](instance: object): boolean {\n * return TypeUuid.isInstanceOf(instance, uuidWidget);\n * }\n * }\n * ```\n * // Example usage:\n * ```ts\n * import { Widget as Widget1 } from 'v1-of-library';\n * import { Widget as Widget2 } from 'v2-of-library';\n * const widget = new Widget2();\n * console.log(widget instanceof Widget1); // prints true\n * ```\n *\n * @public\n */\nclass TypeUuid {\n /**\n * Registers a JavaScript class as having a type identified by the specified UUID.\n * @privateRemarks\n * We cannot use a construct signature for `targetClass` because it may be an abstract class.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static registerClass(targetClass, typeUuid) {\n if (typeof targetClass !== 'function') {\n throw new Error('The targetClass parameter must be a JavaScript class');\n }\n if (!TypeUuid._uuidRegExp.test(typeUuid)) {\n throw new Error(`The type UUID must be specified as lowercase hexadecimal with dashes: \"${typeUuid}\"`);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const targetClassPrototype = targetClass.prototype;\n if (Object.hasOwnProperty.call(targetClassPrototype, classPrototypeUuidSymbol)) {\n const existingUuid = targetClassPrototype[classPrototypeUuidSymbol];\n throw new InternalError_1.InternalError(`Cannot register the target class ${targetClass.name || ''} typeUuid=${typeUuid}` +\n ` because it was already registered with typeUuid=${existingUuid}`);\n }\n targetClassPrototype[classPrototypeUuidSymbol] = typeUuid;\n }\n /**\n * Returns true if the `targetObject` is an instance of a JavaScript class that was previously\n * registered using the specified `typeUuid`. Base classes are also considered.\n */\n static isInstanceOf(targetObject, typeUuid) {\n if (targetObject === undefined || targetObject === null) {\n return false;\n }\n let objectPrototype = Object.getPrototypeOf(targetObject);\n while (objectPrototype !== undefined && objectPrototype !== null) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const registeredUuid = objectPrototype[classPrototypeUuidSymbol];\n if (registeredUuid === typeUuid) {\n return true;\n }\n // Walk upwards an examine base class prototypes\n objectPrototype = Object.getPrototypeOf(objectPrototype);\n }\n return false;\n }\n}\nexports.TypeUuid = TypeUuid;\nTypeUuid._uuidRegExp = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n//# sourceMappingURL=TypeUuid.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeUuid = exports.SubprocessTerminator = exports.StringBuilder = exports.LegacyAdapters = exports.FileWriter = exports.FileSystem = exports.AlreadyExistsBehavior = exports.Sort = exports.NewlineKind = exports.Text = exports.Encoding = exports.Path = exports.PackageNameParser = exports.PackageName = exports.PackageJsonLookup = exports.ProtectableMap = exports.PosixModeBits = exports.MinimumHeap = exports.MapExtensions = exports.LockFile = exports.JsonSchema = exports.JsonFile = exports.JsonSyntax = exports.InternalError = exports.Import = exports.FileError = exports.Executable = exports.EnvironmentMap = exports.Enum = exports.FolderConstants = exports.FileConstants = exports.AsyncQueue = exports.Async = exports.AlreadyReportedError = void 0;\n/**\n * Core libraries that every NodeJS toolchain project should use.\n *\n * @packageDocumentation\n */\nvar AlreadyReportedError_1 = require(\"./AlreadyReportedError\");\nObject.defineProperty(exports, \"AlreadyReportedError\", { enumerable: true, get: function () { return AlreadyReportedError_1.AlreadyReportedError; } });\nvar Async_1 = require(\"./Async\");\nObject.defineProperty(exports, \"Async\", { enumerable: true, get: function () { return Async_1.Async; } });\nObject.defineProperty(exports, \"AsyncQueue\", { enumerable: true, get: function () { return Async_1.AsyncQueue; } });\nvar Constants_1 = require(\"./Constants\");\nObject.defineProperty(exports, \"FileConstants\", { enumerable: true, get: function () { return Constants_1.FileConstants; } });\nObject.defineProperty(exports, \"FolderConstants\", { enumerable: true, get: function () { return Constants_1.FolderConstants; } });\nvar Enum_1 = require(\"./Enum\");\nObject.defineProperty(exports, \"Enum\", { enumerable: true, get: function () { return Enum_1.Enum; } });\nvar EnvironmentMap_1 = require(\"./EnvironmentMap\");\nObject.defineProperty(exports, \"EnvironmentMap\", { enumerable: true, get: function () { return EnvironmentMap_1.EnvironmentMap; } });\nvar Executable_1 = require(\"./Executable\");\nObject.defineProperty(exports, \"Executable\", { enumerable: true, get: function () { return Executable_1.Executable; } });\nvar FileError_1 = require(\"./FileError\");\nObject.defineProperty(exports, \"FileError\", { enumerable: true, get: function () { return FileError_1.FileError; } });\nvar Import_1 = require(\"./Import\");\nObject.defineProperty(exports, \"Import\", { enumerable: true, get: function () { return Import_1.Import; } });\nvar InternalError_1 = require(\"./InternalError\");\nObject.defineProperty(exports, \"InternalError\", { enumerable: true, get: function () { return InternalError_1.InternalError; } });\nvar JsonFile_1 = require(\"./JsonFile\");\nObject.defineProperty(exports, \"JsonSyntax\", { enumerable: true, get: function () { return JsonFile_1.JsonSyntax; } });\nObject.defineProperty(exports, \"JsonFile\", { enumerable: true, get: function () { return JsonFile_1.JsonFile; } });\nvar JsonSchema_1 = require(\"./JsonSchema\");\nObject.defineProperty(exports, \"JsonSchema\", { enumerable: true, get: function () { return JsonSchema_1.JsonSchema; } });\nvar LockFile_1 = require(\"./LockFile\");\nObject.defineProperty(exports, \"LockFile\", { enumerable: true, get: function () { return LockFile_1.LockFile; } });\nvar MapExtensions_1 = require(\"./MapExtensions\");\nObject.defineProperty(exports, \"MapExtensions\", { enumerable: true, get: function () { return MapExtensions_1.MapExtensions; } });\nvar MinimumHeap_1 = require(\"./MinimumHeap\");\nObject.defineProperty(exports, \"MinimumHeap\", { enumerable: true, get: function () { return MinimumHeap_1.MinimumHeap; } });\nvar PosixModeBits_1 = require(\"./PosixModeBits\");\nObject.defineProperty(exports, \"PosixModeBits\", { enumerable: true, get: function () { return PosixModeBits_1.PosixModeBits; } });\nvar ProtectableMap_1 = require(\"./ProtectableMap\");\nObject.defineProperty(exports, \"ProtectableMap\", { enumerable: true, get: function () { return ProtectableMap_1.ProtectableMap; } });\nvar PackageJsonLookup_1 = require(\"./PackageJsonLookup\");\nObject.defineProperty(exports, \"PackageJsonLookup\", { enumerable: true, get: function () { return PackageJsonLookup_1.PackageJsonLookup; } });\nvar PackageName_1 = require(\"./PackageName\");\nObject.defineProperty(exports, \"PackageName\", { enumerable: true, get: function () { return PackageName_1.PackageName; } });\nObject.defineProperty(exports, \"PackageNameParser\", { enumerable: true, get: function () { return PackageName_1.PackageNameParser; } });\nvar Path_1 = require(\"./Path\");\nObject.defineProperty(exports, \"Path\", { enumerable: true, get: function () { return Path_1.Path; } });\nvar Text_1 = require(\"./Text\");\nObject.defineProperty(exports, \"Encoding\", { enumerable: true, get: function () { return Text_1.Encoding; } });\nObject.defineProperty(exports, \"Text\", { enumerable: true, get: function () { return Text_1.Text; } });\nObject.defineProperty(exports, \"NewlineKind\", { enumerable: true, get: function () { return Text_1.NewlineKind; } });\nvar Sort_1 = require(\"./Sort\");\nObject.defineProperty(exports, \"Sort\", { enumerable: true, get: function () { return Sort_1.Sort; } });\nvar FileSystem_1 = require(\"./FileSystem\");\nObject.defineProperty(exports, \"AlreadyExistsBehavior\", { enumerable: true, get: function () { return FileSystem_1.AlreadyExistsBehavior; } });\nObject.defineProperty(exports, \"FileSystem\", { enumerable: true, get: function () { return FileSystem_1.FileSystem; } });\nvar FileWriter_1 = require(\"./FileWriter\");\nObject.defineProperty(exports, \"FileWriter\", { enumerable: true, get: function () { return FileWriter_1.FileWriter; } });\nvar LegacyAdapters_1 = require(\"./LegacyAdapters\");\nObject.defineProperty(exports, \"LegacyAdapters\", { enumerable: true, get: function () { return LegacyAdapters_1.LegacyAdapters; } });\nvar StringBuilder_1 = require(\"./StringBuilder\");\nObject.defineProperty(exports, \"StringBuilder\", { enumerable: true, get: function () { return StringBuilder_1.StringBuilder; } });\nvar SubprocessTerminator_1 = require(\"./SubprocessTerminator\");\nObject.defineProperty(exports, \"SubprocessTerminator\", { enumerable: true, get: function () { return SubprocessTerminator_1.SubprocessTerminator; } });\nvar TypeUuid_1 = require(\"./TypeUuid\");\nObject.defineProperty(exports, \"TypeUuid\", { enumerable: true, get: function () { return TypeUuid_1.TypeUuid; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnsiEscape = void 0;\nconst Colorize_1 = require(\"./Colorize\");\n/**\n * Operations for working with text strings that contain\n * {@link https://en.wikipedia.org/wiki/ANSI_escape_code | ANSI escape codes}.\n * The most commonly used escape codes set the foreground/background color for console output.\n * @public\n */\nclass AnsiEscape {\n static getEscapeSequenceForAnsiCode(code) {\n return `\\u001b[${code}m`;\n }\n /**\n * Returns the input text with all ANSI escape codes removed. For example, this is useful when saving\n * colorized console output to a log file.\n */\n static removeCodes(text) {\n // eslint-disable-next-line no-control-regex\n return text.replace(AnsiEscape._csiRegExp, '');\n }\n /**\n * Replaces ANSI escape codes with human-readable tokens. This is useful for unit tests\n * that compare text strings in test assertions or snapshot files.\n */\n static formatForTests(text, options) {\n if (!options) {\n options = {};\n }\n let result = text.replace(AnsiEscape._csiRegExp, (capture, csiCode) => {\n // If it is an SGR code, then try to show a friendly token\n const match = csiCode.match(AnsiEscape._sgrRegExp);\n if (match) {\n const sgrParameter = parseInt(match[1], 10);\n const sgrParameterName = AnsiEscape._tryGetSgrFriendlyName(sgrParameter);\n if (sgrParameterName) {\n // Example: \"[black-bg]\"\n return `[${sgrParameterName}]`;\n }\n }\n // Otherwise show the raw code, but without the \"[\" from the CSI prefix\n // Example: \"[31m]\"\n return `[${csiCode}]`;\n });\n if (options.encodeNewlines) {\n result = result\n .replace(AnsiEscape._backslashNRegExp, '[n]')\n .replace(AnsiEscape._backslashRRegExp, `[r]`);\n }\n return result;\n }\n // Returns a human-readable token representing an SGR parameter, or undefined for parameter that is not well-known.\n // The SGR parameter numbers are documented in this table:\n // https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters\n static _tryGetSgrFriendlyName(sgiParameter) {\n switch (sgiParameter) {\n case Colorize_1.SgrParameterAttribute.BlackForeground:\n return 'black';\n case Colorize_1.SgrParameterAttribute.RedForeground:\n return 'red';\n case Colorize_1.SgrParameterAttribute.GreenForeground:\n return 'green';\n case Colorize_1.SgrParameterAttribute.YellowForeground:\n return 'yellow';\n case Colorize_1.SgrParameterAttribute.BlueForeground:\n return 'blue';\n case Colorize_1.SgrParameterAttribute.MagentaForeground:\n return 'magenta';\n case Colorize_1.SgrParameterAttribute.CyanForeground:\n return 'cyan';\n case Colorize_1.SgrParameterAttribute.WhiteForeground:\n return 'white';\n case Colorize_1.SgrParameterAttribute.GrayForeground:\n return 'gray';\n case Colorize_1.SgrParameterAttribute.DefaultForeground:\n return 'default';\n case Colorize_1.SgrParameterAttribute.BlackBackground:\n return 'black-bg';\n case Colorize_1.SgrParameterAttribute.RedBackground:\n return 'red-bg';\n case Colorize_1.SgrParameterAttribute.GreenBackground:\n return 'green-bg';\n case Colorize_1.SgrParameterAttribute.YellowBackground:\n return 'yellow-bg';\n case Colorize_1.SgrParameterAttribute.BlueBackground:\n return 'blue-bg';\n case Colorize_1.SgrParameterAttribute.MagentaBackground:\n return 'magenta-bg';\n case Colorize_1.SgrParameterAttribute.CyanBackground:\n return 'cyan-bg';\n case Colorize_1.SgrParameterAttribute.WhiteBackground:\n return 'white-bg';\n case Colorize_1.SgrParameterAttribute.GrayBackground:\n return 'gray-bg';\n case Colorize_1.SgrParameterAttribute.DefaultBackground:\n return 'default-bg';\n case Colorize_1.SgrParameterAttribute.Bold:\n return 'bold';\n case Colorize_1.SgrParameterAttribute.Dim:\n return 'dim';\n case Colorize_1.SgrParameterAttribute.NormalColorOrIntensity:\n return 'normal';\n case Colorize_1.SgrParameterAttribute.Underline:\n return 'underline';\n case Colorize_1.SgrParameterAttribute.UnderlineOff:\n return 'underline-off';\n case Colorize_1.SgrParameterAttribute.Blink:\n return 'blink';\n case Colorize_1.SgrParameterAttribute.BlinkOff:\n return 'blink-off';\n case Colorize_1.SgrParameterAttribute.InvertColor:\n return 'invert';\n case Colorize_1.SgrParameterAttribute.InvertColorOff:\n return 'invert-off';\n case Colorize_1.SgrParameterAttribute.Hidden:\n return 'hidden';\n case Colorize_1.SgrParameterAttribute.HiddenOff:\n return 'hidden-off';\n default:\n return undefined;\n }\n }\n}\nexports.AnsiEscape = AnsiEscape;\n// For now, we only care about the Control Sequence Introducer (CSI) commands which always start with \"[\".\n// eslint-disable-next-line no-control-regex\nAnsiEscape._csiRegExp = /\\x1b\\[([\\x30-\\x3f]*[\\x20-\\x2f]*[\\x40-\\x7e])/gu;\n// Text coloring is performed using Select Graphic Rendition (SGR) codes, which come after the\n// CSI introducer \"ESC [\". The SGR sequence is a number followed by \"m\".\nAnsiEscape._sgrRegExp = /([0-9]+)m/u;\nAnsiEscape._backslashNRegExp = /\\n/g;\nAnsiEscape._backslashRRegExp = /\\r/g;\n//# sourceMappingURL=AnsiEscape.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CallbackWritable = void 0;\nconst TerminalWritable_1 = require(\"./TerminalWritable\");\n/**\n * This class enables very basic {@link TerminalWritable.onWriteChunk} operations to be implemented\n * as a callback function, avoiding the need to define a subclass of `TerminalWritable`.\n *\n * @remarks\n * `CallbackWritable` is provided as a convenience for very simple situations. For most cases,\n * it is generally preferable to create a proper subclass.\n *\n * @privateRemarks\n * We intentionally do not expose a callback for {@link TerminalWritable.onClose}; if special\n * close behavior is required, it is better to create a subclass.\n *\n * @public\n */\nclass CallbackWritable extends TerminalWritable_1.TerminalWritable {\n constructor(options) {\n super();\n this._callback = options.onWriteChunk;\n }\n onWriteChunk(chunk) {\n this._callback(chunk);\n }\n}\nexports.CallbackWritable = CallbackWritable;\n//# sourceMappingURL=CallbackWritable.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Colorize = exports.SgrParameterAttribute = void 0;\nconst AnsiEscape_1 = require(\"./AnsiEscape\");\nvar SgrParameterAttribute;\n(function (SgrParameterAttribute) {\n SgrParameterAttribute[SgrParameterAttribute[\"BlackForeground\"] = 30] = \"BlackForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"RedForeground\"] = 31] = \"RedForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"GreenForeground\"] = 32] = \"GreenForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"YellowForeground\"] = 33] = \"YellowForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"BlueForeground\"] = 34] = \"BlueForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"MagentaForeground\"] = 35] = \"MagentaForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"CyanForeground\"] = 36] = \"CyanForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"WhiteForeground\"] = 37] = \"WhiteForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"GrayForeground\"] = 90] = \"GrayForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"DefaultForeground\"] = 39] = \"DefaultForeground\";\n SgrParameterAttribute[SgrParameterAttribute[\"BlackBackground\"] = 40] = \"BlackBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"RedBackground\"] = 41] = \"RedBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"GreenBackground\"] = 42] = \"GreenBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"YellowBackground\"] = 43] = \"YellowBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"BlueBackground\"] = 44] = \"BlueBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"MagentaBackground\"] = 45] = \"MagentaBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"CyanBackground\"] = 46] = \"CyanBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"WhiteBackground\"] = 47] = \"WhiteBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"GrayBackground\"] = 100] = \"GrayBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"DefaultBackground\"] = 49] = \"DefaultBackground\";\n SgrParameterAttribute[SgrParameterAttribute[\"Bold\"] = 1] = \"Bold\";\n // On Linux, the \"BoldOff\" code instead causes the text to be double-underlined:\n // https://en.wikipedia.org/wiki/Talk:ANSI_escape_code#SGR_21%E2%80%94%60Bold_off%60_not_widely_supported\n // Use \"NormalColorOrIntensity\" instead\n // BoldOff = 21,\n SgrParameterAttribute[SgrParameterAttribute[\"Dim\"] = 2] = \"Dim\";\n SgrParameterAttribute[SgrParameterAttribute[\"NormalColorOrIntensity\"] = 22] = \"NormalColorOrIntensity\";\n SgrParameterAttribute[SgrParameterAttribute[\"Underline\"] = 4] = \"Underline\";\n SgrParameterAttribute[SgrParameterAttribute[\"UnderlineOff\"] = 24] = \"UnderlineOff\";\n SgrParameterAttribute[SgrParameterAttribute[\"Blink\"] = 5] = \"Blink\";\n SgrParameterAttribute[SgrParameterAttribute[\"BlinkOff\"] = 25] = \"BlinkOff\";\n SgrParameterAttribute[SgrParameterAttribute[\"InvertColor\"] = 7] = \"InvertColor\";\n SgrParameterAttribute[SgrParameterAttribute[\"InvertColorOff\"] = 27] = \"InvertColorOff\";\n SgrParameterAttribute[SgrParameterAttribute[\"Hidden\"] = 8] = \"Hidden\";\n SgrParameterAttribute[SgrParameterAttribute[\"HiddenOff\"] = 28] = \"HiddenOff\";\n})(SgrParameterAttribute || (exports.SgrParameterAttribute = SgrParameterAttribute = {}));\nconst RAINBOW_SEQUENCE = [\n SgrParameterAttribute.RedForeground,\n SgrParameterAttribute.YellowForeground,\n SgrParameterAttribute.GreenForeground,\n SgrParameterAttribute.CyanForeground,\n SgrParameterAttribute.BlueForeground,\n SgrParameterAttribute.MagentaForeground\n];\n/**\n * The static functions on this class are used to produce colored text\n * for use with a terminal that supports ANSI escape codes.\n *\n * Note that this API always generates color codes, regardless of whether\n * the process's stdout is a TTY. The reason is that, in a complex program, the\n * code that is generating strings often does not know were those strings will end\n * up. In some cases, the same log message may get printed both to a shell\n * that supports color AND to a log file that does not.\n *\n * @example\n * ```ts\n * console.log(Colorize.red('Red Text!'))\n * terminal.writeLine(Colorize.green('Green Text!'), ' ', Colorize.blue('Blue Text!'));\n *```\n *\n * @public\n */\nclass Colorize {\n static black(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.BlackForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static red(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.RedForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static green(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.GreenForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static yellow(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.YellowForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static blue(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.BlueForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static magenta(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.MagentaForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static cyan(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.CyanForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static white(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.WhiteForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static gray(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.GrayForeground, SgrParameterAttribute.DefaultForeground, text);\n }\n static blackBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.BlackBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static redBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.RedBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static greenBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.GreenBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static yellowBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.YellowBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static blueBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.BlueBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static magentaBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.MagentaBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static cyanBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.CyanBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static whiteBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.WhiteBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static grayBackground(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.GrayBackground, SgrParameterAttribute.DefaultBackground, text);\n }\n static bold(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.Bold, SgrParameterAttribute.NormalColorOrIntensity, text);\n }\n static dim(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.Dim, SgrParameterAttribute.NormalColorOrIntensity, text);\n }\n static underline(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.Underline, SgrParameterAttribute.UnderlineOff, text);\n }\n static blink(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.Blink, SgrParameterAttribute.BlinkOff, text);\n }\n static invertColor(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.InvertColor, SgrParameterAttribute.InvertColorOff, text);\n }\n static hidden(text) {\n return Colorize._wrapTextInAnsiEscapeCodes(SgrParameterAttribute.Hidden, SgrParameterAttribute.HiddenOff, text);\n }\n static rainbow(text) {\n return Colorize._applyColorSequence(text, RAINBOW_SEQUENCE);\n }\n static _applyColorSequence(text, sequence) {\n let result = '';\n const sequenceLength = sequence.length;\n for (let i = 0; i < text.length; i++) {\n result += AnsiEscape_1.AnsiEscape.getEscapeSequenceForAnsiCode(sequence[i % sequenceLength]) + text[i];\n }\n return result + AnsiEscape_1.AnsiEscape.getEscapeSequenceForAnsiCode(SgrParameterAttribute.DefaultForeground);\n }\n static _wrapTextInAnsiEscapeCodes(startCode, endCode, text) {\n return (AnsiEscape_1.AnsiEscape.getEscapeSequenceForAnsiCode(startCode) +\n text +\n AnsiEscape_1.AnsiEscape.getEscapeSequenceForAnsiCode(endCode));\n }\n}\nexports.Colorize = Colorize;\n//# sourceMappingURL=Colorize.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConsoleTerminalProvider = void 0;\nconst os_1 = require(\"os\");\nconst supports_color_1 = __importDefault(require(\"supports-color\"));\nconst ITerminalProvider_1 = require(\"./ITerminalProvider\");\n/**\n * Terminal provider that prints to STDOUT (for log- and verbose-level messages) and\n * STDERR (for warning- and error-level messages).\n *\n * @beta\n */\nclass ConsoleTerminalProvider {\n constructor(options = {}) {\n /**\n * {@inheritDoc ITerminalProvider.supportsColor}\n */\n this.supportsColor = ConsoleTerminalProvider.supportsColor;\n this.verboseEnabled = !!options.verboseEnabled;\n this.debugEnabled = !!options.debugEnabled;\n }\n /**\n * {@inheritDoc ITerminalProvider.write}\n */\n write(data, severity) {\n switch (severity) {\n case ITerminalProvider_1.TerminalProviderSeverity.warning:\n case ITerminalProvider_1.TerminalProviderSeverity.error: {\n process.stderr.write(data);\n break;\n }\n case ITerminalProvider_1.TerminalProviderSeverity.verbose: {\n if (this.verboseEnabled) {\n process.stdout.write(data);\n }\n break;\n }\n case ITerminalProvider_1.TerminalProviderSeverity.debug: {\n if (this.debugEnabled) {\n process.stdout.write(data);\n }\n break;\n }\n case ITerminalProvider_1.TerminalProviderSeverity.log:\n default: {\n process.stdout.write(data);\n break;\n }\n }\n }\n /**\n * {@inheritDoc ITerminalProvider.eolCharacter}\n */\n get eolCharacter() {\n return os_1.EOL;\n }\n}\nexports.ConsoleTerminalProvider = ConsoleTerminalProvider;\nConsoleTerminalProvider.supportsColor = !!supports_color_1.default.stdout && !!supports_color_1.default.stderr;\n//# sourceMappingURL=ConsoleTerminalProvider.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscardStdoutTransform = void 0;\nconst ITerminalChunk_1 = require(\"./ITerminalChunk\");\nconst TerminalTransform_1 = require(\"./TerminalTransform\");\nvar State;\n(function (State) {\n State[State[\"Okay\"] = 0] = \"Okay\";\n State[State[\"StderrFragment\"] = 1] = \"StderrFragment\";\n State[State[\"InsertLinefeed\"] = 2] = \"InsertLinefeed\";\n})(State || (State = {}));\n/**\n * `DiscardStdoutTransform` discards `stdout` chunks while fixing up malformed `stderr` lines.\n *\n * @remarks\n * Suppose that a poorly behaved process produces output like this:\n *\n * ```ts\n * process.stdout.write('Starting operation...\\n');\n * process.stderr.write('An error occurred');\n * process.stdout.write('\\nFinishing up\\n');\n * process.stderr.write('The process completed with errors\\n');\n * ```\n *\n * When `stdout` and `stderr` are combined on the console, the mistake in the output would not be noticeable:\n * ```\n * Starting operation...\n * An error occurred\n * Finishing up\n * The process completed with errors\n * ```\n *\n * However, if we discard `stdout`, then `stderr` is missing a newline:\n * ```\n * An error occurredThe process completed with errors\n * ```\n *\n * Tooling scripts can introduce these sorts of problems via edge cases that are difficult to find and fix.\n * `DiscardStdoutTransform` can discard the `stdout` stream and fix up `stderr`:\n *\n * ```\n * An error occurred\n * The process completed with errors\n * ```\n *\n * @privateRemarks\n * This class is experimental and marked as `@beta`. The algorithm may need some fine-tuning, or there may\n * be better solutions to this problem.\n *\n * @beta\n */\nclass DiscardStdoutTransform extends TerminalTransform_1.TerminalTransform {\n constructor(options) {\n super(options);\n this._state = State.Okay;\n }\n onWriteChunk(chunk) {\n if (chunk.text.indexOf('\\r') >= 0) {\n throw new Error('DiscardStdoutTransform expects chunks with normalized newlines');\n }\n if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stdout) {\n if (this._state === State.StderrFragment) {\n if (chunk.text.indexOf('\\n') >= 0) {\n this._state = State.InsertLinefeed;\n }\n }\n }\n else if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stderr) {\n let correctedText;\n if (this._state === State.InsertLinefeed) {\n correctedText = '\\n' + chunk.text;\n }\n else {\n correctedText = chunk.text;\n }\n this.destination.writeChunk({ kind: ITerminalChunk_1.TerminalChunkKind.Stderr, text: correctedText });\n if (correctedText.length > 0) {\n if (correctedText[correctedText.length - 1] === '\\n') {\n this._state = State.Okay;\n }\n else {\n this._state = State.StderrFragment;\n }\n }\n }\n else {\n this.destination.writeChunk(chunk);\n }\n }\n}\nexports.DiscardStdoutTransform = DiscardStdoutTransform;\n//# sourceMappingURL=DiscardStdoutTransform.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalChunkKind = void 0;\n/**\n * Specifies the kind of data represented by a {@link ITerminalChunk} object.\n * @public\n */\nvar TerminalChunkKind;\n(function (TerminalChunkKind) {\n /**\n * Indicates a `ITerminalChunk` object representing `stdout` console output.\n */\n TerminalChunkKind[\"Stdout\"] = \"O\";\n /**\n * Indicates a `ITerminalChunk` object representing `stderr` console output.\n */\n TerminalChunkKind[\"Stderr\"] = \"E\";\n})(TerminalChunkKind || (exports.TerminalChunkKind = TerminalChunkKind = {}));\n//# sourceMappingURL=ITerminalChunk.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalProviderSeverity = void 0;\n/**\n * Similar to many popular logging packages, terminal providers support a range of message\n * severities. These severities have built-in formatting defaults in the Terminal object\n * (warnings are yellow, errors are red, etc.).\n *\n * Terminal providers may choose to suppress certain messages based on their severity,\n * or to route some messages to other providers or not based on severity.\n *\n * Severity | Purpose\n * --------- | -------\n * error | Build errors and fatal issues\n * warning | Not necessarily fatal, but indicate a problem the user should fix\n * log | Informational messages\n * verbose | Additional information that may not always be necessary\n * debug | Highest detail level, best used for troubleshooting information\n *\n * @beta\n */\nvar TerminalProviderSeverity;\n(function (TerminalProviderSeverity) {\n TerminalProviderSeverity[TerminalProviderSeverity[\"log\"] = 0] = \"log\";\n TerminalProviderSeverity[TerminalProviderSeverity[\"warning\"] = 1] = \"warning\";\n TerminalProviderSeverity[TerminalProviderSeverity[\"error\"] = 2] = \"error\";\n TerminalProviderSeverity[TerminalProviderSeverity[\"verbose\"] = 3] = \"verbose\";\n TerminalProviderSeverity[TerminalProviderSeverity[\"debug\"] = 4] = \"debug\";\n})(TerminalProviderSeverity || (exports.TerminalProviderSeverity = TerminalProviderSeverity = {}));\n//# sourceMappingURL=ITerminalProvider.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MockWritable = void 0;\nconst AnsiEscape_1 = require(\"./AnsiEscape\");\nconst TerminalWritable_1 = require(\"./TerminalWritable\");\n/**\n * A {@link TerminalWritable} subclass for use by unit tests.\n *\n * @beta\n */\nclass MockWritable extends TerminalWritable_1.TerminalWritable {\n constructor() {\n super(...arguments);\n this.chunks = [];\n }\n onWriteChunk(chunk) {\n this.chunks.push(chunk);\n }\n reset() {\n this.chunks.length = 0;\n }\n getAllOutput() {\n return AnsiEscape_1.AnsiEscape.formatForTests(this.chunks.map((x) => x.text).join(''));\n }\n getFormattedChunks() {\n return this.chunks.map((x) => (Object.assign(Object.assign({}, x), { text: AnsiEscape_1.AnsiEscape.formatForTests(x.text) })));\n }\n}\nexports.MockWritable = MockWritable;\n//# sourceMappingURL=MockWritable.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NormalizeNewlinesTextRewriter = void 0;\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nconst TextRewriter_1 = require(\"./TextRewriter\");\n/**\n * For use with {@link TextRewriterTransform}, this rewriter converts all newlines to\n * a standard format.\n *\n * @public\n */\nclass NormalizeNewlinesTextRewriter extends TextRewriter_1.TextRewriter {\n constructor(options) {\n super();\n this.newlineKind = options.newlineKind;\n this.newline = node_core_library_1.Text.getNewline(options.newlineKind);\n this.ensureNewlineAtEnd = !!options.ensureNewlineAtEnd;\n }\n initialize() {\n return {\n characterToIgnore: '',\n incompleteLine: false\n };\n }\n process(unknownState, text) {\n const state = unknownState;\n let result = '';\n if (text.length > 0) {\n let i = 0;\n do {\n const c = text[i];\n ++i;\n if (c === state.characterToIgnore) {\n state.characterToIgnore = '';\n }\n else if (c === '\\r') {\n result += this.newline;\n state.characterToIgnore = '\\n';\n state.incompleteLine = false;\n }\n else if (c === '\\n') {\n result += this.newline;\n state.characterToIgnore = '\\r';\n state.incompleteLine = false;\n }\n else {\n result += c;\n state.characterToIgnore = '';\n state.incompleteLine = true;\n }\n } while (i < text.length);\n }\n return result;\n }\n close(unknownState) {\n const state = unknownState;\n state.characterToIgnore = '';\n if (state.incompleteLine) {\n state.incompleteLine = false;\n return this.newline;\n }\n else {\n return '';\n }\n }\n}\nexports.NormalizeNewlinesTextRewriter = NormalizeNewlinesTextRewriter;\n//# sourceMappingURL=NormalizeNewlinesTextRewriter.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PrefixProxyTerminalProvider = void 0;\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\n/**\n * Wraps an existing {@link ITerminalProvider} that prefixes each line of output with a specified\n * prefix string.\n *\n * @beta\n */\nclass PrefixProxyTerminalProvider {\n constructor(options) {\n const { terminalProvider } = options;\n this._parentTerminalProvider = terminalProvider;\n if (options.prefix !== undefined) {\n const { prefix } = options;\n this._getPrefix = () => prefix;\n }\n else {\n const { getPrefix } = options;\n this._getPrefix = getPrefix;\n }\n this._isOnNewline = true;\n // eslint-disable-next-line @rushstack/security/no-unsafe-regexp\n this._newlineRegex = new RegExp(`${node_core_library_1.Text.escapeRegExp(terminalProvider.eolCharacter)}|\\\\n`, 'g');\n }\n /** @override */\n get supportsColor() {\n return this._parentTerminalProvider.supportsColor;\n }\n /** @override */\n get eolCharacter() {\n return this._parentTerminalProvider.eolCharacter;\n }\n /** @override */\n write(data, severity) {\n // We need to track newlines to ensure that the prefix is added to each line\n let currentIndex = 0;\n // eslint-disable-next-line @rushstack/no-new-null\n let newlineMatch;\n while ((newlineMatch = this._newlineRegex.exec(data))) {\n // Extract the line, add the prefix, and write it out with the newline\n const newlineIndex = newlineMatch.index;\n const newIndex = newlineIndex + newlineMatch[0].length;\n const prefix = this._isOnNewline ? this._getPrefix() : '';\n const dataToWrite = `${prefix}${data.substring(currentIndex, newIndex)}`;\n this._parentTerminalProvider.write(dataToWrite, severity);\n // Update the currentIndex to start the search from the char after the newline\n currentIndex = newIndex;\n this._isOnNewline = true;\n }\n // The remaining data is not postfixed by a newline, so write out the data and set _isNewline to false\n const remainingData = data.substring(currentIndex);\n if (remainingData.length) {\n const prefix = this._isOnNewline ? this._getPrefix() : '';\n this._parentTerminalProvider.write(`${prefix}${remainingData}`, severity);\n this._isOnNewline = false;\n }\n }\n}\nexports.PrefixProxyTerminalProvider = PrefixProxyTerminalProvider;\n//# sourceMappingURL=PrefixProxyTerminalProvider.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PrintUtilities = exports.DEFAULT_CONSOLE_WIDTH = void 0;\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\n/**\n * A sensible fallback column width for consoles.\n *\n * @public\n */\nexports.DEFAULT_CONSOLE_WIDTH = 80;\n/**\n * A collection of utilities for printing messages to the console.\n *\n * @public\n */\nclass PrintUtilities {\n /**\n * Returns the width of the console, measured in columns\n */\n static getConsoleWidth() {\n var _a;\n return (_a = process.stdout) === null || _a === void 0 ? void 0 : _a.columns;\n }\n static wrapWords(text, maxLineLength, indentOrLinePrefix) {\n const wrappedLines = PrintUtilities.wrapWordsToLines(text, maxLineLength, indentOrLinePrefix // TS is confused by the overloads\n );\n return wrappedLines.join('\\n');\n }\n static wrapWordsToLines(text, maxLineLength, indentOrLinePrefix) {\n var _a;\n let linePrefix;\n switch (typeof indentOrLinePrefix) {\n case 'number':\n linePrefix = ' '.repeat(indentOrLinePrefix);\n break;\n case 'string':\n linePrefix = indentOrLinePrefix;\n break;\n default:\n linePrefix = '';\n break;\n }\n const linePrefixLength = linePrefix.length;\n if (!maxLineLength) {\n maxLineLength = PrintUtilities.getConsoleWidth() || exports.DEFAULT_CONSOLE_WIDTH;\n }\n // Apply word wrapping and the provided line prefix, while also respecting existing newlines\n // and prefix spaces that may exist in the text string already.\n const lines = node_core_library_1.Text.splitByNewLines(text);\n const wrappedLines = [];\n for (const line of lines) {\n if (line.length + linePrefixLength <= maxLineLength) {\n wrappedLines.push(linePrefix + line);\n }\n else {\n const lineAdditionalPrefix = ((_a = line.match(/^\\s*/)) === null || _a === void 0 ? void 0 : _a[0]) || '';\n const whitespaceRegexp = /\\s+/g;\n let currentWhitespaceMatch = null;\n let previousWhitespaceMatch;\n let currentLineStartIndex = lineAdditionalPrefix.length;\n let previousBreakRanOver = false;\n while ((currentWhitespaceMatch = whitespaceRegexp.exec(line)) !== null) {\n if (currentWhitespaceMatch.index + linePrefixLength - currentLineStartIndex > maxLineLength) {\n let whitespaceToSplitAt;\n if (!previousWhitespaceMatch ||\n // Handle the case where there are two words longer than the maxLineLength in a row\n previousBreakRanOver) {\n whitespaceToSplitAt = currentWhitespaceMatch;\n }\n else {\n whitespaceToSplitAt = previousWhitespaceMatch;\n }\n wrappedLines.push(linePrefix +\n lineAdditionalPrefix +\n line.substring(currentLineStartIndex, whitespaceToSplitAt.index));\n previousBreakRanOver = whitespaceToSplitAt.index - currentLineStartIndex > maxLineLength;\n currentLineStartIndex = whitespaceToSplitAt.index + whitespaceToSplitAt[0].length;\n }\n else {\n previousBreakRanOver = false;\n }\n previousWhitespaceMatch = currentWhitespaceMatch;\n }\n if (previousWhitespaceMatch &&\n line.length + linePrefixLength - currentLineStartIndex > maxLineLength) {\n const whitespaceToSplitAt = previousWhitespaceMatch;\n wrappedLines.push(linePrefix +\n lineAdditionalPrefix +\n line.substring(currentLineStartIndex, whitespaceToSplitAt.index));\n currentLineStartIndex = whitespaceToSplitAt.index + whitespaceToSplitAt[0].length;\n }\n if (currentLineStartIndex < line.length) {\n wrappedLines.push(linePrefix + lineAdditionalPrefix + line.substring(currentLineStartIndex));\n }\n }\n }\n return wrappedLines;\n }\n /**\n * Displays a message in the console wrapped in a box UI.\n *\n * @param message - The message to display.\n * @param terminal - The terminal to write the message to.\n * @param boxWidth - The width of the box, defaults to half of the console width.\n */\n static printMessageInBox(message, terminal, boxWidth) {\n if (!boxWidth) {\n const consoleWidth = PrintUtilities.getConsoleWidth() || exports.DEFAULT_CONSOLE_WIDTH;\n boxWidth = Math.floor(consoleWidth / 2);\n }\n const maxLineLength = boxWidth - 10;\n const wrappedMessageLines = PrintUtilities.wrapWordsToLines(message, maxLineLength);\n let longestLineLength = 0;\n const trimmedLines = [];\n for (const line of wrappedMessageLines) {\n const trimmedLine = line.trim();\n trimmedLines.push(trimmedLine);\n longestLineLength = Math.max(longestLineLength, trimmedLine.length);\n }\n if (longestLineLength > boxWidth - 2) {\n // If the longest line is longer than the box, print bars above and below the message\n // ═════════════\n // Message\n // ═════════════\n const headerAndFooter = ` ${'═'.repeat(boxWidth)}`;\n terminal.writeLine(headerAndFooter);\n for (const line of wrappedMessageLines) {\n terminal.writeLine(` ${line}`);\n }\n terminal.writeLine(headerAndFooter);\n }\n else {\n // ╔═══════════╗\n // ║ Message ║\n // ╚═══════════╝\n terminal.writeLine(` ╔${'═'.repeat(boxWidth - 2)}╗`);\n for (const trimmedLine of trimmedLines) {\n const padding = boxWidth - trimmedLine.length - 2;\n const leftPadding = Math.floor(padding / 2);\n const rightPadding = padding - leftPadding;\n terminal.writeLine(` ║${' '.repeat(leftPadding)}${trimmedLine}${' '.repeat(rightPadding)}║`);\n }\n terminal.writeLine(` ╚${'═'.repeat(boxWidth - 2)}╝`);\n }\n }\n}\nexports.PrintUtilities = PrintUtilities;\n//# sourceMappingURL=PrintUtilities.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveColorsTextRewriter = void 0;\nconst AnsiEscape_1 = require(\"./AnsiEscape\");\nconst TextRewriter_1 = require(\"./TextRewriter\");\nvar State;\n(function (State) {\n // Buffer is empty, and we're looking for the ESC character\n State[State[\"Start\"] = 0] = \"Start\";\n // We're looking for the '[' character\n State[State[\"AwaitingBracket\"] = 1] = \"AwaitingBracket\";\n // We're reading the codes after the '[' character\n State[State[\"ReadingCodes\"] = 2] = \"ReadingCodes\";\n})(State || (State = {}));\n/**\n * For use with {@link TextRewriterTransform}, this rewriter removes ANSI escape codes\n * including colored text.\n *\n * @remarks\n * The implementation also removes other ANSI escape codes such as cursor positioning.\n * The specific set of affected codes may be adjusted in the future.\n *\n * @public\n */\nclass RemoveColorsTextRewriter extends TextRewriter_1.TextRewriter {\n initialize() {\n return { buffer: '', parseState: State.Start };\n }\n process(unknownState, text) {\n const state = unknownState;\n // We will be matching AnsiEscape._csiRegExp:\n //\n // /\\x1b\\[([\\x30-\\x3f]*[\\x20-\\x2f]*[\\x40-\\x7e])/gu\n //\n const ESC = '\\x1b';\n let result = '';\n let index = 0;\n while (index < text.length) {\n if (state.parseState === State.Start) {\n // The buffer is empty, which means we haven't found anything yet\n const csiIndex = text.indexOf(ESC, index);\n if (csiIndex < 0) {\n // We reached the end of \"text\" without finding another CSI prefix\n result += text.substring(index);\n break;\n }\n // Append everything up to the CSI prefix\n result += text.substring(index, csiIndex);\n // Save the partial match in the buffer\n state.buffer = ESC;\n index = csiIndex + 1;\n state.parseState = State.AwaitingBracket;\n }\n else {\n // The buffer has characters, which means we started matching a partial sequence\n // Read another character into the buffer\n const c = text[index];\n ++index;\n state.buffer += c;\n if (state.parseState === State.AwaitingBracket) {\n if (c === '[') {\n state.parseState = State.ReadingCodes;\n }\n else {\n // Failed to match, so append the buffer and start over\n result += state.buffer;\n state.buffer = '';\n state.parseState = State.Start;\n }\n }\n else {\n // state.state === State.ReadingCodes\n // Stop when we reach any character that is not [\\x30-\\x3f] or [\\x20-\\x2f]\n const code = c.charCodeAt(0);\n if (code < 0x20 || code > 0x3f) {\n result += AnsiEscape_1.AnsiEscape.removeCodes(state.buffer);\n state.buffer = '';\n state.parseState = State.Start;\n }\n }\n }\n }\n return result;\n }\n close(unknownState) {\n const state = unknownState;\n const result = state.buffer;\n state.buffer = '';\n return result;\n }\n}\nexports.RemoveColorsTextRewriter = RemoveColorsTextRewriter;\n//# sourceMappingURL=RemoveColorsTextRewriter.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SplitterTransform = void 0;\nconst TerminalWritable_1 = require(\"./TerminalWritable\");\n/**\n * Use this instead of {@link TerminalTransform} if you need to output `ITerminalChunk`\n * data to more than one destination.\n *\n * @remarks\n *\n * Splitting streams complicates the pipeline topology and can make debugging more difficult.\n * For this reason, it is modeled as an explicit `SplitterTransform` node, rather than\n * as a built-in feature of `TerminalTransform`.\n *\n * @public\n */\nclass SplitterTransform extends TerminalWritable_1.TerminalWritable {\n constructor(options) {\n super();\n this.destinations = [...options.destinations];\n }\n onWriteChunk(chunk) {\n for (const destination of this.destinations) {\n destination.writeChunk(chunk);\n }\n }\n onClose() {\n const errors = [];\n // If an exception is thrown, try to ensure that the other destinations get closed properly\n for (const destination of this.destinations) {\n if (!destination.preventAutoclose) {\n try {\n destination.close();\n }\n catch (error) {\n errors.push(error);\n }\n }\n }\n if (errors.length > 0) {\n throw errors[0];\n }\n }\n}\nexports.SplitterTransform = SplitterTransform;\n//# sourceMappingURL=SplitterTransform.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StderrLineTransform = void 0;\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nconst ITerminalChunk_1 = require(\"./ITerminalChunk\");\nconst TerminalTransform_1 = require(\"./TerminalTransform\");\n/**\n * `StderrLineTransform` normalizes lines that mix characters from `stdout` and `stderr`,\n * so that each output line is routed entirely to `stdout` or `stderr`.\n *\n * @remarks\n * IMPORTANT: This transform assumes that its input has been normalized to use `\"\\n\"` newlines.\n *\n * IMPORTANT: This transform does not produce realtime output, because lines are buffered\n * until a newline character is encountered.\n *\n * Suppose that a poorly behaved process produces output like this:\n *\n * ```ts\n * process.stderr.write('An error occurred, cleaning up');\n * process.stdout.write('.'); // (delay)\n * process.stdout.write('.'); // (delay)\n * process.stdout.write('.');\n * process.stdout.write('\\n');\n * process.stderr.write('The process completed with errors\\n');\n * ```\n *\n * When `stdout` and `stderr` are combined on the console, the mistake in the output would not be noticeable:\n * ```\n * An error occurred, cleaning up...\n * The process completed with errors\n * ```\n *\n * However, if we discard `stdout`, then `stderr` is malformed:\n * ```\n * An error occurred, cleaning upThe process completed with errors\n * ```\n *\n * Tooling scripts can introduce these sorts of problems via edge cases that are difficult to find and fix.\n *\n * `StderrLineTransform` normalizes the output so that if a combined line contains any `stderr` characters,\n * then the entire line is routed to `stderr`. Later, if we discard `stdout`, then the output will\n * preserve the appropriate context:\n *\n * ```\n * An error occurred, cleaning up...\n * The process completed with errors\n * ```\n *\n * @privateRemarks\n * This class is experimental and marked as `@beta`. The algorithm may need some fine-tuning, or there may\n * be better solutions to this problem.\n *\n * @beta\n */\nclass StderrLineTransform extends TerminalTransform_1.TerminalTransform {\n constructor(options) {\n super(options);\n this._accumulatedLine = '';\n this._accumulatedStderr = false;\n this.newline = node_core_library_1.Text.getNewline(options.newlineKind || node_core_library_1.NewlineKind.Lf);\n }\n onWriteChunk(chunk) {\n if (chunk.text.indexOf('\\r') >= 0) {\n throw new Error('StderrLineTransform expects chunks with normalized newlines');\n }\n // After _newlineNormalizerTransform was applied, we can now assume that all newlines\n // use the \"\\n\" string\n const text = chunk.text;\n let startIndex = 0;\n while (startIndex < text.length) {\n if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stderr) {\n this._accumulatedStderr = true;\n }\n const endIndex = text.indexOf('\\n', startIndex);\n if (endIndex < 0) {\n // we did not find \\n, so simply append\n this._accumulatedLine += text.substring(startIndex);\n break;\n }\n // append everything up to \\n\n this._accumulatedLine += text.substring(startIndex, endIndex);\n this._processAccumulatedLine();\n // skip the \\n\n startIndex = endIndex + 1;\n }\n }\n onClose() {\n if (this._accumulatedLine.length > 0) {\n this._processAccumulatedLine();\n }\n this.autocloseDestination();\n }\n _processAccumulatedLine() {\n this._accumulatedLine += this.newline;\n if (this._accumulatedStderr) {\n this.destination.writeChunk({\n kind: ITerminalChunk_1.TerminalChunkKind.Stderr,\n text: this._accumulatedLine\n });\n }\n else {\n this.destination.writeChunk({\n kind: ITerminalChunk_1.TerminalChunkKind.Stdout,\n text: this._accumulatedLine\n });\n }\n this._accumulatedLine = '';\n this._accumulatedStderr = false;\n }\n}\nexports.StderrLineTransform = StderrLineTransform;\n//# sourceMappingURL=StdioLineTransform.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StdioSummarizer = void 0;\nconst ITerminalChunk_1 = require(\"./ITerminalChunk\");\nconst TerminalWritable_1 = require(\"./TerminalWritable\");\n/**\n * Summarizes the results of a failed build task by returning a subset of `stderr` output not to exceed\n * a specified maximum number of lines.\n *\n * @remarks\n * IMPORTANT: This transform assumes that its input was prepared by {@link StderrLineTransform}, so that each\n * {@link ITerminalChunk.text} item is a single line terminated by a `\"\\n\"` character.\n *\n * The {@link IStdioSummarizerOptions.leadingLines} and {@link IStdioSummarizerOptions.trailingLines}\n * counts specify the maximum number of lines to be returned. Any additional lines will be omitted.\n * For example, if `leadingLines` and `trailingLines` were set to `3`, then the summary of 16 `stderr` lines might\n * look like this:\n *\n * ```\n * Line 1\n * Line 2\n * Line 3\n * ...10 lines omitted...\n * Line 14\n * Line 15\n * Line 16\n * ```\n *\n * If the `stderr` output is completely empty, then the `stdout` output will be summarized instead.\n *\n * @beta\n */\nclass StdioSummarizer extends TerminalWritable_1.TerminalWritable {\n constructor(options) {\n super(options);\n this._abridgedOmittedLines = 0;\n if (!options) {\n options = {};\n }\n this._leadingLines = options.leadingLines !== undefined ? options.leadingLines : 10;\n this._trailingLines = options.trailingLines !== undefined ? options.trailingLines : 10;\n this._abridgedLeading = [];\n this._abridgedTrailing = [];\n this._abridgedStderr = false;\n }\n /**\n * Returns the summary report.\n *\n * @remarks\n * The `close()` method must be called before `getReport()` can be used.\n */\n getReport() {\n if (this.isOpen) {\n throw new Error('The summary cannot be prepared until after close() is called.');\n }\n const report = [...this._abridgedLeading];\n if (this._abridgedOmittedLines === 1) {\n report.push(` ...${this._abridgedOmittedLines} line omitted...\\n`);\n }\n if (this._abridgedOmittedLines > 1) {\n report.push(` ...${this._abridgedOmittedLines} lines omitted...\\n`);\n }\n report.push(...this._abridgedTrailing);\n return report.join('');\n }\n onWriteChunk(chunk) {\n if (chunk.text.length === 0 || chunk.text[chunk.text.length - 1] !== '\\n') {\n throw new Error('StdioSummarizer expects chunks that were separated parsed into lines by StderrLineTransform\\n' +\n ' Invalid input: ' +\n JSON.stringify(chunk.text));\n }\n if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stderr && !this._abridgedStderr) {\n // The first time we see stderr, switch to capturing stderr\n this._abridgedStderr = true;\n this._abridgedLeading.length = 0;\n this._abridgedTrailing.length = 0;\n this._abridgedOmittedLines = 0;\n }\n else if (this._abridgedStderr && chunk.kind !== ITerminalChunk_1.TerminalChunkKind.Stderr) {\n // If we're capturing stderr, then ignore non-stderr input\n return;\n }\n // Did we capture enough leading lines?\n if (this._abridgedLeading.length < this._leadingLines) {\n this._abridgedLeading.push(chunk.text);\n return;\n }\n this._abridgedTrailing.push(chunk.text);\n // If we captured to many trailing lines, omit the extras\n while (this._abridgedTrailing.length > this._trailingLines) {\n this._abridgedTrailing.shift();\n ++this._abridgedOmittedLines;\n }\n }\n}\nexports.StdioSummarizer = StdioSummarizer;\n//# sourceMappingURL=StdioSummarizer.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StdioWritable = void 0;\nconst process_1 = __importDefault(require(\"process\"));\nconst ITerminalChunk_1 = require(\"./ITerminalChunk\");\nconst TerminalWritable_1 = require(\"./TerminalWritable\");\n/**\n * A {@link TerminalWritable} subclass that writes its output directly to the process `stdout` and `stderr`\n * streams.\n *\n * @remarks\n * This is the standard output target for a process. You normally do not need to construct\n * this class; the {@link StdioWritable.\"instance\"} singleton can be used instead.\n *\n * @public\n */\nclass StdioWritable extends TerminalWritable_1.TerminalWritable {\n onWriteChunk(chunk) {\n if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stdout) {\n process_1.default.stdout.write(chunk.text);\n }\n else if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stderr) {\n process_1.default.stderr.write(chunk.text);\n }\n }\n}\nexports.StdioWritable = StdioWritable;\nStdioWritable.instance = new StdioWritable();\n//# sourceMappingURL=StdioWritable.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StringBufferTerminalProvider = void 0;\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nconst ITerminalProvider_1 = require(\"./ITerminalProvider\");\nconst AnsiEscape_1 = require(\"./AnsiEscape\");\n/**\n * Terminal provider that stores written data in buffers separated by severity.\n * This terminal provider is designed to be used when code that prints to a terminal\n * is being unit tested.\n *\n * @beta\n */\nclass StringBufferTerminalProvider {\n constructor(supportsColor = false) {\n this._standardBuffer = new node_core_library_1.StringBuilder();\n this._verboseBuffer = new node_core_library_1.StringBuilder();\n this._debugBuffer = new node_core_library_1.StringBuilder();\n this._warningBuffer = new node_core_library_1.StringBuilder();\n this._errorBuffer = new node_core_library_1.StringBuilder();\n this._supportsColor = supportsColor;\n }\n /**\n * {@inheritDoc ITerminalProvider.write}\n */\n write(data, severity) {\n switch (severity) {\n case ITerminalProvider_1.TerminalProviderSeverity.warning: {\n this._warningBuffer.append(data);\n break;\n }\n case ITerminalProvider_1.TerminalProviderSeverity.error: {\n this._errorBuffer.append(data);\n break;\n }\n case ITerminalProvider_1.TerminalProviderSeverity.verbose: {\n this._verboseBuffer.append(data);\n break;\n }\n case ITerminalProvider_1.TerminalProviderSeverity.debug: {\n this._debugBuffer.append(data);\n break;\n }\n case ITerminalProvider_1.TerminalProviderSeverity.log:\n default: {\n this._standardBuffer.append(data);\n break;\n }\n }\n }\n /**\n * {@inheritDoc ITerminalProvider.eolCharacter}\n */\n get eolCharacter() {\n return '\\n';\n }\n /**\n * {@inheritDoc ITerminalProvider.supportsColor}\n */\n get supportsColor() {\n return this._supportsColor;\n }\n /**\n * Get everything that has been written at log-level severity.\n */\n getOutput(options) {\n return this._normalizeOutput(this._standardBuffer.toString(), options);\n }\n /**\n * @deprecated - use {@link StringBufferTerminalProvider.getVerboseOutput}\n */\n getVerbose(options) {\n return this.getVerboseOutput(options);\n }\n /**\n * Get everything that has been written at verbose-level severity.\n */\n getVerboseOutput(options) {\n return this._normalizeOutput(this._verboseBuffer.toString(), options);\n }\n /**\n * Get everything that has been written at debug-level severity.\n */\n getDebugOutput(options) {\n return this._normalizeOutput(this._debugBuffer.toString(), options);\n }\n /**\n * Get everything that has been written at error-level severity.\n */\n getErrorOutput(options) {\n return this._normalizeOutput(this._errorBuffer.toString(), options);\n }\n /**\n * Get everything that has been written at warning-level severity.\n */\n getWarningOutput(options) {\n return this._normalizeOutput(this._warningBuffer.toString(), options);\n }\n _normalizeOutput(s, options) {\n options = Object.assign({ normalizeSpecialCharacters: true }, (options || {}));\n s = node_core_library_1.Text.convertToLf(s);\n if (options.normalizeSpecialCharacters) {\n return AnsiEscape_1.AnsiEscape.formatForTests(s, { encodeNewlines: true });\n }\n else {\n return s;\n }\n }\n}\nexports.StringBufferTerminalProvider = StringBufferTerminalProvider;\n//# sourceMappingURL=StringBufferTerminalProvider.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Terminal = void 0;\nconst ITerminalProvider_1 = require(\"./ITerminalProvider\");\nconst Colorize_1 = require(\"./Colorize\");\nconst AnsiEscape_1 = require(\"./AnsiEscape\");\n/**\n * Colors used with {@link ILegacyColorableSequence}.\n */\nvar ColorValue;\n(function (ColorValue) {\n ColorValue[ColorValue[\"Black\"] = 0] = \"Black\";\n ColorValue[ColorValue[\"Red\"] = 1] = \"Red\";\n ColorValue[ColorValue[\"Green\"] = 2] = \"Green\";\n ColorValue[ColorValue[\"Yellow\"] = 3] = \"Yellow\";\n ColorValue[ColorValue[\"Blue\"] = 4] = \"Blue\";\n ColorValue[ColorValue[\"Magenta\"] = 5] = \"Magenta\";\n ColorValue[ColorValue[\"Cyan\"] = 6] = \"Cyan\";\n ColorValue[ColorValue[\"White\"] = 7] = \"White\";\n ColorValue[ColorValue[\"Gray\"] = 8] = \"Gray\";\n})(ColorValue || (ColorValue = {}));\n/**\n * Text styles used with {@link ILegacyColorableSequence}.\n */\nvar TextAttribute;\n(function (TextAttribute) {\n TextAttribute[TextAttribute[\"Bold\"] = 0] = \"Bold\";\n TextAttribute[TextAttribute[\"Dim\"] = 1] = \"Dim\";\n TextAttribute[TextAttribute[\"Underline\"] = 2] = \"Underline\";\n TextAttribute[TextAttribute[\"Blink\"] = 3] = \"Blink\";\n TextAttribute[TextAttribute[\"InvertColor\"] = 4] = \"InvertColor\";\n TextAttribute[TextAttribute[\"Hidden\"] = 5] = \"Hidden\";\n})(TextAttribute || (TextAttribute = {}));\n/**\n * This class facilitates writing to a console.\n *\n * @beta\n */\nclass Terminal {\n constructor(provider) {\n this._providers = new Set();\n this._providers.add(provider);\n }\n /**\n * {@inheritdoc ITerminal.registerProvider}\n */\n registerProvider(provider) {\n this._providers.add(provider);\n }\n /**\n * {@inheritdoc ITerminal.unregisterProvider}\n */\n unregisterProvider(provider) {\n if (this._providers.has(provider)) {\n this._providers.delete(provider);\n }\n }\n /**\n * {@inheritdoc ITerminal.write}\n */\n write(...messageParts) {\n const { parts } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(parts, ITerminalProvider_1.TerminalProviderSeverity.log, false);\n }\n /**\n * {@inheritdoc ITerminal.writeLine}\n */\n writeLine(...messageParts) {\n const { parts } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(parts, ITerminalProvider_1.TerminalProviderSeverity.log, true);\n }\n /**\n * {@inheritdoc ITerminal.writeWarning}\n */\n writeWarning(...messageParts) {\n const { parts, options: { doNotOverrideSgrCodes } } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(doNotOverrideSgrCodes\n ? parts\n : parts.map((part) => Colorize_1.Colorize.yellow(AnsiEscape_1.AnsiEscape.removeCodes(part))), ITerminalProvider_1.TerminalProviderSeverity.warning, false);\n }\n /**\n * {@inheritdoc ITerminal.writeWarningLine}\n */\n writeWarningLine(...messageParts) {\n const { parts, options: { doNotOverrideSgrCodes } } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(doNotOverrideSgrCodes\n ? parts\n : parts.map((part) => Colorize_1.Colorize.yellow(AnsiEscape_1.AnsiEscape.removeCodes(part))), ITerminalProvider_1.TerminalProviderSeverity.warning, true);\n }\n /**\n * {@inheritdoc ITerminal.writeError}\n */\n writeError(...messageParts) {\n const { parts, options: { doNotOverrideSgrCodes } } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(doNotOverrideSgrCodes ? parts : parts.map((part) => Colorize_1.Colorize.red(AnsiEscape_1.AnsiEscape.removeCodes(part))), ITerminalProvider_1.TerminalProviderSeverity.error, false);\n }\n /**\n * {@inheritdoc ITerminal.writeErrorLine}\n */\n writeErrorLine(...messageParts) {\n const { parts, options: { doNotOverrideSgrCodes } } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(doNotOverrideSgrCodes ? parts : parts.map((part) => Colorize_1.Colorize.red(AnsiEscape_1.AnsiEscape.removeCodes(part))), ITerminalProvider_1.TerminalProviderSeverity.error, true);\n }\n /**\n * {@inheritdoc ITerminal.writeVerbose}\n */\n writeVerbose(...messageParts) {\n const { parts } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(parts, ITerminalProvider_1.TerminalProviderSeverity.verbose, false);\n }\n /**\n * {@inheritdoc ITerminal.writeVerboseLine}\n */\n writeVerboseLine(...messageParts) {\n const { parts } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(parts, ITerminalProvider_1.TerminalProviderSeverity.verbose, true);\n }\n /**\n * {@inheritdoc ITerminal.writeDebug}\n */\n writeDebug(...messageParts) {\n const { parts } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(parts, ITerminalProvider_1.TerminalProviderSeverity.debug, false);\n }\n /**\n * {@inheritdoc ITerminal.writeDebugLine}\n */\n writeDebugLine(...messageParts) {\n const { parts } = this._normalizeWriteParameters(messageParts);\n this._writeSegmentsToProviders(parts, ITerminalProvider_1.TerminalProviderSeverity.debug, true);\n }\n _writeSegmentsToProviders(segments, severity, followedByEol) {\n const linesSegments = [[]];\n let currentLineSegments = linesSegments[0];\n for (const segment of segments) {\n if (typeof segment === 'string') {\n currentLineSegments.push(segment);\n }\n else {\n if (segment.isEol) {\n linesSegments.push([]);\n currentLineSegments = linesSegments[linesSegments.length - 1];\n }\n else {\n currentLineSegments.push(this._serializeLegacyColorableSequence(segment));\n }\n }\n }\n const lines = [];\n for (const lineSegments of linesSegments) {\n lines.push(lineSegments.join(''));\n }\n if (followedByEol) {\n lines.push('');\n }\n let linesWithoutColor;\n const concatenatedLinesWithColorByNewlineChar = new Map();\n const concatenatedLinesWithoutColorByNewlineChar = new Map();\n for (const provider of this._providers) {\n let textToWrite;\n const eol = provider.eolCharacter;\n if (provider.supportsColor) {\n textToWrite = concatenatedLinesWithColorByNewlineChar.get(eol);\n if (!textToWrite) {\n textToWrite = lines.join(eol);\n concatenatedLinesWithColorByNewlineChar.set(eol, textToWrite);\n }\n }\n else {\n textToWrite = concatenatedLinesWithoutColorByNewlineChar.get(eol);\n if (!textToWrite) {\n if (!linesWithoutColor) {\n linesWithoutColor = [];\n for (const line of lines) {\n linesWithoutColor.push(AnsiEscape_1.AnsiEscape.removeCodes(line));\n }\n }\n textToWrite = linesWithoutColor.join(eol);\n concatenatedLinesWithoutColorByNewlineChar.set(eol, textToWrite);\n }\n }\n provider.write(textToWrite, severity);\n }\n }\n _serializeLegacyColorableSequence(segment) {\n const startColorCodes = [];\n const endColorCodes = [];\n switch (segment.foregroundColor) {\n case ColorValue.Black: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.BlackForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.Red: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.RedForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.Green: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.GreenForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.Yellow: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.YellowForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.Blue: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.BlueForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.Magenta: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.MagentaForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.Cyan: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.CyanForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.White: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.WhiteForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n case ColorValue.Gray: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.GrayForeground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultForeground);\n break;\n }\n }\n switch (segment.backgroundColor) {\n case ColorValue.Black: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.BlackBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.Red: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.RedBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.Green: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.GreenBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.Yellow: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.YellowBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.Blue: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.BlueBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.Magenta: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.MagentaBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.Cyan: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.CyanBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.White: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.WhiteBackground);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.DefaultBackground);\n break;\n }\n case ColorValue.Gray: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.GrayBackground);\n endColorCodes.push(49);\n break;\n }\n }\n if (segment.textAttributes) {\n for (const textAttribute of segment.textAttributes) {\n switch (textAttribute) {\n case TextAttribute.Bold: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.Bold);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.NormalColorOrIntensity);\n break;\n }\n case TextAttribute.Dim: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.Dim);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.NormalColorOrIntensity);\n break;\n }\n case TextAttribute.Underline: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.Underline);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.UnderlineOff);\n break;\n }\n case TextAttribute.Blink: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.Blink);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.BlinkOff);\n break;\n }\n case TextAttribute.InvertColor: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.InvertColor);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.InvertColorOff);\n break;\n }\n case TextAttribute.Hidden: {\n startColorCodes.push(Colorize_1.SgrParameterAttribute.Hidden);\n endColorCodes.push(Colorize_1.SgrParameterAttribute.HiddenOff);\n break;\n }\n }\n }\n }\n const resultSegments = [];\n for (let j = 0; j < startColorCodes.length; j++) {\n const code = startColorCodes[j];\n resultSegments.push(AnsiEscape_1.AnsiEscape.getEscapeSequenceForAnsiCode(code));\n }\n resultSegments.push(segment.text);\n for (let j = endColorCodes.length - 1; j >= 0; j--) {\n const code = endColorCodes[j];\n resultSegments.push(AnsiEscape_1.AnsiEscape.getEscapeSequenceForAnsiCode(code));\n }\n return resultSegments.join('');\n }\n _normalizeWriteParameters(parameters) {\n if (parameters.length === 0) {\n return { parts: [], options: {} };\n }\n else {\n const lastParameter = parameters[parameters.length - 1];\n if (typeof lastParameter === 'string') {\n return { parts: parameters, options: {} };\n }\n else {\n return { parts: parameters.slice(0, -1), options: lastParameter };\n }\n }\n }\n}\nexports.Terminal = Terminal;\n//# sourceMappingURL=Terminal.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalStreamWritable = void 0;\nconst stream_1 = require(\"stream\");\nconst ITerminalProvider_1 = require(\"./ITerminalProvider\");\n/**\n * A adapter to allow writing to a provided terminal using Writable streams.\n *\n * @beta\n */\nclass TerminalStreamWritable extends stream_1.Writable {\n constructor(options) {\n const { terminal, severity, writableOptions } = options;\n super(writableOptions);\n this._writev = undefined;\n switch (severity) {\n case ITerminalProvider_1.TerminalProviderSeverity.log:\n this._writeMethod = terminal.write.bind(terminal);\n break;\n case ITerminalProvider_1.TerminalProviderSeverity.verbose:\n this._writeMethod = terminal.writeVerbose.bind(terminal);\n break;\n case ITerminalProvider_1.TerminalProviderSeverity.debug:\n this._writeMethod = terminal.writeDebug.bind(terminal);\n break;\n case ITerminalProvider_1.TerminalProviderSeverity.warning:\n this._writeMethod = terminal.writeWarning.bind(terminal);\n break;\n case ITerminalProvider_1.TerminalProviderSeverity.error:\n this._writeMethod = terminal.writeError.bind(terminal);\n break;\n default:\n throw new Error(`Unknown severity: ${severity}`);\n }\n }\n _write(chunk, encoding, \n // eslint-disable-next-line @rushstack/no-new-null\n callback) {\n try {\n const chunkData = typeof chunk === 'string' ? chunk : Buffer.from(chunk);\n this._writeMethod(chunkData.toString());\n }\n catch (e) {\n callback(e);\n return;\n }\n callback();\n }\n}\nexports.TerminalStreamWritable = TerminalStreamWritable;\n//# sourceMappingURL=TerminalStreamWritable.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalTransform = void 0;\nconst TerminalWritable_1 = require(\"./TerminalWritable\");\n/**\n * The abstract base class for {@link TerminalWritable} objects that receive an input,\n * transform it somehow, and then write the output to another `TerminalWritable`.\n *\n * @remarks\n *\n * The `TerminalTransform` and {@link SplitterTransform} base classes formalize the idea\n * of modeling data flow as a directed acyclic graph of reusable transforms, whose\n * final outputs are `TerminalWritable` objects.\n *\n * The design is based loosely on the `WritableStream` and `TransformStream` classes from\n * the system {@link https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts\n * | Streams API}, except that instead of asynchronous byte streams, the `TerminalWritable`\n * system synchronously transmits human readable messages intended to be rendered on a\n * text console or log file.\n *\n * The main feature of the `TerminalTransform` class is its {@link TerminalTransform.destination}\n * property, which tracks the next link in the graph.\n *\n * @public\n */\nclass TerminalTransform extends TerminalWritable_1.TerminalWritable {\n constructor(options) {\n super();\n this.destination = options.destination;\n this.preventDestinationAutoclose = !!options.preventDestinationAutoclose;\n }\n /** @override */\n onClose() {\n this.autocloseDestination();\n }\n /**\n * The default implementation of {@link TerminalTransform.onClose} calls this\n * method, which closes the {@link TerminalTransform.destination} if appropriate.\n *\n * @remarks\n * The destination will not be closed if its {@link TerminalWritable.preventAutoclose}\n * property is `true`. The destination will not be closed if\n * {@link ITerminalTransformOptions.preventDestinationAutoclose}\n * is `true`.\n *\n * @sealed\n */\n autocloseDestination() {\n if (!this.preventDestinationAutoclose && !this.destination.preventAutoclose) {\n this.destination.close();\n }\n }\n}\nexports.TerminalTransform = TerminalTransform;\n//# sourceMappingURL=TerminalTransform.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalWritable = void 0;\n/**\n * The abstract base class for objects that can present, route, or process text output for\n * a console application. This output is typically prepared using\n * the {@link Terminal} API.\n *\n * @remarks\n *\n * The design is based loosely on the `WritableStream` and `TransformStream` classes from\n * the system {@link https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts\n * | Streams API}, except that instead of asynchronous byte streams, the `TerminalWritable`\n * system synchronously transmits human readable messages intended to be rendered on a text\n * console or log file.\n *\n * Consider a console application whose output may need to be processed in different ways\n * before finally being output. The conceptual block diagram might look like this:\n *\n * ```\n * [Terminal API]\n * |\n * V\n * [normalize newlines]\n * |\n * V\n * +----[splitter]-------+\n * | |\n * V V\n * [shell console] [remove ANSI colors]\n * |\n * V\n * [write to build.log]\n * ```\n *\n * The application uses the `Terminal` API to print `stdout` and `stderr` messages, for example with standardized\n * formatting for errors and warnings, and ANSI escapes to make nice colors. Maybe it also includes text\n * received from external processes, whose newlines may be inconsistent. Ultimately we want to write the\n * output to the shell console and a `build.log` file, but we don't want to put ANSI colors in the build log.\n *\n * For the above example, `[shell console]` and `[write to build.log]` would be modeled as subclasses of\n * `TerminalWritable`. The `[normalize newlines]` and `[remove ANSI colors]` steps are modeled as subclasses\n * of {@link TerminalTransform}, because they output to a \"destination\" object. The `[splitter]` would be\n * implemented using {@link SplitterTransform}.\n *\n * The stream of messages are {@link ITerminalChunk} objects, which can represent both `stdout` and `stderr`\n * channels. The pipeline operates synchronously on each chunk, but by processing one chunk at a time,\n * it avoids storing the entire output in memory. This means that operations like `[remove ANSI colors]`\n * cannot be simple regular expressions -- they must be implemented as state machines ({@link TextRewriter}\n * subclasses) capable of matching substrings that span multiple chunks.\n *\n * @public\n */\nclass TerminalWritable {\n constructor(options) {\n this._isOpen = true;\n if (!options) {\n options = {};\n }\n this.preventAutoclose = !!options.preventAutoclose;\n }\n /**\n * This property is initially `true` when the object is constructed, and becomes `false`\n * when `close()` is called.\n * @sealed\n */\n get isOpen() {\n return this._isOpen;\n }\n /**\n * Upstream objects call this method to provide inputs to this object.\n *\n * @remarks\n * The subclass provides its implementation via the the {@link TerminalWritable.onWriteChunk}\n * method, which is called by `writeChunk()`.\n *\n * The object that calls `writeChunk()` must call `close()` when it is finished;\n * failing to do so may introduce a resource leak, or may prevent some buffered data from\n * being written.\n *\n * @sealed\n */\n writeChunk(chunk) {\n if (!this._isOpen) {\n throw new Error('Writer was already closed');\n }\n this.onWriteChunk(chunk);\n }\n /**\n * Calling this method flushes any remaining outputs and permanently transitions the\n * `TerminalWritable` to a \"closed\" state, where no further chunks can be written.\n *\n * @remarks\n * The subclass provides its implementation via the the {@link TerminalWritable.onClose}\n * method, which is called by `close()`.\n *\n * If this method is called more than once, the additional calls are ignored;\n * `TerminalWritable.onClose` will be called at most once.\n *\n * @sealed\n */\n close() {\n if (this._isOpen) {\n this.onClose();\n this._isOpen = false;\n }\n }\n /**\n * Subclasses can override this empty method to perform additional operations\n * such as closing a file handle.\n *\n * @remarks\n * It is guaranteed that this method will be called at most once during the lifetime\n * of a `TerminalWritable` object.\n *\n * @virtual\n */\n onClose() { }\n}\nexports.TerminalWritable = TerminalWritable;\n//# sourceMappingURL=TerminalWritable.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextRewriter = void 0;\n/**\n * The abstract base class for operations that can be applied by {@link TextRewriterTransform}.\n *\n * @remarks\n * The {@link TextRewriterTransform} applies one or more character rewriting operations to its\n * chunk stream. Since these operations are applied separately to `stderr` and `stdout`, the\n * state is stored in an opaque `TextRewriterState` object.\n *\n * Conceptually, a `TextRewriter` subclass is very similar to a regular expression, with the difference\n * that `RegExp` operates on a text string, whereas `TextRewriter` operates on a stream of characters.\n *\n * The two most common subclasses are {@link NormalizeNewlinesTextRewriter} and {@link RemoveColorsTextRewriter}.\n *\n * A rewriting operation starts with `initialize()`, followed by any number of `process()` calls, and\n * then finishes with `close()`. For example:\n *\n * ```ts\n * const rewriter: NormalizeNewlinesTextRewriter = new NormalizeNewlinesTextRewriter(NewlineKind.Lf);\n * const state: TextRewriterState = rewriter.initialize();\n * let output: string = rewriter.process(state, 'line 1\\r');\n * output += rewriter.process(state, '\\nline 2\\r\\n');\n * output += rewriter.close(state);\n *\n * // The final \"output\" value is: \"line 1\\nline 2\\n\"\n * ```\n *\n * After `close()` has been called, the `TextRewriterState` state should not be reused.\n *\n * @public\n */\nclass TextRewriter {\n}\nexports.TextRewriter = TextRewriter;\n//# sourceMappingURL=TextRewriter.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextRewriterTransform = void 0;\nconst ITerminalChunk_1 = require(\"./ITerminalChunk\");\nconst TerminalTransform_1 = require(\"./TerminalTransform\");\nconst RemoveColorsTextRewriter_1 = require(\"./RemoveColorsTextRewriter\");\nconst NormalizeNewlinesTextRewriter_1 = require(\"./NormalizeNewlinesTextRewriter\");\n/**\n * A {@link TerminalTransform} subclass that performs one or more {@link TextRewriter} operations.\n * The most common operations are {@link NormalizeNewlinesTextRewriter} and {@link RemoveColorsTextRewriter}.\n *\n * @remarks\n * The `TextRewriter` operations are applied separately to the `stderr` and `stdout` streams.\n * If multiple {@link ITextRewriterTransformOptions.textRewriters} are configured, they are applied\n * in the order that they appear in the array.\n *\n * @public\n */\nclass TextRewriterTransform extends TerminalTransform_1.TerminalTransform {\n constructor(options) {\n super(options);\n const textRewriters = options.textRewriters || [];\n if (options.removeColors) {\n textRewriters.push(new RemoveColorsTextRewriter_1.RemoveColorsTextRewriter());\n }\n if (options.normalizeNewlines) {\n textRewriters.push(new NormalizeNewlinesTextRewriter_1.NormalizeNewlinesTextRewriter({\n newlineKind: options.normalizeNewlines,\n ensureNewlineAtEnd: options.ensureNewlineAtEnd\n }));\n }\n if (textRewriters.length === 0) {\n throw new Error('TextRewriterTransform requires at least one matcher');\n }\n this.textRewriters = textRewriters;\n this._stderrStates = this.textRewriters.map((x) => x.initialize());\n this._stdoutStates = this.textRewriters.map((x) => x.initialize());\n }\n onWriteChunk(chunk) {\n if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stderr) {\n this._processText(chunk, this._stderrStates);\n }\n else if (chunk.kind === ITerminalChunk_1.TerminalChunkKind.Stdout) {\n this._processText(chunk, this._stdoutStates);\n }\n else {\n this.destination.writeChunk(chunk);\n }\n }\n _processText(chunk, states) {\n let text = chunk.text;\n for (let i = 0; i < states.length; ++i) {\n if (text.length > 0) {\n text = this.textRewriters[i].process(states[i], text);\n }\n }\n if (text.length > 0) {\n // If possible, avoid allocating a new chunk\n if (text === chunk.text) {\n this.destination.writeChunk(chunk);\n }\n else {\n this.destination.writeChunk({\n text: text,\n kind: chunk.kind\n });\n }\n }\n }\n _closeRewriters(states, chunkKind) {\n let text = '';\n for (let i = 0; i < states.length; ++i) {\n if (text.length > 0) {\n text = this.textRewriters[i].process(states[i], text);\n }\n text += this.textRewriters[i].close(states[i]);\n }\n if (text.length > 0) {\n this.destination.writeChunk({\n text: text,\n kind: chunkKind\n });\n }\n }\n onClose() {\n this._closeRewriters(this._stderrStates, ITerminalChunk_1.TerminalChunkKind.Stderr);\n this._closeRewriters(this._stdoutStates, ITerminalChunk_1.TerminalChunkKind.Stdout);\n this.autocloseDestination();\n }\n}\nexports.TextRewriterTransform = TextRewriterTransform;\n//# sourceMappingURL=TextRewriterTransform.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TerminalStreamWritable = exports.PrefixProxyTerminalProvider = exports.StringBufferTerminalProvider = exports.ConsoleTerminalProvider = exports.TerminalProviderSeverity = exports.Colorize = exports.Terminal = exports.AnsiEscape = exports.TextRewriterTransform = exports.TextRewriter = exports.TerminalWritable = exports.TerminalTransform = exports.StdioWritable = exports.StdioSummarizer = exports.StderrLineTransform = exports.SplitterTransform = exports.RemoveColorsTextRewriter = exports.PrintUtilities = exports.DEFAULT_CONSOLE_WIDTH = exports.NormalizeNewlinesTextRewriter = exports.MockWritable = exports.TerminalChunkKind = exports.DiscardStdoutTransform = exports.CallbackWritable = void 0;\n/**\n * This library implements a system for processing human readable text that\n * will be output by console applications.\n *\n * @remarks\n * See the {@link TerminalWritable} documentation for an overview of the major concepts.\n *\n * @packageDocumentation\n */\nvar CallbackWritable_1 = require(\"./CallbackWritable\");\nObject.defineProperty(exports, \"CallbackWritable\", { enumerable: true, get: function () { return CallbackWritable_1.CallbackWritable; } });\nvar DiscardStdoutTransform_1 = require(\"./DiscardStdoutTransform\");\nObject.defineProperty(exports, \"DiscardStdoutTransform\", { enumerable: true, get: function () { return DiscardStdoutTransform_1.DiscardStdoutTransform; } });\nvar ITerminalChunk_1 = require(\"./ITerminalChunk\");\nObject.defineProperty(exports, \"TerminalChunkKind\", { enumerable: true, get: function () { return ITerminalChunk_1.TerminalChunkKind; } });\nvar MockWritable_1 = require(\"./MockWritable\");\nObject.defineProperty(exports, \"MockWritable\", { enumerable: true, get: function () { return MockWritable_1.MockWritable; } });\nvar NormalizeNewlinesTextRewriter_1 = require(\"./NormalizeNewlinesTextRewriter\");\nObject.defineProperty(exports, \"NormalizeNewlinesTextRewriter\", { enumerable: true, get: function () { return NormalizeNewlinesTextRewriter_1.NormalizeNewlinesTextRewriter; } });\nvar PrintUtilities_1 = require(\"./PrintUtilities\");\nObject.defineProperty(exports, \"DEFAULT_CONSOLE_WIDTH\", { enumerable: true, get: function () { return PrintUtilities_1.DEFAULT_CONSOLE_WIDTH; } });\nObject.defineProperty(exports, \"PrintUtilities\", { enumerable: true, get: function () { return PrintUtilities_1.PrintUtilities; } });\nvar RemoveColorsTextRewriter_1 = require(\"./RemoveColorsTextRewriter\");\nObject.defineProperty(exports, \"RemoveColorsTextRewriter\", { enumerable: true, get: function () { return RemoveColorsTextRewriter_1.RemoveColorsTextRewriter; } });\nvar SplitterTransform_1 = require(\"./SplitterTransform\");\nObject.defineProperty(exports, \"SplitterTransform\", { enumerable: true, get: function () { return SplitterTransform_1.SplitterTransform; } });\nvar StdioLineTransform_1 = require(\"./StdioLineTransform\");\nObject.defineProperty(exports, \"StderrLineTransform\", { enumerable: true, get: function () { return StdioLineTransform_1.StderrLineTransform; } });\nvar StdioSummarizer_1 = require(\"./StdioSummarizer\");\nObject.defineProperty(exports, \"StdioSummarizer\", { enumerable: true, get: function () { return StdioSummarizer_1.StdioSummarizer; } });\nvar StdioWritable_1 = require(\"./StdioWritable\");\nObject.defineProperty(exports, \"StdioWritable\", { enumerable: true, get: function () { return StdioWritable_1.StdioWritable; } });\nvar TerminalTransform_1 = require(\"./TerminalTransform\");\nObject.defineProperty(exports, \"TerminalTransform\", { enumerable: true, get: function () { return TerminalTransform_1.TerminalTransform; } });\nvar TerminalWritable_1 = require(\"./TerminalWritable\");\nObject.defineProperty(exports, \"TerminalWritable\", { enumerable: true, get: function () { return TerminalWritable_1.TerminalWritable; } });\nvar TextRewriter_1 = require(\"./TextRewriter\");\nObject.defineProperty(exports, \"TextRewriter\", { enumerable: true, get: function () { return TextRewriter_1.TextRewriter; } });\nvar TextRewriterTransform_1 = require(\"./TextRewriterTransform\");\nObject.defineProperty(exports, \"TextRewriterTransform\", { enumerable: true, get: function () { return TextRewriterTransform_1.TextRewriterTransform; } });\nvar AnsiEscape_1 = require(\"./AnsiEscape\");\nObject.defineProperty(exports, \"AnsiEscape\", { enumerable: true, get: function () { return AnsiEscape_1.AnsiEscape; } });\nvar Terminal_1 = require(\"./Terminal\");\nObject.defineProperty(exports, \"Terminal\", { enumerable: true, get: function () { return Terminal_1.Terminal; } });\nvar Colorize_1 = require(\"./Colorize\");\nObject.defineProperty(exports, \"Colorize\", { enumerable: true, get: function () { return Colorize_1.Colorize; } });\nvar ITerminalProvider_1 = require(\"./ITerminalProvider\");\nObject.defineProperty(exports, \"TerminalProviderSeverity\", { enumerable: true, get: function () { return ITerminalProvider_1.TerminalProviderSeverity; } });\nvar ConsoleTerminalProvider_1 = require(\"./ConsoleTerminalProvider\");\nObject.defineProperty(exports, \"ConsoleTerminalProvider\", { enumerable: true, get: function () { return ConsoleTerminalProvider_1.ConsoleTerminalProvider; } });\nvar StringBufferTerminalProvider_1 = require(\"./StringBufferTerminalProvider\");\nObject.defineProperty(exports, \"StringBufferTerminalProvider\", { enumerable: true, get: function () { return StringBufferTerminalProvider_1.StringBufferTerminalProvider; } });\nvar PrefixProxyTerminalProvider_1 = require(\"./PrefixProxyTerminalProvider\");\nObject.defineProperty(exports, \"PrefixProxyTerminalProvider\", { enumerable: true, get: function () { return PrefixProxyTerminalProvider_1.PrefixProxyTerminalProvider; } });\nvar TerminalStreamWritable_1 = require(\"./TerminalStreamWritable\");\nObject.defineProperty(exports, \"TerminalStreamWritable\", { enumerable: true, get: function () { return TerminalStreamWritable_1.TerminalStreamWritable; } });\n//# sourceMappingURL=index.js.map","module.exports = require(\"assert\");","module.exports = require(\"child_process\");","module.exports = require(\"constants\");","module.exports = require(\"fs\");","module.exports = require(\"module\");","module.exports = require(\"node:fs\");","module.exports = require(\"node:os\");","module.exports = require(\"node:path\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"process\");","module.exports = require(\"stream\");","module.exports = require(\"tty\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n// THIS SCRIPT IS GENERATED BY THE \"rush deploy\" COMMAND.\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { Async, FileSystem, Path } from '@rushstack/node-core-library';\nimport { Terminal, ConsoleTerminalProvider } from '@rushstack/terminal';\nconst MAX_CONCURRENCY = os.cpus().length * 2;\nconst CREATE_ACTION_NAME = 'create';\nconst REMOVE_ACTION_NAME = 'remove';\nconst REALIZE_FILES_OPTION_NAME = '--realize-files';\nconst TARGET_ROOT_SCRIPT_RELATIVE_PATH = '{TARGET_ROOT_SCRIPT_RELATIVE_PATH}';\nconst TARGET_ROOT_FOLDER = path.resolve(__dirname, TARGET_ROOT_SCRIPT_RELATIVE_PATH);\nasync function removeLinksAsync(terminal, targetRootFolder, extractorMetadataObject) {\n await Async.forEachAsync(extractorMetadataObject.links, async ({ linkPath }) => {\n const newLinkPath = `${targetRootFolder}/${linkPath}`;\n terminal.writeVerboseLine(`Removing link at path \"${newLinkPath}\"`);\n await FileSystem.deleteFileAsync(newLinkPath, { throwIfNotExists: false });\n }, { concurrency: MAX_CONCURRENCY });\n}\nasync function createLinksAsync(terminal, targetRootFolder, extractorMetadataObject) {\n await Async.forEachAsync(extractorMetadataObject.links, async (linkInfo) => {\n // Link to the relative path for symlinks\n const newLinkPath = `${targetRootFolder}/${linkInfo.linkPath}`;\n const linkTargetPath = `${targetRootFolder}/${linkInfo.targetPath}`;\n // Make sure the containing folder exists\n await FileSystem.ensureFolderAsync(path.dirname(newLinkPath));\n // NOTE: This logic is based on NpmLinkManager._createSymlink()\n if (linkInfo.kind === 'folderLink') {\n terminal.writeVerboseLine(`Creating linked folder at path \"${newLinkPath}\"`);\n await FileSystem.createSymbolicLinkJunctionAsync({ newLinkPath, linkTargetPath });\n }\n else if (linkInfo.kind === 'fileLink') {\n // Use hardlinks for Windows and symlinks for other platforms since creating a symbolic link\n // requires administrator permission on Windows. This may cause unexpected behaviour for consumers\n // of the hardlinked files. If this becomes an issue, we may need to revisit this.\n terminal.writeVerboseLine(`Creating linked file at path \"${newLinkPath}\"`);\n if (process.platform === 'win32') {\n await FileSystem.createHardLinkAsync({ newLinkPath, linkTargetPath });\n }\n else {\n await FileSystem.createSymbolicLinkFileAsync({ newLinkPath, linkTargetPath });\n }\n }\n }, { concurrency: MAX_CONCURRENCY });\n}\nasync function realizeFilesAsync(terminal, targetRootFolder, extractorMetadataObject) {\n await Async.forEachAsync(extractorMetadataObject.files, async (relativeFilePath) => {\n const filePath = `${targetRootFolder}/${relativeFilePath}`;\n const realFilePath = await FileSystem.getRealPathAsync(filePath);\n if (!Path.isEqual(realFilePath, filePath)) {\n await FileSystem.deleteFileAsync(filePath);\n // Hard links seem to cause build failures on Mac, so for all other operating\n // systems we copy files.\n terminal.writeVerboseLine(`Realizing file at path \"${filePath}\"`);\n if (process.platform === 'win32') {\n await FileSystem.createHardLinkAsync({ newLinkPath: filePath, linkTargetPath: realFilePath });\n }\n else {\n await FileSystem.copyFileAsync({ sourcePath: realFilePath, destinationPath: filePath });\n }\n }\n }, { concurrency: MAX_CONCURRENCY });\n}\nfunction showUsage(terminal) {\n terminal.writeLine('Usage:');\n terminal.writeLine(` node create-links.js ${CREATE_ACTION_NAME} [${REALIZE_FILES_OPTION_NAME}]`);\n terminal.writeLine(` node create-links.js ${REMOVE_ACTION_NAME}`);\n terminal.writeLine('');\n terminal.writeLine('Creates or removes the symlinks for the output folder created by \"rush deploy\".');\n terminal.writeLine('The link information is read from \"extractor-metadata.json\" in the same folder.');\n}\nasync function runAsync(terminal) {\n // Example: [ \"node.exe\", \"create-links.js\", \"\"create\" ]\n const args = process.argv.slice(2);\n if ((args[0] !== CREATE_ACTION_NAME && args[0] !== REMOVE_ACTION_NAME) ||\n (args[0] === CREATE_ACTION_NAME && args[1] && args[1] !== REALIZE_FILES_OPTION_NAME) ||\n (args[0] === REMOVE_ACTION_NAME && args[1])) {\n showUsage(terminal);\n return false;\n }\n const extractorMetadataPath = `${__dirname}/extractor-metadata.json`;\n if (!fs.existsSync(extractorMetadataPath)) {\n throw new Error('Input file not found: ' + extractorMetadataPath);\n }\n const extractorMetadataJson = fs.readFileSync(extractorMetadataPath).toString();\n const extractorMetadataObject = JSON.parse(extractorMetadataJson);\n if (args[0] === 'create') {\n const realizeFiles = args[1] === '--realize-files';\n terminal.writeLine(`Creating links for extraction at path \"${TARGET_ROOT_FOLDER}\"`);\n await removeLinksAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject);\n await createLinksAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject);\n if (realizeFiles) {\n await realizeFilesAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject);\n }\n }\n else if (args[0] === 'remove') {\n terminal.writeLine(`Removing links for extraction at path \"${TARGET_ROOT_FOLDER}\"`);\n await removeLinksAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject);\n }\n terminal.writeLine('The operation completed successfully.');\n return true;\n}\nprocess.exitCode = 1;\nconst terminal = new Terminal(new ConsoleTerminalProvider());\nrunAsync(terminal)\n .then((result) => {\n process.exitCode = result ? 0 : 1;\n})\n .catch((error) => {\n terminal.writeErrorLine('ERROR: ' + error);\n});\n//# sourceMappingURL=create-links.js.map"],"names":[],"sourceRoot":""}
|