diff --git a/dist/index.js b/dist/index.js index 34c9b12..a8b47dd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9195,6 +9195,12 @@ const path = __webpack_require__(622); const sha1 = __webpack_require__(846); const yaml = __webpack_require__(552); +function assertUsesSHA(uses) { + return typeof uses === 'string' && + uses.includes('@') && + sha1.test(uses.substr(uses.indexOf('@') + 1)) +} + async function run() { try { const workflowsPath = '.github/workflows'; @@ -9213,27 +9219,30 @@ async function run() { } core.startGroup(workflowsPath + '/' + basename); - + for (const job in jobs) { + const uses = jobs[job]['uses']; const steps = jobs[job]['steps']; - if (steps === undefined) { - core.warning(`The "${job}" job of the "${basename}" workflow does not contain steps.`); - } - - for (const step of steps) { - const uses = step['uses']; - - if (typeof uses === 'string' && uses.includes('@')) { - const version = uses.substr(uses.indexOf('@') + 1); - - if (!sha1.test(version)) { - actionHasError = true; - fileHasError = true; + if (uses !== undefined) { + if (!assertUsesSHA(uses)) { + actionHasError = true; + fileHasError = true; - core.error(`${uses} is not pinned to a full length commit SHA.`); - } + core.error(`${uses} is not pinned to a full length commit SHA.`); } + } else if (steps !== undefined) { + for (const step of steps) { + const uses = step['uses']; + if (!assertUsesSHA(uses)) { + actionHasError = true; + fileHasError = true; + + core.error(`${uses} is not pinned to a full length commit SHA.`); + } + } + } else { + core.warning(`The "${job}" job of the "${basename}" workflow does not contain steps or uses.`); } } @@ -9243,7 +9252,7 @@ async function run() { core.endGroup(); } - + if (actionHasError) { throw new Error('At least one workflow contains an unpinned GitHub Action version.'); } @@ -9254,6 +9263,7 @@ async function run() { run(); + /***/ }), /***/ 357: diff --git a/dist/index.js.map b/dist/index.js.map index 45e3fd7..9db470b 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/command.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/core.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/file-command.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/utils.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/glob.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-glob-options-helper.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-globber.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-match-kind.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-path-helper.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-path.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-pattern-helper.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-pattern.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-search-state.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/balanced-match/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/brace-expansion/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/concat-map/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/minimatch/minimatch.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/sha1-regex/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/Document-2cf6b08c.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/PlainValue-ec8e588e.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/Schema-42e9705c.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/parse-cst.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/resolveSeq-4a68b39b.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/warnings-39684f17.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./src/index.js","../webpack://github-actions-ensure-sha-pinned-actions/external \"assert\"","../webpack://github-actions-ensure-sha-pinned-actions/external \"fs\"","../webpack://github-actions-ensure-sha-pinned-actions/external \"os\"","../webpack://github-actions-ensure-sha-pinned-actions/external \"path\"","../webpack://github-actions-ensure-sha-pinned-actions/webpack/bootstrap","../webpack://github-actions-ensure-sha-pinned-actions/webpack/runtime/compat","../webpack://github-actions-ensure-sha-pinned-actions/webpack/startup"],"sourcesContent":["\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input. The value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n */\nfunction error(message) {\n command_1.issue('error', message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds an warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n */\nfunction warning(message) {\n command_1.issue('warning', message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst internal_globber_1 = require(\"./internal-globber\");\n/**\n * Constructs a globber\n *\n * @param patterns Patterns separated by newlines\n * @param options Glob options\n */\nfunction create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield internal_globber_1.DefaultGlobber.create(patterns, options);\n });\n}\nexports.create = create;\n//# sourceMappingURL=glob.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Returns a copy with defaults filled in.\n */\nfunction getOptions(copy) {\n const result = {\n followSymbolicLinks: true,\n implicitDescendants: true,\n omitBrokenSymbolicLinks: true\n };\n if (copy) {\n if (typeof copy.followSymbolicLinks === 'boolean') {\n result.followSymbolicLinks = copy.followSymbolicLinks;\n core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`);\n }\n if (typeof copy.implicitDescendants === 'boolean') {\n result.implicitDescendants = copy.implicitDescendants;\n core.debug(`implicitDescendants '${result.implicitDescendants}'`);\n }\n if (typeof copy.omitBrokenSymbolicLinks === 'boolean') {\n result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;\n core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);\n }\n }\n return result;\n}\nexports.getOptions = getOptions;\n//# sourceMappingURL=internal-glob-options-helper.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\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 __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\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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};\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst fs = __importStar(require(\"fs\"));\nconst globOptionsHelper = __importStar(require(\"./internal-glob-options-helper\"));\nconst path = __importStar(require(\"path\"));\nconst patternHelper = __importStar(require(\"./internal-pattern-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_pattern_1 = require(\"./internal-pattern\");\nconst internal_search_state_1 = require(\"./internal-search-state\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass DefaultGlobber {\n constructor(options) {\n this.patterns = [];\n this.searchPaths = [];\n this.options = globOptionsHelper.getOptions(options);\n }\n getSearchPaths() {\n // Return a copy\n return this.searchPaths.slice();\n }\n glob() {\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n const result = [];\n try {\n for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {\n const itemPath = _c.value;\n result.push(itemPath);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n });\n }\n globGenerator() {\n return __asyncGenerator(this, arguments, function* globGenerator_1() {\n // Fill in defaults options\n const options = globOptionsHelper.getOptions(this.options);\n // Implicit descendants?\n const patterns = [];\n for (const pattern of this.patterns) {\n patterns.push(pattern);\n if (options.implicitDescendants &&\n (pattern.trailingSeparator ||\n pattern.segments[pattern.segments.length - 1] !== '**')) {\n patterns.push(new internal_pattern_1.Pattern(pattern.negate, pattern.segments.concat('**')));\n }\n }\n // Push the search paths\n const stack = [];\n for (const searchPath of patternHelper.getSearchPaths(patterns)) {\n core.debug(`Search path '${searchPath}'`);\n // Exists?\n try {\n // Intentionally using lstat. Detection for broken symlink\n // will be performed later (if following symlinks).\n yield __await(fs.promises.lstat(searchPath));\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n continue;\n }\n throw err;\n }\n stack.unshift(new internal_search_state_1.SearchState(searchPath, 1));\n }\n // Search\n const traversalChain = []; // used to detect cycles\n while (stack.length) {\n // Pop\n const item = stack.pop();\n // Match?\n const match = patternHelper.match(patterns, item.path);\n const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path);\n if (!match && !partialMatch) {\n continue;\n }\n // Stat\n const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain)\n // Broken symlink, or symlink cycle detected, or no longer exists\n );\n // Broken symlink, or symlink cycle detected, or no longer exists\n if (!stats) {\n continue;\n }\n // Directory\n if (stats.isDirectory()) {\n // Matched\n if (match & internal_match_kind_1.MatchKind.Directory) {\n yield yield __await(item.path);\n }\n // Descend?\n else if (!partialMatch) {\n continue;\n }\n // Push the child items in reverse\n const childLevel = item.level + 1;\n const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel));\n stack.push(...childItems.reverse());\n }\n // File\n else if (match & internal_match_kind_1.MatchKind.File) {\n yield yield __await(item.path);\n }\n }\n });\n }\n /**\n * Constructs a DefaultGlobber\n */\n static create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = new DefaultGlobber(options);\n if (IS_WINDOWS) {\n patterns = patterns.replace(/\\r\\n/g, '\\n');\n patterns = patterns.replace(/\\r/g, '\\n');\n }\n const lines = patterns.split('\\n').map(x => x.trim());\n for (const line of lines) {\n // Empty or comment\n if (!line || line.startsWith('#')) {\n continue;\n }\n // Pattern\n else {\n result.patterns.push(new internal_pattern_1.Pattern(line));\n }\n }\n result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns));\n return result;\n });\n }\n static stat(item, options, traversalChain) {\n return __awaiter(this, void 0, void 0, function* () {\n // Note:\n // `stat` returns info about the target of a symlink (or symlink chain)\n // `lstat` returns info about a symlink itself\n let stats;\n if (options.followSymbolicLinks) {\n try {\n // Use `stat` (following symlinks)\n stats = yield fs.promises.stat(item.path);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n if (options.omitBrokenSymbolicLinks) {\n core.debug(`Broken symlink '${item.path}'`);\n return undefined;\n }\n throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`);\n }\n throw err;\n }\n }\n else {\n // Use `lstat` (not following symlinks)\n stats = yield fs.promises.lstat(item.path);\n }\n // Note, isDirectory() returns false for the lstat of a symlink\n if (stats.isDirectory() && options.followSymbolicLinks) {\n // Get the realpath\n const realPath = yield fs.promises.realpath(item.path);\n // Fixup the traversal chain to match the item level\n while (traversalChain.length >= item.level) {\n traversalChain.pop();\n }\n // Test for a cycle\n if (traversalChain.some((x) => x === realPath)) {\n core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`);\n return undefined;\n }\n // Update the traversal chain\n traversalChain.push(realPath);\n }\n return stats;\n });\n }\n}\nexports.DefaultGlobber = DefaultGlobber;\n//# sourceMappingURL=internal-globber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Indicates whether a pattern matches a path\n */\nvar MatchKind;\n(function (MatchKind) {\n /** Not matched */\n MatchKind[MatchKind[\"None\"] = 0] = \"None\";\n /** Matched if the path is a directory */\n MatchKind[MatchKind[\"Directory\"] = 1] = \"Directory\";\n /** Matched if the path is a regular file */\n MatchKind[MatchKind[\"File\"] = 2] = \"File\";\n /** Matched */\n MatchKind[MatchKind[\"All\"] = 3] = \"All\";\n})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));\n//# sourceMappingURL=internal-match-kind.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = __importStar(require(\"path\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths.\n *\n * For example, on Linux/macOS:\n * - `/ => /`\n * - `/hello => /`\n *\n * For example, on Windows:\n * - `C:\\ => C:\\`\n * - `C:\\hello => C:\\`\n * - `C: => C:`\n * - `C:hello => C:`\n * - `\\ => \\`\n * - `\\hello => \\`\n * - `\\\\hello => \\\\hello`\n * - `\\\\hello\\world => \\\\hello\\world`\n */\nfunction dirname(p) {\n // Normalize slashes and trim unnecessary trailing slash\n p = safeTrimTrailingSeparator(p);\n // Windows UNC root, e.g. \\\\hello or \\\\hello\\world\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+(\\\\[^\\\\]+)?$/.test(p)) {\n return p;\n }\n // Get dirname\n let result = path.dirname(p);\n // Trim trailing slash for Windows UNC root, e.g. \\\\hello\\world\\\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+\\\\[^\\\\]+\\\\$/.test(result)) {\n result = safeTrimTrailingSeparator(result);\n }\n return result;\n}\nexports.dirname = dirname;\n/**\n * Roots the path if not already rooted. On Windows, relative roots like `\\`\n * or `C:` are expanded based on the current working directory.\n */\nfunction ensureAbsoluteRoot(root, itemPath) {\n assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);\n assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Already rooted\n if (hasAbsoluteRoot(itemPath)) {\n return itemPath;\n }\n // Windows\n if (IS_WINDOWS) {\n // Check for itemPath like C: or C:foo\n if (itemPath.match(/^[A-Z]:[^\\\\/]|^[A-Z]:$/i)) {\n let cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n // Drive letter matches cwd? Expand to cwd\n if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {\n // Drive only, e.g. C:\n if (itemPath.length === 2) {\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}`;\n }\n // Drive + path, e.g. C:foo\n else {\n if (!cwd.endsWith('\\\\')) {\n cwd += '\\\\';\n }\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}${itemPath.substr(2)}`;\n }\n }\n // Different drive\n else {\n return `${itemPath[0]}:\\\\${itemPath.substr(2)}`;\n }\n }\n // Check for itemPath like \\ or \\foo\n else if (normalizeSeparators(itemPath).match(/^\\\\$|^\\\\[^\\\\]/)) {\n const cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n return `${cwd[0]}:\\\\${itemPath.substr(1)}`;\n }\n }\n assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);\n // Otherwise ensure root ends with a separator\n if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\\\'))) {\n // Intentionally empty\n }\n else {\n // Append separator\n root += path.sep;\n }\n return root + itemPath;\n}\nexports.ensureAbsoluteRoot = ensureAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\\\hello\\share` and `C:\\hello` (and using alternate separator).\n */\nfunction hasAbsoluteRoot(itemPath) {\n assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\\\hello\\share or C:\\hello\n return itemPath.startsWith('\\\\\\\\') || /^[A-Z]:\\\\/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasAbsoluteRoot = hasAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\`, `\\hello`, `\\\\hello\\share`, `C:`, and `C:\\hello` (and using alternate separator).\n */\nfunction hasRoot(itemPath) {\n assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\ or \\hello or \\\\hello\n // E.g. C: or C:\\hello\n return itemPath.startsWith('\\\\') || /^[A-Z]:/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasRoot = hasRoot;\n/**\n * Removes redundant slashes and converts `/` to `\\` on Windows\n */\nfunction normalizeSeparators(p) {\n p = p || '';\n // Windows\n if (IS_WINDOWS) {\n // Convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // Remove redundant slashes\n const isUnc = /^\\\\\\\\+[^\\\\]/.test(p); // e.g. \\\\hello\n return (isUnc ? '\\\\' : '') + p.replace(/\\\\\\\\+/g, '\\\\'); // preserve leading \\\\ for UNC\n }\n // Remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\nexports.normalizeSeparators = normalizeSeparators;\n/**\n * Normalizes the path separators and trims the trailing separator (when safe).\n * For example, `/foo/ => /foo` but `/ => /`\n */\nfunction safeTrimTrailingSeparator(p) {\n // Short-circuit if empty\n if (!p) {\n return '';\n }\n // Normalize separators\n p = normalizeSeparators(p);\n // No trailing slash\n if (!p.endsWith(path.sep)) {\n return p;\n }\n // Check '/' on Linux/macOS and '\\' on Windows\n if (p === path.sep) {\n return p;\n }\n // On Windows check if drive root. E.g. C:\\\n if (IS_WINDOWS && /^[A-Z]:\\\\$/i.test(p)) {\n return p;\n }\n // Otherwise trim trailing slash\n return p.substr(0, p.length - 1);\n}\nexports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;\n//# sourceMappingURL=internal-path-helper.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Helper class for parsing paths into segments\n */\nclass Path {\n /**\n * Constructs a Path\n * @param itemPath Path or array of segments\n */\n constructor(itemPath) {\n this.segments = [];\n // String\n if (typeof itemPath === 'string') {\n assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // Not rooted\n if (!pathHelper.hasRoot(itemPath)) {\n this.segments = itemPath.split(path.sep);\n }\n // Rooted\n else {\n // Add all segments, while not at the root\n let remaining = itemPath;\n let dir = pathHelper.dirname(remaining);\n while (dir !== remaining) {\n // Add the segment\n const basename = path.basename(remaining);\n this.segments.unshift(basename);\n // Truncate the last segment\n remaining = dir;\n dir = pathHelper.dirname(remaining);\n }\n // Remainder is the root\n this.segments.unshift(remaining);\n }\n }\n // Array\n else {\n // Must not be empty\n assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);\n // Each segment\n for (let i = 0; i < itemPath.length; i++) {\n let segment = itemPath[i];\n // Must not be empty\n assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);\n // Normalize slashes\n segment = pathHelper.normalizeSeparators(itemPath[i]);\n // Root segment\n if (i === 0 && pathHelper.hasRoot(segment)) {\n segment = pathHelper.safeTrimTrailingSeparator(segment);\n assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);\n this.segments.push(segment);\n }\n // All other segments\n else {\n // Must not contain slash\n assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);\n this.segments.push(segment);\n }\n }\n }\n }\n /**\n * Converts the path to it's string representation\n */\n toString() {\n // First segment\n let result = this.segments[0];\n // All others\n let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result));\n for (let i = 1; i < this.segments.length; i++) {\n if (skipSlash) {\n skipSlash = false;\n }\n else {\n result += path.sep;\n }\n result += this.segments[i];\n }\n return result;\n }\n}\nexports.Path = Path;\n//# sourceMappingURL=internal-path.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Given an array of patterns, returns an array of paths to search.\n * Duplicates and paths under other included paths are filtered out.\n */\nfunction getSearchPaths(patterns) {\n // Ignore negate patterns\n patterns = patterns.filter(x => !x.negate);\n // Create a map of all search paths\n const searchPathMap = {};\n for (const pattern of patterns) {\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n searchPathMap[key] = 'candidate';\n }\n const result = [];\n for (const pattern of patterns) {\n // Check if already included\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n if (searchPathMap[key] === 'included') {\n continue;\n }\n // Check for an ancestor search path\n let foundAncestor = false;\n let tempKey = key;\n let parent = pathHelper.dirname(tempKey);\n while (parent !== tempKey) {\n if (searchPathMap[parent]) {\n foundAncestor = true;\n break;\n }\n tempKey = parent;\n parent = pathHelper.dirname(tempKey);\n }\n // Include the search pattern in the result\n if (!foundAncestor) {\n result.push(pattern.searchPath);\n searchPathMap[key] = 'included';\n }\n }\n return result;\n}\nexports.getSearchPaths = getSearchPaths;\n/**\n * Matches the patterns against the path\n */\nfunction match(patterns, itemPath) {\n let result = internal_match_kind_1.MatchKind.None;\n for (const pattern of patterns) {\n if (pattern.negate) {\n result &= ~pattern.match(itemPath);\n }\n else {\n result |= pattern.match(itemPath);\n }\n }\n return result;\n}\nexports.match = match;\n/**\n * Checks whether to descend further into the directory\n */\nfunction partialMatch(patterns, itemPath) {\n return patterns.some(x => !x.negate && x.partialMatch(itemPath));\n}\nexports.partialMatch = partialMatch;\n//# sourceMappingURL=internal-pattern-helper.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst minimatch_1 = require(\"minimatch\");\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_path_1 = require(\"./internal-path\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass Pattern {\n constructor(patternOrNegate, segments, homedir) {\n /**\n * Indicates whether matches should be excluded from the result set\n */\n this.negate = false;\n // Pattern overload\n let pattern;\n if (typeof patternOrNegate === 'string') {\n pattern = patternOrNegate.trim();\n }\n // Segments overload\n else {\n // Convert to pattern\n segments = segments || [];\n assert_1.default(segments.length, `Parameter 'segments' must not empty`);\n const root = Pattern.getLiteral(segments[0]);\n assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);\n pattern = new internal_path_1.Path(segments).toString().trim();\n if (patternOrNegate) {\n pattern = `!${pattern}`;\n }\n }\n // Negate\n while (pattern.startsWith('!')) {\n this.negate = !this.negate;\n pattern = pattern.substr(1).trim();\n }\n // Normalize slashes and ensures absolute root\n pattern = Pattern.fixupPattern(pattern, homedir);\n // Segments\n this.segments = new internal_path_1.Path(pattern).segments;\n // Trailing slash indicates the pattern should only match directories, not regular files\n this.trailingSeparator = pathHelper\n .normalizeSeparators(pattern)\n .endsWith(path.sep);\n pattern = pathHelper.safeTrimTrailingSeparator(pattern);\n // Search path (literal path prior to the first glob segment)\n let foundGlob = false;\n const searchSegments = this.segments\n .map(x => Pattern.getLiteral(x))\n .filter(x => !foundGlob && !(foundGlob = x === ''));\n this.searchPath = new internal_path_1.Path(searchSegments).toString();\n // Root RegExp (required when determining partial match)\n this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : '');\n // Create minimatch\n const minimatchOptions = {\n dot: true,\n nobrace: true,\n nocase: IS_WINDOWS,\n nocomment: true,\n noext: true,\n nonegate: true\n };\n pattern = IS_WINDOWS ? pattern.replace(/\\\\/g, '/') : pattern;\n this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions);\n }\n /**\n * Matches the pattern against the specified path\n */\n match(itemPath) {\n // Last segment is globstar?\n if (this.segments[this.segments.length - 1] === '**') {\n // Normalize slashes\n itemPath = pathHelper.normalizeSeparators(itemPath);\n // Append a trailing slash. Otherwise Minimatch will not match the directory immediately\n // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns\n // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.\n if (!itemPath.endsWith(path.sep)) {\n // Note, this is safe because the constructor ensures the pattern has an absolute root.\n // For example, formats like C: and C:foo on Windows are resolved to an absolute root.\n itemPath = `${itemPath}${path.sep}`;\n }\n }\n else {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n }\n // Match\n if (this.minimatch.match(itemPath)) {\n return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All;\n }\n return internal_match_kind_1.MatchKind.None;\n }\n /**\n * Indicates whether the pattern may match descendants of the specified path\n */\n partialMatch(itemPath) {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // matchOne does not handle root path correctly\n if (pathHelper.dirname(itemPath) === itemPath) {\n return this.rootRegExp.test(itemPath);\n }\n return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\\\+/ : /\\/+/), this.minimatch.set[0], true);\n }\n /**\n * Escapes glob patterns within a path\n */\n static globEscape(s) {\n return (IS_WINDOWS ? s : s.replace(/\\\\/g, '\\\\\\\\')) // escape '\\' on Linux/macOS\n .replace(/(\\[)(?=[^/]+\\])/g, '[[]') // escape '[' when ']' follows within the path segment\n .replace(/\\?/g, '[?]') // escape '?'\n .replace(/\\*/g, '[*]'); // escape '*'\n }\n /**\n * Normalizes slashes and ensures absolute root\n */\n static fixupPattern(pattern, homedir) {\n // Empty\n assert_1.default(pattern, 'pattern cannot be empty');\n // Must not contain `.` segment, unless first segment\n // Must not contain `..` segment\n const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));\n assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);\n // Must not contain globs in root, e.g. Windows UNC path \\\\foo\\b*r\n assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);\n // Normalize slashes\n pattern = pathHelper.normalizeSeparators(pattern);\n // Replace leading `.` segment\n if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) {\n pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1);\n }\n // Replace leading `~` segment\n else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {\n homedir = homedir || os.homedir();\n assert_1.default(homedir, 'Unable to determine HOME directory');\n assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);\n pattern = Pattern.globEscape(homedir) + pattern.substr(1);\n }\n // Replace relative drive root, e.g. pattern is C: or C:foo\n else if (IS_WINDOWS &&\n (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\\\]/i))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', pattern.substr(0, 2));\n if (pattern.length > 2 && !root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(2);\n }\n // Replace relative root, e.g. pattern is \\ or \\foo\n else if (IS_WINDOWS && (pattern === '\\\\' || pattern.match(/^\\\\[^\\\\]/))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', '\\\\');\n if (!root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(1);\n }\n // Otherwise ensure absolute root\n else {\n pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern);\n }\n return pathHelper.normalizeSeparators(pattern);\n }\n /**\n * Attempts to unescape a pattern segment to create a literal path segment.\n * Otherwise returns empty string.\n */\n static getLiteral(segment) {\n let literal = '';\n for (let i = 0; i < segment.length; i++) {\n const c = segment[i];\n // Escape\n if (c === '\\\\' && !IS_WINDOWS && i + 1 < segment.length) {\n literal += segment[++i];\n continue;\n }\n // Wildcard\n else if (c === '*' || c === '?') {\n return '';\n }\n // Character set\n else if (c === '[' && i + 1 < segment.length) {\n let set = '';\n let closed = -1;\n for (let i2 = i + 1; i2 < segment.length; i2++) {\n const c2 = segment[i2];\n // Escape\n if (c2 === '\\\\' && !IS_WINDOWS && i2 + 1 < segment.length) {\n set += segment[++i2];\n continue;\n }\n // Closed\n else if (c2 === ']') {\n closed = i2;\n break;\n }\n // Otherwise\n else {\n set += c2;\n }\n }\n // Closed?\n if (closed >= 0) {\n // Cannot convert\n if (set.length > 1) {\n return '';\n }\n // Convert to literal\n if (set) {\n literal += set;\n i = closed;\n continue;\n }\n }\n // Otherwise fall thru\n }\n // Append\n literal += c;\n }\n return literal;\n }\n /**\n * Escapes regexp special characters\n * https://javascript.info/regexp-escaping\n */\n static regExpEscape(s) {\n return s.replace(/[[\\\\^$.|?*+()]/g, '\\\\$&');\n }\n}\nexports.Pattern = Pattern;\n//# sourceMappingURL=internal-pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass SearchState {\n constructor(path, level) {\n this.path = path;\n this.level = level;\n }\n}\nexports.SearchState = SearchState;\n//# sourceMappingURL=internal-search-state.js.map","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = { sep: '/' }\ntry {\n path = require('path')\n} catch (er) {}\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n a = a || {}\n b = b || {}\n var t = {}\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || !Object.keys(def).length) return minimatch\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig.minimatch(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n if (!def || !Object.keys(def).length) return Minimatch\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('glob pattern string required')\n }\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n // \"\" only matches \"\"\n if (pattern.trim() === '') return p === ''\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n if (typeof pattern !== 'string') {\n throw new TypeError('glob pattern string required')\n }\n\n if (!options) options = {}\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n // don't do it more than once.\n if (this._made) return\n\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = console.error\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n if (typeof pattern === 'undefined') {\n throw new TypeError('undefined pattern')\n }\n\n if (options.nobrace ||\n !pattern.match(/\\{.*\\}/)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n if (pattern.length > 1024 * 64) {\n throw new TypeError('pattern is too long')\n }\n\n var options = this.options\n\n // shortcuts\n if (!options.noglobstar && pattern === '**') return GLOBSTAR\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n case '/':\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n if (inClass) {\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '.':\n case '[':\n case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = match\nfunction match (f, partial) {\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n var options = this.options\n\n this.debug('matchOne',\n { 'this': this, file: file, pattern: pattern })\n\n this.debug('matchOne', file.length, pattern.length)\n\n for (var fi = 0,\n pi = 0,\n fl = file.length,\n pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n if (p === false) return false\n\n if (p === GLOBSTAR) {\n this.debug('GLOBSTAR', [pattern, p, f])\n\n // \"**\"\n // a/**/b/**/c would match the following:\n // a/b/x/y/z/c\n // a/x/y/z/b/c\n // a/b/x/b/x/c\n // a/b/c\n // To do this, take the rest of the pattern after\n // the **, and see if it would match the file remainder.\n // If so, return success.\n // If not, the ** \"swallows\" a segment, and try again.\n // This is recursively awful.\n //\n // a/**/b/**/c matching a/b/x/y/z/c\n // - a matches a\n // - doublestar\n // - matchOne(b/x/y/z/c, b/**/c)\n // - b matches b\n // - doublestar\n // - matchOne(x/y/z/c, c) -> no\n // - matchOne(y/z/c, c) -> no\n // - matchOne(z/c, c) -> no\n // - matchOne(c, c) yes, hit\n var fr = fi\n var pr = pi + 1\n if (pr === pl) {\n this.debug('** at the end')\n // a ** at the end will just swallow the rest.\n // We have found a match.\n // however, it will not swallow /.x, unless\n // options.dot is set.\n // . and .. are *never* matched by **, for explosively\n // exponential reasons.\n for (; fi < fl; fi++) {\n if (file[fi] === '.' || file[fi] === '..' ||\n (!options.dot && file[fi].charAt(0) === '.')) return false\n }\n return true\n }\n\n // ok, let's see if we can swallow whatever we can.\n while (fr < fl) {\n var swallowee = file[fr]\n\n this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n // XXX remove this slice. Just pass the start index.\n if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n this.debug('globstar found match!', fr, fl, swallowee)\n // found a match.\n return true\n } else {\n // can't swallow \".\" or \"..\" ever.\n // can only swallow \".foo\" when explicitly asked.\n if (swallowee === '.' || swallowee === '..' ||\n (!options.dot && swallowee.charAt(0) === '.')) {\n this.debug('dot detected!', file, fr, pattern, pr)\n break\n }\n\n // ** swallows a segment, and continue.\n this.debug('globstar swallow a segment, and continue')\n fr++\n }\n }\n\n // no match was found.\n // However, in partial mode, we can't say this is necessarily over.\n // If there's more *pattern* left, then\n if (partial) {\n // ran out of file\n this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n if (fr === fl) return true\n }\n return false\n }\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n if (options.nocase) {\n hit = f.toLowerCase() === p.toLowerCase()\n } else {\n hit = f === p\n }\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')\n return emptyFileEnd\n }\n\n // should be unreachable.\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","module.exports = /^[a-f0-9]{40}$/i\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar resolveSeq = require('./resolveSeq-4a68b39b.js');\nvar Schema = require('./Schema-42e9705c.js');\n\nconst defaultOptions = {\n anchorPrefix: 'a',\n customTags: null,\n indent: 2,\n indentSeq: true,\n keepCstNodes: false,\n keepNodeTypes: true,\n keepBlobsInJSON: true,\n mapAsMap: false,\n maxAliasCount: 100,\n prettyErrors: false,\n // TODO Set true in v2\n simpleKeys: false,\n version: '1.2'\n};\nconst scalarOptions = {\n get binary() {\n return resolveSeq.binaryOptions;\n },\n\n set binary(opt) {\n Object.assign(resolveSeq.binaryOptions, opt);\n },\n\n get bool() {\n return resolveSeq.boolOptions;\n },\n\n set bool(opt) {\n Object.assign(resolveSeq.boolOptions, opt);\n },\n\n get int() {\n return resolveSeq.intOptions;\n },\n\n set int(opt) {\n Object.assign(resolveSeq.intOptions, opt);\n },\n\n get null() {\n return resolveSeq.nullOptions;\n },\n\n set null(opt) {\n Object.assign(resolveSeq.nullOptions, opt);\n },\n\n get str() {\n return resolveSeq.strOptions;\n },\n\n set str(opt) {\n Object.assign(resolveSeq.strOptions, opt);\n }\n\n};\nconst documentOptions = {\n '1.0': {\n schema: 'yaml-1.1',\n merge: true,\n tagPrefixes: [{\n handle: '!',\n prefix: PlainValue.defaultTagPrefix\n }, {\n handle: '!!',\n prefix: 'tag:private.yaml.org,2002:'\n }]\n },\n '1.1': {\n schema: 'yaml-1.1',\n merge: true,\n tagPrefixes: [{\n handle: '!',\n prefix: '!'\n }, {\n handle: '!!',\n prefix: PlainValue.defaultTagPrefix\n }]\n },\n '1.2': {\n schema: 'core',\n merge: false,\n tagPrefixes: [{\n handle: '!',\n prefix: '!'\n }, {\n handle: '!!',\n prefix: PlainValue.defaultTagPrefix\n }]\n }\n};\n\nfunction stringifyTag(doc, tag) {\n if ((doc.version || doc.options.version) === '1.0') {\n const priv = tag.match(/^tag:private\\.yaml\\.org,2002:([^:/]+)$/);\n if (priv) return '!' + priv[1];\n const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\\.yaml\\.org,2002:(.*)/);\n return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, '')}`;\n }\n\n let p = doc.tagPrefixes.find(p => tag.indexOf(p.prefix) === 0);\n\n if (!p) {\n const dtp = doc.getDefaults().tagPrefixes;\n p = dtp && dtp.find(p => tag.indexOf(p.prefix) === 0);\n }\n\n if (!p) return tag[0] === '!' ? tag : `!<${tag}>`;\n const suffix = tag.substr(p.prefix.length).replace(/[!,[\\]{}]/g, ch => ({\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n })[ch]);\n return p.handle + suffix;\n}\n\nfunction getTagObject(tags, item) {\n if (item instanceof resolveSeq.Alias) return resolveSeq.Alias;\n\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0) return match.find(t => t.format === item.format) || match[0];\n }\n\n let tagObj, obj;\n\n if (item instanceof resolveSeq.Scalar) {\n obj = item.value; // TODO: deprecate/remove class check\n\n const match = tags.filter(t => t.identify && t.identify(obj) || t.class && obj instanceof t.class);\n tagObj = match.find(t => t.format === item.format) || match.find(t => !t.format);\n } else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n\n if (!tagObj) {\n const name = obj && obj.constructor ? obj.constructor.name : typeof obj;\n throw new Error(`Tag not resolved for ${name} value`);\n }\n\n return tagObj;\n} // needs to be called before value stringifier to allow for circular anchor refs\n\n\nfunction stringifyProps(node, tagObj, {\n anchors,\n doc\n}) {\n const props = [];\n const anchor = doc.anchors.getName(node);\n\n if (anchor) {\n anchors[anchor] = node;\n props.push(`&${anchor}`);\n }\n\n if (node.tag) {\n props.push(stringifyTag(doc, node.tag));\n } else if (!tagObj.default) {\n props.push(stringifyTag(doc, tagObj.tag));\n }\n\n return props.join(' ');\n}\n\nfunction stringify(item, ctx, onComment, onChompKeep) {\n const {\n anchors,\n schema\n } = ctx.doc;\n let tagObj;\n\n if (!(item instanceof resolveSeq.Node)) {\n const createCtx = {\n aliasNodes: [],\n onTagObj: o => tagObj = o,\n prevObjects: new Map()\n };\n item = schema.createNode(item, true, null, createCtx);\n\n for (const alias of createCtx.aliasNodes) {\n alias.source = alias.source.node;\n let name = anchors.getName(alias.source);\n\n if (!name) {\n name = anchors.newName();\n anchors.map[name] = alias.source;\n }\n }\n }\n\n if (item instanceof resolveSeq.Pair) return item.toString(ctx, onComment, onChompKeep);\n if (!tagObj) tagObj = getTagObject(schema.tags, item);\n const props = stringifyProps(item, tagObj, ctx);\n if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function' ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof resolveSeq.Scalar ? resolveSeq.stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep);\n if (!props) return str;\n return item instanceof resolveSeq.Scalar || str[0] === '{' || str[0] === '[' ? `${props} ${str}` : `${props}\\n${ctx.indent}${str}`;\n}\n\nclass Anchors {\n static validAnchorNode(node) {\n return node instanceof resolveSeq.Scalar || node instanceof resolveSeq.YAMLSeq || node instanceof resolveSeq.YAMLMap;\n }\n\n constructor(prefix) {\n PlainValue._defineProperty(this, \"map\", {});\n\n this.prefix = prefix;\n }\n\n createAlias(node, name) {\n this.setAnchor(node, name);\n return new resolveSeq.Alias(node);\n }\n\n createMergePair(...sources) {\n const merge = new resolveSeq.Merge();\n merge.value.items = sources.map(s => {\n if (s instanceof resolveSeq.Alias) {\n if (s.source instanceof resolveSeq.YAMLMap) return s;\n } else if (s instanceof resolveSeq.YAMLMap) {\n return this.createAlias(s);\n }\n\n throw new Error('Merge sources must be Map nodes or their Aliases');\n });\n return merge;\n }\n\n getName(node) {\n const {\n map\n } = this;\n return Object.keys(map).find(a => map[a] === node);\n }\n\n getNames() {\n return Object.keys(this.map);\n }\n\n getNode(name) {\n return this.map[name];\n }\n\n newName(prefix) {\n if (!prefix) prefix = this.prefix;\n const names = Object.keys(this.map);\n\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!names.includes(name)) return name;\n }\n } // During parsing, map & aliases contain CST nodes\n\n\n resolveNodes() {\n const {\n map,\n _cstAliases\n } = this;\n Object.keys(map).forEach(a => {\n map[a] = map[a].resolved;\n });\n\n _cstAliases.forEach(a => {\n a.source = a.source.resolved;\n });\n\n delete this._cstAliases;\n }\n\n setAnchor(node, name) {\n if (node != null && !Anchors.validAnchorNode(node)) {\n throw new Error('Anchors may only be set for Scalar, Seq and Map nodes');\n }\n\n if (name && /[\\x00-\\x19\\s,[\\]{}]/.test(name)) {\n throw new Error('Anchor names must not contain whitespace or control characters');\n }\n\n const {\n map\n } = this;\n const prev = node && Object.keys(map).find(a => map[a] === node);\n\n if (prev) {\n if (!name) {\n return prev;\n } else if (prev !== name) {\n delete map[prev];\n map[name] = node;\n }\n } else {\n if (!name) {\n if (!node) return null;\n name = this.newName();\n }\n\n map[name] = node;\n }\n\n return name;\n }\n\n}\n\nconst visit = (node, tags) => {\n if (node && typeof node === 'object') {\n const {\n tag\n } = node;\n\n if (node instanceof resolveSeq.Collection) {\n if (tag) tags[tag] = true;\n node.items.forEach(n => visit(n, tags));\n } else if (node instanceof resolveSeq.Pair) {\n visit(node.key, tags);\n visit(node.value, tags);\n } else if (node instanceof resolveSeq.Scalar) {\n if (tag) tags[tag] = true;\n }\n }\n\n return tags;\n};\n\nconst listTagNames = node => Object.keys(visit(node, {}));\n\nfunction parseContents(doc, contents) {\n const comments = {\n before: [],\n after: []\n };\n let body = undefined;\n let spaceBefore = false;\n\n for (const node of contents) {\n if (node.valueRange) {\n if (body !== undefined) {\n const msg = 'Document contains trailing content not separated by a ... or --- line';\n doc.errors.push(new PlainValue.YAMLSyntaxError(node, msg));\n break;\n }\n\n const res = resolveSeq.resolveNode(doc, node);\n\n if (spaceBefore) {\n res.spaceBefore = true;\n spaceBefore = false;\n }\n\n body = res;\n } else if (node.comment !== null) {\n const cc = body === undefined ? comments.before : comments.after;\n cc.push(node.comment);\n } else if (node.type === PlainValue.Type.BLANK_LINE) {\n spaceBefore = true;\n\n if (body === undefined && comments.before.length > 0 && !doc.commentBefore) {\n // space-separated comments at start are parsed as document comments\n doc.commentBefore = comments.before.join('\\n');\n comments.before = [];\n }\n }\n }\n\n doc.contents = body || null;\n\n if (!body) {\n doc.comment = comments.before.concat(comments.after).join('\\n') || null;\n } else {\n const cb = comments.before.join('\\n');\n\n if (cb) {\n const cbNode = body instanceof resolveSeq.Collection && body.items[0] ? body.items[0] : body;\n cbNode.commentBefore = cbNode.commentBefore ? `${cb}\\n${cbNode.commentBefore}` : cb;\n }\n\n doc.comment = comments.after.join('\\n') || null;\n }\n}\n\nfunction resolveTagDirective({\n tagPrefixes\n}, directive) {\n const [handle, prefix] = directive.parameters;\n\n if (!handle || !prefix) {\n const msg = 'Insufficient parameters given for %TAG directive';\n throw new PlainValue.YAMLSemanticError(directive, msg);\n }\n\n if (tagPrefixes.some(p => p.handle === handle)) {\n const msg = 'The %TAG directive must only be given at most once per handle in the same document.';\n throw new PlainValue.YAMLSemanticError(directive, msg);\n }\n\n return {\n handle,\n prefix\n };\n}\n\nfunction resolveYamlDirective(doc, directive) {\n let [version] = directive.parameters;\n if (directive.name === 'YAML:1.0') version = '1.0';\n\n if (!version) {\n const msg = 'Insufficient parameters given for %YAML directive';\n throw new PlainValue.YAMLSemanticError(directive, msg);\n }\n\n if (!documentOptions[version]) {\n const v0 = doc.version || doc.options.version;\n const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version}`;\n doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));\n }\n\n return version;\n}\n\nfunction parseDirectives(doc, directives, prevDoc) {\n const directiveComments = [];\n let hasDirectives = false;\n\n for (const directive of directives) {\n const {\n comment,\n name\n } = directive;\n\n switch (name) {\n case 'TAG':\n try {\n doc.tagPrefixes.push(resolveTagDirective(doc, directive));\n } catch (error) {\n doc.errors.push(error);\n }\n\n hasDirectives = true;\n break;\n\n case 'YAML':\n case 'YAML:1.0':\n if (doc.version) {\n const msg = 'The %YAML directive must only be given at most once per document.';\n doc.errors.push(new PlainValue.YAMLSemanticError(directive, msg));\n }\n\n try {\n doc.version = resolveYamlDirective(doc, directive);\n } catch (error) {\n doc.errors.push(error);\n }\n\n hasDirectives = true;\n break;\n\n default:\n if (name) {\n const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`;\n doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));\n }\n\n }\n\n if (comment) directiveComments.push(comment);\n }\n\n if (prevDoc && !hasDirectives && '1.1' === (doc.version || prevDoc.version || doc.options.version)) {\n const copyTagPrefix = ({\n handle,\n prefix\n }) => ({\n handle,\n prefix\n });\n\n doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix);\n doc.version = prevDoc.version;\n }\n\n doc.commentBefore = directiveComments.join('\\n') || null;\n}\n\nfunction assertCollection(contents) {\n if (contents instanceof resolveSeq.Collection) return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nclass Document {\n constructor(options) {\n this.anchors = new Anchors(options.anchorPrefix);\n this.commentBefore = null;\n this.comment = null;\n this.contents = null;\n this.directivesEndMarker = null;\n this.errors = [];\n this.options = options;\n this.schema = null;\n this.tagPrefixes = [];\n this.version = null;\n this.warnings = [];\n }\n\n add(value) {\n assertCollection(this.contents);\n return this.contents.add(value);\n }\n\n addIn(path, value) {\n assertCollection(this.contents);\n this.contents.addIn(path, value);\n }\n\n delete(key) {\n assertCollection(this.contents);\n return this.contents.delete(key);\n }\n\n deleteIn(path) {\n if (resolveSeq.isEmptyPath(path)) {\n if (this.contents == null) return false;\n this.contents = null;\n return true;\n }\n\n assertCollection(this.contents);\n return this.contents.deleteIn(path);\n }\n\n getDefaults() {\n return Document.defaults[this.version] || Document.defaults[this.options.version] || {};\n }\n\n get(key, keepScalar) {\n return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : undefined;\n }\n\n getIn(path, keepScalar) {\n if (resolveSeq.isEmptyPath(path)) return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents;\n return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path, keepScalar) : undefined;\n }\n\n has(key) {\n return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false;\n }\n\n hasIn(path) {\n if (resolveSeq.isEmptyPath(path)) return this.contents !== undefined;\n return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path) : false;\n }\n\n set(key, value) {\n assertCollection(this.contents);\n this.contents.set(key, value);\n }\n\n setIn(path, value) {\n if (resolveSeq.isEmptyPath(path)) this.contents = value;else {\n assertCollection(this.contents);\n this.contents.setIn(path, value);\n }\n }\n\n setSchema(id, customTags) {\n if (!id && !customTags && this.schema) return;\n if (typeof id === 'number') id = id.toFixed(1);\n\n if (id === '1.0' || id === '1.1' || id === '1.2') {\n if (this.version) this.version = id;else this.options.version = id;\n delete this.options.schema;\n } else if (id && typeof id === 'string') {\n this.options.schema = id;\n }\n\n if (Array.isArray(customTags)) this.options.customTags = customTags;\n const opt = Object.assign({}, this.getDefaults(), this.options);\n this.schema = new Schema.Schema(opt);\n }\n\n parse(node, prevDoc) {\n if (this.options.keepCstNodes) this.cstNode = node;\n if (this.options.keepNodeTypes) this.type = 'DOCUMENT';\n const {\n directives = [],\n contents = [],\n directivesEndMarker,\n error,\n valueRange\n } = node;\n\n if (error) {\n if (!error.source) error.source = this;\n this.errors.push(error);\n }\n\n parseDirectives(this, directives, prevDoc);\n if (directivesEndMarker) this.directivesEndMarker = true;\n this.range = valueRange ? [valueRange.start, valueRange.end] : null;\n this.setSchema();\n this.anchors._cstAliases = [];\n parseContents(this, contents);\n this.anchors.resolveNodes();\n\n if (this.options.prettyErrors) {\n for (const error of this.errors) if (error instanceof PlainValue.YAMLError) error.makePretty();\n\n for (const warn of this.warnings) if (warn instanceof PlainValue.YAMLError) warn.makePretty();\n }\n\n return this;\n }\n\n listNonDefaultTags() {\n return listTagNames(this.contents).filter(t => t.indexOf(Schema.Schema.defaultPrefix) !== 0);\n }\n\n setTagPrefix(handle, prefix) {\n if (handle[0] !== '!' || handle[handle.length - 1] !== '!') throw new Error('Handle must start and end with !');\n\n if (prefix) {\n const prev = this.tagPrefixes.find(p => p.handle === handle);\n if (prev) prev.prefix = prefix;else this.tagPrefixes.push({\n handle,\n prefix\n });\n } else {\n this.tagPrefixes = this.tagPrefixes.filter(p => p.handle !== handle);\n }\n }\n\n toJSON(arg, onAnchor) {\n const {\n keepBlobsInJSON,\n mapAsMap,\n maxAliasCount\n } = this.options;\n const keep = keepBlobsInJSON && (typeof arg !== 'string' || !(this.contents instanceof resolveSeq.Scalar));\n const ctx = {\n doc: this,\n indentStep: ' ',\n keep,\n mapAsMap: keep && !!mapAsMap,\n maxAliasCount,\n stringify // Requiring directly in Pair would create circular dependencies\n\n };\n const anchorNames = Object.keys(this.anchors.map);\n if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map(name => [this.anchors.map[name], {\n alias: [],\n aliasCount: 0,\n count: 1\n }]));\n const res = resolveSeq.toJSON(this.contents, arg, ctx);\n if (typeof onAnchor === 'function' && ctx.anchors) for (const {\n count,\n res\n } of ctx.anchors.values()) onAnchor(res, count);\n return res;\n }\n\n toString() {\n if (this.errors.length > 0) throw new Error('Document with errors cannot be stringified');\n const indentSize = this.options.indent;\n\n if (!Number.isInteger(indentSize) || indentSize <= 0) {\n const s = JSON.stringify(indentSize);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n\n this.setSchema();\n const lines = [];\n let hasDirectives = false;\n\n if (this.version) {\n let vd = '%YAML 1.2';\n\n if (this.schema.name === 'yaml-1.1') {\n if (this.version === '1.0') vd = '%YAML:1.0';else if (this.version === '1.1') vd = '%YAML 1.1';\n }\n\n lines.push(vd);\n hasDirectives = true;\n }\n\n const tagNames = this.listNonDefaultTags();\n this.tagPrefixes.forEach(({\n handle,\n prefix\n }) => {\n if (tagNames.some(t => t.indexOf(prefix) === 0)) {\n lines.push(`%TAG ${handle} ${prefix}`);\n hasDirectives = true;\n }\n });\n if (hasDirectives || this.directivesEndMarker) lines.push('---');\n\n if (this.commentBefore) {\n if (hasDirectives || !this.directivesEndMarker) lines.unshift('');\n lines.unshift(this.commentBefore.replace(/^/gm, '#'));\n }\n\n const ctx = {\n anchors: {},\n doc: this,\n indent: '',\n indentStep: ' '.repeat(indentSize),\n stringify // Requiring directly in nodes would create circular dependencies\n\n };\n let chompKeep = false;\n let contentComment = null;\n\n if (this.contents) {\n if (this.contents instanceof resolveSeq.Node) {\n if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push('');\n if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, '#')); // top-level block scalars need to be indented if followed by a comment\n\n ctx.forceBlockIndent = !!this.comment;\n contentComment = this.contents.comment;\n }\n\n const onChompKeep = contentComment ? null : () => chompKeep = true;\n const body = stringify(this.contents, ctx, () => contentComment = null, onChompKeep);\n lines.push(resolveSeq.addComment(body, '', contentComment));\n } else if (this.contents !== undefined) {\n lines.push(stringify(this.contents, ctx));\n }\n\n if (this.comment) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') lines.push('');\n lines.push(this.comment.replace(/^/gm, '#'));\n }\n\n return lines.join('\\n') + '\\n';\n }\n\n}\n\nPlainValue._defineProperty(Document, \"defaults\", documentOptions);\n\nexports.Document = Document;\nexports.defaultOptions = defaultOptions;\nexports.scalarOptions = scalarOptions;\n","'use strict';\n\nconst Char = {\n ANCHOR: '&',\n COMMENT: '#',\n TAG: '!',\n DIRECTIVES_END: '-',\n DOCUMENT_END: '.'\n};\nconst Type = {\n ALIAS: 'ALIAS',\n BLANK_LINE: 'BLANK_LINE',\n BLOCK_FOLDED: 'BLOCK_FOLDED',\n BLOCK_LITERAL: 'BLOCK_LITERAL',\n COMMENT: 'COMMENT',\n DIRECTIVE: 'DIRECTIVE',\n DOCUMENT: 'DOCUMENT',\n FLOW_MAP: 'FLOW_MAP',\n FLOW_SEQ: 'FLOW_SEQ',\n MAP: 'MAP',\n MAP_KEY: 'MAP_KEY',\n MAP_VALUE: 'MAP_VALUE',\n PLAIN: 'PLAIN',\n QUOTE_DOUBLE: 'QUOTE_DOUBLE',\n QUOTE_SINGLE: 'QUOTE_SINGLE',\n SEQ: 'SEQ',\n SEQ_ITEM: 'SEQ_ITEM'\n};\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nconst defaultTags = {\n MAP: 'tag:yaml.org,2002:map',\n SEQ: 'tag:yaml.org,2002:seq',\n STR: 'tag:yaml.org,2002:str'\n};\n\nfunction findLineStarts(src) {\n const ls = [0];\n let offset = src.indexOf('\\n');\n\n while (offset !== -1) {\n offset += 1;\n ls.push(offset);\n offset = src.indexOf('\\n', offset);\n }\n\n return ls;\n}\n\nfunction getSrcInfo(cst) {\n let lineStarts, src;\n\n if (typeof cst === 'string') {\n lineStarts = findLineStarts(cst);\n src = cst;\n } else {\n if (Array.isArray(cst)) cst = cst[0];\n\n if (cst && cst.context) {\n if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src);\n lineStarts = cst.lineStarts;\n src = cst.context.src;\n }\n }\n\n return {\n lineStarts,\n src\n };\n}\n/**\n * @typedef {Object} LinePos - One-indexed position in the source\n * @property {number} line\n * @property {number} col\n */\n\n/**\n * Determine the line/col position matching a character offset.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns a one-indexed `{ line, col }` location if found, or\n * `undefined` otherwise.\n *\n * @param {number} offset\n * @param {string|Document|Document[]} cst\n * @returns {?LinePos}\n */\n\n\nfunction getLinePos(offset, cst) {\n if (typeof offset !== 'number' || offset < 0) return null;\n const {\n lineStarts,\n src\n } = getSrcInfo(cst);\n if (!lineStarts || !src || offset > src.length) return null;\n\n for (let i = 0; i < lineStarts.length; ++i) {\n const start = lineStarts[i];\n\n if (offset < start) {\n return {\n line: i,\n col: offset - lineStarts[i - 1] + 1\n };\n }\n\n if (offset === start) return {\n line: i + 1,\n col: 1\n };\n }\n\n const line = lineStarts.length;\n return {\n line,\n col: offset - lineStarts[line - 1] + 1\n };\n}\n/**\n * Get a specified line from the source.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns the line as a string if found, or `null` otherwise.\n *\n * @param {number} line One-indexed line number\n * @param {string|Document|Document[]} cst\n * @returns {?string}\n */\n\nfunction getLine(line, cst) {\n const {\n lineStarts,\n src\n } = getSrcInfo(cst);\n if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;\n const start = lineStarts[line - 1];\n let end = lineStarts[line]; // undefined for last line; that's ok for slice()\n\n while (end && end > start && src[end - 1] === '\\n') --end;\n\n return src.slice(start, end);\n}\n/**\n * Pretty-print the starting line from the source indicated by the range `pos`\n *\n * Trims output to `maxWidth` chars while keeping the starting column visible,\n * using `…` at either end to indicate dropped characters.\n *\n * Returns a two-line string (or `null`) with `\\n` as separator; the second line\n * will hold appropriately indented `^` marks indicating the column range.\n *\n * @param {Object} pos\n * @param {LinePos} pos.start\n * @param {LinePos} [pos.end]\n * @param {string|Document|Document[]*} cst\n * @param {number} [maxWidth=80]\n * @returns {?string}\n */\n\nfunction getPrettyContext({\n start,\n end\n}, cst, maxWidth = 80) {\n let src = getLine(start.line, cst);\n if (!src) return null;\n let {\n col\n } = start;\n\n if (src.length > maxWidth) {\n if (col <= maxWidth - 10) {\n src = src.substr(0, maxWidth - 1) + '…';\n } else {\n const halfWidth = Math.round(maxWidth / 2);\n if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + '…';\n col -= src.length - maxWidth;\n src = '…' + src.substr(1 - maxWidth);\n }\n }\n\n let errLen = 1;\n let errEnd = '';\n\n if (end) {\n if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) {\n errLen = end.col - start.col;\n } else {\n errLen = Math.min(src.length + 1, maxWidth) - col;\n errEnd = '…';\n }\n }\n\n const offset = col > 1 ? ' '.repeat(col - 1) : '';\n const err = '^'.repeat(errLen);\n return `${src}\\n${offset}${err}${errEnd}`;\n}\n\nclass Range {\n static copy(orig) {\n return new Range(orig.start, orig.end);\n }\n\n constructor(start, end) {\n this.start = start;\n this.end = end || start;\n }\n\n isEmpty() {\n return typeof this.start !== 'number' || !this.end || this.end <= this.start;\n }\n /**\n * Set `origStart` and `origEnd` to point to the original source range for\n * this node, which may differ due to dropped CR characters.\n *\n * @param {number[]} cr - Positions of dropped CR characters\n * @param {number} offset - Starting index of `cr` from the last call\n * @returns {number} - The next offset, matching the one found for `origStart`\n */\n\n\n setOrigRange(cr, offset) {\n const {\n start,\n end\n } = this;\n\n if (cr.length === 0 || end <= cr[0]) {\n this.origStart = start;\n this.origEnd = end;\n return offset;\n }\n\n let i = offset;\n\n while (i < cr.length) {\n if (cr[i] > start) break;else ++i;\n }\n\n this.origStart = start + i;\n const nextOffset = i;\n\n while (i < cr.length) {\n // if end was at \\n, it should now be at \\r\n if (cr[i] >= end) break;else ++i;\n }\n\n this.origEnd = end + i;\n return nextOffset;\n }\n\n}\n\n/** Root class of all nodes */\n\nclass Node {\n static addStringTerminator(src, offset, str) {\n if (str[str.length - 1] === '\\n') return str;\n const next = Node.endOfWhiteSpace(src, offset);\n return next >= src.length || src[next] === '\\n' ? str + '\\n' : str;\n } // ^(---|...)\n\n\n static atDocumentBoundary(src, offset, sep) {\n const ch0 = src[offset];\n if (!ch0) return true;\n const prev = src[offset - 1];\n if (prev && prev !== '\\n') return false;\n\n if (sep) {\n if (ch0 !== sep) return false;\n } else {\n if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false;\n }\n\n const ch1 = src[offset + 1];\n const ch2 = src[offset + 2];\n if (ch1 !== ch0 || ch2 !== ch0) return false;\n const ch3 = src[offset + 3];\n return !ch3 || ch3 === '\\n' || ch3 === '\\t' || ch3 === ' ';\n }\n\n static endOfIdentifier(src, offset) {\n let ch = src[offset];\n const isVerbatim = ch === '<';\n const notOk = isVerbatim ? ['\\n', '\\t', ' ', '>'] : ['\\n', '\\t', ' ', '[', ']', '{', '}', ','];\n\n while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1];\n\n if (isVerbatim && ch === '>') offset += 1;\n return offset;\n }\n\n static endOfIndent(src, offset) {\n let ch = src[offset];\n\n while (ch === ' ') ch = src[offset += 1];\n\n return offset;\n }\n\n static endOfLine(src, offset) {\n let ch = src[offset];\n\n while (ch && ch !== '\\n') ch = src[offset += 1];\n\n return offset;\n }\n\n static endOfWhiteSpace(src, offset) {\n let ch = src[offset];\n\n while (ch === '\\t' || ch === ' ') ch = src[offset += 1];\n\n return offset;\n }\n\n static startOfLine(src, offset) {\n let ch = src[offset - 1];\n if (ch === '\\n') return offset;\n\n while (ch && ch !== '\\n') ch = src[offset -= 1];\n\n return offset + 1;\n }\n /**\n * End of indentation, or null if the line's indent level is not more\n * than `indent`\n *\n * @param {string} src\n * @param {number} indent\n * @param {number} lineStart\n * @returns {?number}\n */\n\n\n static endOfBlockIndent(src, indent, lineStart) {\n const inEnd = Node.endOfIndent(src, lineStart);\n\n if (inEnd > lineStart + indent) {\n return inEnd;\n } else {\n const wsEnd = Node.endOfWhiteSpace(src, inEnd);\n const ch = src[wsEnd];\n if (!ch || ch === '\\n') return wsEnd;\n }\n\n return null;\n }\n\n static atBlank(src, offset, endAsBlank) {\n const ch = src[offset];\n return ch === '\\n' || ch === '\\t' || ch === ' ' || endAsBlank && !ch;\n }\n\n static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) {\n if (!ch || indentDiff < 0) return false;\n if (indentDiff > 0) return true;\n return indicatorAsIndent && ch === '-';\n } // should be at line or string end, or at next non-whitespace char\n\n\n static normalizeOffset(src, offset) {\n const ch = src[offset];\n return !ch ? offset : ch !== '\\n' && src[offset - 1] === '\\n' ? offset - 1 : Node.endOfWhiteSpace(src, offset);\n } // fold single newline into space, multiple newlines to N - 1 newlines\n // presumes src[offset] === '\\n'\n\n\n static foldNewline(src, offset, indent) {\n let inCount = 0;\n let error = false;\n let fold = '';\n let ch = src[offset + 1];\n\n while (ch === ' ' || ch === '\\t' || ch === '\\n') {\n switch (ch) {\n case '\\n':\n inCount = 0;\n offset += 1;\n fold += '\\n';\n break;\n\n case '\\t':\n if (inCount <= indent) error = true;\n offset = Node.endOfWhiteSpace(src, offset + 2) - 1;\n break;\n\n case ' ':\n inCount += 1;\n offset += 1;\n break;\n }\n\n ch = src[offset + 1];\n }\n\n if (!fold) fold = ' ';\n if (ch && inCount <= indent) error = true;\n return {\n fold,\n offset,\n error\n };\n }\n\n constructor(type, props, context) {\n Object.defineProperty(this, 'context', {\n value: context || null,\n writable: true\n });\n this.error = null;\n this.range = null;\n this.valueRange = null;\n this.props = props || [];\n this.type = type;\n this.value = null;\n }\n\n getPropValue(idx, key, skipKey) {\n if (!this.context) return null;\n const {\n src\n } = this.context;\n const prop = this.props[idx];\n return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;\n }\n\n get anchor() {\n for (let i = 0; i < this.props.length; ++i) {\n const anchor = this.getPropValue(i, Char.ANCHOR, true);\n if (anchor != null) return anchor;\n }\n\n return null;\n }\n\n get comment() {\n const comments = [];\n\n for (let i = 0; i < this.props.length; ++i) {\n const comment = this.getPropValue(i, Char.COMMENT, true);\n if (comment != null) comments.push(comment);\n }\n\n return comments.length > 0 ? comments.join('\\n') : null;\n }\n\n commentHasRequiredWhitespace(start) {\n const {\n src\n } = this.context;\n if (this.header && start === this.header.end) return false;\n if (!this.valueRange) return false;\n const {\n end\n } = this.valueRange;\n return start !== end || Node.atBlank(src, end - 1);\n }\n\n get hasComment() {\n if (this.context) {\n const {\n src\n } = this.context;\n\n for (let i = 0; i < this.props.length; ++i) {\n if (src[this.props[i].start] === Char.COMMENT) return true;\n }\n }\n\n return false;\n }\n\n get hasProps() {\n if (this.context) {\n const {\n src\n } = this.context;\n\n for (let i = 0; i < this.props.length; ++i) {\n if (src[this.props[i].start] !== Char.COMMENT) return true;\n }\n }\n\n return false;\n }\n\n get includesTrailingLines() {\n return false;\n }\n\n get jsonLike() {\n const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE];\n return jsonLikeTypes.indexOf(this.type) !== -1;\n }\n\n get rangeAsLinePos() {\n if (!this.range || !this.context) return undefined;\n const start = getLinePos(this.range.start, this.context.root);\n if (!start) return undefined;\n const end = getLinePos(this.range.end, this.context.root);\n return {\n start,\n end\n };\n }\n\n get rawValue() {\n if (!this.valueRange || !this.context) return null;\n const {\n start,\n end\n } = this.valueRange;\n return this.context.src.slice(start, end);\n }\n\n get tag() {\n for (let i = 0; i < this.props.length; ++i) {\n const tag = this.getPropValue(i, Char.TAG, false);\n\n if (tag != null) {\n if (tag[1] === '<') {\n return {\n verbatim: tag.slice(2, -1)\n };\n } else {\n // eslint-disable-next-line no-unused-vars\n const [_, handle, suffix] = tag.match(/^(.*!)([^!]*)$/);\n return {\n handle,\n suffix\n };\n }\n }\n }\n\n return null;\n }\n\n get valueRangeContainsNewline() {\n if (!this.valueRange || !this.context) return false;\n const {\n start,\n end\n } = this.valueRange;\n const {\n src\n } = this.context;\n\n for (let i = start; i < end; ++i) {\n if (src[i] === '\\n') return true;\n }\n\n return false;\n }\n\n parseComment(start) {\n const {\n src\n } = this.context;\n\n if (src[start] === Char.COMMENT) {\n const end = Node.endOfLine(src, start + 1);\n const commentRange = new Range(start, end);\n this.props.push(commentRange);\n return end;\n }\n\n return start;\n }\n /**\n * Populates the `origStart` and `origEnd` values of all ranges for this\n * node. Extended by child classes to handle descendant nodes.\n *\n * @param {number[]} cr - Positions of dropped CR characters\n * @param {number} offset - Starting index of `cr` from the last call\n * @returns {number} - The next offset, matching the one found for `origStart`\n */\n\n\n setOrigRanges(cr, offset) {\n if (this.range) offset = this.range.setOrigRange(cr, offset);\n if (this.valueRange) this.valueRange.setOrigRange(cr, offset);\n this.props.forEach(prop => prop.setOrigRange(cr, offset));\n return offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n range,\n value\n } = this;\n if (value != null) return value;\n const str = src.slice(range.start, range.end);\n return Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass YAMLError extends Error {\n constructor(name, source, message) {\n if (!message || !(source instanceof Node)) throw new Error(`Invalid arguments for new ${name}`);\n super();\n this.name = name;\n this.message = message;\n this.source = source;\n }\n\n makePretty() {\n if (!this.source) return;\n this.nodeType = this.source.type;\n const cst = this.source.context && this.source.context.root;\n\n if (typeof this.offset === 'number') {\n this.range = new Range(this.offset, this.offset + 1);\n const start = cst && getLinePos(this.offset, cst);\n\n if (start) {\n const end = {\n line: start.line,\n col: start.col + 1\n };\n this.linePos = {\n start,\n end\n };\n }\n\n delete this.offset;\n } else {\n this.range = this.source.range;\n this.linePos = this.source.rangeAsLinePos;\n }\n\n if (this.linePos) {\n const {\n line,\n col\n } = this.linePos.start;\n this.message += ` at line ${line}, column ${col}`;\n const ctx = cst && getPrettyContext(this.linePos, cst);\n if (ctx) this.message += `:\\n\\n${ctx}\\n`;\n }\n\n delete this.source;\n }\n\n}\nclass YAMLReferenceError extends YAMLError {\n constructor(source, message) {\n super('YAMLReferenceError', source, message);\n }\n\n}\nclass YAMLSemanticError extends YAMLError {\n constructor(source, message) {\n super('YAMLSemanticError', source, message);\n }\n\n}\nclass YAMLSyntaxError extends YAMLError {\n constructor(source, message) {\n super('YAMLSyntaxError', source, message);\n }\n\n}\nclass YAMLWarning extends YAMLError {\n constructor(source, message) {\n super('YAMLWarning', source, message);\n }\n\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nclass PlainValue extends Node {\n static endOfLine(src, start, inFlow) {\n let ch = src[start];\n let offset = start;\n\n while (ch && ch !== '\\n') {\n if (inFlow && (ch === '[' || ch === ']' || ch === '{' || ch === '}' || ch === ',')) break;\n const next = src[offset + 1];\n if (ch === ':' && (!next || next === '\\n' || next === '\\t' || next === ' ' || inFlow && next === ',')) break;\n if ((ch === ' ' || ch === '\\t') && next === '#') break;\n offset += 1;\n ch = next;\n }\n\n return offset;\n }\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n let {\n start,\n end\n } = this.valueRange;\n const {\n src\n } = this.context;\n let ch = src[end - 1];\n\n while (start < end && (ch === '\\n' || ch === '\\t' || ch === ' ')) ch = src[--end - 1];\n\n let str = '';\n\n for (let i = start; i < end; ++i) {\n const ch = src[i];\n\n if (ch === '\\n') {\n const {\n fold,\n offset\n } = Node.foldNewline(src, i, -1);\n str += fold;\n i = offset;\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = src[i + 1];\n\n while (i < end && (next === ' ' || next === '\\t')) {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n const ch0 = src[start];\n\n switch (ch0) {\n case '\\t':\n {\n const msg = 'Plain value cannot start with a tab character';\n const errors = [new YAMLSemanticError(this, msg)];\n return {\n errors,\n str\n };\n }\n\n case '@':\n case '`':\n {\n const msg = `Plain value cannot start with reserved character ${ch0}`;\n const errors = [new YAMLSemanticError(this, msg)];\n return {\n errors,\n str\n };\n }\n\n default:\n return str;\n }\n }\n\n parseBlockValue(start) {\n const {\n indent,\n inFlow,\n src\n } = this.context;\n let offset = start;\n let valueEnd = start;\n\n for (let ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n if (Node.atDocumentBoundary(src, offset + 1)) break;\n const end = Node.endOfBlockIndent(src, indent, offset + 1);\n if (end === null || src[end] === '#') break;\n\n if (src[end] === '\\n') {\n offset = end;\n } else {\n valueEnd = PlainValue.endOfLine(src, end, inFlow);\n offset = valueEnd;\n }\n }\n\n if (this.valueRange.isEmpty()) this.valueRange.start = start;\n this.valueRange.end = valueEnd;\n return valueEnd;\n }\n /**\n * Parses a plain value from the source\n *\n * Accepted forms are:\n * ```\n * #comment\n *\n * first line\n *\n * first line #comment\n *\n * first line\n * block\n * lines\n *\n * #comment\n * block\n * lines\n * ```\n * where block lines are empty or have an indent level greater than `indent`.\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar, may be `\\n`\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n inFlow,\n src\n } = context;\n let offset = start;\n const ch = src[offset];\n\n if (ch && ch !== '#' && ch !== '\\n') {\n offset = PlainValue.endOfLine(src, start, inFlow);\n }\n\n this.valueRange = new Range(start, offset);\n offset = Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n\n if (!this.hasComment || this.valueRange.isEmpty()) {\n offset = this.parseBlockValue(offset);\n }\n\n return offset;\n }\n\n}\n\nexports.Char = Char;\nexports.Node = Node;\nexports.PlainValue = PlainValue;\nexports.Range = Range;\nexports.Type = Type;\nexports.YAMLError = YAMLError;\nexports.YAMLReferenceError = YAMLReferenceError;\nexports.YAMLSemanticError = YAMLSemanticError;\nexports.YAMLSyntaxError = YAMLSyntaxError;\nexports.YAMLWarning = YAMLWarning;\nexports._defineProperty = _defineProperty;\nexports.defaultTagPrefix = defaultTagPrefix;\nexports.defaultTags = defaultTags;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar resolveSeq = require('./resolveSeq-4a68b39b.js');\nvar warnings = require('./warnings-39684f17.js');\n\nfunction createMap(schema, obj, ctx) {\n const map = new resolveSeq.YAMLMap(schema);\n\n if (obj instanceof Map) {\n for (const [key, value] of obj) map.items.push(schema.createPair(key, value, ctx));\n } else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj)) map.items.push(schema.createPair(key, obj[key], ctx));\n }\n\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n\n return map;\n}\n\nconst map = {\n createNode: createMap,\n default: true,\n nodeClass: resolveSeq.YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve: resolveSeq.resolveMap\n};\n\nfunction createSeq(schema, obj, ctx) {\n const seq = new resolveSeq.YAMLSeq(schema);\n\n if (obj && obj[Symbol.iterator]) {\n for (const it of obj) {\n const v = schema.createNode(it, ctx.wrapScalars, null, ctx);\n seq.items.push(v);\n }\n }\n\n return seq;\n}\n\nconst seq = {\n createNode: createSeq,\n default: true,\n nodeClass: resolveSeq.YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve: resolveSeq.resolveSeq\n};\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: resolveSeq.resolveString,\n\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({\n actualString: true\n }, ctx);\n return resolveSeq.stringifyString(item, ctx, onComment, onChompKeep);\n },\n\n options: resolveSeq.strOptions\n};\n\nconst failsafe = [map, seq, string];\n\n/* global BigInt */\n\nconst intIdentify = value => typeof value === 'bigint' || Number.isInteger(value);\n\nconst intResolve = (src, part, radix) => resolveSeq.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);\n\nfunction intStringify(node, radix, prefix) {\n const {\n value\n } = node;\n if (intIdentify(value) && value >= 0) return prefix + value.toString(radix);\n return resolveSeq.stringifyNumber(node);\n}\n\nconst nullObj = {\n identify: value => value == null,\n createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => null,\n options: resolveSeq.nullOptions,\n stringify: () => resolveSeq.nullOptions.nullStr\n};\nconst boolObj = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => str[0] === 't' || str[0] === 'T',\n options: resolveSeq.boolOptions,\n stringify: ({\n value\n }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr\n};\nconst octObj = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o([0-7]+)$/,\n resolve: (str, oct) => intResolve(str, oct, 8),\n options: resolveSeq.intOptions,\n stringify: node => intStringify(node, 8, '0o')\n};\nconst intObj = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: str => intResolve(str, str, 10),\n options: resolveSeq.intOptions,\n stringify: resolveSeq.stringifyNumber\n};\nconst hexObj = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x([0-9a-fA-F]+)$/,\n resolve: (str, hex) => intResolve(str, hex, 16),\n options: resolveSeq.intOptions,\n stringify: node => intStringify(node, 16, '0x')\n};\nconst nanObj = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n stringify: resolveSeq.stringifyNumber\n};\nconst expObj = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify: ({\n value\n }) => Number(value).toExponential()\n};\nconst floatObj = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.([0-9]+)|[0-9]+\\.([0-9]*))$/,\n\n resolve(str, frac1, frac2) {\n const frac = frac1 || frac2;\n const node = new resolveSeq.Scalar(parseFloat(str));\n if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;\n return node;\n },\n\n stringify: resolveSeq.stringifyNumber\n};\nconst core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);\n\n/* global BigInt */\n\nconst intIdentify$1 = value => typeof value === 'bigint' || Number.isInteger(value);\n\nconst stringifyJSON = ({\n value\n}) => JSON.stringify(value);\n\nconst json = [map, seq, {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: resolveSeq.resolveString,\n stringify: stringifyJSON\n}, {\n identify: value => value == null,\n createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n}, {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true|false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n}, {\n identify: intIdentify$1,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: str => resolveSeq.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({\n value\n }) => intIdentify$1(value) ? value.toString() : JSON.stringify(value)\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n}];\n\njson.scalarFallback = str => {\n throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n};\n\n/* global BigInt */\n\nconst boolStringify = ({\n value\n}) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr;\n\nconst intIdentify$2 = value => typeof value === 'bigint' || Number.isInteger(value);\n\nfunction intResolve$1(sign, src, radix) {\n let str = src.replace(/_/g, '');\n\n if (resolveSeq.intOptions.asBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n\n case 8:\n str = `0o${str}`;\n break;\n\n case 16:\n str = `0x${str}`;\n break;\n }\n\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\n\nfunction intStringify$1(node, radix, prefix) {\n const {\n value\n } = node;\n\n if (intIdentify$2(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n\n return resolveSeq.stringifyNumber(node);\n}\n\nconst yaml11 = failsafe.concat([{\n identify: value => value == null,\n createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => null,\n options: resolveSeq.nullOptions,\n stringify: () => resolveSeq.nullOptions.nullStr\n}, {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => true,\n options: resolveSeq.boolOptions,\n stringify: boolStringify\n}, {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,\n resolve: () => false,\n options: resolveSeq.boolOptions,\n stringify: boolStringify\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^([-+]?)0b([0-1_]+)$/,\n resolve: (str, sign, bin) => intResolve$1(sign, bin, 2),\n stringify: node => intStringify$1(node, 2, '0b')\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^([-+]?)0([0-7_]+)$/,\n resolve: (str, sign, oct) => intResolve$1(sign, oct, 8),\n stringify: node => intStringify$1(node, 8, '0')\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^([-+]?)([0-9][0-9_]*)$/,\n resolve: (str, sign, abs) => intResolve$1(sign, abs, 10),\n stringify: resolveSeq.stringifyNumber\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^([-+]?)0x([0-9a-fA-F_]+)$/,\n resolve: (str, sign, hex) => intResolve$1(sign, hex, 16),\n stringify: node => intStringify$1(node, 16, '0x')\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n stringify: resolveSeq.stringifyNumber\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?([0-9][0-9_]*)?(\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str.replace(/_/g, '')),\n stringify: ({\n value\n }) => Number(value).toExponential()\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.([0-9_]*)$/,\n\n resolve(str, frac) {\n const node = new resolveSeq.Scalar(parseFloat(str.replace(/_/g, '')));\n\n if (frac) {\n const f = frac.replace(/_/g, '');\n if (f[f.length - 1] === '0') node.minFractionDigits = f.length;\n }\n\n return node;\n },\n\n stringify: resolveSeq.stringifyNumber\n}], warnings.binary, warnings.omap, warnings.pairs, warnings.set, warnings.intTime, warnings.floatTime, warnings.timestamp);\n\nconst schemas = {\n core,\n failsafe,\n json,\n yaml11\n};\nconst tags = {\n binary: warnings.binary,\n bool: boolObj,\n float: floatObj,\n floatExp: expObj,\n floatNaN: nanObj,\n floatTime: warnings.floatTime,\n int: intObj,\n intHex: hexObj,\n intOct: octObj,\n intTime: warnings.intTime,\n map,\n null: nullObj,\n omap: warnings.omap,\n pairs: warnings.pairs,\n seq,\n set: warnings.set,\n timestamp: warnings.timestamp\n};\n\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) || match[0];\n if (!tagObj) throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n } // TODO: deprecate/remove class check\n\n\n return tags.find(t => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format);\n}\n\nfunction createNode(value, tagName, ctx) {\n if (value instanceof resolveSeq.Node) return value;\n const {\n defaultPrefix,\n onTagObj,\n prevObjects,\n schema,\n wrapScalars\n } = ctx;\n if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n\n if (!tagObj) {\n if (typeof value.toJSON === 'function') value = value.toJSON();\n if (typeof value !== 'object') return wrapScalars ? new resolveSeq.Scalar(value) : value;\n tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;\n }\n\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n } // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `obj` wrapper allows for circular references to resolve.\n\n\n const obj = {};\n\n if (value && typeof value === 'object' && prevObjects) {\n const prev = prevObjects.get(value);\n\n if (prev) {\n const alias = new resolveSeq.Alias(prev); // leaves source dirty; must be cleaned by caller\n\n ctx.aliasNodes.push(alias); // defined along with prevObjects\n\n return alias;\n }\n\n obj.value = value;\n prevObjects.set(value, obj);\n }\n\n obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq.Scalar(value) : value;\n if (tagName && obj.node instanceof resolveSeq.Node) obj.node.tag = tagName;\n return obj.node;\n}\n\nfunction getSchemaTags(schemas, knownTags, customTags, schemaId) {\n let tags = schemas[schemaId.replace(/\\W/g, '')]; // 'yaml-1.1' -> 'yaml11'\n\n if (!tags) {\n const keys = Object.keys(schemas).map(key => JSON.stringify(key)).join(', ');\n throw new Error(`Unknown schema \"${schemaId}\"; use one of ${keys}`);\n }\n\n if (Array.isArray(customTags)) {\n for (const tag of customTags) tags = tags.concat(tag);\n } else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n\n for (let i = 0; i < tags.length; ++i) {\n const tag = tags[i];\n\n if (typeof tag === 'string') {\n const tagObj = knownTags[tag];\n\n if (!tagObj) {\n const keys = Object.keys(knownTags).map(key => JSON.stringify(key)).join(', ');\n throw new Error(`Unknown custom tag \"${tag}\"; use one of ${keys}`);\n }\n\n tags[i] = tagObj;\n }\n }\n\n return tags;\n}\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\n\nclass Schema {\n // TODO: remove in v2\n // TODO: remove in v2\n constructor({\n customTags,\n merge,\n schema,\n sortMapEntries,\n tags: deprecatedCustomTags\n }) {\n this.merge = !!merge;\n this.name = schema;\n this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;\n if (!customTags && deprecatedCustomTags) warnings.warnOptionDeprecation('tags', 'customTags');\n this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);\n }\n\n createNode(value, wrapScalars, tagName, ctx) {\n const baseCtx = {\n defaultPrefix: Schema.defaultPrefix,\n schema: this,\n wrapScalars\n };\n const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;\n return createNode(value, tagName, createCtx);\n }\n\n createPair(key, value, ctx) {\n if (!ctx) ctx = {\n wrapScalars: true\n };\n const k = this.createNode(key, ctx.wrapScalars, null, ctx);\n const v = this.createNode(value, ctx.wrapScalars, null, ctx);\n return new resolveSeq.Pair(k, v);\n }\n\n}\n\nPlainValue._defineProperty(Schema, \"defaultPrefix\", PlainValue.defaultTagPrefix);\n\nPlainValue._defineProperty(Schema, \"defaultTags\", PlainValue.defaultTags);\n\nexports.Schema = Schema;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar parseCst = require('./parse-cst.js');\nrequire('./resolveSeq-4a68b39b.js');\nvar Document$1 = require('./Document-2cf6b08c.js');\nvar Schema = require('./Schema-42e9705c.js');\nvar warnings = require('./warnings-39684f17.js');\n\nfunction createNode(value, wrapScalars = true, tag) {\n if (tag === undefined && typeof wrapScalars === 'string') {\n tag = wrapScalars;\n wrapScalars = true;\n }\n\n const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions);\n const schema = new Schema.Schema(options);\n return schema.createNode(value, wrapScalars, tag);\n}\n\nclass Document extends Document$1.Document {\n constructor(options) {\n super(Object.assign({}, Document$1.defaultOptions, options));\n }\n\n}\n\nfunction parseAllDocuments(src, options) {\n const stream = [];\n let prev;\n\n for (const cstDoc of parseCst.parse(src)) {\n const doc = new Document(options);\n doc.parse(cstDoc, prev);\n stream.push(doc);\n prev = doc;\n }\n\n return stream;\n}\n\nfunction parseDocument(src, options) {\n const cst = parseCst.parse(src);\n const doc = new Document(options).parse(cst[0]);\n\n if (cst.length > 1) {\n const errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';\n doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg));\n }\n\n return doc;\n}\n\nfunction parse(src, options) {\n const doc = parseDocument(src, options);\n doc.warnings.forEach(warning => warnings.warn(warning));\n if (doc.errors.length > 0) throw doc.errors[0];\n return doc.toJSON();\n}\n\nfunction stringify(value, options) {\n const doc = new Document(options);\n doc.contents = value;\n return String(doc);\n}\n\nconst YAML = {\n createNode,\n defaultOptions: Document$1.defaultOptions,\n Document,\n parse,\n parseAllDocuments,\n parseCST: parseCst.parse,\n parseDocument,\n scalarOptions: Document$1.scalarOptions,\n stringify\n};\n\nexports.YAML = YAML;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\n\nclass BlankLine extends PlainValue.Node {\n constructor() {\n super(PlainValue.Type.BLANK_LINE);\n }\n /* istanbul ignore next */\n\n\n get includesTrailingLines() {\n // This is never called from anywhere, but if it were,\n // this is the value it should return.\n return true;\n }\n /**\n * Parses a blank line from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first \\n character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n this.range = new PlainValue.Range(start, start + 1);\n return start + 1;\n }\n\n}\n\nclass CollectionItem extends PlainValue.Node {\n constructor(type, props) {\n super(type, props);\n this.node = null;\n }\n\n get includesTrailingLines() {\n return !!this.node && this.node.includesTrailingLines;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n parseNode,\n src\n } = context;\n let {\n atLineStart,\n lineStart\n } = context;\n if (!atLineStart && this.type === PlainValue.Type.SEQ_ITEM) this.error = new PlainValue.YAMLSemanticError(this, 'Sequence items must not have preceding content on the same line');\n const indent = atLineStart ? start - lineStart : context.indent;\n let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1);\n let ch = src[offset];\n const inlineComment = ch === '#';\n const comments = [];\n let blankLine = null;\n\n while (ch === '\\n' || ch === '#') {\n if (ch === '#') {\n const end = PlainValue.Node.endOfLine(src, offset + 1);\n comments.push(new PlainValue.Range(offset, end));\n offset = end;\n } else {\n atLineStart = true;\n lineStart = offset + 1;\n const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart);\n\n if (src[wsEnd] === '\\n' && comments.length === 0) {\n blankLine = new BlankLine();\n lineStart = blankLine.parse({\n src\n }, lineStart);\n }\n\n offset = PlainValue.Node.endOfIndent(src, lineStart);\n }\n\n ch = src[offset];\n }\n\n if (PlainValue.Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== PlainValue.Type.SEQ_ITEM)) {\n this.node = parseNode({\n atLineStart,\n inCollection: false,\n indent,\n lineStart,\n parent: this\n }, offset);\n } else if (ch && lineStart > start + 1) {\n offset = lineStart - 1;\n }\n\n if (this.node) {\n if (blankLine) {\n // Only blank lines preceding non-empty nodes are captured. Note that\n // this means that collection item range start indices do not always\n // increase monotonically. -- eemeli/yaml#126\n const items = context.parent.items || context.parent.contents;\n if (items) items.push(blankLine);\n }\n\n if (comments.length) Array.prototype.push.apply(this.props, comments);\n offset = this.node.range.end;\n } else {\n if (inlineComment) {\n const c = comments[0];\n this.props.push(c);\n offset = c.end;\n } else {\n offset = PlainValue.Node.endOfLine(src, start + 1);\n }\n }\n\n const end = this.node ? this.node.valueRange.end : offset;\n this.valueRange = new PlainValue.Range(start, end);\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n return this.node ? this.node.setOrigRanges(cr, offset) : offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n node,\n range,\n value\n } = this;\n if (value != null) return value;\n const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end);\n return PlainValue.Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass Comment extends PlainValue.Node {\n constructor() {\n super(PlainValue.Type.COMMENT);\n }\n /**\n * Parses a comment line from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n\n parse(context, start) {\n this.context = context;\n const offset = this.parseComment(start);\n this.range = new PlainValue.Range(start, offset);\n return offset;\n }\n\n}\n\nfunction grabCollectionEndComments(node) {\n let cnode = node;\n\n while (cnode instanceof CollectionItem) cnode = cnode.node;\n\n if (!(cnode instanceof Collection)) return null;\n const len = cnode.items.length;\n let ci = -1;\n\n for (let i = len - 1; i >= 0; --i) {\n const n = cnode.items[i];\n\n if (n.type === PlainValue.Type.COMMENT) {\n // Keep sufficiently indented comments with preceding node\n const {\n indent,\n lineStart\n } = n.context;\n if (indent > 0 && n.range.start >= lineStart + indent) break;\n ci = i;\n } else if (n.type === PlainValue.Type.BLANK_LINE) ci = i;else break;\n }\n\n if (ci === -1) return null;\n const ca = cnode.items.splice(ci, len - ci);\n const prevEnd = ca[0].range.start;\n\n while (true) {\n cnode.range.end = prevEnd;\n if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd;\n if (cnode === node) break;\n cnode = cnode.context.parent;\n }\n\n return ca;\n}\nclass Collection extends PlainValue.Node {\n static nextContentHasIndent(src, offset, indent) {\n const lineStart = PlainValue.Node.endOfLine(src, offset) + 1;\n offset = PlainValue.Node.endOfWhiteSpace(src, lineStart);\n const ch = src[offset];\n if (!ch) return false;\n if (offset >= lineStart + indent) return true;\n if (ch !== '#' && ch !== '\\n') return false;\n return Collection.nextContentHasIndent(src, offset, indent);\n }\n\n constructor(firstItem) {\n super(firstItem.type === PlainValue.Type.SEQ_ITEM ? PlainValue.Type.SEQ : PlainValue.Type.MAP);\n\n for (let i = firstItem.props.length - 1; i >= 0; --i) {\n if (firstItem.props[i].start < firstItem.context.lineStart) {\n // props on previous line are assumed by the collection\n this.props = firstItem.props.slice(0, i + 1);\n firstItem.props = firstItem.props.slice(i + 1);\n const itemRange = firstItem.props[0] || firstItem.valueRange;\n firstItem.range.start = itemRange.start;\n break;\n }\n }\n\n this.items = [firstItem];\n const ec = grabCollectionEndComments(firstItem);\n if (ec) Array.prototype.push.apply(this.items, ec);\n }\n\n get includesTrailingLines() {\n return this.items.length > 0;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n parseNode,\n src\n } = context; // It's easier to recalculate lineStart here rather than tracking down the\n // last context from which to read it -- eemeli/yaml#2\n\n let lineStart = PlainValue.Node.startOfLine(src, start);\n const firstItem = this.items[0]; // First-item context needs to be correct for later comment handling\n // -- eemeli/yaml#17\n\n firstItem.context.parent = this;\n this.valueRange = PlainValue.Range.copy(firstItem.valueRange);\n const indent = firstItem.range.start - firstItem.context.lineStart;\n let offset = start;\n offset = PlainValue.Node.normalizeOffset(src, offset);\n let ch = src[offset];\n let atLineStart = PlainValue.Node.endOfWhiteSpace(src, lineStart) === offset;\n let prevIncludesTrailingLines = false;\n\n while (ch) {\n while (ch === '\\n' || ch === '#') {\n if (atLineStart && ch === '\\n' && !prevIncludesTrailingLines) {\n const blankLine = new BlankLine();\n offset = blankLine.parse({\n src\n }, offset);\n this.valueRange.end = offset;\n\n if (offset >= src.length) {\n ch = null;\n break;\n }\n\n this.items.push(blankLine);\n offset -= 1; // blankLine.parse() consumes terminal newline\n } else if (ch === '#') {\n if (offset < lineStart + indent && !Collection.nextContentHasIndent(src, offset, indent)) {\n return offset;\n }\n\n const comment = new Comment();\n offset = comment.parse({\n indent,\n lineStart,\n src\n }, offset);\n this.items.push(comment);\n this.valueRange.end = offset;\n\n if (offset >= src.length) {\n ch = null;\n break;\n }\n }\n\n lineStart = offset + 1;\n offset = PlainValue.Node.endOfIndent(src, lineStart);\n\n if (PlainValue.Node.atBlank(src, offset)) {\n const wsEnd = PlainValue.Node.endOfWhiteSpace(src, offset);\n const next = src[wsEnd];\n\n if (!next || next === '\\n' || next === '#') {\n offset = wsEnd;\n }\n }\n\n ch = src[offset];\n atLineStart = true;\n }\n\n if (!ch) {\n break;\n }\n\n if (offset !== lineStart + indent && (atLineStart || ch !== ':')) {\n if (offset < lineStart + indent) {\n if (lineStart > start) offset = lineStart;\n break;\n } else if (!this.error) {\n const msg = 'All collection items must start at the same column';\n this.error = new PlainValue.YAMLSyntaxError(this, msg);\n }\n }\n\n if (firstItem.type === PlainValue.Type.SEQ_ITEM) {\n if (ch !== '-') {\n if (lineStart > start) offset = lineStart;\n break;\n }\n } else if (ch === '-' && !this.error) {\n // map key may start with -, as long as it's followed by a non-whitespace char\n const next = src[offset + 1];\n\n if (!next || next === '\\n' || next === '\\t' || next === ' ') {\n const msg = 'A collection cannot be both a mapping and a sequence';\n this.error = new PlainValue.YAMLSyntaxError(this, msg);\n }\n }\n\n const node = parseNode({\n atLineStart,\n inCollection: true,\n indent,\n lineStart,\n parent: this\n }, offset);\n if (!node) return offset; // at next document start\n\n this.items.push(node);\n this.valueRange.end = node.valueRange.end;\n offset = PlainValue.Node.normalizeOffset(src, node.range.end);\n ch = src[offset];\n atLineStart = false;\n prevIncludesTrailingLines = node.includesTrailingLines; // Need to reset lineStart and atLineStart here if preceding node's range\n // has advanced to check the current line's indentation level\n // -- eemeli/yaml#10 & eemeli/yaml#38\n\n if (ch) {\n let ls = offset - 1;\n let prev = src[ls];\n\n while (prev === ' ' || prev === '\\t') prev = src[--ls];\n\n if (prev === '\\n') {\n lineStart = ls + 1;\n atLineStart = true;\n }\n }\n\n const ec = grabCollectionEndComments(node);\n if (ec) Array.prototype.push.apply(this.items, ec);\n }\n\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n this.items.forEach(node => {\n offset = node.setOrigRanges(cr, offset);\n });\n return offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n items,\n range,\n value\n } = this;\n if (value != null) return value;\n let str = src.slice(range.start, items[0].range.start) + String(items[0]);\n\n for (let i = 1; i < items.length; ++i) {\n const item = items[i];\n const {\n atLineStart,\n indent\n } = item.context;\n if (atLineStart) for (let i = 0; i < indent; ++i) str += ' ';\n str += String(item);\n }\n\n return PlainValue.Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass Directive extends PlainValue.Node {\n constructor() {\n super(PlainValue.Type.DIRECTIVE);\n this.name = null;\n }\n\n get parameters() {\n const raw = this.rawValue;\n return raw ? raw.trim().split(/[ \\t]+/) : [];\n }\n\n parseName(start) {\n const {\n src\n } = this.context;\n let offset = start;\n let ch = src[offset];\n\n while (ch && ch !== '\\n' && ch !== '\\t' && ch !== ' ') ch = src[offset += 1];\n\n this.name = src.slice(start, offset);\n return offset;\n }\n\n parseParameters(start) {\n const {\n src\n } = this.context;\n let offset = start;\n let ch = src[offset];\n\n while (ch && ch !== '\\n' && ch !== '#') ch = src[offset += 1];\n\n this.valueRange = new PlainValue.Range(start, offset);\n return offset;\n }\n\n parse(context, start) {\n this.context = context;\n let offset = this.parseName(start + 1);\n offset = this.parseParameters(offset);\n offset = this.parseComment(offset);\n this.range = new PlainValue.Range(start, offset);\n return offset;\n }\n\n}\n\nclass Document extends PlainValue.Node {\n static startCommentOrEndBlankLine(src, start) {\n const offset = PlainValue.Node.endOfWhiteSpace(src, start);\n const ch = src[offset];\n return ch === '#' || ch === '\\n' ? offset : start;\n }\n\n constructor() {\n super(PlainValue.Type.DOCUMENT);\n this.directives = null;\n this.contents = null;\n this.directivesEndMarker = null;\n this.documentEndMarker = null;\n }\n\n parseDirectives(start) {\n const {\n src\n } = this.context;\n this.directives = [];\n let atLineStart = true;\n let hasDirectives = false;\n let offset = start;\n\n while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DIRECTIVES_END)) {\n offset = Document.startCommentOrEndBlankLine(src, offset);\n\n switch (src[offset]) {\n case '\\n':\n if (atLineStart) {\n const blankLine = new BlankLine();\n offset = blankLine.parse({\n src\n }, offset);\n\n if (offset < src.length) {\n this.directives.push(blankLine);\n }\n } else {\n offset += 1;\n atLineStart = true;\n }\n\n break;\n\n case '#':\n {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.directives.push(comment);\n atLineStart = false;\n }\n break;\n\n case '%':\n {\n const directive = new Directive();\n offset = directive.parse({\n parent: this,\n src\n }, offset);\n this.directives.push(directive);\n hasDirectives = true;\n atLineStart = false;\n }\n break;\n\n default:\n if (hasDirectives) {\n this.error = new PlainValue.YAMLSemanticError(this, 'Missing directives-end indicator line');\n } else if (this.directives.length > 0) {\n this.contents = this.directives;\n this.directives = [];\n }\n\n return offset;\n }\n }\n\n if (src[offset]) {\n this.directivesEndMarker = new PlainValue.Range(offset, offset + 3);\n return offset + 3;\n }\n\n if (hasDirectives) {\n this.error = new PlainValue.YAMLSemanticError(this, 'Missing directives-end indicator line');\n } else if (this.directives.length > 0) {\n this.contents = this.directives;\n this.directives = [];\n }\n\n return offset;\n }\n\n parseContents(start) {\n const {\n parseNode,\n src\n } = this.context;\n if (!this.contents) this.contents = [];\n let lineStart = start;\n\n while (src[lineStart - 1] === '-') lineStart -= 1;\n\n let offset = PlainValue.Node.endOfWhiteSpace(src, start);\n let atLineStart = lineStart === start;\n this.valueRange = new PlainValue.Range(offset);\n\n while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DOCUMENT_END)) {\n switch (src[offset]) {\n case '\\n':\n if (atLineStart) {\n const blankLine = new BlankLine();\n offset = blankLine.parse({\n src\n }, offset);\n\n if (offset < src.length) {\n this.contents.push(blankLine);\n }\n } else {\n offset += 1;\n atLineStart = true;\n }\n\n lineStart = offset;\n break;\n\n case '#':\n {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.contents.push(comment);\n atLineStart = false;\n }\n break;\n\n default:\n {\n const iEnd = PlainValue.Node.endOfIndent(src, offset);\n const context = {\n atLineStart,\n indent: -1,\n inFlow: false,\n inCollection: false,\n lineStart,\n parent: this\n };\n const node = parseNode(context, iEnd);\n if (!node) return this.valueRange.end = iEnd; // at next document start\n\n this.contents.push(node);\n offset = node.range.end;\n atLineStart = false;\n const ec = grabCollectionEndComments(node);\n if (ec) Array.prototype.push.apply(this.contents, ec);\n }\n }\n\n offset = Document.startCommentOrEndBlankLine(src, offset);\n }\n\n this.valueRange.end = offset;\n\n if (src[offset]) {\n this.documentEndMarker = new PlainValue.Range(offset, offset + 3);\n offset += 3;\n\n if (src[offset]) {\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n\n if (src[offset] === '#') {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.contents.push(comment);\n }\n\n switch (src[offset]) {\n case '\\n':\n offset += 1;\n break;\n\n case undefined:\n break;\n\n default:\n this.error = new PlainValue.YAMLSyntaxError(this, 'Document end marker line cannot have a non-comment suffix');\n }\n }\n }\n\n return offset;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n context.root = this;\n this.context = context;\n const {\n src\n } = context;\n let offset = src.charCodeAt(start) === 0xfeff ? start + 1 : start; // skip BOM\n\n offset = this.parseDirectives(offset);\n offset = this.parseContents(offset);\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n this.directives.forEach(node => {\n offset = node.setOrigRanges(cr, offset);\n });\n if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset);\n this.contents.forEach(node => {\n offset = node.setOrigRanges(cr, offset);\n });\n if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset);\n return offset;\n }\n\n toString() {\n const {\n contents,\n directives,\n value\n } = this;\n if (value != null) return value;\n let str = directives.join('');\n\n if (contents.length > 0) {\n if (directives.length > 0 || contents[0].type === PlainValue.Type.COMMENT) str += '---\\n';\n str += contents.join('');\n }\n\n if (str[str.length - 1] !== '\\n') str += '\\n';\n return str;\n }\n\n}\n\nclass Alias extends PlainValue.Node {\n /**\n * Parses an *alias from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = PlainValue.Node.endOfIdentifier(src, start + 1);\n this.valueRange = new PlainValue.Range(start + 1, offset);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n\n}\n\nconst Chomp = {\n CLIP: 'CLIP',\n KEEP: 'KEEP',\n STRIP: 'STRIP'\n};\nclass BlockValue extends PlainValue.Node {\n constructor(type, props) {\n super(type, props);\n this.blockIndent = null;\n this.chomping = Chomp.CLIP;\n this.header = null;\n }\n\n get includesTrailingLines() {\n return this.chomping === Chomp.KEEP;\n }\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n let {\n start,\n end\n } = this.valueRange;\n const {\n indent,\n src\n } = this.context;\n if (this.valueRange.isEmpty()) return '';\n let lastNewLine = null;\n let ch = src[end - 1];\n\n while (ch === '\\n' || ch === '\\t' || ch === ' ') {\n end -= 1;\n\n if (end <= start) {\n if (this.chomping === Chomp.KEEP) break;else return ''; // probably never happens\n }\n\n if (ch === '\\n') lastNewLine = end;\n ch = src[end - 1];\n }\n\n let keepStart = end + 1;\n\n if (lastNewLine) {\n if (this.chomping === Chomp.KEEP) {\n keepStart = lastNewLine;\n end = this.valueRange.end;\n } else {\n end = lastNewLine;\n }\n }\n\n const bi = indent + this.blockIndent;\n const folded = this.type === PlainValue.Type.BLOCK_FOLDED;\n let atStart = true;\n let str = '';\n let sep = '';\n let prevMoreIndented = false;\n\n for (let i = start; i < end; ++i) {\n for (let j = 0; j < bi; ++j) {\n if (src[i] !== ' ') break;\n i += 1;\n }\n\n const ch = src[i];\n\n if (ch === '\\n') {\n if (sep === '\\n') str += '\\n';else sep = '\\n';\n } else {\n const lineEnd = PlainValue.Node.endOfLine(src, i);\n const line = src.slice(i, lineEnd);\n i = lineEnd;\n\n if (folded && (ch === ' ' || ch === '\\t') && i < keepStart) {\n if (sep === ' ') sep = '\\n';else if (!prevMoreIndented && !atStart && sep === '\\n') sep = '\\n\\n';\n str += sep + line; //+ ((lineEnd < end && src[lineEnd]) || '')\n\n sep = lineEnd < end && src[lineEnd] || '';\n prevMoreIndented = true;\n } else {\n str += sep + line;\n sep = folded && i < keepStart ? ' ' : '\\n';\n prevMoreIndented = false;\n }\n\n if (atStart && line !== '') atStart = false;\n }\n }\n\n return this.chomping === Chomp.STRIP ? str : str + '\\n';\n }\n\n parseBlockHeader(start) {\n const {\n src\n } = this.context;\n let offset = start + 1;\n let bi = '';\n\n while (true) {\n const ch = src[offset];\n\n switch (ch) {\n case '-':\n this.chomping = Chomp.STRIP;\n break;\n\n case '+':\n this.chomping = Chomp.KEEP;\n break;\n\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n bi += ch;\n break;\n\n default:\n this.blockIndent = Number(bi) || null;\n this.header = new PlainValue.Range(start, offset);\n return offset;\n }\n\n offset += 1;\n }\n }\n\n parseBlockValue(start) {\n const {\n indent,\n src\n } = this.context;\n const explicit = !!this.blockIndent;\n let offset = start;\n let valueEnd = start;\n let minBlockIndent = 1;\n\n for (let ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n offset += 1;\n if (PlainValue.Node.atDocumentBoundary(src, offset)) break;\n const end = PlainValue.Node.endOfBlockIndent(src, indent, offset); // should not include tab?\n\n if (end === null) break;\n const ch = src[end];\n const lineIndent = end - (offset + indent);\n\n if (!this.blockIndent) {\n // no explicit block indent, none yet detected\n if (src[end] !== '\\n') {\n // first line with non-whitespace content\n if (lineIndent < minBlockIndent) {\n const msg = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n this.error = new PlainValue.YAMLSemanticError(this, msg);\n }\n\n this.blockIndent = lineIndent;\n } else if (lineIndent > minBlockIndent) {\n // empty line with more whitespace\n minBlockIndent = lineIndent;\n }\n } else if (ch && ch !== '\\n' && lineIndent < this.blockIndent) {\n if (src[end] === '#') break;\n\n if (!this.error) {\n const src = explicit ? 'explicit indentation indicator' : 'first line';\n const msg = `Block scalars must not be less indented than their ${src}`;\n this.error = new PlainValue.YAMLSemanticError(this, msg);\n }\n }\n\n if (src[end] === '\\n') {\n offset = end;\n } else {\n offset = valueEnd = PlainValue.Node.endOfLine(src, end);\n }\n }\n\n if (this.chomping !== Chomp.KEEP) {\n offset = src[valueEnd] ? valueEnd + 1 : valueEnd;\n }\n\n this.valueRange = new PlainValue.Range(start + 1, offset);\n return offset;\n }\n /**\n * Parses a block value from the source\n *\n * Accepted forms are:\n * ```\n * BS\n * block\n * lines\n *\n * BS #comment\n * block\n * lines\n * ```\n * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines\n * are empty or have an indent level greater than `indent`.\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this block\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = this.parseBlockHeader(start);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n offset = this.parseBlockValue(offset);\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n return this.header ? this.header.setOrigRange(cr, offset) : offset;\n }\n\n}\n\nclass FlowCollection extends PlainValue.Node {\n constructor(type, props) {\n super(type, props);\n this.items = null;\n }\n\n prevNodeIsJsonLike(idx = this.items.length) {\n const node = this.items[idx - 1];\n return !!node && (node.jsonLike || node.type === PlainValue.Type.COMMENT && this.prevNodeIsJsonLike(idx - 1));\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n parseNode,\n src\n } = context;\n let {\n indent,\n lineStart\n } = context;\n let char = src[start]; // { or [\n\n this.items = [{\n char,\n offset: start\n }];\n let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1);\n char = src[offset];\n\n while (char && char !== ']' && char !== '}') {\n switch (char) {\n case '\\n':\n {\n lineStart = offset + 1;\n const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart);\n\n if (src[wsEnd] === '\\n') {\n const blankLine = new BlankLine();\n lineStart = blankLine.parse({\n src\n }, lineStart);\n this.items.push(blankLine);\n }\n\n offset = PlainValue.Node.endOfIndent(src, lineStart);\n\n if (offset <= lineStart + indent) {\n char = src[offset];\n\n if (offset < lineStart + indent || char !== ']' && char !== '}') {\n const msg = 'Insufficient indentation in flow collection';\n this.error = new PlainValue.YAMLSemanticError(this, msg);\n }\n }\n }\n break;\n\n case ',':\n {\n this.items.push({\n char,\n offset\n });\n offset += 1;\n }\n break;\n\n case '#':\n {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.items.push(comment);\n }\n break;\n\n case '?':\n case ':':\n {\n const next = src[offset + 1];\n\n if (next === '\\n' || next === '\\t' || next === ' ' || next === ',' || // in-flow : after JSON-like key does not need to be followed by whitespace\n char === ':' && this.prevNodeIsJsonLike()) {\n this.items.push({\n char,\n offset\n });\n offset += 1;\n break;\n }\n }\n // fallthrough\n\n default:\n {\n const node = parseNode({\n atLineStart: false,\n inCollection: false,\n inFlow: true,\n indent: -1,\n lineStart,\n parent: this\n }, offset);\n\n if (!node) {\n // at next document start\n this.valueRange = new PlainValue.Range(start, offset);\n return offset;\n }\n\n this.items.push(node);\n offset = PlainValue.Node.normalizeOffset(src, node.range.end);\n }\n }\n\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n char = src[offset];\n }\n\n this.valueRange = new PlainValue.Range(start, offset + 1);\n\n if (char) {\n this.items.push({\n char,\n offset\n });\n offset = PlainValue.Node.endOfWhiteSpace(src, offset + 1);\n offset = this.parseComment(offset);\n }\n\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n this.items.forEach(node => {\n if (node instanceof PlainValue.Node) {\n offset = node.setOrigRanges(cr, offset);\n } else if (cr.length === 0) {\n node.origOffset = node.offset;\n } else {\n let i = offset;\n\n while (i < cr.length) {\n if (cr[i] > node.offset) break;else ++i;\n }\n\n node.origOffset = node.offset + i;\n offset = i;\n }\n });\n return offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n items,\n range,\n value\n } = this;\n if (value != null) return value;\n const nodes = items.filter(item => item instanceof PlainValue.Node);\n let str = '';\n let prevEnd = range.start;\n nodes.forEach(node => {\n const prefix = src.slice(prevEnd, node.range.start);\n prevEnd = node.range.end;\n str += prefix + String(node);\n\n if (str[str.length - 1] === '\\n' && src[prevEnd - 1] !== '\\n' && src[prevEnd] === '\\n') {\n // Comment range does not include the terminal newline, but its\n // stringified value does. Without this fix, newlines at comment ends\n // get duplicated.\n prevEnd += 1;\n }\n });\n str += src.slice(prevEnd, range.end);\n return PlainValue.Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass QuoteDouble extends PlainValue.Node {\n static endOfQuote(src, offset) {\n let ch = src[offset];\n\n while (ch && ch !== '\"') {\n offset += ch === '\\\\' ? 2 : 1;\n ch = src[offset];\n }\n\n return offset + 1;\n }\n /**\n * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n */\n\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n const errors = [];\n const {\n start,\n end\n } = this.valueRange;\n const {\n indent,\n src\n } = this.context;\n if (src[end - 1] !== '\"') errors.push(new PlainValue.YAMLSyntaxError(this, 'Missing closing \"quote')); // Using String#replace is too painful with escaped newlines preceded by\n // escaped backslashes; also, this should be faster.\n\n let str = '';\n\n for (let i = start + 1; i < end - 1; ++i) {\n const ch = src[i];\n\n if (ch === '\\n') {\n if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n const {\n fold,\n offset,\n error\n } = PlainValue.Node.foldNewline(src, i, indent);\n str += fold;\n i = offset;\n if (error) errors.push(new PlainValue.YAMLSemanticError(this, 'Multi-line double-quoted string needs to be sufficiently indented'));\n } else if (ch === '\\\\') {\n i += 1;\n\n switch (src[i]) {\n case '0':\n str += '\\0';\n break;\n // null character\n\n case 'a':\n str += '\\x07';\n break;\n // bell character\n\n case 'b':\n str += '\\b';\n break;\n // backspace\n\n case 'e':\n str += '\\x1b';\n break;\n // escape character\n\n case 'f':\n str += '\\f';\n break;\n // form feed\n\n case 'n':\n str += '\\n';\n break;\n // line feed\n\n case 'r':\n str += '\\r';\n break;\n // carriage return\n\n case 't':\n str += '\\t';\n break;\n // horizontal tab\n\n case 'v':\n str += '\\v';\n break;\n // vertical tab\n\n case 'N':\n str += '\\u0085';\n break;\n // Unicode next line\n\n case '_':\n str += '\\u00a0';\n break;\n // Unicode non-breaking space\n\n case 'L':\n str += '\\u2028';\n break;\n // Unicode line separator\n\n case 'P':\n str += '\\u2029';\n break;\n // Unicode paragraph separator\n\n case ' ':\n str += ' ';\n break;\n\n case '\"':\n str += '\"';\n break;\n\n case '/':\n str += '/';\n break;\n\n case '\\\\':\n str += '\\\\';\n break;\n\n case '\\t':\n str += '\\t';\n break;\n\n case 'x':\n str += this.parseCharCode(i + 1, 2, errors);\n i += 2;\n break;\n\n case 'u':\n str += this.parseCharCode(i + 1, 4, errors);\n i += 4;\n break;\n\n case 'U':\n str += this.parseCharCode(i + 1, 8, errors);\n i += 8;\n break;\n\n case '\\n':\n // skip escaped newlines, but still trim the following line\n while (src[i + 1] === ' ' || src[i + 1] === '\\t') i += 1;\n\n break;\n\n default:\n errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`));\n str += '\\\\' + src[i];\n }\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = src[i + 1];\n\n while (next === ' ' || next === '\\t') {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n return errors.length > 0 ? {\n errors,\n str\n } : str;\n }\n\n parseCharCode(offset, length, errors) {\n const {\n src\n } = this.context;\n const cc = src.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n\n if (isNaN(code)) {\n errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`));\n return src.substr(offset - 2, length + 2);\n }\n\n return String.fromCodePoint(code);\n }\n /**\n * Parses a \"double quoted\" value from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = QuoteDouble.endOfQuote(src, start + 1);\n this.valueRange = new PlainValue.Range(start, offset);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n\n}\n\nclass QuoteSingle extends PlainValue.Node {\n static endOfQuote(src, offset) {\n let ch = src[offset];\n\n while (ch) {\n if (ch === \"'\") {\n if (src[offset + 1] !== \"'\") break;\n ch = src[offset += 2];\n } else {\n ch = src[offset += 1];\n }\n }\n\n return offset + 1;\n }\n /**\n * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n */\n\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n const errors = [];\n const {\n start,\n end\n } = this.valueRange;\n const {\n indent,\n src\n } = this.context;\n if (src[end - 1] !== \"'\") errors.push(new PlainValue.YAMLSyntaxError(this, \"Missing closing 'quote\"));\n let str = '';\n\n for (let i = start + 1; i < end - 1; ++i) {\n const ch = src[i];\n\n if (ch === '\\n') {\n if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n const {\n fold,\n offset,\n error\n } = PlainValue.Node.foldNewline(src, i, indent);\n str += fold;\n i = offset;\n if (error) errors.push(new PlainValue.YAMLSemanticError(this, 'Multi-line single-quoted string needs to be sufficiently indented'));\n } else if (ch === \"'\") {\n str += ch;\n i += 1;\n if (src[i] !== \"'\") errors.push(new PlainValue.YAMLSyntaxError(this, 'Unescaped single quote? This should not happen.'));\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = src[i + 1];\n\n while (next === ' ' || next === '\\t') {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n return errors.length > 0 ? {\n errors,\n str\n } : str;\n }\n /**\n * Parses a 'single quoted' value from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = QuoteSingle.endOfQuote(src, start + 1);\n this.valueRange = new PlainValue.Range(start, offset);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n\n}\n\nfunction createNewNode(type, props) {\n switch (type) {\n case PlainValue.Type.ALIAS:\n return new Alias(type, props);\n\n case PlainValue.Type.BLOCK_FOLDED:\n case PlainValue.Type.BLOCK_LITERAL:\n return new BlockValue(type, props);\n\n case PlainValue.Type.FLOW_MAP:\n case PlainValue.Type.FLOW_SEQ:\n return new FlowCollection(type, props);\n\n case PlainValue.Type.MAP_KEY:\n case PlainValue.Type.MAP_VALUE:\n case PlainValue.Type.SEQ_ITEM:\n return new CollectionItem(type, props);\n\n case PlainValue.Type.COMMENT:\n case PlainValue.Type.PLAIN:\n return new PlainValue.PlainValue(type, props);\n\n case PlainValue.Type.QUOTE_DOUBLE:\n return new QuoteDouble(type, props);\n\n case PlainValue.Type.QUOTE_SINGLE:\n return new QuoteSingle(type, props);\n\n /* istanbul ignore next */\n\n default:\n return null;\n // should never happen\n }\n}\n/**\n * @param {boolean} atLineStart - Node starts at beginning of line\n * @param {boolean} inFlow - true if currently in a flow context\n * @param {boolean} inCollection - true if currently in a collection context\n * @param {number} indent - Current level of indentation\n * @param {number} lineStart - Start of the current line\n * @param {Node} parent - The parent of the node\n * @param {string} src - Source of the YAML document\n */\n\n\nclass ParseContext {\n static parseType(src, offset, inFlow) {\n switch (src[offset]) {\n case '*':\n return PlainValue.Type.ALIAS;\n\n case '>':\n return PlainValue.Type.BLOCK_FOLDED;\n\n case '|':\n return PlainValue.Type.BLOCK_LITERAL;\n\n case '{':\n return PlainValue.Type.FLOW_MAP;\n\n case '[':\n return PlainValue.Type.FLOW_SEQ;\n\n case '?':\n return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_KEY : PlainValue.Type.PLAIN;\n\n case ':':\n return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_VALUE : PlainValue.Type.PLAIN;\n\n case '-':\n return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.SEQ_ITEM : PlainValue.Type.PLAIN;\n\n case '\"':\n return PlainValue.Type.QUOTE_DOUBLE;\n\n case \"'\":\n return PlainValue.Type.QUOTE_SINGLE;\n\n default:\n return PlainValue.Type.PLAIN;\n }\n }\n\n constructor(orig = {}, {\n atLineStart,\n inCollection,\n inFlow,\n indent,\n lineStart,\n parent\n } = {}) {\n PlainValue._defineProperty(this, \"parseNode\", (overlay, start) => {\n if (PlainValue.Node.atDocumentBoundary(this.src, start)) return null;\n const context = new ParseContext(this, overlay);\n const {\n props,\n type,\n valueStart\n } = context.parseProps(start);\n const node = createNewNode(type, props);\n let offset = node.parse(context, valueStart);\n node.range = new PlainValue.Range(start, offset);\n /* istanbul ignore if */\n\n if (offset <= start) {\n // This should never happen, but if it does, let's make sure to at least\n // step one character forward to avoid a busy loop.\n node.error = new Error(`Node#parse consumed no characters`);\n node.error.parseEnd = offset;\n node.error.source = node;\n node.range.end = start + 1;\n }\n\n if (context.nodeStartsCollection(node)) {\n if (!node.error && !context.atLineStart && context.parent.type === PlainValue.Type.DOCUMENT) {\n node.error = new PlainValue.YAMLSyntaxError(node, 'Block collection must not have preceding content here (e.g. directives-end indicator)');\n }\n\n const collection = new Collection(node);\n offset = collection.parse(new ParseContext(context), offset);\n collection.range = new PlainValue.Range(start, offset);\n return collection;\n }\n\n return node;\n });\n\n this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false;\n this.inCollection = inCollection != null ? inCollection : orig.inCollection || false;\n this.inFlow = inFlow != null ? inFlow : orig.inFlow || false;\n this.indent = indent != null ? indent : orig.indent;\n this.lineStart = lineStart != null ? lineStart : orig.lineStart;\n this.parent = parent != null ? parent : orig.parent || {};\n this.root = orig.root;\n this.src = orig.src;\n }\n\n nodeStartsCollection(node) {\n const {\n inCollection,\n inFlow,\n src\n } = this;\n if (inCollection || inFlow) return false;\n if (node instanceof CollectionItem) return true; // check for implicit key\n\n let offset = node.range.end;\n if (src[offset] === '\\n' || src[offset - 1] === '\\n') return false;\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n return src[offset] === ':';\n } // Anchor and tag are before type, which determines the node implementation\n // class; hence this intermediate step.\n\n\n parseProps(offset) {\n const {\n inFlow,\n parent,\n src\n } = this;\n const props = [];\n let lineHasProps = false;\n offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset);\n let ch = src[offset];\n\n while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === '\\n') {\n if (ch === '\\n') {\n const lineStart = offset + 1;\n const inEnd = PlainValue.Node.endOfIndent(src, lineStart);\n const indentDiff = inEnd - (lineStart + this.indent);\n const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart;\n if (!PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n this.atLineStart = true;\n this.lineStart = lineStart;\n lineHasProps = false;\n offset = inEnd;\n } else if (ch === PlainValue.Char.COMMENT) {\n const end = PlainValue.Node.endOfLine(src, offset + 1);\n props.push(new PlainValue.Range(offset, end));\n offset = end;\n } else {\n let end = PlainValue.Node.endOfIdentifier(src, offset + 1);\n\n if (ch === PlainValue.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, end + 13))) {\n // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n // than an empty but 'foo.bar' private-tagged node in a flow collection\n // followed without whitespace by a plain string starting with a year\n // or date divided by something.\n end = PlainValue.Node.endOfIdentifier(src, end + 5);\n }\n\n props.push(new PlainValue.Range(offset, end));\n lineHasProps = true;\n offset = PlainValue.Node.endOfWhiteSpace(src, end);\n }\n\n ch = src[offset];\n } // '- &a : b' has an anchor on an empty node\n\n\n if (lineHasProps && ch === ':' && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1;\n const type = ParseContext.parseType(src, offset, inFlow);\n return {\n props,\n type,\n valueStart: offset\n };\n }\n /**\n * Parses a node from the source\n * @param {ParseContext} overlay\n * @param {number} start - Index of first non-whitespace character for the node\n * @returns {?Node} - null if at a document boundary\n */\n\n\n}\n\n// Published as 'yaml/parse-cst'\nfunction parse(src) {\n const cr = [];\n\n if (src.indexOf('\\r') !== -1) {\n src = src.replace(/\\r\\n?/g, (match, offset) => {\n if (match.length > 1) cr.push(offset);\n return '\\n';\n });\n }\n\n const documents = [];\n let offset = 0;\n\n do {\n const doc = new Document();\n const context = new ParseContext({\n src\n });\n offset = doc.parse(context, offset);\n documents.push(doc);\n } while (offset < src.length);\n\n documents.setOrigRanges = () => {\n if (cr.length === 0) return false;\n\n for (let i = 1; i < cr.length; ++i) cr[i] -= i;\n\n let crOffset = 0;\n\n for (let i = 0; i < documents.length; ++i) {\n crOffset = documents[i].setOrigRanges(cr, crOffset);\n }\n\n cr.splice(0, cr.length);\n return true;\n };\n\n documents.toString = () => documents.join('...\\n');\n\n return documents;\n}\n\nexports.parse = parse;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\n\nfunction addCommentBefore(str, indent, comment) {\n if (!comment) return str;\n const cc = comment.replace(/[\\s\\S]^/gm, `$&${indent}#`);\n return `#${cc}\\n${indent}${str}`;\n}\nfunction addComment(str, indent, comment) {\n return !comment ? str : comment.indexOf('\\n') === -1 ? `${str} #${comment}` : `${str}\\n` + comment.replace(/^/gm, `${indent || ''}#`);\n}\n\nclass Node {}\n\nfunction toJSON(value, arg, ctx) {\n if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx));\n\n if (value && typeof value.toJSON === 'function') {\n const anchor = ctx && ctx.anchors && ctx.anchors.get(value);\n if (anchor) ctx.onCreate = res => {\n anchor.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (anchor && ctx.onCreate) ctx.onCreate(res);\n return res;\n }\n\n if ((!ctx || !ctx.keep) && typeof value === 'bigint') return Number(value);\n return value;\n}\n\nclass Scalar extends Node {\n constructor(value) {\n super();\n this.value = value;\n }\n\n toJSON(arg, ctx) {\n return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx);\n }\n\n toString() {\n return String(this.value);\n }\n\n}\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n const o = Number.isInteger(k) && k >= 0 ? [] : {};\n o[k] = v;\n v = o;\n }\n\n return schema.createNode(v, false);\n} // null, undefined, or an empty non-string iterable (e.g. [])\n\n\nconst isEmptyPath = path => path == null || typeof path === 'object' && path[Symbol.iterator]().next().done;\nclass Collection extends Node {\n constructor(schema) {\n super();\n\n PlainValue._defineProperty(this, \"items\", []);\n\n this.schema = schema;\n }\n\n addIn(path, value) {\n if (isEmptyPath(path)) this.add(value);else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (node instanceof Collection) node.addIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n\n deleteIn([key, ...rest]) {\n if (rest.length === 0) return this.delete(key);\n const node = this.get(key, true);\n if (node instanceof Collection) return node.deleteIn(rest);else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n\n getIn([key, ...rest], keepScalar) {\n const node = this.get(key, true);\n if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node;else return node instanceof Collection ? node.getIn(rest, keepScalar) : undefined;\n }\n\n hasAllNullValues() {\n return this.items.every(node => {\n if (!node || node.type !== 'PAIR') return false;\n const n = node.value;\n return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag;\n });\n }\n\n hasIn([key, ...rest]) {\n if (rest.length === 0) return this.has(key);\n const node = this.get(key, true);\n return node instanceof Collection ? node.hasIn(rest) : false;\n }\n\n setIn([key, ...rest], value) {\n if (rest.length === 0) {\n this.set(key, value);\n } else {\n const node = this.get(key, true);\n if (node instanceof Collection) node.setIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n } // overridden in implementations\n\n /* istanbul ignore next */\n\n\n toJSON() {\n return null;\n }\n\n toString(ctx, {\n blockItem,\n flowChars,\n isMap,\n itemIndent\n }, onComment, onChompKeep) {\n const {\n indent,\n indentStep,\n stringify\n } = ctx;\n const inFlow = this.type === PlainValue.Type.FLOW_MAP || this.type === PlainValue.Type.FLOW_SEQ || ctx.inFlow;\n if (inFlow) itemIndent += indentStep;\n const allNullValues = isMap && this.hasAllNullValues();\n ctx = Object.assign({}, ctx, {\n allNullValues,\n indent: itemIndent,\n inFlow,\n type: null\n });\n let chompKeep = false;\n let hasItemWithNewLine = false;\n const nodes = this.items.reduce((nodes, item, i) => {\n let comment;\n\n if (item) {\n if (!chompKeep && item.spaceBefore) nodes.push({\n type: 'comment',\n str: ''\n });\n if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach(line => {\n nodes.push({\n type: 'comment',\n str: `#${line}`\n });\n });\n if (item.comment) comment = item.comment;\n if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true;\n }\n\n chompKeep = false;\n let str = stringify(item, ctx, () => comment = null, () => chompKeep = true);\n if (inFlow && !hasItemWithNewLine && str.includes('\\n')) hasItemWithNewLine = true;\n if (inFlow && i < this.items.length - 1) str += ',';\n str = addComment(str, itemIndent, comment);\n if (chompKeep && (comment || inFlow)) chompKeep = false;\n nodes.push({\n type: 'item',\n str\n });\n return nodes;\n }, []);\n let str;\n\n if (nodes.length === 0) {\n str = flowChars.start + flowChars.end;\n } else if (inFlow) {\n const {\n start,\n end\n } = flowChars;\n const strings = nodes.map(n => n.str);\n\n if (hasItemWithNewLine || strings.reduce((sum, str) => sum + str.length + 2, 2) > Collection.maxFlowStringSingleLineLength) {\n str = start;\n\n for (const s of strings) {\n str += s ? `\\n${indentStep}${indent}${s}` : '\\n';\n }\n\n str += `\\n${indent}${end}`;\n } else {\n str = `${start} ${strings.join(' ')} ${end}`;\n }\n } else {\n const strings = nodes.map(blockItem);\n str = strings.shift();\n\n for (const s of strings) str += s ? `\\n${indent}${s}` : '\\n';\n }\n\n if (this.comment) {\n str += '\\n' + this.comment.replace(/^/gm, `${indent}#`);\n if (onComment) onComment();\n } else if (chompKeep && onChompKeep) onChompKeep();\n\n return str;\n }\n\n}\n\nPlainValue._defineProperty(Collection, \"maxFlowStringSingleLineLength\", 60);\n\nfunction asItemIndex(key) {\n let idx = key instanceof Scalar ? key.value : key;\n if (idx && typeof idx === 'string') idx = Number(idx);\n return Number.isInteger(idx) && idx >= 0 ? idx : null;\n}\n\nclass YAMLSeq extends Collection {\n add(value) {\n this.items.push(value);\n }\n\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number') return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number') return undefined;\n const it = this.items[idx];\n return !keepScalar && it instanceof Scalar ? it.value : it;\n }\n\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number') throw new Error(`Expected a valid index, not ${key}.`);\n this.items[idx] = value;\n }\n\n toJSON(_, ctx) {\n const seq = [];\n if (ctx && ctx.onCreate) ctx.onCreate(seq);\n let i = 0;\n\n for (const item of this.items) seq.push(toJSON(item, String(i++), ctx));\n\n return seq;\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n return super.toString(ctx, {\n blockItem: n => n.type === 'comment' ? n.str : `- ${n.str}`,\n flowChars: {\n start: '[',\n end: ']'\n },\n isMap: false,\n itemIndent: (ctx.indent || '') + ' '\n }, onComment, onChompKeep);\n }\n\n}\n\nconst stringifyKey = (key, jsKey, ctx) => {\n if (jsKey === null) return '';\n if (typeof jsKey !== 'object') return String(jsKey);\n if (key instanceof Node && ctx && ctx.doc) return key.toString({\n anchors: {},\n doc: ctx.doc,\n indent: '',\n indentStep: ctx.indentStep,\n inFlow: true,\n inStringifyKey: true,\n stringify: ctx.stringify\n });\n return JSON.stringify(jsKey);\n};\n\nclass Pair extends Node {\n constructor(key, value = null) {\n super();\n this.key = key;\n this.value = value;\n this.type = Pair.Type.PAIR;\n }\n\n get commentBefore() {\n return this.key instanceof Node ? this.key.commentBefore : undefined;\n }\n\n set commentBefore(cb) {\n if (this.key == null) this.key = new Scalar(null);\n if (this.key instanceof Node) this.key.commentBefore = cb;else {\n const msg = 'Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.';\n throw new Error(msg);\n }\n }\n\n addToJSMap(ctx, map) {\n const key = toJSON(this.key, '', ctx);\n\n if (map instanceof Map) {\n const value = toJSON(this.value, key, ctx);\n map.set(key, value);\n } else if (map instanceof Set) {\n map.add(key);\n } else {\n const stringKey = stringifyKey(this.key, key, ctx);\n map[stringKey] = toJSON(this.value, stringKey, ctx);\n }\n\n return map;\n }\n\n toJSON(_, ctx) {\n const pair = ctx && ctx.mapAsMap ? new Map() : {};\n return this.addToJSMap(ctx, pair);\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx || !ctx.doc) return JSON.stringify(this);\n const {\n indent: indentSize,\n indentSeq,\n simpleKeys\n } = ctx.doc.options;\n let {\n key,\n value\n } = this;\n let keyComment = key instanceof Node && key.comment;\n\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n\n if (key instanceof Collection) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n\n const explicitKey = !simpleKeys && (!key || keyComment || key instanceof Collection || key.type === PlainValue.Type.BLOCK_FOLDED || key.type === PlainValue.Type.BLOCK_LITERAL);\n const {\n doc,\n indent,\n indentStep,\n stringify\n } = ctx;\n ctx = Object.assign({}, ctx, {\n implicitKey: !explicitKey,\n indent: indent + indentStep\n });\n let chompKeep = false;\n let str = stringify(key, ctx, () => keyComment = null, () => chompKeep = true);\n str = addComment(str, ctx.indent, keyComment);\n\n if (ctx.allNullValues && !simpleKeys) {\n if (this.comment) {\n str = addComment(str, ctx.indent, this.comment);\n if (onComment) onComment();\n } else if (chompKeep && !keyComment && onChompKeep) onChompKeep();\n\n return ctx.inFlow ? str : `? ${str}`;\n }\n\n str = explicitKey ? `? ${str}\\n${indent}:` : `${str}:`;\n\n if (this.comment) {\n // expected (but not strictly required) to be a single-line comment\n str = addComment(str, ctx.indent, this.comment);\n if (onComment) onComment();\n }\n\n let vcb = '';\n let valueComment = null;\n\n if (value instanceof Node) {\n if (value.spaceBefore) vcb = '\\n';\n\n if (value.commentBefore) {\n const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`);\n vcb += `\\n${cs}`;\n }\n\n valueComment = value.comment;\n } else if (value && typeof value === 'object') {\n value = doc.schema.createNode(value, true);\n }\n\n ctx.implicitKey = false;\n if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n\n if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== PlainValue.Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substr(2);\n }\n\n const valueStr = stringify(value, ctx, () => valueComment = null, () => chompKeep = true);\n let ws = ' ';\n\n if (vcb || this.comment) {\n ws = `${vcb}\\n${ctx.indent}`;\n } else if (!explicitKey && value instanceof Collection) {\n const flow = valueStr[0] === '[' || valueStr[0] === '{';\n if (!flow || valueStr.includes('\\n')) ws = `\\n${ctx.indent}`;\n }\n\n if (chompKeep && !valueComment && onChompKeep) onChompKeep();\n return addComment(str + ws + valueStr, ctx.indent, valueComment);\n }\n\n}\n\nPlainValue._defineProperty(Pair, \"Type\", {\n PAIR: 'PAIR',\n MERGE_PAIR: 'MERGE_PAIR'\n});\n\nconst getAliasCount = (node, anchors) => {\n if (node instanceof Alias) {\n const anchor = anchors.get(node.source);\n return anchor.count * anchor.aliasCount;\n } else if (node instanceof Collection) {\n let count = 0;\n\n for (const item of node.items) {\n const c = getAliasCount(item, anchors);\n if (c > count) count = c;\n }\n\n return count;\n } else if (node instanceof Pair) {\n const kc = getAliasCount(node.key, anchors);\n const vc = getAliasCount(node.value, anchors);\n return Math.max(kc, vc);\n }\n\n return 1;\n};\n\nclass Alias extends Node {\n static stringify({\n range,\n source\n }, {\n anchors,\n doc,\n implicitKey,\n inStringifyKey\n }) {\n let anchor = Object.keys(anchors).find(a => anchors[a] === source);\n if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName();\n if (anchor) return `*${anchor}${implicitKey ? ' ' : ''}`;\n const msg = doc.anchors.getName(source) ? 'Alias node must be after source node' : 'Source node not found for alias node';\n throw new Error(`${msg} [${range}]`);\n }\n\n constructor(source) {\n super();\n this.source = source;\n this.type = PlainValue.Type.ALIAS;\n }\n\n set tag(t) {\n throw new Error('Alias nodes cannot have tags');\n }\n\n toJSON(arg, ctx) {\n if (!ctx) return toJSON(this.source, arg, ctx);\n const {\n anchors,\n maxAliasCount\n } = ctx;\n const anchor = anchors.get(this.source);\n /* istanbul ignore if */\n\n if (!anchor || anchor.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);\n }\n\n if (maxAliasCount >= 0) {\n anchor.count += 1;\n if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors);\n\n if (anchor.count * anchor.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);\n }\n }\n\n return anchor.res;\n } // Only called when stringifying an alias mapping key while constructing\n // Object output.\n\n\n toString(ctx) {\n return Alias.stringify(this, ctx);\n }\n\n}\n\nPlainValue._defineProperty(Alias, \"default\", true);\n\nfunction findPair(items, key) {\n const k = key instanceof Scalar ? key.value : key;\n\n for (const it of items) {\n if (it instanceof Pair) {\n if (it.key === key || it.key === k) return it;\n if (it.key && it.key.value === k) return it;\n }\n }\n\n return undefined;\n}\nclass YAMLMap extends Collection {\n add(pair, overwrite) {\n if (!pair) pair = new Pair(pair);else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value);\n const prev = findPair(this.items, pair.key);\n const sortEntries = this.schema && this.schema.sortMapEntries;\n\n if (prev) {\n if (overwrite) prev.value = pair.value;else throw new Error(`Key ${pair.key} already set`);\n } else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(pair, item) < 0);\n if (i === -1) this.items.push(pair);else this.items.splice(i, 0, pair);\n } else {\n this.items.push(pair);\n }\n }\n\n delete(key) {\n const it = findPair(this.items, key);\n if (!it) return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it && it.value;\n return !keepScalar && node instanceof Scalar ? node.value : node;\n }\n\n has(key) {\n return !!findPair(this.items, key);\n }\n\n set(key, value) {\n this.add(new Pair(key, value), true);\n }\n /**\n * @param {*} arg ignored\n * @param {*} ctx Conversion context, originally set in Document#toJSON()\n * @param {Class} Type If set, forces the returned collection type\n * @returns {*} Instance of Type, Map, or Object\n */\n\n\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx && ctx.mapAsMap ? new Map() : {};\n if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n for (const item of this.items) item.addToJSMap(ctx, map);\n\n return map;\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n\n for (const item of this.items) {\n if (!(item instanceof Pair)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n\n return super.toString(ctx, {\n blockItem: n => n.str,\n flowChars: {\n start: '{',\n end: '}'\n },\n isMap: true,\n itemIndent: ctx.indent || ''\n }, onComment, onChompKeep);\n }\n\n}\n\nconst MERGE_KEY = '<<';\nclass Merge extends Pair {\n constructor(pair) {\n if (pair instanceof Pair) {\n let seq = pair.value;\n\n if (!(seq instanceof YAMLSeq)) {\n seq = new YAMLSeq();\n seq.items.push(pair.value);\n seq.range = pair.value.range;\n }\n\n super(pair.key, seq);\n this.range = pair.range;\n } else {\n super(new Scalar(MERGE_KEY), new YAMLSeq());\n }\n\n this.type = Pair.Type.MERGE_PAIR;\n } // If the value associated with a merge key is a single mapping node, each of\n // its key/value pairs is inserted into the current mapping, unless the key\n // already exists in it. If the value associated with the merge key is a\n // sequence, then this sequence is expected to contain mapping nodes and each\n // of these nodes is merged in turn according to its order in the sequence.\n // Keys in mapping nodes earlier in the sequence override keys specified in\n // later mapping nodes. -- http://yaml.org/type/merge.html\n\n\n addToJSMap(ctx, map) {\n for (const {\n source\n } of this.value.items) {\n if (!(source instanceof YAMLMap)) throw new Error('Merge sources must be maps');\n const srcMap = source.toJSON(null, ctx, Map);\n\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key)) map.set(key, value);\n } else if (map instanceof Set) {\n map.add(key);\n } else {\n if (!Object.prototype.hasOwnProperty.call(map, key)) map[key] = value;\n }\n }\n }\n\n return map;\n }\n\n toString(ctx, onComment) {\n const seq = this.value;\n if (seq.items.length > 1) return super.toString(ctx, onComment);\n this.value = seq.items[0];\n const str = super.toString(ctx, onComment);\n this.value = seq;\n return str;\n }\n\n}\n\nconst binaryOptions = {\n defaultType: PlainValue.Type.BLOCK_LITERAL,\n lineWidth: 76\n};\nconst boolOptions = {\n trueStr: 'true',\n falseStr: 'false'\n};\nconst intOptions = {\n asBigInt: false\n};\nconst nullOptions = {\n nullStr: 'null'\n};\nconst strOptions = {\n defaultType: PlainValue.Type.PLAIN,\n doubleQuoted: {\n jsonEncoding: false,\n minMultiLineLength: 40\n },\n fold: {\n lineWidth: 80,\n minContentWidth: 20\n }\n};\n\nfunction resolveScalar(str, tags, scalarFallback) {\n for (const {\n format,\n test,\n resolve\n } of tags) {\n if (test) {\n const match = str.match(test);\n\n if (match) {\n let res = resolve.apply(null, match);\n if (!(res instanceof Scalar)) res = new Scalar(res);\n if (format) res.format = format;\n return res;\n }\n }\n }\n\n if (scalarFallback) str = scalarFallback(str);\n return new Scalar(str);\n}\n\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted'; // presumes i+1 is at the start of a line\n// returns index of last newline in more-indented block\n\nconst consumeMoreIndentedLines = (text, i) => {\n let ch = text[i + 1];\n\n while (ch === ' ' || ch === '\\t') {\n do {\n ch = text[i += 1];\n } while (ch && ch !== '\\n');\n\n ch = text[i + 1];\n }\n\n return i;\n};\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n *\n * @param {string} text\n * @param {string} indent\n * @param {string} [mode='flow'] `'block'` prevents more-indented lines\n * from being folded; `'quoted'` allows for `\\` escapes, including escaped\n * newlines\n * @param {Object} options\n * @param {number} [options.indentAtStart] Accounts for leading contents on\n * the first line, defaulting to `indent.length`\n * @param {number} [options.lineWidth=80]\n * @param {number} [options.minContentWidth=20] Allow highly indented lines to\n * stretch the line width\n * @param {function} options.onFold Called once if the text is folded\n * @param {function} options.onFold Called once if any line of text exceeds\n * lineWidth characters\n */\n\n\nfunction foldFlowLines(text, indent, mode, {\n indentAtStart,\n lineWidth = 80,\n minContentWidth = 20,\n onFold,\n onOverflow\n}) {\n if (!lineWidth || lineWidth < 0) return text;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep) return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - (typeof indentAtStart === 'number' ? indentAtStart : indent.length);\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i);\n if (i !== -1) end = i + endStep;\n }\n\n for (let ch; ch = text[i += 1];) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n\n case 'u':\n i += 5;\n break;\n\n case 'U':\n i += 9;\n break;\n\n default:\n i += 1;\n }\n }\n\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i);\n end = i + endStep;\n split = undefined;\n } else {\n if (ch === ' ' && prev && prev !== ' ' && prev !== '\\n' && prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t') split = i;\n }\n\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n } else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[i += 1];\n overflow = true;\n } // i - 2 accounts for not-dropped last char + newline-escaping \\\n\n\n folds.push(i - 2);\n escapedFolds[i - 2] = true;\n end = i - 2 + endStep;\n split = undefined;\n } else {\n overflow = true;\n }\n }\n }\n\n prev = ch;\n }\n\n if (overflow && onOverflow) onOverflow();\n if (folds.length === 0) return text;\n if (onFold) onFold();\n let res = text.slice(0, folds[0]);\n\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n\n return res;\n}\n\nconst getFoldOptions = ({\n indentAtStart\n}) => indentAtStart ? Object.assign({\n indentAtStart\n}, strOptions.fold) : strOptions.fold; // Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\n\n\nconst containsDocumentMarker = str => /^(%|---|\\.\\.\\.)/m.test(str);\n\nfunction lineLengthOverLimit(str, limit) {\n const strLen = str.length;\n if (strLen <= limit) return false;\n\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit) return true;\n start = i + 1;\n if (strLen - start <= limit) return false;\n }\n }\n\n return true;\n}\n\nfunction doubleQuotedString(value, ctx) {\n const {\n implicitKey\n } = ctx;\n const {\n jsonEncoding,\n minMultiLineLength\n } = strOptions.doubleQuoted;\n const json = JSON.stringify(value);\n if (jsonEncoding) return json;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n\n if (ch === '\\\\') switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n\n case '0007':\n str += '\\\\a';\n break;\n\n case '000b':\n str += '\\\\v';\n break;\n\n case '001b':\n str += '\\\\e';\n break;\n\n case '0085':\n str += '\\\\N';\n break;\n\n case '00a0':\n str += '\\\\_';\n break;\n\n case '2028':\n str += '\\\\L';\n break;\n\n case '2029':\n str += '\\\\P';\n break;\n\n default:\n if (code.substr(0, 2) === '00') str += '\\\\x' + code.substr(2);else str += json.substr(i, 6);\n }\n\n i += 5;\n start = i + 1;\n }\n break;\n\n case 'n':\n if (implicitKey || json[i + 2] === '\"' || json.length < minMultiLineLength) {\n i += 1;\n } else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n\n while (json[i + 2] === '\\\\' && json[i + 3] === 'n' && json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n\n str += indent; // space after newline needs to be escaped to not be folded\n\n if (json[i + 2] === ' ') str += '\\\\';\n i += 1;\n start = i + 1;\n }\n\n break;\n\n default:\n i += 1;\n }\n }\n\n str = start ? str + json.slice(start) : json;\n return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx));\n}\n\nfunction singleQuotedString(value, ctx) {\n if (ctx.implicitKey) {\n if (/\\n/.test(value)) return doubleQuotedString(value, ctx);\n } else {\n // single quoted string can't have leading or trailing whitespace around newline\n if (/[ \\t]\\n|\\n[ \\t]/.test(value)) return doubleQuotedString(value, ctx);\n }\n\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx));\n}\n\nfunction blockString({\n comment,\n type,\n value\n}, ctx, onComment, onChompKeep) {\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (/\\n[\\t ]+$/.test(value) || /^\\s*$/.test(value)) {\n return doubleQuotedString(value, ctx);\n }\n\n const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const indentSize = indent ? '2' : '1'; // root is at -1\n\n const literal = type === PlainValue.Type.BLOCK_FOLDED ? false : type === PlainValue.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth - indent.length);\n let header = literal ? '|' : '>';\n if (!value) return header + '\\n';\n let wsStart = '';\n let wsEnd = '';\n value = value.replace(/[\\n\\t ]*$/, ws => {\n const n = ws.indexOf('\\n');\n\n if (n === -1) {\n header += '-'; // strip\n } else if (value === ws || n !== ws.length - 1) {\n header += '+'; // keep\n\n if (onChompKeep) onChompKeep();\n }\n\n wsEnd = ws.replace(/\\n$/, '');\n return '';\n }).replace(/^[\\n ]*/, ws => {\n if (ws.indexOf(' ') !== -1) header += indentSize;\n const m = ws.match(/ +$/);\n\n if (m) {\n wsStart = ws.slice(0, -m[0].length);\n return m[0];\n } else {\n wsStart = ws;\n return '';\n }\n });\n if (wsEnd) wsEnd = wsEnd.replace(/\\n+(?!\\n|$)/g, `$&${indent}`);\n if (wsStart) wsStart = wsStart.replace(/\\n+/g, `$&${indent}`);\n\n if (comment) {\n header += ' #' + comment.replace(/ ?[\\r\\n]+/g, ' ');\n if (onComment) onComment();\n }\n\n if (!value) return `${header}${indentSize}\\n${indent}${wsEnd}`;\n\n if (literal) {\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `${header}\\n${indent}${wsStart}${value}${wsEnd}`;\n }\n\n value = value.replace(/\\n+/g, '\\n$&').replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ ind.line ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n const body = foldFlowLines(`${wsStart}${value}${wsEnd}`, indent, FOLD_BLOCK, strOptions.fold);\n return `${header}\\n${indent}${body}`;\n}\n\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const {\n comment,\n type,\n value\n } = item;\n const {\n actualString,\n implicitKey,\n indent,\n inFlow\n } = ctx;\n\n if (implicitKey && /[\\n[\\]{},]/.test(value) || inFlow && /[[\\]{},]/.test(value)) {\n return doubleQuotedString(value, ctx);\n }\n\n if (!value || /^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - empty string, '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || value.indexOf('\\n') === -1 ? value.indexOf('\"') !== -1 && value.indexOf(\"'\") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);\n }\n\n if (!implicitKey && !inFlow && type !== PlainValue.Type.PLAIN && value.indexOf('\\n') !== -1) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n\n if (indent === '' && containsDocumentMarker(value)) {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n\n const str = value.replace(/\\n+/g, `$&\\n${indent}`); // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n\n if (actualString) {\n const {\n tags\n } = ctx.doc.schema;\n const resolved = resolveScalar(str, tags, tags.scalarFallback).value;\n if (typeof resolved !== 'string') return doubleQuotedString(value, ctx);\n }\n\n const body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx));\n\n if (comment && !inFlow && (body.indexOf('\\n') !== -1 || comment.indexOf('\\n') !== -1)) {\n if (onComment) onComment();\n return addCommentBefore(body, indent, comment);\n }\n\n return body;\n}\n\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const {\n defaultType\n } = strOptions;\n const {\n implicitKey,\n inFlow\n } = ctx;\n let {\n type,\n value\n } = item;\n\n if (typeof value !== 'string') {\n value = String(value);\n item = Object.assign({}, item, {\n value\n });\n }\n\n const _stringify = _type => {\n switch (_type) {\n case PlainValue.Type.BLOCK_FOLDED:\n case PlainValue.Type.BLOCK_LITERAL:\n return blockString(item, ctx, onComment, onChompKeep);\n\n case PlainValue.Type.QUOTE_DOUBLE:\n return doubleQuotedString(value, ctx);\n\n case PlainValue.Type.QUOTE_SINGLE:\n return singleQuotedString(value, ctx);\n\n case PlainValue.Type.PLAIN:\n return plainString(item, ctx, onComment, onChompKeep);\n\n default:\n return null;\n }\n };\n\n if (type !== PlainValue.Type.QUOTE_DOUBLE && /[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/.test(value)) {\n // force double quotes on control characters\n type = PlainValue.Type.QUOTE_DOUBLE;\n } else if ((implicitKey || inFlow) && (type === PlainValue.Type.BLOCK_FOLDED || type === PlainValue.Type.BLOCK_LITERAL)) {\n // should not happen; blocks are not valid inside flow containers\n type = PlainValue.Type.QUOTE_DOUBLE;\n }\n\n let res = _stringify(type);\n\n if (res === null) {\n res = _stringify(defaultType);\n if (res === null) throw new Error(`Unsupported default string type ${defaultType}`);\n }\n\n return res;\n}\n\nfunction stringifyNumber({\n format,\n minFractionDigits,\n tag,\n value\n}) {\n if (typeof value === 'bigint') return String(value);\n if (!isFinite(value)) return isNaN(value) ? '.nan' : value < 0 ? '-.inf' : '.inf';\n let n = JSON.stringify(value);\n\n if (!format && minFractionDigits && (!tag || tag === 'tag:yaml.org,2002:float') && /^\\d/.test(n)) {\n let i = n.indexOf('.');\n\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n\n let d = minFractionDigits - (n.length - i - 1);\n\n while (d-- > 0) n += '0';\n }\n\n return n;\n}\n\nfunction checkFlowCollectionEnd(errors, cst) {\n let char, name;\n\n switch (cst.type) {\n case PlainValue.Type.FLOW_MAP:\n char = '}';\n name = 'flow map';\n break;\n\n case PlainValue.Type.FLOW_SEQ:\n char = ']';\n name = 'flow sequence';\n break;\n\n default:\n errors.push(new PlainValue.YAMLSemanticError(cst, 'Not a flow collection!?'));\n return;\n }\n\n let lastItem;\n\n for (let i = cst.items.length - 1; i >= 0; --i) {\n const item = cst.items[i];\n\n if (!item || item.type !== PlainValue.Type.COMMENT) {\n lastItem = item;\n break;\n }\n }\n\n if (lastItem && lastItem.char !== char) {\n const msg = `Expected ${name} to end with ${char}`;\n let err;\n\n if (typeof lastItem.offset === 'number') {\n err = new PlainValue.YAMLSemanticError(cst, msg);\n err.offset = lastItem.offset + 1;\n } else {\n err = new PlainValue.YAMLSemanticError(lastItem, msg);\n if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start;\n }\n\n errors.push(err);\n }\n}\nfunction checkFlowCommentSpace(errors, comment) {\n const prev = comment.context.src[comment.range.start - 1];\n\n if (prev !== '\\n' && prev !== '\\t' && prev !== ' ') {\n const msg = 'Comments must be separated from other tokens by white space characters';\n errors.push(new PlainValue.YAMLSemanticError(comment, msg));\n }\n}\nfunction getLongKeyError(source, key) {\n const sk = String(key);\n const k = sk.substr(0, 8) + '...' + sk.substr(-8);\n return new PlainValue.YAMLSemanticError(source, `The \"${k}\" key is too long`);\n}\nfunction resolveComments(collection, comments) {\n for (const {\n afterKey,\n before,\n comment\n } of comments) {\n let item = collection.items[before];\n\n if (!item) {\n if (comment !== undefined) {\n if (collection.comment) collection.comment += '\\n' + comment;else collection.comment = comment;\n }\n } else {\n if (afterKey && item.value) item = item.value;\n\n if (comment === undefined) {\n if (afterKey || !item.commentBefore) item.spaceBefore = true;\n } else {\n if (item.commentBefore) item.commentBefore += '\\n' + comment;else item.commentBefore = comment;\n }\n }\n }\n}\n\n// on error, will return { str: string, errors: Error[] }\nfunction resolveString(doc, node) {\n const res = node.strValue;\n if (!res) return '';\n if (typeof res === 'string') return res;\n res.errors.forEach(error => {\n if (!error.source) error.source = node;\n doc.errors.push(error);\n });\n return res.str;\n}\n\nfunction resolveTagHandle(doc, node) {\n const {\n handle,\n suffix\n } = node.tag;\n let prefix = doc.tagPrefixes.find(p => p.handle === handle);\n\n if (!prefix) {\n const dtp = doc.getDefaults().tagPrefixes;\n if (dtp) prefix = dtp.find(p => p.handle === handle);\n if (!prefix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag handle is non-default and was not declared.`);\n }\n\n if (!suffix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag has no suffix.`);\n\n if (handle === '!' && (doc.version || doc.options.version) === '1.0') {\n if (suffix[0] === '^') {\n doc.warnings.push(new PlainValue.YAMLWarning(node, 'YAML 1.0 ^ tag expansion is not supported'));\n return suffix;\n }\n\n if (/[:/]/.test(suffix)) {\n // word/foo -> tag:word.yaml.org,2002:foo\n const vocab = suffix.match(/^([a-z0-9-]+)\\/(.*)/i);\n return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`;\n }\n }\n\n return prefix.prefix + decodeURIComponent(suffix);\n}\n\nfunction resolveTagName(doc, node) {\n const {\n tag,\n type\n } = node;\n let nonSpecific = false;\n\n if (tag) {\n const {\n handle,\n suffix,\n verbatim\n } = tag;\n\n if (verbatim) {\n if (verbatim !== '!' && verbatim !== '!!') return verbatim;\n const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`;\n doc.errors.push(new PlainValue.YAMLSemanticError(node, msg));\n } else if (handle === '!' && !suffix) {\n nonSpecific = true;\n } else {\n try {\n return resolveTagHandle(doc, node);\n } catch (error) {\n doc.errors.push(error);\n }\n }\n }\n\n switch (type) {\n case PlainValue.Type.BLOCK_FOLDED:\n case PlainValue.Type.BLOCK_LITERAL:\n case PlainValue.Type.QUOTE_DOUBLE:\n case PlainValue.Type.QUOTE_SINGLE:\n return PlainValue.defaultTags.STR;\n\n case PlainValue.Type.FLOW_MAP:\n case PlainValue.Type.MAP:\n return PlainValue.defaultTags.MAP;\n\n case PlainValue.Type.FLOW_SEQ:\n case PlainValue.Type.SEQ:\n return PlainValue.defaultTags.SEQ;\n\n case PlainValue.Type.PLAIN:\n return nonSpecific ? PlainValue.defaultTags.STR : null;\n\n default:\n return null;\n }\n}\n\nfunction resolveByTagName(doc, node, tagName) {\n const {\n tags\n } = doc.schema;\n const matchWithTest = [];\n\n for (const tag of tags) {\n if (tag.tag === tagName) {\n if (tag.test) matchWithTest.push(tag);else {\n const res = tag.resolve(doc, node);\n return res instanceof Collection ? res : new Scalar(res);\n }\n }\n }\n\n const str = resolveString(doc, node);\n if (typeof str === 'string' && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback);\n return null;\n}\n\nfunction getFallbackTagName({\n type\n}) {\n switch (type) {\n case PlainValue.Type.FLOW_MAP:\n case PlainValue.Type.MAP:\n return PlainValue.defaultTags.MAP;\n\n case PlainValue.Type.FLOW_SEQ:\n case PlainValue.Type.SEQ:\n return PlainValue.defaultTags.SEQ;\n\n default:\n return PlainValue.defaultTags.STR;\n }\n}\n\nfunction resolveTag(doc, node, tagName) {\n try {\n const res = resolveByTagName(doc, node, tagName);\n\n if (res) {\n if (tagName && node.tag) res.tag = tagName;\n return res;\n }\n } catch (error) {\n /* istanbul ignore if */\n if (!error.source) error.source = node;\n doc.errors.push(error);\n return null;\n }\n\n try {\n const fallback = getFallbackTagName(node);\n if (!fallback) throw new Error(`The tag ${tagName} is unavailable`);\n const msg = `The tag ${tagName} is unavailable, falling back to ${fallback}`;\n doc.warnings.push(new PlainValue.YAMLWarning(node, msg));\n const res = resolveByTagName(doc, node, fallback);\n res.tag = tagName;\n return res;\n } catch (error) {\n const refError = new PlainValue.YAMLReferenceError(node, error.message);\n refError.stack = error.stack;\n doc.errors.push(refError);\n return null;\n }\n}\n\nconst isCollectionItem = node => {\n if (!node) return false;\n const {\n type\n } = node;\n return type === PlainValue.Type.MAP_KEY || type === PlainValue.Type.MAP_VALUE || type === PlainValue.Type.SEQ_ITEM;\n};\n\nfunction resolveNodeProps(errors, node) {\n const comments = {\n before: [],\n after: []\n };\n let hasAnchor = false;\n let hasTag = false;\n const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props;\n\n for (const {\n start,\n end\n } of props) {\n switch (node.context.src[start]) {\n case PlainValue.Char.COMMENT:\n {\n if (!node.commentHasRequiredWhitespace(start)) {\n const msg = 'Comments must be separated from other tokens by white space characters';\n errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n const {\n header,\n valueRange\n } = node;\n const cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before;\n cc.push(node.context.src.slice(start + 1, end));\n break;\n }\n // Actual anchor & tag resolution is handled by schema, here we just complain\n\n case PlainValue.Char.ANCHOR:\n if (hasAnchor) {\n const msg = 'A node can have at most one anchor';\n errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n hasAnchor = true;\n break;\n\n case PlainValue.Char.TAG:\n if (hasTag) {\n const msg = 'A node can have at most one tag';\n errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n hasTag = true;\n break;\n }\n }\n\n return {\n comments,\n hasAnchor,\n hasTag\n };\n}\n\nfunction resolveNodeValue(doc, node) {\n const {\n anchors,\n errors,\n schema\n } = doc;\n\n if (node.type === PlainValue.Type.ALIAS) {\n const name = node.rawValue;\n const src = anchors.getNode(name);\n\n if (!src) {\n const msg = `Aliased anchor not found: ${name}`;\n errors.push(new PlainValue.YAMLReferenceError(node, msg));\n return null;\n } // Lazy resolution for circular references\n\n\n const res = new Alias(src);\n\n anchors._cstAliases.push(res);\n\n return res;\n }\n\n const tagName = resolveTagName(doc, node);\n if (tagName) return resolveTag(doc, node, tagName);\n\n if (node.type !== PlainValue.Type.PLAIN) {\n const msg = `Failed to resolve ${node.type} node here`;\n errors.push(new PlainValue.YAMLSyntaxError(node, msg));\n return null;\n }\n\n try {\n const str = resolveString(doc, node);\n return resolveScalar(str, schema.tags, schema.tags.scalarFallback);\n } catch (error) {\n if (!error.source) error.source = node;\n errors.push(error);\n return null;\n }\n} // sets node.resolved on success\n\n\nfunction resolveNode(doc, node) {\n if (!node) return null;\n if (node.error) doc.errors.push(node.error);\n const {\n comments,\n hasAnchor,\n hasTag\n } = resolveNodeProps(doc.errors, node);\n\n if (hasAnchor) {\n const {\n anchors\n } = doc;\n const name = node.anchor;\n const prev = anchors.getNode(name); // At this point, aliases for any preceding node with the same anchor\n // name have already been resolved, so it may safely be renamed.\n\n if (prev) anchors.map[anchors.newName(name)] = prev; // During parsing, we need to store the CST node in anchors.map as\n // anchors need to be available during resolution to allow for\n // circular references.\n\n anchors.map[name] = node;\n }\n\n if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) {\n const msg = 'An alias node must not specify any properties';\n doc.errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n const res = resolveNodeValue(doc, node);\n\n if (res) {\n res.range = [node.range.start, node.range.end];\n if (doc.options.keepCstNodes) res.cstNode = node;\n if (doc.options.keepNodeTypes) res.type = node.type;\n const cb = comments.before.join('\\n');\n\n if (cb) {\n res.commentBefore = res.commentBefore ? `${res.commentBefore}\\n${cb}` : cb;\n }\n\n const ca = comments.after.join('\\n');\n if (ca) res.comment = res.comment ? `${res.comment}\\n${ca}` : ca;\n }\n\n return node.resolved = res;\n}\n\nfunction resolveMap(doc, cst) {\n if (cst.type !== PlainValue.Type.MAP && cst.type !== PlainValue.Type.FLOW_MAP) {\n const msg = `A ${cst.type} node cannot be resolved as a mapping`;\n doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg));\n return null;\n }\n\n const {\n comments,\n items\n } = cst.type === PlainValue.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst);\n const map = new YAMLMap();\n map.items = items;\n resolveComments(map, comments);\n let hasCollectionKey = false;\n\n for (let i = 0; i < items.length; ++i) {\n const {\n key: iKey\n } = items[i];\n if (iKey instanceof Collection) hasCollectionKey = true;\n\n if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) {\n items[i] = new Merge(items[i]);\n const sources = items[i].value.items;\n let error = null;\n sources.some(node => {\n if (node instanceof Alias) {\n // During parsing, alias sources are CST nodes; to account for\n // circular references their resolved values can't be used here.\n const {\n type\n } = node.source;\n if (type === PlainValue.Type.MAP || type === PlainValue.Type.FLOW_MAP) return false;\n return error = 'Merge nodes aliases can only point to maps';\n }\n\n return error = 'Merge nodes can only have Alias nodes as values';\n });\n if (error) doc.errors.push(new PlainValue.YAMLSemanticError(cst, error));\n } else {\n for (let j = i + 1; j < items.length; ++j) {\n const {\n key: jKey\n } = items[j];\n\n if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, 'value') && iKey.value === jKey.value) {\n const msg = `Map keys must be unique; \"${iKey}\" is repeated`;\n doc.errors.push(new PlainValue.YAMLSemanticError(cst, msg));\n break;\n }\n }\n }\n }\n\n if (hasCollectionKey && !doc.options.mapAsMap) {\n const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n doc.warnings.push(new PlainValue.YAMLWarning(cst, warn));\n }\n\n cst.resolved = map;\n return map;\n}\n\nconst valueHasPairComment = ({\n context: {\n lineStart,\n node,\n src\n },\n props\n}) => {\n if (props.length === 0) return false;\n const {\n start\n } = props[0];\n if (node && start > node.valueRange.start) return false;\n if (src[start] !== PlainValue.Char.COMMENT) return false;\n\n for (let i = lineStart; i < start; ++i) if (src[i] === '\\n') return false;\n\n return true;\n};\n\nfunction resolvePairComment(item, pair) {\n if (!valueHasPairComment(item)) return;\n const comment = item.getPropValue(0, PlainValue.Char.COMMENT, true);\n let found = false;\n const cb = pair.value.commentBefore;\n\n if (cb && cb.startsWith(comment)) {\n pair.value.commentBefore = cb.substr(comment.length + 1);\n found = true;\n } else {\n const cc = pair.value.comment;\n\n if (!item.node && cc && cc.startsWith(comment)) {\n pair.value.comment = cc.substr(comment.length + 1);\n found = true;\n }\n }\n\n if (found) pair.comment = comment;\n}\n\nfunction resolveBlockMapItems(doc, cst) {\n const comments = [];\n const items = [];\n let key = undefined;\n let keyStart = null;\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n switch (item.type) {\n case PlainValue.Type.BLANK_LINE:\n comments.push({\n afterKey: !!key,\n before: items.length\n });\n break;\n\n case PlainValue.Type.COMMENT:\n comments.push({\n afterKey: !!key,\n before: items.length,\n comment: item.comment\n });\n break;\n\n case PlainValue.Type.MAP_KEY:\n if (key !== undefined) items.push(new Pair(key));\n if (item.error) doc.errors.push(item.error);\n key = resolveNode(doc, item.node);\n keyStart = null;\n break;\n\n case PlainValue.Type.MAP_VALUE:\n {\n if (key === undefined) key = null;\n if (item.error) doc.errors.push(item.error);\n\n if (!item.context.atLineStart && item.node && item.node.type === PlainValue.Type.MAP && !item.node.context.atLineStart) {\n const msg = 'Nested mappings are not allowed in compact mappings';\n doc.errors.push(new PlainValue.YAMLSemanticError(item.node, msg));\n }\n\n let valueNode = item.node;\n\n if (!valueNode && item.props.length > 0) {\n // Comments on an empty mapping value need to be preserved, so we\n // need to construct a minimal empty node here to use instead of the\n // missing `item.node`. -- eemeli/yaml#19\n valueNode = new PlainValue.PlainValue(PlainValue.Type.PLAIN, []);\n valueNode.context = {\n parent: item,\n src: item.context.src\n };\n const pos = item.range.start + 1;\n valueNode.range = {\n start: pos,\n end: pos\n };\n valueNode.valueRange = {\n start: pos,\n end: pos\n };\n\n if (typeof item.range.origStart === 'number') {\n const origPos = item.range.origStart + 1;\n valueNode.range.origStart = valueNode.range.origEnd = origPos;\n valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos;\n }\n }\n\n const pair = new Pair(key, resolveNode(doc, valueNode));\n resolvePairComment(item, pair);\n items.push(pair);\n\n if (key && typeof keyStart === 'number') {\n if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n }\n\n key = undefined;\n keyStart = null;\n }\n break;\n\n default:\n if (key !== undefined) items.push(new Pair(key));\n key = resolveNode(doc, item);\n keyStart = item.range.start;\n if (item.error) doc.errors.push(item.error);\n\n next: for (let j = i + 1;; ++j) {\n const nextItem = cst.items[j];\n\n switch (nextItem && nextItem.type) {\n case PlainValue.Type.BLANK_LINE:\n case PlainValue.Type.COMMENT:\n continue next;\n\n case PlainValue.Type.MAP_VALUE:\n break next;\n\n default:\n {\n const msg = 'Implicit map keys need to be followed by map values';\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n break next;\n }\n }\n }\n\n if (item.valueRangeContainsNewline) {\n const msg = 'Implicit map keys need to be on a single line';\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n }\n\n }\n }\n\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments,\n items\n };\n}\n\nfunction resolveFlowMapItems(doc, cst) {\n const comments = [];\n const items = [];\n let key = undefined;\n let explicitKey = false;\n let next = '{';\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n if (typeof item.char === 'string') {\n const {\n char,\n offset\n } = item;\n\n if (char === '?' && key === undefined && !explicitKey) {\n explicitKey = true;\n next = ':';\n continue;\n }\n\n if (char === ':') {\n if (key === undefined) key = null;\n\n if (next === ':') {\n next = ',';\n continue;\n }\n } else {\n if (explicitKey) {\n if (key === undefined && char !== ',') key = null;\n explicitKey = false;\n }\n\n if (key !== undefined) {\n items.push(new Pair(key));\n key = undefined;\n\n if (char === ',') {\n next = ':';\n continue;\n }\n }\n }\n\n if (char === '}') {\n if (i === cst.items.length - 1) continue;\n } else if (char === next) {\n next = ':';\n continue;\n }\n\n const msg = `Flow map contains an unexpected ${char}`;\n const err = new PlainValue.YAMLSyntaxError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n } else if (item.type === PlainValue.Type.BLANK_LINE) {\n comments.push({\n afterKey: !!key,\n before: items.length\n });\n } else if (item.type === PlainValue.Type.COMMENT) {\n checkFlowCommentSpace(doc.errors, item);\n comments.push({\n afterKey: !!key,\n before: items.length,\n comment: item.comment\n });\n } else if (key === undefined) {\n if (next === ',') doc.errors.push(new PlainValue.YAMLSemanticError(item, 'Separator , missing in flow map'));\n key = resolveNode(doc, item);\n } else {\n if (next !== ',') doc.errors.push(new PlainValue.YAMLSemanticError(item, 'Indicator : missing in flow map entry'));\n items.push(new Pair(key, resolveNode(doc, item)));\n key = undefined;\n explicitKey = false;\n }\n }\n\n checkFlowCollectionEnd(doc.errors, cst);\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments,\n items\n };\n}\n\nfunction resolveSeq(doc, cst) {\n if (cst.type !== PlainValue.Type.SEQ && cst.type !== PlainValue.Type.FLOW_SEQ) {\n const msg = `A ${cst.type} node cannot be resolved as a sequence`;\n doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg));\n return null;\n }\n\n const {\n comments,\n items\n } = cst.type === PlainValue.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst);\n const seq = new YAMLSeq();\n seq.items = items;\n resolveComments(seq, comments);\n\n if (!doc.options.mapAsMap && items.some(it => it instanceof Pair && it.key instanceof Collection)) {\n const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n doc.warnings.push(new PlainValue.YAMLWarning(cst, warn));\n }\n\n cst.resolved = seq;\n return seq;\n}\n\nfunction resolveBlockSeqItems(doc, cst) {\n const comments = [];\n const items = [];\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n switch (item.type) {\n case PlainValue.Type.BLANK_LINE:\n comments.push({\n before: items.length\n });\n break;\n\n case PlainValue.Type.COMMENT:\n comments.push({\n comment: item.comment,\n before: items.length\n });\n break;\n\n case PlainValue.Type.SEQ_ITEM:\n if (item.error) doc.errors.push(item.error);\n items.push(resolveNode(doc, item.node));\n\n if (item.hasProps) {\n const msg = 'Sequence items cannot have tags or anchors before the - indicator';\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n }\n\n break;\n\n default:\n if (item.error) doc.errors.push(item.error);\n doc.errors.push(new PlainValue.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`));\n }\n }\n\n return {\n comments,\n items\n };\n}\n\nfunction resolveFlowSeqItems(doc, cst) {\n const comments = [];\n const items = [];\n let explicitKey = false;\n let key = undefined;\n let keyStart = null;\n let next = '[';\n let prevItem = null;\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n if (typeof item.char === 'string') {\n const {\n char,\n offset\n } = item;\n\n if (char !== ':' && (explicitKey || key !== undefined)) {\n if (explicitKey && key === undefined) key = next ? items.pop() : null;\n items.push(new Pair(key));\n explicitKey = false;\n key = undefined;\n keyStart = null;\n }\n\n if (char === next) {\n next = null;\n } else if (!next && char === '?') {\n explicitKey = true;\n } else if (next !== '[' && char === ':' && key === undefined) {\n if (next === ',') {\n key = items.pop();\n\n if (key instanceof Pair) {\n const msg = 'Chaining flow sequence pairs is invalid';\n const err = new PlainValue.YAMLSemanticError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n }\n\n if (!explicitKey && typeof keyStart === 'number') {\n const keyEnd = item.range ? item.range.start : item.offset;\n if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n const {\n src\n } = prevItem.context;\n\n for (let i = keyStart; i < keyEnd; ++i) if (src[i] === '\\n') {\n const msg = 'Implicit keys of flow sequence pairs need to be on a single line';\n doc.errors.push(new PlainValue.YAMLSemanticError(prevItem, msg));\n break;\n }\n }\n } else {\n key = null;\n }\n\n keyStart = null;\n explicitKey = false;\n next = null;\n } else if (next === '[' || char !== ']' || i < cst.items.length - 1) {\n const msg = `Flow sequence contains an unexpected ${char}`;\n const err = new PlainValue.YAMLSyntaxError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n }\n } else if (item.type === PlainValue.Type.BLANK_LINE) {\n comments.push({\n before: items.length\n });\n } else if (item.type === PlainValue.Type.COMMENT) {\n checkFlowCommentSpace(doc.errors, item);\n comments.push({\n comment: item.comment,\n before: items.length\n });\n } else {\n if (next) {\n const msg = `Expected a ${next} in flow sequence`;\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n }\n\n const value = resolveNode(doc, item);\n\n if (key === undefined) {\n items.push(value);\n prevItem = item;\n } else {\n items.push(new Pair(key, value));\n key = undefined;\n }\n\n keyStart = item.range.start;\n next = ',';\n }\n }\n\n checkFlowCollectionEnd(doc.errors, cst);\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments,\n items\n };\n}\n\nexports.Alias = Alias;\nexports.Collection = Collection;\nexports.Merge = Merge;\nexports.Node = Node;\nexports.Pair = Pair;\nexports.Scalar = Scalar;\nexports.YAMLMap = YAMLMap;\nexports.YAMLSeq = YAMLSeq;\nexports.addComment = addComment;\nexports.binaryOptions = binaryOptions;\nexports.boolOptions = boolOptions;\nexports.findPair = findPair;\nexports.intOptions = intOptions;\nexports.isEmptyPath = isEmptyPath;\nexports.nullOptions = nullOptions;\nexports.resolveMap = resolveMap;\nexports.resolveNode = resolveNode;\nexports.resolveSeq = resolveSeq;\nexports.resolveString = resolveString;\nexports.strOptions = strOptions;\nexports.stringifyNumber = stringifyNumber;\nexports.stringifyString = stringifyString;\nexports.toJSON = toJSON;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar resolveSeq = require('./resolveSeq-4a68b39b.js');\n\n/* global atob, btoa, Buffer */\nconst binary = {\n identify: value => value instanceof Uint8Array,\n // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve: (doc, node) => {\n const src = resolveSeq.resolveString(doc, node);\n\n if (typeof Buffer === 'function') {\n return Buffer.from(src, 'base64');\n } else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n\n for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i);\n\n return buffer;\n } else {\n const msg = 'This environment does not support reading binary tags; either Buffer or atob is required';\n doc.errors.push(new PlainValue.YAMLReferenceError(node, msg));\n return null;\n }\n },\n options: resolveSeq.binaryOptions,\n stringify: ({\n comment,\n type,\n value\n }, ctx, onComment, onChompKeep) => {\n let src;\n\n if (typeof Buffer === 'function') {\n src = value instanceof Buffer ? value.toString('base64') : Buffer.from(value.buffer).toString('base64');\n } else if (typeof btoa === 'function') {\n let s = '';\n\n for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]);\n\n src = btoa(s);\n } else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n\n if (!type) type = resolveSeq.binaryOptions.defaultType;\n\n if (type === PlainValue.Type.QUOTE_DOUBLE) {\n value = src;\n } else {\n const {\n lineWidth\n } = resolveSeq.binaryOptions;\n const n = Math.ceil(src.length / lineWidth);\n const lines = new Array(n);\n\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = src.substr(o, lineWidth);\n }\n\n value = lines.join(type === PlainValue.Type.BLOCK_LITERAL ? '\\n' : ' ');\n }\n\n return resolveSeq.stringifyString({\n comment,\n type,\n value\n }, ctx, onComment, onChompKeep);\n }\n};\n\nfunction parsePairs(doc, cst) {\n const seq = resolveSeq.resolveSeq(doc, cst);\n\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (item instanceof resolveSeq.Pair) continue;else if (item instanceof resolveSeq.YAMLMap) {\n if (item.items.length > 1) {\n const msg = 'Each pair must have its own sequence indicator';\n throw new PlainValue.YAMLSemanticError(cst, msg);\n }\n\n const pair = item.items[0] || new resolveSeq.Pair();\n if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore}\\n${pair.commentBefore}` : item.commentBefore;\n if (item.comment) pair.comment = pair.comment ? `${item.comment}\\n${pair.comment}` : item.comment;\n item = pair;\n }\n seq.items[i] = item instanceof resolveSeq.Pair ? item : new resolveSeq.Pair(item);\n }\n\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const pairs = new resolveSeq.YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n\n for (const it of iterable) {\n let key, value;\n\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n } else throw new TypeError(`Expected [key, value] tuple: ${it}`);\n } else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n } else throw new TypeError(`Expected { key: value } tuple: ${it}`);\n } else {\n key = it;\n }\n\n const pair = schema.createPair(key, value, ctx);\n pairs.items.push(pair);\n }\n\n return pairs;\n}\nconst pairs = {\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: parsePairs,\n createNode: createPairs\n};\n\nclass YAMLOMap extends resolveSeq.YAMLSeq {\n constructor() {\n super();\n\n PlainValue._defineProperty(this, \"add\", resolveSeq.YAMLMap.prototype.add.bind(this));\n\n PlainValue._defineProperty(this, \"delete\", resolveSeq.YAMLMap.prototype.delete.bind(this));\n\n PlainValue._defineProperty(this, \"get\", resolveSeq.YAMLMap.prototype.get.bind(this));\n\n PlainValue._defineProperty(this, \"has\", resolveSeq.YAMLMap.prototype.has.bind(this));\n\n PlainValue._defineProperty(this, \"set\", resolveSeq.YAMLMap.prototype.set.bind(this));\n\n this.tag = YAMLOMap.tag;\n }\n\n toJSON(_, ctx) {\n const map = new Map();\n if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n for (const pair of this.items) {\n let key, value;\n\n if (pair instanceof resolveSeq.Pair) {\n key = resolveSeq.toJSON(pair.key, '', ctx);\n value = resolveSeq.toJSON(pair.value, key, ctx);\n } else {\n key = resolveSeq.toJSON(pair, '', ctx);\n }\n\n if (map.has(key)) throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n\n return map;\n }\n\n}\n\nPlainValue._defineProperty(YAMLOMap, \"tag\", 'tag:yaml.org,2002:omap');\n\nfunction parseOMap(doc, cst) {\n const pairs = parsePairs(doc, cst);\n const seenKeys = [];\n\n for (const {\n key\n } of pairs.items) {\n if (key instanceof resolveSeq.Scalar) {\n if (seenKeys.includes(key.value)) {\n const msg = 'Ordered maps must not include duplicate keys';\n throw new PlainValue.YAMLSemanticError(cst, msg);\n } else {\n seenKeys.push(key.value);\n }\n }\n }\n\n return Object.assign(new YAMLOMap(), pairs);\n}\n\nfunction createOMap(schema, iterable, ctx) {\n const pairs = createPairs(schema, iterable, ctx);\n const omap = new YAMLOMap();\n omap.items = pairs.items;\n return omap;\n}\n\nconst omap = {\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve: parseOMap,\n createNode: createOMap\n};\n\nclass YAMLSet extends resolveSeq.YAMLMap {\n constructor() {\n super();\n this.tag = YAMLSet.tag;\n }\n\n add(key) {\n const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key);\n const prev = resolveSeq.findPair(this.items, pair.key);\n if (!prev) this.items.push(pair);\n }\n\n get(key, keepPair) {\n const pair = resolveSeq.findPair(this.items, key);\n return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair;\n }\n\n set(key, value) {\n if (typeof value !== 'boolean') throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = resolveSeq.findPair(this.items, key);\n\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n } else if (!prev && value) {\n this.items.push(new resolveSeq.Pair(key));\n }\n }\n\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');\n }\n\n}\n\nPlainValue._defineProperty(YAMLSet, \"tag\", 'tag:yaml.org,2002:set');\n\nfunction parseSet(doc, cst) {\n const map = resolveSeq.resolveMap(doc, cst);\n if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, 'Set items must all have null values');\n return Object.assign(new YAMLSet(), map);\n}\n\nfunction createSet(schema, iterable, ctx) {\n const set = new YAMLSet();\n\n for (const value of iterable) set.items.push(schema.createPair(value, null, ctx));\n\n return set;\n}\n\nconst set = {\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n resolve: parseSet,\n createNode: createSet\n};\n\nconst parseSexagesimal = (sign, parts) => {\n const n = parts.split(':').reduce((n, p) => n * 60 + Number(p), 0);\n return sign === '-' ? -n : n;\n}; // hhhh:mm:ss.sss\n\n\nconst stringifySexagesimal = ({\n value\n}) => {\n if (isNaN(value) || !isFinite(value)) return resolveSeq.stringifyNumber(value);\n let sign = '';\n\n if (value < 0) {\n sign = '-';\n value = Math.abs(value);\n }\n\n const parts = [value % 60]; // seconds, including ms\n\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n } else {\n value = Math.round((value - parts[0]) / 60);\n parts.unshift(value % 60); // minutes\n\n if (value >= 60) {\n value = Math.round((value - parts[0]) / 60);\n parts.unshift(value); // hours\n }\n }\n\n return sign + parts.map(n => n < 10 ? '0' + String(n) : String(n)).join(':').replace(/000000\\d*$/, '') // % 60 may introduce error\n ;\n};\n\nconst intTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,\n resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*)$/,\n resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^(?:' + '([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?' + ')$'),\n resolve: (str, year, month, day, hour, minute, second, millisec, tz) => {\n if (millisec) millisec = (millisec + '00').substr(1, 3);\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0);\n\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz[0], tz.slice(1));\n if (Math.abs(d) < 30) d *= 60;\n date -= 60000 * d;\n }\n\n return new Date(date);\n },\n stringify: ({\n value\n }) => value.toISOString().replace(/((T00:00)?:00)?\\.000Z$/, '')\n};\n\n/* global console, process, YAML_SILENCE_DEPRECATION_WARNINGS, YAML_SILENCE_WARNINGS */\nfunction shouldWarn(deprecation) {\n const env = typeof process !== 'undefined' && process.env || {};\n\n if (deprecation) {\n if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== 'undefined') return !YAML_SILENCE_DEPRECATION_WARNINGS;\n return !env.YAML_SILENCE_DEPRECATION_WARNINGS;\n }\n\n if (typeof YAML_SILENCE_WARNINGS !== 'undefined') return !YAML_SILENCE_WARNINGS;\n return !env.YAML_SILENCE_WARNINGS;\n}\n\nfunction warn(warning, type) {\n if (shouldWarn(false)) {\n const emit = typeof process !== 'undefined' && process.emitWarning; // This will throw in Jest if `warning` is an Error instance due to\n // https://github.com/facebook/jest/issues/2549\n\n if (emit) emit(warning, type);else {\n // eslint-disable-next-line no-console\n console.warn(type ? `${type}: ${warning}` : warning);\n }\n }\n}\nfunction warnFileDeprecation(filename) {\n if (shouldWarn(true)) {\n const path = filename.replace(/.*yaml[/\\\\]/i, '').replace(/\\.js$/, '').replace(/\\\\/g, '/');\n warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, 'DeprecationWarning');\n }\n}\nconst warned = {};\nfunction warnOptionDeprecation(name, alternative) {\n if (!warned[name] && shouldWarn(true)) {\n warned[name] = true;\n let msg = `The option '${name}' will be removed in a future release`;\n msg += alternative ? `, use '${alternative}' instead.` : '.';\n warn(msg, 'DeprecationWarning');\n }\n}\n\nexports.binary = binary;\nexports.floatTime = floatTime;\nexports.intTime = intTime;\nexports.omap = omap;\nexports.pairs = pairs;\nexports.set = set;\nexports.timestamp = timestamp;\nexports.warn = warn;\nexports.warnFileDeprecation = warnFileDeprecation;\nexports.warnOptionDeprecation = warnOptionDeprecation;\n","module.exports = require('./dist').YAML\n","const core = require('@actions/core');\nconst fs = require('fs');\nconst glob = require('@actions/glob');\nconst path = require('path');\nconst sha1 = require('sha1-regex');\nconst yaml = require('yaml');\n\nasync function run() {\n try {\n const workflowsPath = '.github/workflows';\n const globber = await glob.create([workflowsPath + '/*.yaml', workflowsPath + '/*.yml'].join('\\n'));\n let actionHasError = false;\n\n for await (const file of globber.globGenerator()) {\n const basename = path.basename(file);\n const fileContents = fs.readFileSync(file, 'utf8');\n const yamlContents = yaml.parse(fileContents);\n const jobs = yamlContents['jobs'];\n let fileHasError = false;\n\n if (jobs === undefined) {\n core.setFailed(`The \"${basename}\" workflow does not contain jobs.`);\n }\n\n core.startGroup(workflowsPath + '/' + basename);\n \n for (const job in jobs) {\n const steps = jobs[job]['steps'];\n\n if (steps === undefined) {\n core.warning(`The \"${job}\" job of the \"${basename}\" workflow does not contain steps.`);\n }\n\n for (const step of steps) {\n const uses = step['uses'];\n\n if (typeof uses === 'string' && uses.includes('@')) {\n const version = uses.substr(uses.indexOf('@') + 1);\n\n if (!sha1.test(version)) {\n actionHasError = true;\n fileHasError = true;\n\n core.error(`${uses} is not pinned to a full length commit SHA.`);\n }\n }\n }\n }\n\n if (!fileHasError) {\n core.info('No issues were found.')\n }\n\n core.endGroup();\n }\n \n if (actionHasError) {\n throw new Error('At least one workflow contains an unpinned GitHub Action version.');\n }\n } catch (error) {\n core.setFailed(error.message);\n }\n}\n\nrun();","module.exports = require(\"assert\");;","module.exports = require(\"fs\");;","module.exports = require(\"os\");;","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\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].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\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\n__webpack_require__.ab = __dirname + \"/\";","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(351);\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AC55BA;AACA;AACA;A;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACtvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC72BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC3gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACptDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACpkEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;ACjaA;AACA;AACA;A;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACjEA;AACA;A;;;;;;ACDA;AACA;A;;;;;;ACDA;AACA;A;;;;;;ACDA;AACA;A;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5BA;AACA;ACDA;AACA;AACA;AACA;;A","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/command.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/core.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/file-command.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/core/lib/utils.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/glob.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-glob-options-helper.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-globber.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-match-kind.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-path-helper.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-path.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-pattern-helper.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-pattern.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/@actions/glob/lib/internal-search-state.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/balanced-match/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/brace-expansion/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/concat-map/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/minimatch/minimatch.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/sha1-regex/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/Document-2cf6b08c.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/PlainValue-ec8e588e.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/Schema-42e9705c.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/parse-cst.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/resolveSeq-4a68b39b.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/dist/warnings-39684f17.js","../webpack://github-actions-ensure-sha-pinned-actions/./node_modules/yaml/index.js","../webpack://github-actions-ensure-sha-pinned-actions/./src/index.js","../webpack://github-actions-ensure-sha-pinned-actions/external \"assert\"","../webpack://github-actions-ensure-sha-pinned-actions/external \"fs\"","../webpack://github-actions-ensure-sha-pinned-actions/external \"os\"","../webpack://github-actions-ensure-sha-pinned-actions/external \"path\"","../webpack://github-actions-ensure-sha-pinned-actions/webpack/bootstrap","../webpack://github-actions-ensure-sha-pinned-actions/webpack/runtime/compat","../webpack://github-actions-ensure-sha-pinned-actions/webpack/startup"],"sourcesContent":["\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input. The value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n */\nfunction error(message) {\n command_1.issue('error', message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds an warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n */\nfunction warning(message) {\n command_1.issue('warning', message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst internal_globber_1 = require(\"./internal-globber\");\n/**\n * Constructs a globber\n *\n * @param patterns Patterns separated by newlines\n * @param options Glob options\n */\nfunction create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield internal_globber_1.DefaultGlobber.create(patterns, options);\n });\n}\nexports.create = create;\n//# sourceMappingURL=glob.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Returns a copy with defaults filled in.\n */\nfunction getOptions(copy) {\n const result = {\n followSymbolicLinks: true,\n implicitDescendants: true,\n omitBrokenSymbolicLinks: true\n };\n if (copy) {\n if (typeof copy.followSymbolicLinks === 'boolean') {\n result.followSymbolicLinks = copy.followSymbolicLinks;\n core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`);\n }\n if (typeof copy.implicitDescendants === 'boolean') {\n result.implicitDescendants = copy.implicitDescendants;\n core.debug(`implicitDescendants '${result.implicitDescendants}'`);\n }\n if (typeof copy.omitBrokenSymbolicLinks === 'boolean') {\n result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;\n core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);\n }\n }\n return result;\n}\nexports.getOptions = getOptions;\n//# sourceMappingURL=internal-glob-options-helper.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\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 __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\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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};\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst fs = __importStar(require(\"fs\"));\nconst globOptionsHelper = __importStar(require(\"./internal-glob-options-helper\"));\nconst path = __importStar(require(\"path\"));\nconst patternHelper = __importStar(require(\"./internal-pattern-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_pattern_1 = require(\"./internal-pattern\");\nconst internal_search_state_1 = require(\"./internal-search-state\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass DefaultGlobber {\n constructor(options) {\n this.patterns = [];\n this.searchPaths = [];\n this.options = globOptionsHelper.getOptions(options);\n }\n getSearchPaths() {\n // Return a copy\n return this.searchPaths.slice();\n }\n glob() {\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n const result = [];\n try {\n for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {\n const itemPath = _c.value;\n result.push(itemPath);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n });\n }\n globGenerator() {\n return __asyncGenerator(this, arguments, function* globGenerator_1() {\n // Fill in defaults options\n const options = globOptionsHelper.getOptions(this.options);\n // Implicit descendants?\n const patterns = [];\n for (const pattern of this.patterns) {\n patterns.push(pattern);\n if (options.implicitDescendants &&\n (pattern.trailingSeparator ||\n pattern.segments[pattern.segments.length - 1] !== '**')) {\n patterns.push(new internal_pattern_1.Pattern(pattern.negate, pattern.segments.concat('**')));\n }\n }\n // Push the search paths\n const stack = [];\n for (const searchPath of patternHelper.getSearchPaths(patterns)) {\n core.debug(`Search path '${searchPath}'`);\n // Exists?\n try {\n // Intentionally using lstat. Detection for broken symlink\n // will be performed later (if following symlinks).\n yield __await(fs.promises.lstat(searchPath));\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n continue;\n }\n throw err;\n }\n stack.unshift(new internal_search_state_1.SearchState(searchPath, 1));\n }\n // Search\n const traversalChain = []; // used to detect cycles\n while (stack.length) {\n // Pop\n const item = stack.pop();\n // Match?\n const match = patternHelper.match(patterns, item.path);\n const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path);\n if (!match && !partialMatch) {\n continue;\n }\n // Stat\n const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain)\n // Broken symlink, or symlink cycle detected, or no longer exists\n );\n // Broken symlink, or symlink cycle detected, or no longer exists\n if (!stats) {\n continue;\n }\n // Directory\n if (stats.isDirectory()) {\n // Matched\n if (match & internal_match_kind_1.MatchKind.Directory) {\n yield yield __await(item.path);\n }\n // Descend?\n else if (!partialMatch) {\n continue;\n }\n // Push the child items in reverse\n const childLevel = item.level + 1;\n const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel));\n stack.push(...childItems.reverse());\n }\n // File\n else if (match & internal_match_kind_1.MatchKind.File) {\n yield yield __await(item.path);\n }\n }\n });\n }\n /**\n * Constructs a DefaultGlobber\n */\n static create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = new DefaultGlobber(options);\n if (IS_WINDOWS) {\n patterns = patterns.replace(/\\r\\n/g, '\\n');\n patterns = patterns.replace(/\\r/g, '\\n');\n }\n const lines = patterns.split('\\n').map(x => x.trim());\n for (const line of lines) {\n // Empty or comment\n if (!line || line.startsWith('#')) {\n continue;\n }\n // Pattern\n else {\n result.patterns.push(new internal_pattern_1.Pattern(line));\n }\n }\n result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns));\n return result;\n });\n }\n static stat(item, options, traversalChain) {\n return __awaiter(this, void 0, void 0, function* () {\n // Note:\n // `stat` returns info about the target of a symlink (or symlink chain)\n // `lstat` returns info about a symlink itself\n let stats;\n if (options.followSymbolicLinks) {\n try {\n // Use `stat` (following symlinks)\n stats = yield fs.promises.stat(item.path);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n if (options.omitBrokenSymbolicLinks) {\n core.debug(`Broken symlink '${item.path}'`);\n return undefined;\n }\n throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`);\n }\n throw err;\n }\n }\n else {\n // Use `lstat` (not following symlinks)\n stats = yield fs.promises.lstat(item.path);\n }\n // Note, isDirectory() returns false for the lstat of a symlink\n if (stats.isDirectory() && options.followSymbolicLinks) {\n // Get the realpath\n const realPath = yield fs.promises.realpath(item.path);\n // Fixup the traversal chain to match the item level\n while (traversalChain.length >= item.level) {\n traversalChain.pop();\n }\n // Test for a cycle\n if (traversalChain.some((x) => x === realPath)) {\n core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`);\n return undefined;\n }\n // Update the traversal chain\n traversalChain.push(realPath);\n }\n return stats;\n });\n }\n}\nexports.DefaultGlobber = DefaultGlobber;\n//# sourceMappingURL=internal-globber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Indicates whether a pattern matches a path\n */\nvar MatchKind;\n(function (MatchKind) {\n /** Not matched */\n MatchKind[MatchKind[\"None\"] = 0] = \"None\";\n /** Matched if the path is a directory */\n MatchKind[MatchKind[\"Directory\"] = 1] = \"Directory\";\n /** Matched if the path is a regular file */\n MatchKind[MatchKind[\"File\"] = 2] = \"File\";\n /** Matched */\n MatchKind[MatchKind[\"All\"] = 3] = \"All\";\n})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));\n//# sourceMappingURL=internal-match-kind.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = __importStar(require(\"path\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths.\n *\n * For example, on Linux/macOS:\n * - `/ => /`\n * - `/hello => /`\n *\n * For example, on Windows:\n * - `C:\\ => C:\\`\n * - `C:\\hello => C:\\`\n * - `C: => C:`\n * - `C:hello => C:`\n * - `\\ => \\`\n * - `\\hello => \\`\n * - `\\\\hello => \\\\hello`\n * - `\\\\hello\\world => \\\\hello\\world`\n */\nfunction dirname(p) {\n // Normalize slashes and trim unnecessary trailing slash\n p = safeTrimTrailingSeparator(p);\n // Windows UNC root, e.g. \\\\hello or \\\\hello\\world\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+(\\\\[^\\\\]+)?$/.test(p)) {\n return p;\n }\n // Get dirname\n let result = path.dirname(p);\n // Trim trailing slash for Windows UNC root, e.g. \\\\hello\\world\\\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+\\\\[^\\\\]+\\\\$/.test(result)) {\n result = safeTrimTrailingSeparator(result);\n }\n return result;\n}\nexports.dirname = dirname;\n/**\n * Roots the path if not already rooted. On Windows, relative roots like `\\`\n * or `C:` are expanded based on the current working directory.\n */\nfunction ensureAbsoluteRoot(root, itemPath) {\n assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);\n assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Already rooted\n if (hasAbsoluteRoot(itemPath)) {\n return itemPath;\n }\n // Windows\n if (IS_WINDOWS) {\n // Check for itemPath like C: or C:foo\n if (itemPath.match(/^[A-Z]:[^\\\\/]|^[A-Z]:$/i)) {\n let cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n // Drive letter matches cwd? Expand to cwd\n if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {\n // Drive only, e.g. C:\n if (itemPath.length === 2) {\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}`;\n }\n // Drive + path, e.g. C:foo\n else {\n if (!cwd.endsWith('\\\\')) {\n cwd += '\\\\';\n }\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}${itemPath.substr(2)}`;\n }\n }\n // Different drive\n else {\n return `${itemPath[0]}:\\\\${itemPath.substr(2)}`;\n }\n }\n // Check for itemPath like \\ or \\foo\n else if (normalizeSeparators(itemPath).match(/^\\\\$|^\\\\[^\\\\]/)) {\n const cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n return `${cwd[0]}:\\\\${itemPath.substr(1)}`;\n }\n }\n assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);\n // Otherwise ensure root ends with a separator\n if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\\\'))) {\n // Intentionally empty\n }\n else {\n // Append separator\n root += path.sep;\n }\n return root + itemPath;\n}\nexports.ensureAbsoluteRoot = ensureAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\\\hello\\share` and `C:\\hello` (and using alternate separator).\n */\nfunction hasAbsoluteRoot(itemPath) {\n assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\\\hello\\share or C:\\hello\n return itemPath.startsWith('\\\\\\\\') || /^[A-Z]:\\\\/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasAbsoluteRoot = hasAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\`, `\\hello`, `\\\\hello\\share`, `C:`, and `C:\\hello` (and using alternate separator).\n */\nfunction hasRoot(itemPath) {\n assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\ or \\hello or \\\\hello\n // E.g. C: or C:\\hello\n return itemPath.startsWith('\\\\') || /^[A-Z]:/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasRoot = hasRoot;\n/**\n * Removes redundant slashes and converts `/` to `\\` on Windows\n */\nfunction normalizeSeparators(p) {\n p = p || '';\n // Windows\n if (IS_WINDOWS) {\n // Convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // Remove redundant slashes\n const isUnc = /^\\\\\\\\+[^\\\\]/.test(p); // e.g. \\\\hello\n return (isUnc ? '\\\\' : '') + p.replace(/\\\\\\\\+/g, '\\\\'); // preserve leading \\\\ for UNC\n }\n // Remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\nexports.normalizeSeparators = normalizeSeparators;\n/**\n * Normalizes the path separators and trims the trailing separator (when safe).\n * For example, `/foo/ => /foo` but `/ => /`\n */\nfunction safeTrimTrailingSeparator(p) {\n // Short-circuit if empty\n if (!p) {\n return '';\n }\n // Normalize separators\n p = normalizeSeparators(p);\n // No trailing slash\n if (!p.endsWith(path.sep)) {\n return p;\n }\n // Check '/' on Linux/macOS and '\\' on Windows\n if (p === path.sep) {\n return p;\n }\n // On Windows check if drive root. E.g. C:\\\n if (IS_WINDOWS && /^[A-Z]:\\\\$/i.test(p)) {\n return p;\n }\n // Otherwise trim trailing slash\n return p.substr(0, p.length - 1);\n}\nexports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;\n//# sourceMappingURL=internal-path-helper.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Helper class for parsing paths into segments\n */\nclass Path {\n /**\n * Constructs a Path\n * @param itemPath Path or array of segments\n */\n constructor(itemPath) {\n this.segments = [];\n // String\n if (typeof itemPath === 'string') {\n assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // Not rooted\n if (!pathHelper.hasRoot(itemPath)) {\n this.segments = itemPath.split(path.sep);\n }\n // Rooted\n else {\n // Add all segments, while not at the root\n let remaining = itemPath;\n let dir = pathHelper.dirname(remaining);\n while (dir !== remaining) {\n // Add the segment\n const basename = path.basename(remaining);\n this.segments.unshift(basename);\n // Truncate the last segment\n remaining = dir;\n dir = pathHelper.dirname(remaining);\n }\n // Remainder is the root\n this.segments.unshift(remaining);\n }\n }\n // Array\n else {\n // Must not be empty\n assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);\n // Each segment\n for (let i = 0; i < itemPath.length; i++) {\n let segment = itemPath[i];\n // Must not be empty\n assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);\n // Normalize slashes\n segment = pathHelper.normalizeSeparators(itemPath[i]);\n // Root segment\n if (i === 0 && pathHelper.hasRoot(segment)) {\n segment = pathHelper.safeTrimTrailingSeparator(segment);\n assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);\n this.segments.push(segment);\n }\n // All other segments\n else {\n // Must not contain slash\n assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);\n this.segments.push(segment);\n }\n }\n }\n }\n /**\n * Converts the path to it's string representation\n */\n toString() {\n // First segment\n let result = this.segments[0];\n // All others\n let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result));\n for (let i = 1; i < this.segments.length; i++) {\n if (skipSlash) {\n skipSlash = false;\n }\n else {\n result += path.sep;\n }\n result += this.segments[i];\n }\n return result;\n }\n}\nexports.Path = Path;\n//# sourceMappingURL=internal-path.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Given an array of patterns, returns an array of paths to search.\n * Duplicates and paths under other included paths are filtered out.\n */\nfunction getSearchPaths(patterns) {\n // Ignore negate patterns\n patterns = patterns.filter(x => !x.negate);\n // Create a map of all search paths\n const searchPathMap = {};\n for (const pattern of patterns) {\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n searchPathMap[key] = 'candidate';\n }\n const result = [];\n for (const pattern of patterns) {\n // Check if already included\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n if (searchPathMap[key] === 'included') {\n continue;\n }\n // Check for an ancestor search path\n let foundAncestor = false;\n let tempKey = key;\n let parent = pathHelper.dirname(tempKey);\n while (parent !== tempKey) {\n if (searchPathMap[parent]) {\n foundAncestor = true;\n break;\n }\n tempKey = parent;\n parent = pathHelper.dirname(tempKey);\n }\n // Include the search pattern in the result\n if (!foundAncestor) {\n result.push(pattern.searchPath);\n searchPathMap[key] = 'included';\n }\n }\n return result;\n}\nexports.getSearchPaths = getSearchPaths;\n/**\n * Matches the patterns against the path\n */\nfunction match(patterns, itemPath) {\n let result = internal_match_kind_1.MatchKind.None;\n for (const pattern of patterns) {\n if (pattern.negate) {\n result &= ~pattern.match(itemPath);\n }\n else {\n result |= pattern.match(itemPath);\n }\n }\n return result;\n}\nexports.match = match;\n/**\n * Checks whether to descend further into the directory\n */\nfunction partialMatch(patterns, itemPath) {\n return patterns.some(x => !x.negate && x.partialMatch(itemPath));\n}\nexports.partialMatch = partialMatch;\n//# sourceMappingURL=internal-pattern-helper.js.map","\"use strict\";\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst minimatch_1 = require(\"minimatch\");\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_path_1 = require(\"./internal-path\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass Pattern {\n constructor(patternOrNegate, segments, homedir) {\n /**\n * Indicates whether matches should be excluded from the result set\n */\n this.negate = false;\n // Pattern overload\n let pattern;\n if (typeof patternOrNegate === 'string') {\n pattern = patternOrNegate.trim();\n }\n // Segments overload\n else {\n // Convert to pattern\n segments = segments || [];\n assert_1.default(segments.length, `Parameter 'segments' must not empty`);\n const root = Pattern.getLiteral(segments[0]);\n assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);\n pattern = new internal_path_1.Path(segments).toString().trim();\n if (patternOrNegate) {\n pattern = `!${pattern}`;\n }\n }\n // Negate\n while (pattern.startsWith('!')) {\n this.negate = !this.negate;\n pattern = pattern.substr(1).trim();\n }\n // Normalize slashes and ensures absolute root\n pattern = Pattern.fixupPattern(pattern, homedir);\n // Segments\n this.segments = new internal_path_1.Path(pattern).segments;\n // Trailing slash indicates the pattern should only match directories, not regular files\n this.trailingSeparator = pathHelper\n .normalizeSeparators(pattern)\n .endsWith(path.sep);\n pattern = pathHelper.safeTrimTrailingSeparator(pattern);\n // Search path (literal path prior to the first glob segment)\n let foundGlob = false;\n const searchSegments = this.segments\n .map(x => Pattern.getLiteral(x))\n .filter(x => !foundGlob && !(foundGlob = x === ''));\n this.searchPath = new internal_path_1.Path(searchSegments).toString();\n // Root RegExp (required when determining partial match)\n this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : '');\n // Create minimatch\n const minimatchOptions = {\n dot: true,\n nobrace: true,\n nocase: IS_WINDOWS,\n nocomment: true,\n noext: true,\n nonegate: true\n };\n pattern = IS_WINDOWS ? pattern.replace(/\\\\/g, '/') : pattern;\n this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions);\n }\n /**\n * Matches the pattern against the specified path\n */\n match(itemPath) {\n // Last segment is globstar?\n if (this.segments[this.segments.length - 1] === '**') {\n // Normalize slashes\n itemPath = pathHelper.normalizeSeparators(itemPath);\n // Append a trailing slash. Otherwise Minimatch will not match the directory immediately\n // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns\n // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.\n if (!itemPath.endsWith(path.sep)) {\n // Note, this is safe because the constructor ensures the pattern has an absolute root.\n // For example, formats like C: and C:foo on Windows are resolved to an absolute root.\n itemPath = `${itemPath}${path.sep}`;\n }\n }\n else {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n }\n // Match\n if (this.minimatch.match(itemPath)) {\n return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All;\n }\n return internal_match_kind_1.MatchKind.None;\n }\n /**\n * Indicates whether the pattern may match descendants of the specified path\n */\n partialMatch(itemPath) {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // matchOne does not handle root path correctly\n if (pathHelper.dirname(itemPath) === itemPath) {\n return this.rootRegExp.test(itemPath);\n }\n return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\\\+/ : /\\/+/), this.minimatch.set[0], true);\n }\n /**\n * Escapes glob patterns within a path\n */\n static globEscape(s) {\n return (IS_WINDOWS ? s : s.replace(/\\\\/g, '\\\\\\\\')) // escape '\\' on Linux/macOS\n .replace(/(\\[)(?=[^/]+\\])/g, '[[]') // escape '[' when ']' follows within the path segment\n .replace(/\\?/g, '[?]') // escape '?'\n .replace(/\\*/g, '[*]'); // escape '*'\n }\n /**\n * Normalizes slashes and ensures absolute root\n */\n static fixupPattern(pattern, homedir) {\n // Empty\n assert_1.default(pattern, 'pattern cannot be empty');\n // Must not contain `.` segment, unless first segment\n // Must not contain `..` segment\n const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));\n assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);\n // Must not contain globs in root, e.g. Windows UNC path \\\\foo\\b*r\n assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);\n // Normalize slashes\n pattern = pathHelper.normalizeSeparators(pattern);\n // Replace leading `.` segment\n if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) {\n pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1);\n }\n // Replace leading `~` segment\n else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {\n homedir = homedir || os.homedir();\n assert_1.default(homedir, 'Unable to determine HOME directory');\n assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);\n pattern = Pattern.globEscape(homedir) + pattern.substr(1);\n }\n // Replace relative drive root, e.g. pattern is C: or C:foo\n else if (IS_WINDOWS &&\n (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\\\]/i))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', pattern.substr(0, 2));\n if (pattern.length > 2 && !root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(2);\n }\n // Replace relative root, e.g. pattern is \\ or \\foo\n else if (IS_WINDOWS && (pattern === '\\\\' || pattern.match(/^\\\\[^\\\\]/))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', '\\\\');\n if (!root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(1);\n }\n // Otherwise ensure absolute root\n else {\n pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern);\n }\n return pathHelper.normalizeSeparators(pattern);\n }\n /**\n * Attempts to unescape a pattern segment to create a literal path segment.\n * Otherwise returns empty string.\n */\n static getLiteral(segment) {\n let literal = '';\n for (let i = 0; i < segment.length; i++) {\n const c = segment[i];\n // Escape\n if (c === '\\\\' && !IS_WINDOWS && i + 1 < segment.length) {\n literal += segment[++i];\n continue;\n }\n // Wildcard\n else if (c === '*' || c === '?') {\n return '';\n }\n // Character set\n else if (c === '[' && i + 1 < segment.length) {\n let set = '';\n let closed = -1;\n for (let i2 = i + 1; i2 < segment.length; i2++) {\n const c2 = segment[i2];\n // Escape\n if (c2 === '\\\\' && !IS_WINDOWS && i2 + 1 < segment.length) {\n set += segment[++i2];\n continue;\n }\n // Closed\n else if (c2 === ']') {\n closed = i2;\n break;\n }\n // Otherwise\n else {\n set += c2;\n }\n }\n // Closed?\n if (closed >= 0) {\n // Cannot convert\n if (set.length > 1) {\n return '';\n }\n // Convert to literal\n if (set) {\n literal += set;\n i = closed;\n continue;\n }\n }\n // Otherwise fall thru\n }\n // Append\n literal += c;\n }\n return literal;\n }\n /**\n * Escapes regexp special characters\n * https://javascript.info/regexp-escaping\n */\n static regExpEscape(s) {\n return s.replace(/[[\\\\^$.|?*+()]/g, '\\\\$&');\n }\n}\nexports.Pattern = Pattern;\n//# sourceMappingURL=internal-pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass SearchState {\n constructor(path, level) {\n this.path = path;\n this.level = level;\n }\n}\nexports.SearchState = SearchState;\n//# sourceMappingURL=internal-search-state.js.map","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = { sep: '/' }\ntry {\n path = require('path')\n} catch (er) {}\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n a = a || {}\n b = b || {}\n var t = {}\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || !Object.keys(def).length) return minimatch\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig.minimatch(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n if (!def || !Object.keys(def).length) return Minimatch\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('glob pattern string required')\n }\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n // \"\" only matches \"\"\n if (pattern.trim() === '') return p === ''\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n if (typeof pattern !== 'string') {\n throw new TypeError('glob pattern string required')\n }\n\n if (!options) options = {}\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n // don't do it more than once.\n if (this._made) return\n\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = console.error\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n if (typeof pattern === 'undefined') {\n throw new TypeError('undefined pattern')\n }\n\n if (options.nobrace ||\n !pattern.match(/\\{.*\\}/)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n if (pattern.length > 1024 * 64) {\n throw new TypeError('pattern is too long')\n }\n\n var options = this.options\n\n // shortcuts\n if (!options.noglobstar && pattern === '**') return GLOBSTAR\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n case '/':\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n if (inClass) {\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '.':\n case '[':\n case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = match\nfunction match (f, partial) {\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n var options = this.options\n\n this.debug('matchOne',\n { 'this': this, file: file, pattern: pattern })\n\n this.debug('matchOne', file.length, pattern.length)\n\n for (var fi = 0,\n pi = 0,\n fl = file.length,\n pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n if (p === false) return false\n\n if (p === GLOBSTAR) {\n this.debug('GLOBSTAR', [pattern, p, f])\n\n // \"**\"\n // a/**/b/**/c would match the following:\n // a/b/x/y/z/c\n // a/x/y/z/b/c\n // a/b/x/b/x/c\n // a/b/c\n // To do this, take the rest of the pattern after\n // the **, and see if it would match the file remainder.\n // If so, return success.\n // If not, the ** \"swallows\" a segment, and try again.\n // This is recursively awful.\n //\n // a/**/b/**/c matching a/b/x/y/z/c\n // - a matches a\n // - doublestar\n // - matchOne(b/x/y/z/c, b/**/c)\n // - b matches b\n // - doublestar\n // - matchOne(x/y/z/c, c) -> no\n // - matchOne(y/z/c, c) -> no\n // - matchOne(z/c, c) -> no\n // - matchOne(c, c) yes, hit\n var fr = fi\n var pr = pi + 1\n if (pr === pl) {\n this.debug('** at the end')\n // a ** at the end will just swallow the rest.\n // We have found a match.\n // however, it will not swallow /.x, unless\n // options.dot is set.\n // . and .. are *never* matched by **, for explosively\n // exponential reasons.\n for (; fi < fl; fi++) {\n if (file[fi] === '.' || file[fi] === '..' ||\n (!options.dot && file[fi].charAt(0) === '.')) return false\n }\n return true\n }\n\n // ok, let's see if we can swallow whatever we can.\n while (fr < fl) {\n var swallowee = file[fr]\n\n this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n // XXX remove this slice. Just pass the start index.\n if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n this.debug('globstar found match!', fr, fl, swallowee)\n // found a match.\n return true\n } else {\n // can't swallow \".\" or \"..\" ever.\n // can only swallow \".foo\" when explicitly asked.\n if (swallowee === '.' || swallowee === '..' ||\n (!options.dot && swallowee.charAt(0) === '.')) {\n this.debug('dot detected!', file, fr, pattern, pr)\n break\n }\n\n // ** swallows a segment, and continue.\n this.debug('globstar swallow a segment, and continue')\n fr++\n }\n }\n\n // no match was found.\n // However, in partial mode, we can't say this is necessarily over.\n // If there's more *pattern* left, then\n if (partial) {\n // ran out of file\n this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n if (fr === fl) return true\n }\n return false\n }\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n if (options.nocase) {\n hit = f.toLowerCase() === p.toLowerCase()\n } else {\n hit = f === p\n }\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')\n return emptyFileEnd\n }\n\n // should be unreachable.\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","module.exports = /^[a-f0-9]{40}$/i\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar resolveSeq = require('./resolveSeq-4a68b39b.js');\nvar Schema = require('./Schema-42e9705c.js');\n\nconst defaultOptions = {\n anchorPrefix: 'a',\n customTags: null,\n indent: 2,\n indentSeq: true,\n keepCstNodes: false,\n keepNodeTypes: true,\n keepBlobsInJSON: true,\n mapAsMap: false,\n maxAliasCount: 100,\n prettyErrors: false,\n // TODO Set true in v2\n simpleKeys: false,\n version: '1.2'\n};\nconst scalarOptions = {\n get binary() {\n return resolveSeq.binaryOptions;\n },\n\n set binary(opt) {\n Object.assign(resolveSeq.binaryOptions, opt);\n },\n\n get bool() {\n return resolveSeq.boolOptions;\n },\n\n set bool(opt) {\n Object.assign(resolveSeq.boolOptions, opt);\n },\n\n get int() {\n return resolveSeq.intOptions;\n },\n\n set int(opt) {\n Object.assign(resolveSeq.intOptions, opt);\n },\n\n get null() {\n return resolveSeq.nullOptions;\n },\n\n set null(opt) {\n Object.assign(resolveSeq.nullOptions, opt);\n },\n\n get str() {\n return resolveSeq.strOptions;\n },\n\n set str(opt) {\n Object.assign(resolveSeq.strOptions, opt);\n }\n\n};\nconst documentOptions = {\n '1.0': {\n schema: 'yaml-1.1',\n merge: true,\n tagPrefixes: [{\n handle: '!',\n prefix: PlainValue.defaultTagPrefix\n }, {\n handle: '!!',\n prefix: 'tag:private.yaml.org,2002:'\n }]\n },\n '1.1': {\n schema: 'yaml-1.1',\n merge: true,\n tagPrefixes: [{\n handle: '!',\n prefix: '!'\n }, {\n handle: '!!',\n prefix: PlainValue.defaultTagPrefix\n }]\n },\n '1.2': {\n schema: 'core',\n merge: false,\n tagPrefixes: [{\n handle: '!',\n prefix: '!'\n }, {\n handle: '!!',\n prefix: PlainValue.defaultTagPrefix\n }]\n }\n};\n\nfunction stringifyTag(doc, tag) {\n if ((doc.version || doc.options.version) === '1.0') {\n const priv = tag.match(/^tag:private\\.yaml\\.org,2002:([^:/]+)$/);\n if (priv) return '!' + priv[1];\n const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\\.yaml\\.org,2002:(.*)/);\n return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, '')}`;\n }\n\n let p = doc.tagPrefixes.find(p => tag.indexOf(p.prefix) === 0);\n\n if (!p) {\n const dtp = doc.getDefaults().tagPrefixes;\n p = dtp && dtp.find(p => tag.indexOf(p.prefix) === 0);\n }\n\n if (!p) return tag[0] === '!' ? tag : `!<${tag}>`;\n const suffix = tag.substr(p.prefix.length).replace(/[!,[\\]{}]/g, ch => ({\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n })[ch]);\n return p.handle + suffix;\n}\n\nfunction getTagObject(tags, item) {\n if (item instanceof resolveSeq.Alias) return resolveSeq.Alias;\n\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0) return match.find(t => t.format === item.format) || match[0];\n }\n\n let tagObj, obj;\n\n if (item instanceof resolveSeq.Scalar) {\n obj = item.value; // TODO: deprecate/remove class check\n\n const match = tags.filter(t => t.identify && t.identify(obj) || t.class && obj instanceof t.class);\n tagObj = match.find(t => t.format === item.format) || match.find(t => !t.format);\n } else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n\n if (!tagObj) {\n const name = obj && obj.constructor ? obj.constructor.name : typeof obj;\n throw new Error(`Tag not resolved for ${name} value`);\n }\n\n return tagObj;\n} // needs to be called before value stringifier to allow for circular anchor refs\n\n\nfunction stringifyProps(node, tagObj, {\n anchors,\n doc\n}) {\n const props = [];\n const anchor = doc.anchors.getName(node);\n\n if (anchor) {\n anchors[anchor] = node;\n props.push(`&${anchor}`);\n }\n\n if (node.tag) {\n props.push(stringifyTag(doc, node.tag));\n } else if (!tagObj.default) {\n props.push(stringifyTag(doc, tagObj.tag));\n }\n\n return props.join(' ');\n}\n\nfunction stringify(item, ctx, onComment, onChompKeep) {\n const {\n anchors,\n schema\n } = ctx.doc;\n let tagObj;\n\n if (!(item instanceof resolveSeq.Node)) {\n const createCtx = {\n aliasNodes: [],\n onTagObj: o => tagObj = o,\n prevObjects: new Map()\n };\n item = schema.createNode(item, true, null, createCtx);\n\n for (const alias of createCtx.aliasNodes) {\n alias.source = alias.source.node;\n let name = anchors.getName(alias.source);\n\n if (!name) {\n name = anchors.newName();\n anchors.map[name] = alias.source;\n }\n }\n }\n\n if (item instanceof resolveSeq.Pair) return item.toString(ctx, onComment, onChompKeep);\n if (!tagObj) tagObj = getTagObject(schema.tags, item);\n const props = stringifyProps(item, tagObj, ctx);\n if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function' ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof resolveSeq.Scalar ? resolveSeq.stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep);\n if (!props) return str;\n return item instanceof resolveSeq.Scalar || str[0] === '{' || str[0] === '[' ? `${props} ${str}` : `${props}\\n${ctx.indent}${str}`;\n}\n\nclass Anchors {\n static validAnchorNode(node) {\n return node instanceof resolveSeq.Scalar || node instanceof resolveSeq.YAMLSeq || node instanceof resolveSeq.YAMLMap;\n }\n\n constructor(prefix) {\n PlainValue._defineProperty(this, \"map\", {});\n\n this.prefix = prefix;\n }\n\n createAlias(node, name) {\n this.setAnchor(node, name);\n return new resolveSeq.Alias(node);\n }\n\n createMergePair(...sources) {\n const merge = new resolveSeq.Merge();\n merge.value.items = sources.map(s => {\n if (s instanceof resolveSeq.Alias) {\n if (s.source instanceof resolveSeq.YAMLMap) return s;\n } else if (s instanceof resolveSeq.YAMLMap) {\n return this.createAlias(s);\n }\n\n throw new Error('Merge sources must be Map nodes or their Aliases');\n });\n return merge;\n }\n\n getName(node) {\n const {\n map\n } = this;\n return Object.keys(map).find(a => map[a] === node);\n }\n\n getNames() {\n return Object.keys(this.map);\n }\n\n getNode(name) {\n return this.map[name];\n }\n\n newName(prefix) {\n if (!prefix) prefix = this.prefix;\n const names = Object.keys(this.map);\n\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!names.includes(name)) return name;\n }\n } // During parsing, map & aliases contain CST nodes\n\n\n resolveNodes() {\n const {\n map,\n _cstAliases\n } = this;\n Object.keys(map).forEach(a => {\n map[a] = map[a].resolved;\n });\n\n _cstAliases.forEach(a => {\n a.source = a.source.resolved;\n });\n\n delete this._cstAliases;\n }\n\n setAnchor(node, name) {\n if (node != null && !Anchors.validAnchorNode(node)) {\n throw new Error('Anchors may only be set for Scalar, Seq and Map nodes');\n }\n\n if (name && /[\\x00-\\x19\\s,[\\]{}]/.test(name)) {\n throw new Error('Anchor names must not contain whitespace or control characters');\n }\n\n const {\n map\n } = this;\n const prev = node && Object.keys(map).find(a => map[a] === node);\n\n if (prev) {\n if (!name) {\n return prev;\n } else if (prev !== name) {\n delete map[prev];\n map[name] = node;\n }\n } else {\n if (!name) {\n if (!node) return null;\n name = this.newName();\n }\n\n map[name] = node;\n }\n\n return name;\n }\n\n}\n\nconst visit = (node, tags) => {\n if (node && typeof node === 'object') {\n const {\n tag\n } = node;\n\n if (node instanceof resolveSeq.Collection) {\n if (tag) tags[tag] = true;\n node.items.forEach(n => visit(n, tags));\n } else if (node instanceof resolveSeq.Pair) {\n visit(node.key, tags);\n visit(node.value, tags);\n } else if (node instanceof resolveSeq.Scalar) {\n if (tag) tags[tag] = true;\n }\n }\n\n return tags;\n};\n\nconst listTagNames = node => Object.keys(visit(node, {}));\n\nfunction parseContents(doc, contents) {\n const comments = {\n before: [],\n after: []\n };\n let body = undefined;\n let spaceBefore = false;\n\n for (const node of contents) {\n if (node.valueRange) {\n if (body !== undefined) {\n const msg = 'Document contains trailing content not separated by a ... or --- line';\n doc.errors.push(new PlainValue.YAMLSyntaxError(node, msg));\n break;\n }\n\n const res = resolveSeq.resolveNode(doc, node);\n\n if (spaceBefore) {\n res.spaceBefore = true;\n spaceBefore = false;\n }\n\n body = res;\n } else if (node.comment !== null) {\n const cc = body === undefined ? comments.before : comments.after;\n cc.push(node.comment);\n } else if (node.type === PlainValue.Type.BLANK_LINE) {\n spaceBefore = true;\n\n if (body === undefined && comments.before.length > 0 && !doc.commentBefore) {\n // space-separated comments at start are parsed as document comments\n doc.commentBefore = comments.before.join('\\n');\n comments.before = [];\n }\n }\n }\n\n doc.contents = body || null;\n\n if (!body) {\n doc.comment = comments.before.concat(comments.after).join('\\n') || null;\n } else {\n const cb = comments.before.join('\\n');\n\n if (cb) {\n const cbNode = body instanceof resolveSeq.Collection && body.items[0] ? body.items[0] : body;\n cbNode.commentBefore = cbNode.commentBefore ? `${cb}\\n${cbNode.commentBefore}` : cb;\n }\n\n doc.comment = comments.after.join('\\n') || null;\n }\n}\n\nfunction resolveTagDirective({\n tagPrefixes\n}, directive) {\n const [handle, prefix] = directive.parameters;\n\n if (!handle || !prefix) {\n const msg = 'Insufficient parameters given for %TAG directive';\n throw new PlainValue.YAMLSemanticError(directive, msg);\n }\n\n if (tagPrefixes.some(p => p.handle === handle)) {\n const msg = 'The %TAG directive must only be given at most once per handle in the same document.';\n throw new PlainValue.YAMLSemanticError(directive, msg);\n }\n\n return {\n handle,\n prefix\n };\n}\n\nfunction resolveYamlDirective(doc, directive) {\n let [version] = directive.parameters;\n if (directive.name === 'YAML:1.0') version = '1.0';\n\n if (!version) {\n const msg = 'Insufficient parameters given for %YAML directive';\n throw new PlainValue.YAMLSemanticError(directive, msg);\n }\n\n if (!documentOptions[version]) {\n const v0 = doc.version || doc.options.version;\n const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version}`;\n doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));\n }\n\n return version;\n}\n\nfunction parseDirectives(doc, directives, prevDoc) {\n const directiveComments = [];\n let hasDirectives = false;\n\n for (const directive of directives) {\n const {\n comment,\n name\n } = directive;\n\n switch (name) {\n case 'TAG':\n try {\n doc.tagPrefixes.push(resolveTagDirective(doc, directive));\n } catch (error) {\n doc.errors.push(error);\n }\n\n hasDirectives = true;\n break;\n\n case 'YAML':\n case 'YAML:1.0':\n if (doc.version) {\n const msg = 'The %YAML directive must only be given at most once per document.';\n doc.errors.push(new PlainValue.YAMLSemanticError(directive, msg));\n }\n\n try {\n doc.version = resolveYamlDirective(doc, directive);\n } catch (error) {\n doc.errors.push(error);\n }\n\n hasDirectives = true;\n break;\n\n default:\n if (name) {\n const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`;\n doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));\n }\n\n }\n\n if (comment) directiveComments.push(comment);\n }\n\n if (prevDoc && !hasDirectives && '1.1' === (doc.version || prevDoc.version || doc.options.version)) {\n const copyTagPrefix = ({\n handle,\n prefix\n }) => ({\n handle,\n prefix\n });\n\n doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix);\n doc.version = prevDoc.version;\n }\n\n doc.commentBefore = directiveComments.join('\\n') || null;\n}\n\nfunction assertCollection(contents) {\n if (contents instanceof resolveSeq.Collection) return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nclass Document {\n constructor(options) {\n this.anchors = new Anchors(options.anchorPrefix);\n this.commentBefore = null;\n this.comment = null;\n this.contents = null;\n this.directivesEndMarker = null;\n this.errors = [];\n this.options = options;\n this.schema = null;\n this.tagPrefixes = [];\n this.version = null;\n this.warnings = [];\n }\n\n add(value) {\n assertCollection(this.contents);\n return this.contents.add(value);\n }\n\n addIn(path, value) {\n assertCollection(this.contents);\n this.contents.addIn(path, value);\n }\n\n delete(key) {\n assertCollection(this.contents);\n return this.contents.delete(key);\n }\n\n deleteIn(path) {\n if (resolveSeq.isEmptyPath(path)) {\n if (this.contents == null) return false;\n this.contents = null;\n return true;\n }\n\n assertCollection(this.contents);\n return this.contents.deleteIn(path);\n }\n\n getDefaults() {\n return Document.defaults[this.version] || Document.defaults[this.options.version] || {};\n }\n\n get(key, keepScalar) {\n return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : undefined;\n }\n\n getIn(path, keepScalar) {\n if (resolveSeq.isEmptyPath(path)) return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents;\n return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path, keepScalar) : undefined;\n }\n\n has(key) {\n return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false;\n }\n\n hasIn(path) {\n if (resolveSeq.isEmptyPath(path)) return this.contents !== undefined;\n return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path) : false;\n }\n\n set(key, value) {\n assertCollection(this.contents);\n this.contents.set(key, value);\n }\n\n setIn(path, value) {\n if (resolveSeq.isEmptyPath(path)) this.contents = value;else {\n assertCollection(this.contents);\n this.contents.setIn(path, value);\n }\n }\n\n setSchema(id, customTags) {\n if (!id && !customTags && this.schema) return;\n if (typeof id === 'number') id = id.toFixed(1);\n\n if (id === '1.0' || id === '1.1' || id === '1.2') {\n if (this.version) this.version = id;else this.options.version = id;\n delete this.options.schema;\n } else if (id && typeof id === 'string') {\n this.options.schema = id;\n }\n\n if (Array.isArray(customTags)) this.options.customTags = customTags;\n const opt = Object.assign({}, this.getDefaults(), this.options);\n this.schema = new Schema.Schema(opt);\n }\n\n parse(node, prevDoc) {\n if (this.options.keepCstNodes) this.cstNode = node;\n if (this.options.keepNodeTypes) this.type = 'DOCUMENT';\n const {\n directives = [],\n contents = [],\n directivesEndMarker,\n error,\n valueRange\n } = node;\n\n if (error) {\n if (!error.source) error.source = this;\n this.errors.push(error);\n }\n\n parseDirectives(this, directives, prevDoc);\n if (directivesEndMarker) this.directivesEndMarker = true;\n this.range = valueRange ? [valueRange.start, valueRange.end] : null;\n this.setSchema();\n this.anchors._cstAliases = [];\n parseContents(this, contents);\n this.anchors.resolveNodes();\n\n if (this.options.prettyErrors) {\n for (const error of this.errors) if (error instanceof PlainValue.YAMLError) error.makePretty();\n\n for (const warn of this.warnings) if (warn instanceof PlainValue.YAMLError) warn.makePretty();\n }\n\n return this;\n }\n\n listNonDefaultTags() {\n return listTagNames(this.contents).filter(t => t.indexOf(Schema.Schema.defaultPrefix) !== 0);\n }\n\n setTagPrefix(handle, prefix) {\n if (handle[0] !== '!' || handle[handle.length - 1] !== '!') throw new Error('Handle must start and end with !');\n\n if (prefix) {\n const prev = this.tagPrefixes.find(p => p.handle === handle);\n if (prev) prev.prefix = prefix;else this.tagPrefixes.push({\n handle,\n prefix\n });\n } else {\n this.tagPrefixes = this.tagPrefixes.filter(p => p.handle !== handle);\n }\n }\n\n toJSON(arg, onAnchor) {\n const {\n keepBlobsInJSON,\n mapAsMap,\n maxAliasCount\n } = this.options;\n const keep = keepBlobsInJSON && (typeof arg !== 'string' || !(this.contents instanceof resolveSeq.Scalar));\n const ctx = {\n doc: this,\n indentStep: ' ',\n keep,\n mapAsMap: keep && !!mapAsMap,\n maxAliasCount,\n stringify // Requiring directly in Pair would create circular dependencies\n\n };\n const anchorNames = Object.keys(this.anchors.map);\n if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map(name => [this.anchors.map[name], {\n alias: [],\n aliasCount: 0,\n count: 1\n }]));\n const res = resolveSeq.toJSON(this.contents, arg, ctx);\n if (typeof onAnchor === 'function' && ctx.anchors) for (const {\n count,\n res\n } of ctx.anchors.values()) onAnchor(res, count);\n return res;\n }\n\n toString() {\n if (this.errors.length > 0) throw new Error('Document with errors cannot be stringified');\n const indentSize = this.options.indent;\n\n if (!Number.isInteger(indentSize) || indentSize <= 0) {\n const s = JSON.stringify(indentSize);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n\n this.setSchema();\n const lines = [];\n let hasDirectives = false;\n\n if (this.version) {\n let vd = '%YAML 1.2';\n\n if (this.schema.name === 'yaml-1.1') {\n if (this.version === '1.0') vd = '%YAML:1.0';else if (this.version === '1.1') vd = '%YAML 1.1';\n }\n\n lines.push(vd);\n hasDirectives = true;\n }\n\n const tagNames = this.listNonDefaultTags();\n this.tagPrefixes.forEach(({\n handle,\n prefix\n }) => {\n if (tagNames.some(t => t.indexOf(prefix) === 0)) {\n lines.push(`%TAG ${handle} ${prefix}`);\n hasDirectives = true;\n }\n });\n if (hasDirectives || this.directivesEndMarker) lines.push('---');\n\n if (this.commentBefore) {\n if (hasDirectives || !this.directivesEndMarker) lines.unshift('');\n lines.unshift(this.commentBefore.replace(/^/gm, '#'));\n }\n\n const ctx = {\n anchors: {},\n doc: this,\n indent: '',\n indentStep: ' '.repeat(indentSize),\n stringify // Requiring directly in nodes would create circular dependencies\n\n };\n let chompKeep = false;\n let contentComment = null;\n\n if (this.contents) {\n if (this.contents instanceof resolveSeq.Node) {\n if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push('');\n if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, '#')); // top-level block scalars need to be indented if followed by a comment\n\n ctx.forceBlockIndent = !!this.comment;\n contentComment = this.contents.comment;\n }\n\n const onChompKeep = contentComment ? null : () => chompKeep = true;\n const body = stringify(this.contents, ctx, () => contentComment = null, onChompKeep);\n lines.push(resolveSeq.addComment(body, '', contentComment));\n } else if (this.contents !== undefined) {\n lines.push(stringify(this.contents, ctx));\n }\n\n if (this.comment) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') lines.push('');\n lines.push(this.comment.replace(/^/gm, '#'));\n }\n\n return lines.join('\\n') + '\\n';\n }\n\n}\n\nPlainValue._defineProperty(Document, \"defaults\", documentOptions);\n\nexports.Document = Document;\nexports.defaultOptions = defaultOptions;\nexports.scalarOptions = scalarOptions;\n","'use strict';\n\nconst Char = {\n ANCHOR: '&',\n COMMENT: '#',\n TAG: '!',\n DIRECTIVES_END: '-',\n DOCUMENT_END: '.'\n};\nconst Type = {\n ALIAS: 'ALIAS',\n BLANK_LINE: 'BLANK_LINE',\n BLOCK_FOLDED: 'BLOCK_FOLDED',\n BLOCK_LITERAL: 'BLOCK_LITERAL',\n COMMENT: 'COMMENT',\n DIRECTIVE: 'DIRECTIVE',\n DOCUMENT: 'DOCUMENT',\n FLOW_MAP: 'FLOW_MAP',\n FLOW_SEQ: 'FLOW_SEQ',\n MAP: 'MAP',\n MAP_KEY: 'MAP_KEY',\n MAP_VALUE: 'MAP_VALUE',\n PLAIN: 'PLAIN',\n QUOTE_DOUBLE: 'QUOTE_DOUBLE',\n QUOTE_SINGLE: 'QUOTE_SINGLE',\n SEQ: 'SEQ',\n SEQ_ITEM: 'SEQ_ITEM'\n};\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nconst defaultTags = {\n MAP: 'tag:yaml.org,2002:map',\n SEQ: 'tag:yaml.org,2002:seq',\n STR: 'tag:yaml.org,2002:str'\n};\n\nfunction findLineStarts(src) {\n const ls = [0];\n let offset = src.indexOf('\\n');\n\n while (offset !== -1) {\n offset += 1;\n ls.push(offset);\n offset = src.indexOf('\\n', offset);\n }\n\n return ls;\n}\n\nfunction getSrcInfo(cst) {\n let lineStarts, src;\n\n if (typeof cst === 'string') {\n lineStarts = findLineStarts(cst);\n src = cst;\n } else {\n if (Array.isArray(cst)) cst = cst[0];\n\n if (cst && cst.context) {\n if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src);\n lineStarts = cst.lineStarts;\n src = cst.context.src;\n }\n }\n\n return {\n lineStarts,\n src\n };\n}\n/**\n * @typedef {Object} LinePos - One-indexed position in the source\n * @property {number} line\n * @property {number} col\n */\n\n/**\n * Determine the line/col position matching a character offset.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns a one-indexed `{ line, col }` location if found, or\n * `undefined` otherwise.\n *\n * @param {number} offset\n * @param {string|Document|Document[]} cst\n * @returns {?LinePos}\n */\n\n\nfunction getLinePos(offset, cst) {\n if (typeof offset !== 'number' || offset < 0) return null;\n const {\n lineStarts,\n src\n } = getSrcInfo(cst);\n if (!lineStarts || !src || offset > src.length) return null;\n\n for (let i = 0; i < lineStarts.length; ++i) {\n const start = lineStarts[i];\n\n if (offset < start) {\n return {\n line: i,\n col: offset - lineStarts[i - 1] + 1\n };\n }\n\n if (offset === start) return {\n line: i + 1,\n col: 1\n };\n }\n\n const line = lineStarts.length;\n return {\n line,\n col: offset - lineStarts[line - 1] + 1\n };\n}\n/**\n * Get a specified line from the source.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns the line as a string if found, or `null` otherwise.\n *\n * @param {number} line One-indexed line number\n * @param {string|Document|Document[]} cst\n * @returns {?string}\n */\n\nfunction getLine(line, cst) {\n const {\n lineStarts,\n src\n } = getSrcInfo(cst);\n if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;\n const start = lineStarts[line - 1];\n let end = lineStarts[line]; // undefined for last line; that's ok for slice()\n\n while (end && end > start && src[end - 1] === '\\n') --end;\n\n return src.slice(start, end);\n}\n/**\n * Pretty-print the starting line from the source indicated by the range `pos`\n *\n * Trims output to `maxWidth` chars while keeping the starting column visible,\n * using `…` at either end to indicate dropped characters.\n *\n * Returns a two-line string (or `null`) with `\\n` as separator; the second line\n * will hold appropriately indented `^` marks indicating the column range.\n *\n * @param {Object} pos\n * @param {LinePos} pos.start\n * @param {LinePos} [pos.end]\n * @param {string|Document|Document[]*} cst\n * @param {number} [maxWidth=80]\n * @returns {?string}\n */\n\nfunction getPrettyContext({\n start,\n end\n}, cst, maxWidth = 80) {\n let src = getLine(start.line, cst);\n if (!src) return null;\n let {\n col\n } = start;\n\n if (src.length > maxWidth) {\n if (col <= maxWidth - 10) {\n src = src.substr(0, maxWidth - 1) + '…';\n } else {\n const halfWidth = Math.round(maxWidth / 2);\n if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + '…';\n col -= src.length - maxWidth;\n src = '…' + src.substr(1 - maxWidth);\n }\n }\n\n let errLen = 1;\n let errEnd = '';\n\n if (end) {\n if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) {\n errLen = end.col - start.col;\n } else {\n errLen = Math.min(src.length + 1, maxWidth) - col;\n errEnd = '…';\n }\n }\n\n const offset = col > 1 ? ' '.repeat(col - 1) : '';\n const err = '^'.repeat(errLen);\n return `${src}\\n${offset}${err}${errEnd}`;\n}\n\nclass Range {\n static copy(orig) {\n return new Range(orig.start, orig.end);\n }\n\n constructor(start, end) {\n this.start = start;\n this.end = end || start;\n }\n\n isEmpty() {\n return typeof this.start !== 'number' || !this.end || this.end <= this.start;\n }\n /**\n * Set `origStart` and `origEnd` to point to the original source range for\n * this node, which may differ due to dropped CR characters.\n *\n * @param {number[]} cr - Positions of dropped CR characters\n * @param {number} offset - Starting index of `cr` from the last call\n * @returns {number} - The next offset, matching the one found for `origStart`\n */\n\n\n setOrigRange(cr, offset) {\n const {\n start,\n end\n } = this;\n\n if (cr.length === 0 || end <= cr[0]) {\n this.origStart = start;\n this.origEnd = end;\n return offset;\n }\n\n let i = offset;\n\n while (i < cr.length) {\n if (cr[i] > start) break;else ++i;\n }\n\n this.origStart = start + i;\n const nextOffset = i;\n\n while (i < cr.length) {\n // if end was at \\n, it should now be at \\r\n if (cr[i] >= end) break;else ++i;\n }\n\n this.origEnd = end + i;\n return nextOffset;\n }\n\n}\n\n/** Root class of all nodes */\n\nclass Node {\n static addStringTerminator(src, offset, str) {\n if (str[str.length - 1] === '\\n') return str;\n const next = Node.endOfWhiteSpace(src, offset);\n return next >= src.length || src[next] === '\\n' ? str + '\\n' : str;\n } // ^(---|...)\n\n\n static atDocumentBoundary(src, offset, sep) {\n const ch0 = src[offset];\n if (!ch0) return true;\n const prev = src[offset - 1];\n if (prev && prev !== '\\n') return false;\n\n if (sep) {\n if (ch0 !== sep) return false;\n } else {\n if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false;\n }\n\n const ch1 = src[offset + 1];\n const ch2 = src[offset + 2];\n if (ch1 !== ch0 || ch2 !== ch0) return false;\n const ch3 = src[offset + 3];\n return !ch3 || ch3 === '\\n' || ch3 === '\\t' || ch3 === ' ';\n }\n\n static endOfIdentifier(src, offset) {\n let ch = src[offset];\n const isVerbatim = ch === '<';\n const notOk = isVerbatim ? ['\\n', '\\t', ' ', '>'] : ['\\n', '\\t', ' ', '[', ']', '{', '}', ','];\n\n while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1];\n\n if (isVerbatim && ch === '>') offset += 1;\n return offset;\n }\n\n static endOfIndent(src, offset) {\n let ch = src[offset];\n\n while (ch === ' ') ch = src[offset += 1];\n\n return offset;\n }\n\n static endOfLine(src, offset) {\n let ch = src[offset];\n\n while (ch && ch !== '\\n') ch = src[offset += 1];\n\n return offset;\n }\n\n static endOfWhiteSpace(src, offset) {\n let ch = src[offset];\n\n while (ch === '\\t' || ch === ' ') ch = src[offset += 1];\n\n return offset;\n }\n\n static startOfLine(src, offset) {\n let ch = src[offset - 1];\n if (ch === '\\n') return offset;\n\n while (ch && ch !== '\\n') ch = src[offset -= 1];\n\n return offset + 1;\n }\n /**\n * End of indentation, or null if the line's indent level is not more\n * than `indent`\n *\n * @param {string} src\n * @param {number} indent\n * @param {number} lineStart\n * @returns {?number}\n */\n\n\n static endOfBlockIndent(src, indent, lineStart) {\n const inEnd = Node.endOfIndent(src, lineStart);\n\n if (inEnd > lineStart + indent) {\n return inEnd;\n } else {\n const wsEnd = Node.endOfWhiteSpace(src, inEnd);\n const ch = src[wsEnd];\n if (!ch || ch === '\\n') return wsEnd;\n }\n\n return null;\n }\n\n static atBlank(src, offset, endAsBlank) {\n const ch = src[offset];\n return ch === '\\n' || ch === '\\t' || ch === ' ' || endAsBlank && !ch;\n }\n\n static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) {\n if (!ch || indentDiff < 0) return false;\n if (indentDiff > 0) return true;\n return indicatorAsIndent && ch === '-';\n } // should be at line or string end, or at next non-whitespace char\n\n\n static normalizeOffset(src, offset) {\n const ch = src[offset];\n return !ch ? offset : ch !== '\\n' && src[offset - 1] === '\\n' ? offset - 1 : Node.endOfWhiteSpace(src, offset);\n } // fold single newline into space, multiple newlines to N - 1 newlines\n // presumes src[offset] === '\\n'\n\n\n static foldNewline(src, offset, indent) {\n let inCount = 0;\n let error = false;\n let fold = '';\n let ch = src[offset + 1];\n\n while (ch === ' ' || ch === '\\t' || ch === '\\n') {\n switch (ch) {\n case '\\n':\n inCount = 0;\n offset += 1;\n fold += '\\n';\n break;\n\n case '\\t':\n if (inCount <= indent) error = true;\n offset = Node.endOfWhiteSpace(src, offset + 2) - 1;\n break;\n\n case ' ':\n inCount += 1;\n offset += 1;\n break;\n }\n\n ch = src[offset + 1];\n }\n\n if (!fold) fold = ' ';\n if (ch && inCount <= indent) error = true;\n return {\n fold,\n offset,\n error\n };\n }\n\n constructor(type, props, context) {\n Object.defineProperty(this, 'context', {\n value: context || null,\n writable: true\n });\n this.error = null;\n this.range = null;\n this.valueRange = null;\n this.props = props || [];\n this.type = type;\n this.value = null;\n }\n\n getPropValue(idx, key, skipKey) {\n if (!this.context) return null;\n const {\n src\n } = this.context;\n const prop = this.props[idx];\n return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;\n }\n\n get anchor() {\n for (let i = 0; i < this.props.length; ++i) {\n const anchor = this.getPropValue(i, Char.ANCHOR, true);\n if (anchor != null) return anchor;\n }\n\n return null;\n }\n\n get comment() {\n const comments = [];\n\n for (let i = 0; i < this.props.length; ++i) {\n const comment = this.getPropValue(i, Char.COMMENT, true);\n if (comment != null) comments.push(comment);\n }\n\n return comments.length > 0 ? comments.join('\\n') : null;\n }\n\n commentHasRequiredWhitespace(start) {\n const {\n src\n } = this.context;\n if (this.header && start === this.header.end) return false;\n if (!this.valueRange) return false;\n const {\n end\n } = this.valueRange;\n return start !== end || Node.atBlank(src, end - 1);\n }\n\n get hasComment() {\n if (this.context) {\n const {\n src\n } = this.context;\n\n for (let i = 0; i < this.props.length; ++i) {\n if (src[this.props[i].start] === Char.COMMENT) return true;\n }\n }\n\n return false;\n }\n\n get hasProps() {\n if (this.context) {\n const {\n src\n } = this.context;\n\n for (let i = 0; i < this.props.length; ++i) {\n if (src[this.props[i].start] !== Char.COMMENT) return true;\n }\n }\n\n return false;\n }\n\n get includesTrailingLines() {\n return false;\n }\n\n get jsonLike() {\n const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE];\n return jsonLikeTypes.indexOf(this.type) !== -1;\n }\n\n get rangeAsLinePos() {\n if (!this.range || !this.context) return undefined;\n const start = getLinePos(this.range.start, this.context.root);\n if (!start) return undefined;\n const end = getLinePos(this.range.end, this.context.root);\n return {\n start,\n end\n };\n }\n\n get rawValue() {\n if (!this.valueRange || !this.context) return null;\n const {\n start,\n end\n } = this.valueRange;\n return this.context.src.slice(start, end);\n }\n\n get tag() {\n for (let i = 0; i < this.props.length; ++i) {\n const tag = this.getPropValue(i, Char.TAG, false);\n\n if (tag != null) {\n if (tag[1] === '<') {\n return {\n verbatim: tag.slice(2, -1)\n };\n } else {\n // eslint-disable-next-line no-unused-vars\n const [_, handle, suffix] = tag.match(/^(.*!)([^!]*)$/);\n return {\n handle,\n suffix\n };\n }\n }\n }\n\n return null;\n }\n\n get valueRangeContainsNewline() {\n if (!this.valueRange || !this.context) return false;\n const {\n start,\n end\n } = this.valueRange;\n const {\n src\n } = this.context;\n\n for (let i = start; i < end; ++i) {\n if (src[i] === '\\n') return true;\n }\n\n return false;\n }\n\n parseComment(start) {\n const {\n src\n } = this.context;\n\n if (src[start] === Char.COMMENT) {\n const end = Node.endOfLine(src, start + 1);\n const commentRange = new Range(start, end);\n this.props.push(commentRange);\n return end;\n }\n\n return start;\n }\n /**\n * Populates the `origStart` and `origEnd` values of all ranges for this\n * node. Extended by child classes to handle descendant nodes.\n *\n * @param {number[]} cr - Positions of dropped CR characters\n * @param {number} offset - Starting index of `cr` from the last call\n * @returns {number} - The next offset, matching the one found for `origStart`\n */\n\n\n setOrigRanges(cr, offset) {\n if (this.range) offset = this.range.setOrigRange(cr, offset);\n if (this.valueRange) this.valueRange.setOrigRange(cr, offset);\n this.props.forEach(prop => prop.setOrigRange(cr, offset));\n return offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n range,\n value\n } = this;\n if (value != null) return value;\n const str = src.slice(range.start, range.end);\n return Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass YAMLError extends Error {\n constructor(name, source, message) {\n if (!message || !(source instanceof Node)) throw new Error(`Invalid arguments for new ${name}`);\n super();\n this.name = name;\n this.message = message;\n this.source = source;\n }\n\n makePretty() {\n if (!this.source) return;\n this.nodeType = this.source.type;\n const cst = this.source.context && this.source.context.root;\n\n if (typeof this.offset === 'number') {\n this.range = new Range(this.offset, this.offset + 1);\n const start = cst && getLinePos(this.offset, cst);\n\n if (start) {\n const end = {\n line: start.line,\n col: start.col + 1\n };\n this.linePos = {\n start,\n end\n };\n }\n\n delete this.offset;\n } else {\n this.range = this.source.range;\n this.linePos = this.source.rangeAsLinePos;\n }\n\n if (this.linePos) {\n const {\n line,\n col\n } = this.linePos.start;\n this.message += ` at line ${line}, column ${col}`;\n const ctx = cst && getPrettyContext(this.linePos, cst);\n if (ctx) this.message += `:\\n\\n${ctx}\\n`;\n }\n\n delete this.source;\n }\n\n}\nclass YAMLReferenceError extends YAMLError {\n constructor(source, message) {\n super('YAMLReferenceError', source, message);\n }\n\n}\nclass YAMLSemanticError extends YAMLError {\n constructor(source, message) {\n super('YAMLSemanticError', source, message);\n }\n\n}\nclass YAMLSyntaxError extends YAMLError {\n constructor(source, message) {\n super('YAMLSyntaxError', source, message);\n }\n\n}\nclass YAMLWarning extends YAMLError {\n constructor(source, message) {\n super('YAMLWarning', source, message);\n }\n\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nclass PlainValue extends Node {\n static endOfLine(src, start, inFlow) {\n let ch = src[start];\n let offset = start;\n\n while (ch && ch !== '\\n') {\n if (inFlow && (ch === '[' || ch === ']' || ch === '{' || ch === '}' || ch === ',')) break;\n const next = src[offset + 1];\n if (ch === ':' && (!next || next === '\\n' || next === '\\t' || next === ' ' || inFlow && next === ',')) break;\n if ((ch === ' ' || ch === '\\t') && next === '#') break;\n offset += 1;\n ch = next;\n }\n\n return offset;\n }\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n let {\n start,\n end\n } = this.valueRange;\n const {\n src\n } = this.context;\n let ch = src[end - 1];\n\n while (start < end && (ch === '\\n' || ch === '\\t' || ch === ' ')) ch = src[--end - 1];\n\n let str = '';\n\n for (let i = start; i < end; ++i) {\n const ch = src[i];\n\n if (ch === '\\n') {\n const {\n fold,\n offset\n } = Node.foldNewline(src, i, -1);\n str += fold;\n i = offset;\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = src[i + 1];\n\n while (i < end && (next === ' ' || next === '\\t')) {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n const ch0 = src[start];\n\n switch (ch0) {\n case '\\t':\n {\n const msg = 'Plain value cannot start with a tab character';\n const errors = [new YAMLSemanticError(this, msg)];\n return {\n errors,\n str\n };\n }\n\n case '@':\n case '`':\n {\n const msg = `Plain value cannot start with reserved character ${ch0}`;\n const errors = [new YAMLSemanticError(this, msg)];\n return {\n errors,\n str\n };\n }\n\n default:\n return str;\n }\n }\n\n parseBlockValue(start) {\n const {\n indent,\n inFlow,\n src\n } = this.context;\n let offset = start;\n let valueEnd = start;\n\n for (let ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n if (Node.atDocumentBoundary(src, offset + 1)) break;\n const end = Node.endOfBlockIndent(src, indent, offset + 1);\n if (end === null || src[end] === '#') break;\n\n if (src[end] === '\\n') {\n offset = end;\n } else {\n valueEnd = PlainValue.endOfLine(src, end, inFlow);\n offset = valueEnd;\n }\n }\n\n if (this.valueRange.isEmpty()) this.valueRange.start = start;\n this.valueRange.end = valueEnd;\n return valueEnd;\n }\n /**\n * Parses a plain value from the source\n *\n * Accepted forms are:\n * ```\n * #comment\n *\n * first line\n *\n * first line #comment\n *\n * first line\n * block\n * lines\n *\n * #comment\n * block\n * lines\n * ```\n * where block lines are empty or have an indent level greater than `indent`.\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar, may be `\\n`\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n inFlow,\n src\n } = context;\n let offset = start;\n const ch = src[offset];\n\n if (ch && ch !== '#' && ch !== '\\n') {\n offset = PlainValue.endOfLine(src, start, inFlow);\n }\n\n this.valueRange = new Range(start, offset);\n offset = Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n\n if (!this.hasComment || this.valueRange.isEmpty()) {\n offset = this.parseBlockValue(offset);\n }\n\n return offset;\n }\n\n}\n\nexports.Char = Char;\nexports.Node = Node;\nexports.PlainValue = PlainValue;\nexports.Range = Range;\nexports.Type = Type;\nexports.YAMLError = YAMLError;\nexports.YAMLReferenceError = YAMLReferenceError;\nexports.YAMLSemanticError = YAMLSemanticError;\nexports.YAMLSyntaxError = YAMLSyntaxError;\nexports.YAMLWarning = YAMLWarning;\nexports._defineProperty = _defineProperty;\nexports.defaultTagPrefix = defaultTagPrefix;\nexports.defaultTags = defaultTags;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar resolveSeq = require('./resolveSeq-4a68b39b.js');\nvar warnings = require('./warnings-39684f17.js');\n\nfunction createMap(schema, obj, ctx) {\n const map = new resolveSeq.YAMLMap(schema);\n\n if (obj instanceof Map) {\n for (const [key, value] of obj) map.items.push(schema.createPair(key, value, ctx));\n } else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj)) map.items.push(schema.createPair(key, obj[key], ctx));\n }\n\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n\n return map;\n}\n\nconst map = {\n createNode: createMap,\n default: true,\n nodeClass: resolveSeq.YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve: resolveSeq.resolveMap\n};\n\nfunction createSeq(schema, obj, ctx) {\n const seq = new resolveSeq.YAMLSeq(schema);\n\n if (obj && obj[Symbol.iterator]) {\n for (const it of obj) {\n const v = schema.createNode(it, ctx.wrapScalars, null, ctx);\n seq.items.push(v);\n }\n }\n\n return seq;\n}\n\nconst seq = {\n createNode: createSeq,\n default: true,\n nodeClass: resolveSeq.YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve: resolveSeq.resolveSeq\n};\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: resolveSeq.resolveString,\n\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({\n actualString: true\n }, ctx);\n return resolveSeq.stringifyString(item, ctx, onComment, onChompKeep);\n },\n\n options: resolveSeq.strOptions\n};\n\nconst failsafe = [map, seq, string];\n\n/* global BigInt */\n\nconst intIdentify = value => typeof value === 'bigint' || Number.isInteger(value);\n\nconst intResolve = (src, part, radix) => resolveSeq.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);\n\nfunction intStringify(node, radix, prefix) {\n const {\n value\n } = node;\n if (intIdentify(value) && value >= 0) return prefix + value.toString(radix);\n return resolveSeq.stringifyNumber(node);\n}\n\nconst nullObj = {\n identify: value => value == null,\n createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => null,\n options: resolveSeq.nullOptions,\n stringify: () => resolveSeq.nullOptions.nullStr\n};\nconst boolObj = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => str[0] === 't' || str[0] === 'T',\n options: resolveSeq.boolOptions,\n stringify: ({\n value\n }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr\n};\nconst octObj = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o([0-7]+)$/,\n resolve: (str, oct) => intResolve(str, oct, 8),\n options: resolveSeq.intOptions,\n stringify: node => intStringify(node, 8, '0o')\n};\nconst intObj = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: str => intResolve(str, str, 10),\n options: resolveSeq.intOptions,\n stringify: resolveSeq.stringifyNumber\n};\nconst hexObj = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x([0-9a-fA-F]+)$/,\n resolve: (str, hex) => intResolve(str, hex, 16),\n options: resolveSeq.intOptions,\n stringify: node => intStringify(node, 16, '0x')\n};\nconst nanObj = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n stringify: resolveSeq.stringifyNumber\n};\nconst expObj = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify: ({\n value\n }) => Number(value).toExponential()\n};\nconst floatObj = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.([0-9]+)|[0-9]+\\.([0-9]*))$/,\n\n resolve(str, frac1, frac2) {\n const frac = frac1 || frac2;\n const node = new resolveSeq.Scalar(parseFloat(str));\n if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;\n return node;\n },\n\n stringify: resolveSeq.stringifyNumber\n};\nconst core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);\n\n/* global BigInt */\n\nconst intIdentify$1 = value => typeof value === 'bigint' || Number.isInteger(value);\n\nconst stringifyJSON = ({\n value\n}) => JSON.stringify(value);\n\nconst json = [map, seq, {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: resolveSeq.resolveString,\n stringify: stringifyJSON\n}, {\n identify: value => value == null,\n createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n}, {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true|false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n}, {\n identify: intIdentify$1,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: str => resolveSeq.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({\n value\n }) => intIdentify$1(value) ? value.toString() : JSON.stringify(value)\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n}];\n\njson.scalarFallback = str => {\n throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n};\n\n/* global BigInt */\n\nconst boolStringify = ({\n value\n}) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr;\n\nconst intIdentify$2 = value => typeof value === 'bigint' || Number.isInteger(value);\n\nfunction intResolve$1(sign, src, radix) {\n let str = src.replace(/_/g, '');\n\n if (resolveSeq.intOptions.asBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n\n case 8:\n str = `0o${str}`;\n break;\n\n case 16:\n str = `0x${str}`;\n break;\n }\n\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\n\nfunction intStringify$1(node, radix, prefix) {\n const {\n value\n } = node;\n\n if (intIdentify$2(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n\n return resolveSeq.stringifyNumber(node);\n}\n\nconst yaml11 = failsafe.concat([{\n identify: value => value == null,\n createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => null,\n options: resolveSeq.nullOptions,\n stringify: () => resolveSeq.nullOptions.nullStr\n}, {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => true,\n options: resolveSeq.boolOptions,\n stringify: boolStringify\n}, {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,\n resolve: () => false,\n options: resolveSeq.boolOptions,\n stringify: boolStringify\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^([-+]?)0b([0-1_]+)$/,\n resolve: (str, sign, bin) => intResolve$1(sign, bin, 2),\n stringify: node => intStringify$1(node, 2, '0b')\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^([-+]?)0([0-7_]+)$/,\n resolve: (str, sign, oct) => intResolve$1(sign, oct, 8),\n stringify: node => intStringify$1(node, 8, '0')\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^([-+]?)([0-9][0-9_]*)$/,\n resolve: (str, sign, abs) => intResolve$1(sign, abs, 10),\n stringify: resolveSeq.stringifyNumber\n}, {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^([-+]?)0x([0-9a-fA-F_]+)$/,\n resolve: (str, sign, hex) => intResolve$1(sign, hex, 16),\n stringify: node => intStringify$1(node, 16, '0x')\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,\n stringify: resolveSeq.stringifyNumber\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?([0-9][0-9_]*)?(\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str.replace(/_/g, '')),\n stringify: ({\n value\n }) => Number(value).toExponential()\n}, {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.([0-9_]*)$/,\n\n resolve(str, frac) {\n const node = new resolveSeq.Scalar(parseFloat(str.replace(/_/g, '')));\n\n if (frac) {\n const f = frac.replace(/_/g, '');\n if (f[f.length - 1] === '0') node.minFractionDigits = f.length;\n }\n\n return node;\n },\n\n stringify: resolveSeq.stringifyNumber\n}], warnings.binary, warnings.omap, warnings.pairs, warnings.set, warnings.intTime, warnings.floatTime, warnings.timestamp);\n\nconst schemas = {\n core,\n failsafe,\n json,\n yaml11\n};\nconst tags = {\n binary: warnings.binary,\n bool: boolObj,\n float: floatObj,\n floatExp: expObj,\n floatNaN: nanObj,\n floatTime: warnings.floatTime,\n int: intObj,\n intHex: hexObj,\n intOct: octObj,\n intTime: warnings.intTime,\n map,\n null: nullObj,\n omap: warnings.omap,\n pairs: warnings.pairs,\n seq,\n set: warnings.set,\n timestamp: warnings.timestamp\n};\n\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) || match[0];\n if (!tagObj) throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n } // TODO: deprecate/remove class check\n\n\n return tags.find(t => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format);\n}\n\nfunction createNode(value, tagName, ctx) {\n if (value instanceof resolveSeq.Node) return value;\n const {\n defaultPrefix,\n onTagObj,\n prevObjects,\n schema,\n wrapScalars\n } = ctx;\n if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n\n if (!tagObj) {\n if (typeof value.toJSON === 'function') value = value.toJSON();\n if (typeof value !== 'object') return wrapScalars ? new resolveSeq.Scalar(value) : value;\n tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;\n }\n\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n } // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `obj` wrapper allows for circular references to resolve.\n\n\n const obj = {};\n\n if (value && typeof value === 'object' && prevObjects) {\n const prev = prevObjects.get(value);\n\n if (prev) {\n const alias = new resolveSeq.Alias(prev); // leaves source dirty; must be cleaned by caller\n\n ctx.aliasNodes.push(alias); // defined along with prevObjects\n\n return alias;\n }\n\n obj.value = value;\n prevObjects.set(value, obj);\n }\n\n obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq.Scalar(value) : value;\n if (tagName && obj.node instanceof resolveSeq.Node) obj.node.tag = tagName;\n return obj.node;\n}\n\nfunction getSchemaTags(schemas, knownTags, customTags, schemaId) {\n let tags = schemas[schemaId.replace(/\\W/g, '')]; // 'yaml-1.1' -> 'yaml11'\n\n if (!tags) {\n const keys = Object.keys(schemas).map(key => JSON.stringify(key)).join(', ');\n throw new Error(`Unknown schema \"${schemaId}\"; use one of ${keys}`);\n }\n\n if (Array.isArray(customTags)) {\n for (const tag of customTags) tags = tags.concat(tag);\n } else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n\n for (let i = 0; i < tags.length; ++i) {\n const tag = tags[i];\n\n if (typeof tag === 'string') {\n const tagObj = knownTags[tag];\n\n if (!tagObj) {\n const keys = Object.keys(knownTags).map(key => JSON.stringify(key)).join(', ');\n throw new Error(`Unknown custom tag \"${tag}\"; use one of ${keys}`);\n }\n\n tags[i] = tagObj;\n }\n }\n\n return tags;\n}\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\n\nclass Schema {\n // TODO: remove in v2\n // TODO: remove in v2\n constructor({\n customTags,\n merge,\n schema,\n sortMapEntries,\n tags: deprecatedCustomTags\n }) {\n this.merge = !!merge;\n this.name = schema;\n this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;\n if (!customTags && deprecatedCustomTags) warnings.warnOptionDeprecation('tags', 'customTags');\n this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);\n }\n\n createNode(value, wrapScalars, tagName, ctx) {\n const baseCtx = {\n defaultPrefix: Schema.defaultPrefix,\n schema: this,\n wrapScalars\n };\n const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;\n return createNode(value, tagName, createCtx);\n }\n\n createPair(key, value, ctx) {\n if (!ctx) ctx = {\n wrapScalars: true\n };\n const k = this.createNode(key, ctx.wrapScalars, null, ctx);\n const v = this.createNode(value, ctx.wrapScalars, null, ctx);\n return new resolveSeq.Pair(k, v);\n }\n\n}\n\nPlainValue._defineProperty(Schema, \"defaultPrefix\", PlainValue.defaultTagPrefix);\n\nPlainValue._defineProperty(Schema, \"defaultTags\", PlainValue.defaultTags);\n\nexports.Schema = Schema;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar parseCst = require('./parse-cst.js');\nrequire('./resolveSeq-4a68b39b.js');\nvar Document$1 = require('./Document-2cf6b08c.js');\nvar Schema = require('./Schema-42e9705c.js');\nvar warnings = require('./warnings-39684f17.js');\n\nfunction createNode(value, wrapScalars = true, tag) {\n if (tag === undefined && typeof wrapScalars === 'string') {\n tag = wrapScalars;\n wrapScalars = true;\n }\n\n const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions);\n const schema = new Schema.Schema(options);\n return schema.createNode(value, wrapScalars, tag);\n}\n\nclass Document extends Document$1.Document {\n constructor(options) {\n super(Object.assign({}, Document$1.defaultOptions, options));\n }\n\n}\n\nfunction parseAllDocuments(src, options) {\n const stream = [];\n let prev;\n\n for (const cstDoc of parseCst.parse(src)) {\n const doc = new Document(options);\n doc.parse(cstDoc, prev);\n stream.push(doc);\n prev = doc;\n }\n\n return stream;\n}\n\nfunction parseDocument(src, options) {\n const cst = parseCst.parse(src);\n const doc = new Document(options).parse(cst[0]);\n\n if (cst.length > 1) {\n const errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';\n doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg));\n }\n\n return doc;\n}\n\nfunction parse(src, options) {\n const doc = parseDocument(src, options);\n doc.warnings.forEach(warning => warnings.warn(warning));\n if (doc.errors.length > 0) throw doc.errors[0];\n return doc.toJSON();\n}\n\nfunction stringify(value, options) {\n const doc = new Document(options);\n doc.contents = value;\n return String(doc);\n}\n\nconst YAML = {\n createNode,\n defaultOptions: Document$1.defaultOptions,\n Document,\n parse,\n parseAllDocuments,\n parseCST: parseCst.parse,\n parseDocument,\n scalarOptions: Document$1.scalarOptions,\n stringify\n};\n\nexports.YAML = YAML;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\n\nclass BlankLine extends PlainValue.Node {\n constructor() {\n super(PlainValue.Type.BLANK_LINE);\n }\n /* istanbul ignore next */\n\n\n get includesTrailingLines() {\n // This is never called from anywhere, but if it were,\n // this is the value it should return.\n return true;\n }\n /**\n * Parses a blank line from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first \\n character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n this.range = new PlainValue.Range(start, start + 1);\n return start + 1;\n }\n\n}\n\nclass CollectionItem extends PlainValue.Node {\n constructor(type, props) {\n super(type, props);\n this.node = null;\n }\n\n get includesTrailingLines() {\n return !!this.node && this.node.includesTrailingLines;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n parseNode,\n src\n } = context;\n let {\n atLineStart,\n lineStart\n } = context;\n if (!atLineStart && this.type === PlainValue.Type.SEQ_ITEM) this.error = new PlainValue.YAMLSemanticError(this, 'Sequence items must not have preceding content on the same line');\n const indent = atLineStart ? start - lineStart : context.indent;\n let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1);\n let ch = src[offset];\n const inlineComment = ch === '#';\n const comments = [];\n let blankLine = null;\n\n while (ch === '\\n' || ch === '#') {\n if (ch === '#') {\n const end = PlainValue.Node.endOfLine(src, offset + 1);\n comments.push(new PlainValue.Range(offset, end));\n offset = end;\n } else {\n atLineStart = true;\n lineStart = offset + 1;\n const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart);\n\n if (src[wsEnd] === '\\n' && comments.length === 0) {\n blankLine = new BlankLine();\n lineStart = blankLine.parse({\n src\n }, lineStart);\n }\n\n offset = PlainValue.Node.endOfIndent(src, lineStart);\n }\n\n ch = src[offset];\n }\n\n if (PlainValue.Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== PlainValue.Type.SEQ_ITEM)) {\n this.node = parseNode({\n atLineStart,\n inCollection: false,\n indent,\n lineStart,\n parent: this\n }, offset);\n } else if (ch && lineStart > start + 1) {\n offset = lineStart - 1;\n }\n\n if (this.node) {\n if (blankLine) {\n // Only blank lines preceding non-empty nodes are captured. Note that\n // this means that collection item range start indices do not always\n // increase monotonically. -- eemeli/yaml#126\n const items = context.parent.items || context.parent.contents;\n if (items) items.push(blankLine);\n }\n\n if (comments.length) Array.prototype.push.apply(this.props, comments);\n offset = this.node.range.end;\n } else {\n if (inlineComment) {\n const c = comments[0];\n this.props.push(c);\n offset = c.end;\n } else {\n offset = PlainValue.Node.endOfLine(src, start + 1);\n }\n }\n\n const end = this.node ? this.node.valueRange.end : offset;\n this.valueRange = new PlainValue.Range(start, end);\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n return this.node ? this.node.setOrigRanges(cr, offset) : offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n node,\n range,\n value\n } = this;\n if (value != null) return value;\n const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end);\n return PlainValue.Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass Comment extends PlainValue.Node {\n constructor() {\n super(PlainValue.Type.COMMENT);\n }\n /**\n * Parses a comment line from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n\n parse(context, start) {\n this.context = context;\n const offset = this.parseComment(start);\n this.range = new PlainValue.Range(start, offset);\n return offset;\n }\n\n}\n\nfunction grabCollectionEndComments(node) {\n let cnode = node;\n\n while (cnode instanceof CollectionItem) cnode = cnode.node;\n\n if (!(cnode instanceof Collection)) return null;\n const len = cnode.items.length;\n let ci = -1;\n\n for (let i = len - 1; i >= 0; --i) {\n const n = cnode.items[i];\n\n if (n.type === PlainValue.Type.COMMENT) {\n // Keep sufficiently indented comments with preceding node\n const {\n indent,\n lineStart\n } = n.context;\n if (indent > 0 && n.range.start >= lineStart + indent) break;\n ci = i;\n } else if (n.type === PlainValue.Type.BLANK_LINE) ci = i;else break;\n }\n\n if (ci === -1) return null;\n const ca = cnode.items.splice(ci, len - ci);\n const prevEnd = ca[0].range.start;\n\n while (true) {\n cnode.range.end = prevEnd;\n if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd;\n if (cnode === node) break;\n cnode = cnode.context.parent;\n }\n\n return ca;\n}\nclass Collection extends PlainValue.Node {\n static nextContentHasIndent(src, offset, indent) {\n const lineStart = PlainValue.Node.endOfLine(src, offset) + 1;\n offset = PlainValue.Node.endOfWhiteSpace(src, lineStart);\n const ch = src[offset];\n if (!ch) return false;\n if (offset >= lineStart + indent) return true;\n if (ch !== '#' && ch !== '\\n') return false;\n return Collection.nextContentHasIndent(src, offset, indent);\n }\n\n constructor(firstItem) {\n super(firstItem.type === PlainValue.Type.SEQ_ITEM ? PlainValue.Type.SEQ : PlainValue.Type.MAP);\n\n for (let i = firstItem.props.length - 1; i >= 0; --i) {\n if (firstItem.props[i].start < firstItem.context.lineStart) {\n // props on previous line are assumed by the collection\n this.props = firstItem.props.slice(0, i + 1);\n firstItem.props = firstItem.props.slice(i + 1);\n const itemRange = firstItem.props[0] || firstItem.valueRange;\n firstItem.range.start = itemRange.start;\n break;\n }\n }\n\n this.items = [firstItem];\n const ec = grabCollectionEndComments(firstItem);\n if (ec) Array.prototype.push.apply(this.items, ec);\n }\n\n get includesTrailingLines() {\n return this.items.length > 0;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n parseNode,\n src\n } = context; // It's easier to recalculate lineStart here rather than tracking down the\n // last context from which to read it -- eemeli/yaml#2\n\n let lineStart = PlainValue.Node.startOfLine(src, start);\n const firstItem = this.items[0]; // First-item context needs to be correct for later comment handling\n // -- eemeli/yaml#17\n\n firstItem.context.parent = this;\n this.valueRange = PlainValue.Range.copy(firstItem.valueRange);\n const indent = firstItem.range.start - firstItem.context.lineStart;\n let offset = start;\n offset = PlainValue.Node.normalizeOffset(src, offset);\n let ch = src[offset];\n let atLineStart = PlainValue.Node.endOfWhiteSpace(src, lineStart) === offset;\n let prevIncludesTrailingLines = false;\n\n while (ch) {\n while (ch === '\\n' || ch === '#') {\n if (atLineStart && ch === '\\n' && !prevIncludesTrailingLines) {\n const blankLine = new BlankLine();\n offset = blankLine.parse({\n src\n }, offset);\n this.valueRange.end = offset;\n\n if (offset >= src.length) {\n ch = null;\n break;\n }\n\n this.items.push(blankLine);\n offset -= 1; // blankLine.parse() consumes terminal newline\n } else if (ch === '#') {\n if (offset < lineStart + indent && !Collection.nextContentHasIndent(src, offset, indent)) {\n return offset;\n }\n\n const comment = new Comment();\n offset = comment.parse({\n indent,\n lineStart,\n src\n }, offset);\n this.items.push(comment);\n this.valueRange.end = offset;\n\n if (offset >= src.length) {\n ch = null;\n break;\n }\n }\n\n lineStart = offset + 1;\n offset = PlainValue.Node.endOfIndent(src, lineStart);\n\n if (PlainValue.Node.atBlank(src, offset)) {\n const wsEnd = PlainValue.Node.endOfWhiteSpace(src, offset);\n const next = src[wsEnd];\n\n if (!next || next === '\\n' || next === '#') {\n offset = wsEnd;\n }\n }\n\n ch = src[offset];\n atLineStart = true;\n }\n\n if (!ch) {\n break;\n }\n\n if (offset !== lineStart + indent && (atLineStart || ch !== ':')) {\n if (offset < lineStart + indent) {\n if (lineStart > start) offset = lineStart;\n break;\n } else if (!this.error) {\n const msg = 'All collection items must start at the same column';\n this.error = new PlainValue.YAMLSyntaxError(this, msg);\n }\n }\n\n if (firstItem.type === PlainValue.Type.SEQ_ITEM) {\n if (ch !== '-') {\n if (lineStart > start) offset = lineStart;\n break;\n }\n } else if (ch === '-' && !this.error) {\n // map key may start with -, as long as it's followed by a non-whitespace char\n const next = src[offset + 1];\n\n if (!next || next === '\\n' || next === '\\t' || next === ' ') {\n const msg = 'A collection cannot be both a mapping and a sequence';\n this.error = new PlainValue.YAMLSyntaxError(this, msg);\n }\n }\n\n const node = parseNode({\n atLineStart,\n inCollection: true,\n indent,\n lineStart,\n parent: this\n }, offset);\n if (!node) return offset; // at next document start\n\n this.items.push(node);\n this.valueRange.end = node.valueRange.end;\n offset = PlainValue.Node.normalizeOffset(src, node.range.end);\n ch = src[offset];\n atLineStart = false;\n prevIncludesTrailingLines = node.includesTrailingLines; // Need to reset lineStart and atLineStart here if preceding node's range\n // has advanced to check the current line's indentation level\n // -- eemeli/yaml#10 & eemeli/yaml#38\n\n if (ch) {\n let ls = offset - 1;\n let prev = src[ls];\n\n while (prev === ' ' || prev === '\\t') prev = src[--ls];\n\n if (prev === '\\n') {\n lineStart = ls + 1;\n atLineStart = true;\n }\n }\n\n const ec = grabCollectionEndComments(node);\n if (ec) Array.prototype.push.apply(this.items, ec);\n }\n\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n this.items.forEach(node => {\n offset = node.setOrigRanges(cr, offset);\n });\n return offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n items,\n range,\n value\n } = this;\n if (value != null) return value;\n let str = src.slice(range.start, items[0].range.start) + String(items[0]);\n\n for (let i = 1; i < items.length; ++i) {\n const item = items[i];\n const {\n atLineStart,\n indent\n } = item.context;\n if (atLineStart) for (let i = 0; i < indent; ++i) str += ' ';\n str += String(item);\n }\n\n return PlainValue.Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass Directive extends PlainValue.Node {\n constructor() {\n super(PlainValue.Type.DIRECTIVE);\n this.name = null;\n }\n\n get parameters() {\n const raw = this.rawValue;\n return raw ? raw.trim().split(/[ \\t]+/) : [];\n }\n\n parseName(start) {\n const {\n src\n } = this.context;\n let offset = start;\n let ch = src[offset];\n\n while (ch && ch !== '\\n' && ch !== '\\t' && ch !== ' ') ch = src[offset += 1];\n\n this.name = src.slice(start, offset);\n return offset;\n }\n\n parseParameters(start) {\n const {\n src\n } = this.context;\n let offset = start;\n let ch = src[offset];\n\n while (ch && ch !== '\\n' && ch !== '#') ch = src[offset += 1];\n\n this.valueRange = new PlainValue.Range(start, offset);\n return offset;\n }\n\n parse(context, start) {\n this.context = context;\n let offset = this.parseName(start + 1);\n offset = this.parseParameters(offset);\n offset = this.parseComment(offset);\n this.range = new PlainValue.Range(start, offset);\n return offset;\n }\n\n}\n\nclass Document extends PlainValue.Node {\n static startCommentOrEndBlankLine(src, start) {\n const offset = PlainValue.Node.endOfWhiteSpace(src, start);\n const ch = src[offset];\n return ch === '#' || ch === '\\n' ? offset : start;\n }\n\n constructor() {\n super(PlainValue.Type.DOCUMENT);\n this.directives = null;\n this.contents = null;\n this.directivesEndMarker = null;\n this.documentEndMarker = null;\n }\n\n parseDirectives(start) {\n const {\n src\n } = this.context;\n this.directives = [];\n let atLineStart = true;\n let hasDirectives = false;\n let offset = start;\n\n while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DIRECTIVES_END)) {\n offset = Document.startCommentOrEndBlankLine(src, offset);\n\n switch (src[offset]) {\n case '\\n':\n if (atLineStart) {\n const blankLine = new BlankLine();\n offset = blankLine.parse({\n src\n }, offset);\n\n if (offset < src.length) {\n this.directives.push(blankLine);\n }\n } else {\n offset += 1;\n atLineStart = true;\n }\n\n break;\n\n case '#':\n {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.directives.push(comment);\n atLineStart = false;\n }\n break;\n\n case '%':\n {\n const directive = new Directive();\n offset = directive.parse({\n parent: this,\n src\n }, offset);\n this.directives.push(directive);\n hasDirectives = true;\n atLineStart = false;\n }\n break;\n\n default:\n if (hasDirectives) {\n this.error = new PlainValue.YAMLSemanticError(this, 'Missing directives-end indicator line');\n } else if (this.directives.length > 0) {\n this.contents = this.directives;\n this.directives = [];\n }\n\n return offset;\n }\n }\n\n if (src[offset]) {\n this.directivesEndMarker = new PlainValue.Range(offset, offset + 3);\n return offset + 3;\n }\n\n if (hasDirectives) {\n this.error = new PlainValue.YAMLSemanticError(this, 'Missing directives-end indicator line');\n } else if (this.directives.length > 0) {\n this.contents = this.directives;\n this.directives = [];\n }\n\n return offset;\n }\n\n parseContents(start) {\n const {\n parseNode,\n src\n } = this.context;\n if (!this.contents) this.contents = [];\n let lineStart = start;\n\n while (src[lineStart - 1] === '-') lineStart -= 1;\n\n let offset = PlainValue.Node.endOfWhiteSpace(src, start);\n let atLineStart = lineStart === start;\n this.valueRange = new PlainValue.Range(offset);\n\n while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DOCUMENT_END)) {\n switch (src[offset]) {\n case '\\n':\n if (atLineStart) {\n const blankLine = new BlankLine();\n offset = blankLine.parse({\n src\n }, offset);\n\n if (offset < src.length) {\n this.contents.push(blankLine);\n }\n } else {\n offset += 1;\n atLineStart = true;\n }\n\n lineStart = offset;\n break;\n\n case '#':\n {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.contents.push(comment);\n atLineStart = false;\n }\n break;\n\n default:\n {\n const iEnd = PlainValue.Node.endOfIndent(src, offset);\n const context = {\n atLineStart,\n indent: -1,\n inFlow: false,\n inCollection: false,\n lineStart,\n parent: this\n };\n const node = parseNode(context, iEnd);\n if (!node) return this.valueRange.end = iEnd; // at next document start\n\n this.contents.push(node);\n offset = node.range.end;\n atLineStart = false;\n const ec = grabCollectionEndComments(node);\n if (ec) Array.prototype.push.apply(this.contents, ec);\n }\n }\n\n offset = Document.startCommentOrEndBlankLine(src, offset);\n }\n\n this.valueRange.end = offset;\n\n if (src[offset]) {\n this.documentEndMarker = new PlainValue.Range(offset, offset + 3);\n offset += 3;\n\n if (src[offset]) {\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n\n if (src[offset] === '#') {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.contents.push(comment);\n }\n\n switch (src[offset]) {\n case '\\n':\n offset += 1;\n break;\n\n case undefined:\n break;\n\n default:\n this.error = new PlainValue.YAMLSyntaxError(this, 'Document end marker line cannot have a non-comment suffix');\n }\n }\n }\n\n return offset;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n context.root = this;\n this.context = context;\n const {\n src\n } = context;\n let offset = src.charCodeAt(start) === 0xfeff ? start + 1 : start; // skip BOM\n\n offset = this.parseDirectives(offset);\n offset = this.parseContents(offset);\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n this.directives.forEach(node => {\n offset = node.setOrigRanges(cr, offset);\n });\n if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset);\n this.contents.forEach(node => {\n offset = node.setOrigRanges(cr, offset);\n });\n if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset);\n return offset;\n }\n\n toString() {\n const {\n contents,\n directives,\n value\n } = this;\n if (value != null) return value;\n let str = directives.join('');\n\n if (contents.length > 0) {\n if (directives.length > 0 || contents[0].type === PlainValue.Type.COMMENT) str += '---\\n';\n str += contents.join('');\n }\n\n if (str[str.length - 1] !== '\\n') str += '\\n';\n return str;\n }\n\n}\n\nclass Alias extends PlainValue.Node {\n /**\n * Parses an *alias from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = PlainValue.Node.endOfIdentifier(src, start + 1);\n this.valueRange = new PlainValue.Range(start + 1, offset);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n\n}\n\nconst Chomp = {\n CLIP: 'CLIP',\n KEEP: 'KEEP',\n STRIP: 'STRIP'\n};\nclass BlockValue extends PlainValue.Node {\n constructor(type, props) {\n super(type, props);\n this.blockIndent = null;\n this.chomping = Chomp.CLIP;\n this.header = null;\n }\n\n get includesTrailingLines() {\n return this.chomping === Chomp.KEEP;\n }\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n let {\n start,\n end\n } = this.valueRange;\n const {\n indent,\n src\n } = this.context;\n if (this.valueRange.isEmpty()) return '';\n let lastNewLine = null;\n let ch = src[end - 1];\n\n while (ch === '\\n' || ch === '\\t' || ch === ' ') {\n end -= 1;\n\n if (end <= start) {\n if (this.chomping === Chomp.KEEP) break;else return ''; // probably never happens\n }\n\n if (ch === '\\n') lastNewLine = end;\n ch = src[end - 1];\n }\n\n let keepStart = end + 1;\n\n if (lastNewLine) {\n if (this.chomping === Chomp.KEEP) {\n keepStart = lastNewLine;\n end = this.valueRange.end;\n } else {\n end = lastNewLine;\n }\n }\n\n const bi = indent + this.blockIndent;\n const folded = this.type === PlainValue.Type.BLOCK_FOLDED;\n let atStart = true;\n let str = '';\n let sep = '';\n let prevMoreIndented = false;\n\n for (let i = start; i < end; ++i) {\n for (let j = 0; j < bi; ++j) {\n if (src[i] !== ' ') break;\n i += 1;\n }\n\n const ch = src[i];\n\n if (ch === '\\n') {\n if (sep === '\\n') str += '\\n';else sep = '\\n';\n } else {\n const lineEnd = PlainValue.Node.endOfLine(src, i);\n const line = src.slice(i, lineEnd);\n i = lineEnd;\n\n if (folded && (ch === ' ' || ch === '\\t') && i < keepStart) {\n if (sep === ' ') sep = '\\n';else if (!prevMoreIndented && !atStart && sep === '\\n') sep = '\\n\\n';\n str += sep + line; //+ ((lineEnd < end && src[lineEnd]) || '')\n\n sep = lineEnd < end && src[lineEnd] || '';\n prevMoreIndented = true;\n } else {\n str += sep + line;\n sep = folded && i < keepStart ? ' ' : '\\n';\n prevMoreIndented = false;\n }\n\n if (atStart && line !== '') atStart = false;\n }\n }\n\n return this.chomping === Chomp.STRIP ? str : str + '\\n';\n }\n\n parseBlockHeader(start) {\n const {\n src\n } = this.context;\n let offset = start + 1;\n let bi = '';\n\n while (true) {\n const ch = src[offset];\n\n switch (ch) {\n case '-':\n this.chomping = Chomp.STRIP;\n break;\n\n case '+':\n this.chomping = Chomp.KEEP;\n break;\n\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n bi += ch;\n break;\n\n default:\n this.blockIndent = Number(bi) || null;\n this.header = new PlainValue.Range(start, offset);\n return offset;\n }\n\n offset += 1;\n }\n }\n\n parseBlockValue(start) {\n const {\n indent,\n src\n } = this.context;\n const explicit = !!this.blockIndent;\n let offset = start;\n let valueEnd = start;\n let minBlockIndent = 1;\n\n for (let ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n offset += 1;\n if (PlainValue.Node.atDocumentBoundary(src, offset)) break;\n const end = PlainValue.Node.endOfBlockIndent(src, indent, offset); // should not include tab?\n\n if (end === null) break;\n const ch = src[end];\n const lineIndent = end - (offset + indent);\n\n if (!this.blockIndent) {\n // no explicit block indent, none yet detected\n if (src[end] !== '\\n') {\n // first line with non-whitespace content\n if (lineIndent < minBlockIndent) {\n const msg = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n this.error = new PlainValue.YAMLSemanticError(this, msg);\n }\n\n this.blockIndent = lineIndent;\n } else if (lineIndent > minBlockIndent) {\n // empty line with more whitespace\n minBlockIndent = lineIndent;\n }\n } else if (ch && ch !== '\\n' && lineIndent < this.blockIndent) {\n if (src[end] === '#') break;\n\n if (!this.error) {\n const src = explicit ? 'explicit indentation indicator' : 'first line';\n const msg = `Block scalars must not be less indented than their ${src}`;\n this.error = new PlainValue.YAMLSemanticError(this, msg);\n }\n }\n\n if (src[end] === '\\n') {\n offset = end;\n } else {\n offset = valueEnd = PlainValue.Node.endOfLine(src, end);\n }\n }\n\n if (this.chomping !== Chomp.KEEP) {\n offset = src[valueEnd] ? valueEnd + 1 : valueEnd;\n }\n\n this.valueRange = new PlainValue.Range(start + 1, offset);\n return offset;\n }\n /**\n * Parses a block value from the source\n *\n * Accepted forms are:\n * ```\n * BS\n * block\n * lines\n *\n * BS #comment\n * block\n * lines\n * ```\n * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines\n * are empty or have an indent level greater than `indent`.\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this block\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = this.parseBlockHeader(start);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n offset = this.parseBlockValue(offset);\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n return this.header ? this.header.setOrigRange(cr, offset) : offset;\n }\n\n}\n\nclass FlowCollection extends PlainValue.Node {\n constructor(type, props) {\n super(type, props);\n this.items = null;\n }\n\n prevNodeIsJsonLike(idx = this.items.length) {\n const node = this.items[idx - 1];\n return !!node && (node.jsonLike || node.type === PlainValue.Type.COMMENT && this.prevNodeIsJsonLike(idx - 1));\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n parseNode,\n src\n } = context;\n let {\n indent,\n lineStart\n } = context;\n let char = src[start]; // { or [\n\n this.items = [{\n char,\n offset: start\n }];\n let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1);\n char = src[offset];\n\n while (char && char !== ']' && char !== '}') {\n switch (char) {\n case '\\n':\n {\n lineStart = offset + 1;\n const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart);\n\n if (src[wsEnd] === '\\n') {\n const blankLine = new BlankLine();\n lineStart = blankLine.parse({\n src\n }, lineStart);\n this.items.push(blankLine);\n }\n\n offset = PlainValue.Node.endOfIndent(src, lineStart);\n\n if (offset <= lineStart + indent) {\n char = src[offset];\n\n if (offset < lineStart + indent || char !== ']' && char !== '}') {\n const msg = 'Insufficient indentation in flow collection';\n this.error = new PlainValue.YAMLSemanticError(this, msg);\n }\n }\n }\n break;\n\n case ',':\n {\n this.items.push({\n char,\n offset\n });\n offset += 1;\n }\n break;\n\n case '#':\n {\n const comment = new Comment();\n offset = comment.parse({\n src\n }, offset);\n this.items.push(comment);\n }\n break;\n\n case '?':\n case ':':\n {\n const next = src[offset + 1];\n\n if (next === '\\n' || next === '\\t' || next === ' ' || next === ',' || // in-flow : after JSON-like key does not need to be followed by whitespace\n char === ':' && this.prevNodeIsJsonLike()) {\n this.items.push({\n char,\n offset\n });\n offset += 1;\n break;\n }\n }\n // fallthrough\n\n default:\n {\n const node = parseNode({\n atLineStart: false,\n inCollection: false,\n inFlow: true,\n indent: -1,\n lineStart,\n parent: this\n }, offset);\n\n if (!node) {\n // at next document start\n this.valueRange = new PlainValue.Range(start, offset);\n return offset;\n }\n\n this.items.push(node);\n offset = PlainValue.Node.normalizeOffset(src, node.range.end);\n }\n }\n\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n char = src[offset];\n }\n\n this.valueRange = new PlainValue.Range(start, offset + 1);\n\n if (char) {\n this.items.push({\n char,\n offset\n });\n offset = PlainValue.Node.endOfWhiteSpace(src, offset + 1);\n offset = this.parseComment(offset);\n }\n\n return offset;\n }\n\n setOrigRanges(cr, offset) {\n offset = super.setOrigRanges(cr, offset);\n this.items.forEach(node => {\n if (node instanceof PlainValue.Node) {\n offset = node.setOrigRanges(cr, offset);\n } else if (cr.length === 0) {\n node.origOffset = node.offset;\n } else {\n let i = offset;\n\n while (i < cr.length) {\n if (cr[i] > node.offset) break;else ++i;\n }\n\n node.origOffset = node.offset + i;\n offset = i;\n }\n });\n return offset;\n }\n\n toString() {\n const {\n context: {\n src\n },\n items,\n range,\n value\n } = this;\n if (value != null) return value;\n const nodes = items.filter(item => item instanceof PlainValue.Node);\n let str = '';\n let prevEnd = range.start;\n nodes.forEach(node => {\n const prefix = src.slice(prevEnd, node.range.start);\n prevEnd = node.range.end;\n str += prefix + String(node);\n\n if (str[str.length - 1] === '\\n' && src[prevEnd - 1] !== '\\n' && src[prevEnd] === '\\n') {\n // Comment range does not include the terminal newline, but its\n // stringified value does. Without this fix, newlines at comment ends\n // get duplicated.\n prevEnd += 1;\n }\n });\n str += src.slice(prevEnd, range.end);\n return PlainValue.Node.addStringTerminator(src, range.end, str);\n }\n\n}\n\nclass QuoteDouble extends PlainValue.Node {\n static endOfQuote(src, offset) {\n let ch = src[offset];\n\n while (ch && ch !== '\"') {\n offset += ch === '\\\\' ? 2 : 1;\n ch = src[offset];\n }\n\n return offset + 1;\n }\n /**\n * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n */\n\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n const errors = [];\n const {\n start,\n end\n } = this.valueRange;\n const {\n indent,\n src\n } = this.context;\n if (src[end - 1] !== '\"') errors.push(new PlainValue.YAMLSyntaxError(this, 'Missing closing \"quote')); // Using String#replace is too painful with escaped newlines preceded by\n // escaped backslashes; also, this should be faster.\n\n let str = '';\n\n for (let i = start + 1; i < end - 1; ++i) {\n const ch = src[i];\n\n if (ch === '\\n') {\n if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n const {\n fold,\n offset,\n error\n } = PlainValue.Node.foldNewline(src, i, indent);\n str += fold;\n i = offset;\n if (error) errors.push(new PlainValue.YAMLSemanticError(this, 'Multi-line double-quoted string needs to be sufficiently indented'));\n } else if (ch === '\\\\') {\n i += 1;\n\n switch (src[i]) {\n case '0':\n str += '\\0';\n break;\n // null character\n\n case 'a':\n str += '\\x07';\n break;\n // bell character\n\n case 'b':\n str += '\\b';\n break;\n // backspace\n\n case 'e':\n str += '\\x1b';\n break;\n // escape character\n\n case 'f':\n str += '\\f';\n break;\n // form feed\n\n case 'n':\n str += '\\n';\n break;\n // line feed\n\n case 'r':\n str += '\\r';\n break;\n // carriage return\n\n case 't':\n str += '\\t';\n break;\n // horizontal tab\n\n case 'v':\n str += '\\v';\n break;\n // vertical tab\n\n case 'N':\n str += '\\u0085';\n break;\n // Unicode next line\n\n case '_':\n str += '\\u00a0';\n break;\n // Unicode non-breaking space\n\n case 'L':\n str += '\\u2028';\n break;\n // Unicode line separator\n\n case 'P':\n str += '\\u2029';\n break;\n // Unicode paragraph separator\n\n case ' ':\n str += ' ';\n break;\n\n case '\"':\n str += '\"';\n break;\n\n case '/':\n str += '/';\n break;\n\n case '\\\\':\n str += '\\\\';\n break;\n\n case '\\t':\n str += '\\t';\n break;\n\n case 'x':\n str += this.parseCharCode(i + 1, 2, errors);\n i += 2;\n break;\n\n case 'u':\n str += this.parseCharCode(i + 1, 4, errors);\n i += 4;\n break;\n\n case 'U':\n str += this.parseCharCode(i + 1, 8, errors);\n i += 8;\n break;\n\n case '\\n':\n // skip escaped newlines, but still trim the following line\n while (src[i + 1] === ' ' || src[i + 1] === '\\t') i += 1;\n\n break;\n\n default:\n errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`));\n str += '\\\\' + src[i];\n }\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = src[i + 1];\n\n while (next === ' ' || next === '\\t') {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n return errors.length > 0 ? {\n errors,\n str\n } : str;\n }\n\n parseCharCode(offset, length, errors) {\n const {\n src\n } = this.context;\n const cc = src.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n\n if (isNaN(code)) {\n errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`));\n return src.substr(offset - 2, length + 2);\n }\n\n return String.fromCodePoint(code);\n }\n /**\n * Parses a \"double quoted\" value from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = QuoteDouble.endOfQuote(src, start + 1);\n this.valueRange = new PlainValue.Range(start, offset);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n\n}\n\nclass QuoteSingle extends PlainValue.Node {\n static endOfQuote(src, offset) {\n let ch = src[offset];\n\n while (ch) {\n if (ch === \"'\") {\n if (src[offset + 1] !== \"'\") break;\n ch = src[offset += 2];\n } else {\n ch = src[offset += 1];\n }\n }\n\n return offset + 1;\n }\n /**\n * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n */\n\n\n get strValue() {\n if (!this.valueRange || !this.context) return null;\n const errors = [];\n const {\n start,\n end\n } = this.valueRange;\n const {\n indent,\n src\n } = this.context;\n if (src[end - 1] !== \"'\") errors.push(new PlainValue.YAMLSyntaxError(this, \"Missing closing 'quote\"));\n let str = '';\n\n for (let i = start + 1; i < end - 1; ++i) {\n const ch = src[i];\n\n if (ch === '\\n') {\n if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n const {\n fold,\n offset,\n error\n } = PlainValue.Node.foldNewline(src, i, indent);\n str += fold;\n i = offset;\n if (error) errors.push(new PlainValue.YAMLSemanticError(this, 'Multi-line single-quoted string needs to be sufficiently indented'));\n } else if (ch === \"'\") {\n str += ch;\n i += 1;\n if (src[i] !== \"'\") errors.push(new PlainValue.YAMLSyntaxError(this, 'Unescaped single quote? This should not happen.'));\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = src[i + 1];\n\n while (next === ' ' || next === '\\t') {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n return errors.length > 0 ? {\n errors,\n str\n } : str;\n }\n /**\n * Parses a 'single quoted' value from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n\n parse(context, start) {\n this.context = context;\n const {\n src\n } = context;\n let offset = QuoteSingle.endOfQuote(src, start + 1);\n this.valueRange = new PlainValue.Range(start, offset);\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n\n}\n\nfunction createNewNode(type, props) {\n switch (type) {\n case PlainValue.Type.ALIAS:\n return new Alias(type, props);\n\n case PlainValue.Type.BLOCK_FOLDED:\n case PlainValue.Type.BLOCK_LITERAL:\n return new BlockValue(type, props);\n\n case PlainValue.Type.FLOW_MAP:\n case PlainValue.Type.FLOW_SEQ:\n return new FlowCollection(type, props);\n\n case PlainValue.Type.MAP_KEY:\n case PlainValue.Type.MAP_VALUE:\n case PlainValue.Type.SEQ_ITEM:\n return new CollectionItem(type, props);\n\n case PlainValue.Type.COMMENT:\n case PlainValue.Type.PLAIN:\n return new PlainValue.PlainValue(type, props);\n\n case PlainValue.Type.QUOTE_DOUBLE:\n return new QuoteDouble(type, props);\n\n case PlainValue.Type.QUOTE_SINGLE:\n return new QuoteSingle(type, props);\n\n /* istanbul ignore next */\n\n default:\n return null;\n // should never happen\n }\n}\n/**\n * @param {boolean} atLineStart - Node starts at beginning of line\n * @param {boolean} inFlow - true if currently in a flow context\n * @param {boolean} inCollection - true if currently in a collection context\n * @param {number} indent - Current level of indentation\n * @param {number} lineStart - Start of the current line\n * @param {Node} parent - The parent of the node\n * @param {string} src - Source of the YAML document\n */\n\n\nclass ParseContext {\n static parseType(src, offset, inFlow) {\n switch (src[offset]) {\n case '*':\n return PlainValue.Type.ALIAS;\n\n case '>':\n return PlainValue.Type.BLOCK_FOLDED;\n\n case '|':\n return PlainValue.Type.BLOCK_LITERAL;\n\n case '{':\n return PlainValue.Type.FLOW_MAP;\n\n case '[':\n return PlainValue.Type.FLOW_SEQ;\n\n case '?':\n return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_KEY : PlainValue.Type.PLAIN;\n\n case ':':\n return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_VALUE : PlainValue.Type.PLAIN;\n\n case '-':\n return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.SEQ_ITEM : PlainValue.Type.PLAIN;\n\n case '\"':\n return PlainValue.Type.QUOTE_DOUBLE;\n\n case \"'\":\n return PlainValue.Type.QUOTE_SINGLE;\n\n default:\n return PlainValue.Type.PLAIN;\n }\n }\n\n constructor(orig = {}, {\n atLineStart,\n inCollection,\n inFlow,\n indent,\n lineStart,\n parent\n } = {}) {\n PlainValue._defineProperty(this, \"parseNode\", (overlay, start) => {\n if (PlainValue.Node.atDocumentBoundary(this.src, start)) return null;\n const context = new ParseContext(this, overlay);\n const {\n props,\n type,\n valueStart\n } = context.parseProps(start);\n const node = createNewNode(type, props);\n let offset = node.parse(context, valueStart);\n node.range = new PlainValue.Range(start, offset);\n /* istanbul ignore if */\n\n if (offset <= start) {\n // This should never happen, but if it does, let's make sure to at least\n // step one character forward to avoid a busy loop.\n node.error = new Error(`Node#parse consumed no characters`);\n node.error.parseEnd = offset;\n node.error.source = node;\n node.range.end = start + 1;\n }\n\n if (context.nodeStartsCollection(node)) {\n if (!node.error && !context.atLineStart && context.parent.type === PlainValue.Type.DOCUMENT) {\n node.error = new PlainValue.YAMLSyntaxError(node, 'Block collection must not have preceding content here (e.g. directives-end indicator)');\n }\n\n const collection = new Collection(node);\n offset = collection.parse(new ParseContext(context), offset);\n collection.range = new PlainValue.Range(start, offset);\n return collection;\n }\n\n return node;\n });\n\n this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false;\n this.inCollection = inCollection != null ? inCollection : orig.inCollection || false;\n this.inFlow = inFlow != null ? inFlow : orig.inFlow || false;\n this.indent = indent != null ? indent : orig.indent;\n this.lineStart = lineStart != null ? lineStart : orig.lineStart;\n this.parent = parent != null ? parent : orig.parent || {};\n this.root = orig.root;\n this.src = orig.src;\n }\n\n nodeStartsCollection(node) {\n const {\n inCollection,\n inFlow,\n src\n } = this;\n if (inCollection || inFlow) return false;\n if (node instanceof CollectionItem) return true; // check for implicit key\n\n let offset = node.range.end;\n if (src[offset] === '\\n' || src[offset - 1] === '\\n') return false;\n offset = PlainValue.Node.endOfWhiteSpace(src, offset);\n return src[offset] === ':';\n } // Anchor and tag are before type, which determines the node implementation\n // class; hence this intermediate step.\n\n\n parseProps(offset) {\n const {\n inFlow,\n parent,\n src\n } = this;\n const props = [];\n let lineHasProps = false;\n offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset);\n let ch = src[offset];\n\n while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === '\\n') {\n if (ch === '\\n') {\n const lineStart = offset + 1;\n const inEnd = PlainValue.Node.endOfIndent(src, lineStart);\n const indentDiff = inEnd - (lineStart + this.indent);\n const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart;\n if (!PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n this.atLineStart = true;\n this.lineStart = lineStart;\n lineHasProps = false;\n offset = inEnd;\n } else if (ch === PlainValue.Char.COMMENT) {\n const end = PlainValue.Node.endOfLine(src, offset + 1);\n props.push(new PlainValue.Range(offset, end));\n offset = end;\n } else {\n let end = PlainValue.Node.endOfIdentifier(src, offset + 1);\n\n if (ch === PlainValue.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, end + 13))) {\n // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n // than an empty but 'foo.bar' private-tagged node in a flow collection\n // followed without whitespace by a plain string starting with a year\n // or date divided by something.\n end = PlainValue.Node.endOfIdentifier(src, end + 5);\n }\n\n props.push(new PlainValue.Range(offset, end));\n lineHasProps = true;\n offset = PlainValue.Node.endOfWhiteSpace(src, end);\n }\n\n ch = src[offset];\n } // '- &a : b' has an anchor on an empty node\n\n\n if (lineHasProps && ch === ':' && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1;\n const type = ParseContext.parseType(src, offset, inFlow);\n return {\n props,\n type,\n valueStart: offset\n };\n }\n /**\n * Parses a node from the source\n * @param {ParseContext} overlay\n * @param {number} start - Index of first non-whitespace character for the node\n * @returns {?Node} - null if at a document boundary\n */\n\n\n}\n\n// Published as 'yaml/parse-cst'\nfunction parse(src) {\n const cr = [];\n\n if (src.indexOf('\\r') !== -1) {\n src = src.replace(/\\r\\n?/g, (match, offset) => {\n if (match.length > 1) cr.push(offset);\n return '\\n';\n });\n }\n\n const documents = [];\n let offset = 0;\n\n do {\n const doc = new Document();\n const context = new ParseContext({\n src\n });\n offset = doc.parse(context, offset);\n documents.push(doc);\n } while (offset < src.length);\n\n documents.setOrigRanges = () => {\n if (cr.length === 0) return false;\n\n for (let i = 1; i < cr.length; ++i) cr[i] -= i;\n\n let crOffset = 0;\n\n for (let i = 0; i < documents.length; ++i) {\n crOffset = documents[i].setOrigRanges(cr, crOffset);\n }\n\n cr.splice(0, cr.length);\n return true;\n };\n\n documents.toString = () => documents.join('...\\n');\n\n return documents;\n}\n\nexports.parse = parse;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\n\nfunction addCommentBefore(str, indent, comment) {\n if (!comment) return str;\n const cc = comment.replace(/[\\s\\S]^/gm, `$&${indent}#`);\n return `#${cc}\\n${indent}${str}`;\n}\nfunction addComment(str, indent, comment) {\n return !comment ? str : comment.indexOf('\\n') === -1 ? `${str} #${comment}` : `${str}\\n` + comment.replace(/^/gm, `${indent || ''}#`);\n}\n\nclass Node {}\n\nfunction toJSON(value, arg, ctx) {\n if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx));\n\n if (value && typeof value.toJSON === 'function') {\n const anchor = ctx && ctx.anchors && ctx.anchors.get(value);\n if (anchor) ctx.onCreate = res => {\n anchor.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (anchor && ctx.onCreate) ctx.onCreate(res);\n return res;\n }\n\n if ((!ctx || !ctx.keep) && typeof value === 'bigint') return Number(value);\n return value;\n}\n\nclass Scalar extends Node {\n constructor(value) {\n super();\n this.value = value;\n }\n\n toJSON(arg, ctx) {\n return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx);\n }\n\n toString() {\n return String(this.value);\n }\n\n}\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n const o = Number.isInteger(k) && k >= 0 ? [] : {};\n o[k] = v;\n v = o;\n }\n\n return schema.createNode(v, false);\n} // null, undefined, or an empty non-string iterable (e.g. [])\n\n\nconst isEmptyPath = path => path == null || typeof path === 'object' && path[Symbol.iterator]().next().done;\nclass Collection extends Node {\n constructor(schema) {\n super();\n\n PlainValue._defineProperty(this, \"items\", []);\n\n this.schema = schema;\n }\n\n addIn(path, value) {\n if (isEmptyPath(path)) this.add(value);else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (node instanceof Collection) node.addIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n\n deleteIn([key, ...rest]) {\n if (rest.length === 0) return this.delete(key);\n const node = this.get(key, true);\n if (node instanceof Collection) return node.deleteIn(rest);else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n\n getIn([key, ...rest], keepScalar) {\n const node = this.get(key, true);\n if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node;else return node instanceof Collection ? node.getIn(rest, keepScalar) : undefined;\n }\n\n hasAllNullValues() {\n return this.items.every(node => {\n if (!node || node.type !== 'PAIR') return false;\n const n = node.value;\n return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag;\n });\n }\n\n hasIn([key, ...rest]) {\n if (rest.length === 0) return this.has(key);\n const node = this.get(key, true);\n return node instanceof Collection ? node.hasIn(rest) : false;\n }\n\n setIn([key, ...rest], value) {\n if (rest.length === 0) {\n this.set(key, value);\n } else {\n const node = this.get(key, true);\n if (node instanceof Collection) node.setIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n } // overridden in implementations\n\n /* istanbul ignore next */\n\n\n toJSON() {\n return null;\n }\n\n toString(ctx, {\n blockItem,\n flowChars,\n isMap,\n itemIndent\n }, onComment, onChompKeep) {\n const {\n indent,\n indentStep,\n stringify\n } = ctx;\n const inFlow = this.type === PlainValue.Type.FLOW_MAP || this.type === PlainValue.Type.FLOW_SEQ || ctx.inFlow;\n if (inFlow) itemIndent += indentStep;\n const allNullValues = isMap && this.hasAllNullValues();\n ctx = Object.assign({}, ctx, {\n allNullValues,\n indent: itemIndent,\n inFlow,\n type: null\n });\n let chompKeep = false;\n let hasItemWithNewLine = false;\n const nodes = this.items.reduce((nodes, item, i) => {\n let comment;\n\n if (item) {\n if (!chompKeep && item.spaceBefore) nodes.push({\n type: 'comment',\n str: ''\n });\n if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach(line => {\n nodes.push({\n type: 'comment',\n str: `#${line}`\n });\n });\n if (item.comment) comment = item.comment;\n if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true;\n }\n\n chompKeep = false;\n let str = stringify(item, ctx, () => comment = null, () => chompKeep = true);\n if (inFlow && !hasItemWithNewLine && str.includes('\\n')) hasItemWithNewLine = true;\n if (inFlow && i < this.items.length - 1) str += ',';\n str = addComment(str, itemIndent, comment);\n if (chompKeep && (comment || inFlow)) chompKeep = false;\n nodes.push({\n type: 'item',\n str\n });\n return nodes;\n }, []);\n let str;\n\n if (nodes.length === 0) {\n str = flowChars.start + flowChars.end;\n } else if (inFlow) {\n const {\n start,\n end\n } = flowChars;\n const strings = nodes.map(n => n.str);\n\n if (hasItemWithNewLine || strings.reduce((sum, str) => sum + str.length + 2, 2) > Collection.maxFlowStringSingleLineLength) {\n str = start;\n\n for (const s of strings) {\n str += s ? `\\n${indentStep}${indent}${s}` : '\\n';\n }\n\n str += `\\n${indent}${end}`;\n } else {\n str = `${start} ${strings.join(' ')} ${end}`;\n }\n } else {\n const strings = nodes.map(blockItem);\n str = strings.shift();\n\n for (const s of strings) str += s ? `\\n${indent}${s}` : '\\n';\n }\n\n if (this.comment) {\n str += '\\n' + this.comment.replace(/^/gm, `${indent}#`);\n if (onComment) onComment();\n } else if (chompKeep && onChompKeep) onChompKeep();\n\n return str;\n }\n\n}\n\nPlainValue._defineProperty(Collection, \"maxFlowStringSingleLineLength\", 60);\n\nfunction asItemIndex(key) {\n let idx = key instanceof Scalar ? key.value : key;\n if (idx && typeof idx === 'string') idx = Number(idx);\n return Number.isInteger(idx) && idx >= 0 ? idx : null;\n}\n\nclass YAMLSeq extends Collection {\n add(value) {\n this.items.push(value);\n }\n\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number') return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number') return undefined;\n const it = this.items[idx];\n return !keepScalar && it instanceof Scalar ? it.value : it;\n }\n\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number') throw new Error(`Expected a valid index, not ${key}.`);\n this.items[idx] = value;\n }\n\n toJSON(_, ctx) {\n const seq = [];\n if (ctx && ctx.onCreate) ctx.onCreate(seq);\n let i = 0;\n\n for (const item of this.items) seq.push(toJSON(item, String(i++), ctx));\n\n return seq;\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n return super.toString(ctx, {\n blockItem: n => n.type === 'comment' ? n.str : `- ${n.str}`,\n flowChars: {\n start: '[',\n end: ']'\n },\n isMap: false,\n itemIndent: (ctx.indent || '') + ' '\n }, onComment, onChompKeep);\n }\n\n}\n\nconst stringifyKey = (key, jsKey, ctx) => {\n if (jsKey === null) return '';\n if (typeof jsKey !== 'object') return String(jsKey);\n if (key instanceof Node && ctx && ctx.doc) return key.toString({\n anchors: {},\n doc: ctx.doc,\n indent: '',\n indentStep: ctx.indentStep,\n inFlow: true,\n inStringifyKey: true,\n stringify: ctx.stringify\n });\n return JSON.stringify(jsKey);\n};\n\nclass Pair extends Node {\n constructor(key, value = null) {\n super();\n this.key = key;\n this.value = value;\n this.type = Pair.Type.PAIR;\n }\n\n get commentBefore() {\n return this.key instanceof Node ? this.key.commentBefore : undefined;\n }\n\n set commentBefore(cb) {\n if (this.key == null) this.key = new Scalar(null);\n if (this.key instanceof Node) this.key.commentBefore = cb;else {\n const msg = 'Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.';\n throw new Error(msg);\n }\n }\n\n addToJSMap(ctx, map) {\n const key = toJSON(this.key, '', ctx);\n\n if (map instanceof Map) {\n const value = toJSON(this.value, key, ctx);\n map.set(key, value);\n } else if (map instanceof Set) {\n map.add(key);\n } else {\n const stringKey = stringifyKey(this.key, key, ctx);\n map[stringKey] = toJSON(this.value, stringKey, ctx);\n }\n\n return map;\n }\n\n toJSON(_, ctx) {\n const pair = ctx && ctx.mapAsMap ? new Map() : {};\n return this.addToJSMap(ctx, pair);\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx || !ctx.doc) return JSON.stringify(this);\n const {\n indent: indentSize,\n indentSeq,\n simpleKeys\n } = ctx.doc.options;\n let {\n key,\n value\n } = this;\n let keyComment = key instanceof Node && key.comment;\n\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n\n if (key instanceof Collection) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n\n const explicitKey = !simpleKeys && (!key || keyComment || key instanceof Collection || key.type === PlainValue.Type.BLOCK_FOLDED || key.type === PlainValue.Type.BLOCK_LITERAL);\n const {\n doc,\n indent,\n indentStep,\n stringify\n } = ctx;\n ctx = Object.assign({}, ctx, {\n implicitKey: !explicitKey,\n indent: indent + indentStep\n });\n let chompKeep = false;\n let str = stringify(key, ctx, () => keyComment = null, () => chompKeep = true);\n str = addComment(str, ctx.indent, keyComment);\n\n if (ctx.allNullValues && !simpleKeys) {\n if (this.comment) {\n str = addComment(str, ctx.indent, this.comment);\n if (onComment) onComment();\n } else if (chompKeep && !keyComment && onChompKeep) onChompKeep();\n\n return ctx.inFlow ? str : `? ${str}`;\n }\n\n str = explicitKey ? `? ${str}\\n${indent}:` : `${str}:`;\n\n if (this.comment) {\n // expected (but not strictly required) to be a single-line comment\n str = addComment(str, ctx.indent, this.comment);\n if (onComment) onComment();\n }\n\n let vcb = '';\n let valueComment = null;\n\n if (value instanceof Node) {\n if (value.spaceBefore) vcb = '\\n';\n\n if (value.commentBefore) {\n const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`);\n vcb += `\\n${cs}`;\n }\n\n valueComment = value.comment;\n } else if (value && typeof value === 'object') {\n value = doc.schema.createNode(value, true);\n }\n\n ctx.implicitKey = false;\n if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n\n if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== PlainValue.Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substr(2);\n }\n\n const valueStr = stringify(value, ctx, () => valueComment = null, () => chompKeep = true);\n let ws = ' ';\n\n if (vcb || this.comment) {\n ws = `${vcb}\\n${ctx.indent}`;\n } else if (!explicitKey && value instanceof Collection) {\n const flow = valueStr[0] === '[' || valueStr[0] === '{';\n if (!flow || valueStr.includes('\\n')) ws = `\\n${ctx.indent}`;\n }\n\n if (chompKeep && !valueComment && onChompKeep) onChompKeep();\n return addComment(str + ws + valueStr, ctx.indent, valueComment);\n }\n\n}\n\nPlainValue._defineProperty(Pair, \"Type\", {\n PAIR: 'PAIR',\n MERGE_PAIR: 'MERGE_PAIR'\n});\n\nconst getAliasCount = (node, anchors) => {\n if (node instanceof Alias) {\n const anchor = anchors.get(node.source);\n return anchor.count * anchor.aliasCount;\n } else if (node instanceof Collection) {\n let count = 0;\n\n for (const item of node.items) {\n const c = getAliasCount(item, anchors);\n if (c > count) count = c;\n }\n\n return count;\n } else if (node instanceof Pair) {\n const kc = getAliasCount(node.key, anchors);\n const vc = getAliasCount(node.value, anchors);\n return Math.max(kc, vc);\n }\n\n return 1;\n};\n\nclass Alias extends Node {\n static stringify({\n range,\n source\n }, {\n anchors,\n doc,\n implicitKey,\n inStringifyKey\n }) {\n let anchor = Object.keys(anchors).find(a => anchors[a] === source);\n if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName();\n if (anchor) return `*${anchor}${implicitKey ? ' ' : ''}`;\n const msg = doc.anchors.getName(source) ? 'Alias node must be after source node' : 'Source node not found for alias node';\n throw new Error(`${msg} [${range}]`);\n }\n\n constructor(source) {\n super();\n this.source = source;\n this.type = PlainValue.Type.ALIAS;\n }\n\n set tag(t) {\n throw new Error('Alias nodes cannot have tags');\n }\n\n toJSON(arg, ctx) {\n if (!ctx) return toJSON(this.source, arg, ctx);\n const {\n anchors,\n maxAliasCount\n } = ctx;\n const anchor = anchors.get(this.source);\n /* istanbul ignore if */\n\n if (!anchor || anchor.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);\n }\n\n if (maxAliasCount >= 0) {\n anchor.count += 1;\n if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors);\n\n if (anchor.count * anchor.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);\n }\n }\n\n return anchor.res;\n } // Only called when stringifying an alias mapping key while constructing\n // Object output.\n\n\n toString(ctx) {\n return Alias.stringify(this, ctx);\n }\n\n}\n\nPlainValue._defineProperty(Alias, \"default\", true);\n\nfunction findPair(items, key) {\n const k = key instanceof Scalar ? key.value : key;\n\n for (const it of items) {\n if (it instanceof Pair) {\n if (it.key === key || it.key === k) return it;\n if (it.key && it.key.value === k) return it;\n }\n }\n\n return undefined;\n}\nclass YAMLMap extends Collection {\n add(pair, overwrite) {\n if (!pair) pair = new Pair(pair);else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value);\n const prev = findPair(this.items, pair.key);\n const sortEntries = this.schema && this.schema.sortMapEntries;\n\n if (prev) {\n if (overwrite) prev.value = pair.value;else throw new Error(`Key ${pair.key} already set`);\n } else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(pair, item) < 0);\n if (i === -1) this.items.push(pair);else this.items.splice(i, 0, pair);\n } else {\n this.items.push(pair);\n }\n }\n\n delete(key) {\n const it = findPair(this.items, key);\n if (!it) return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it && it.value;\n return !keepScalar && node instanceof Scalar ? node.value : node;\n }\n\n has(key) {\n return !!findPair(this.items, key);\n }\n\n set(key, value) {\n this.add(new Pair(key, value), true);\n }\n /**\n * @param {*} arg ignored\n * @param {*} ctx Conversion context, originally set in Document#toJSON()\n * @param {Class} Type If set, forces the returned collection type\n * @returns {*} Instance of Type, Map, or Object\n */\n\n\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx && ctx.mapAsMap ? new Map() : {};\n if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n for (const item of this.items) item.addToJSMap(ctx, map);\n\n return map;\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n\n for (const item of this.items) {\n if (!(item instanceof Pair)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n\n return super.toString(ctx, {\n blockItem: n => n.str,\n flowChars: {\n start: '{',\n end: '}'\n },\n isMap: true,\n itemIndent: ctx.indent || ''\n }, onComment, onChompKeep);\n }\n\n}\n\nconst MERGE_KEY = '<<';\nclass Merge extends Pair {\n constructor(pair) {\n if (pair instanceof Pair) {\n let seq = pair.value;\n\n if (!(seq instanceof YAMLSeq)) {\n seq = new YAMLSeq();\n seq.items.push(pair.value);\n seq.range = pair.value.range;\n }\n\n super(pair.key, seq);\n this.range = pair.range;\n } else {\n super(new Scalar(MERGE_KEY), new YAMLSeq());\n }\n\n this.type = Pair.Type.MERGE_PAIR;\n } // If the value associated with a merge key is a single mapping node, each of\n // its key/value pairs is inserted into the current mapping, unless the key\n // already exists in it. If the value associated with the merge key is a\n // sequence, then this sequence is expected to contain mapping nodes and each\n // of these nodes is merged in turn according to its order in the sequence.\n // Keys in mapping nodes earlier in the sequence override keys specified in\n // later mapping nodes. -- http://yaml.org/type/merge.html\n\n\n addToJSMap(ctx, map) {\n for (const {\n source\n } of this.value.items) {\n if (!(source instanceof YAMLMap)) throw new Error('Merge sources must be maps');\n const srcMap = source.toJSON(null, ctx, Map);\n\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key)) map.set(key, value);\n } else if (map instanceof Set) {\n map.add(key);\n } else {\n if (!Object.prototype.hasOwnProperty.call(map, key)) map[key] = value;\n }\n }\n }\n\n return map;\n }\n\n toString(ctx, onComment) {\n const seq = this.value;\n if (seq.items.length > 1) return super.toString(ctx, onComment);\n this.value = seq.items[0];\n const str = super.toString(ctx, onComment);\n this.value = seq;\n return str;\n }\n\n}\n\nconst binaryOptions = {\n defaultType: PlainValue.Type.BLOCK_LITERAL,\n lineWidth: 76\n};\nconst boolOptions = {\n trueStr: 'true',\n falseStr: 'false'\n};\nconst intOptions = {\n asBigInt: false\n};\nconst nullOptions = {\n nullStr: 'null'\n};\nconst strOptions = {\n defaultType: PlainValue.Type.PLAIN,\n doubleQuoted: {\n jsonEncoding: false,\n minMultiLineLength: 40\n },\n fold: {\n lineWidth: 80,\n minContentWidth: 20\n }\n};\n\nfunction resolveScalar(str, tags, scalarFallback) {\n for (const {\n format,\n test,\n resolve\n } of tags) {\n if (test) {\n const match = str.match(test);\n\n if (match) {\n let res = resolve.apply(null, match);\n if (!(res instanceof Scalar)) res = new Scalar(res);\n if (format) res.format = format;\n return res;\n }\n }\n }\n\n if (scalarFallback) str = scalarFallback(str);\n return new Scalar(str);\n}\n\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted'; // presumes i+1 is at the start of a line\n// returns index of last newline in more-indented block\n\nconst consumeMoreIndentedLines = (text, i) => {\n let ch = text[i + 1];\n\n while (ch === ' ' || ch === '\\t') {\n do {\n ch = text[i += 1];\n } while (ch && ch !== '\\n');\n\n ch = text[i + 1];\n }\n\n return i;\n};\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n *\n * @param {string} text\n * @param {string} indent\n * @param {string} [mode='flow'] `'block'` prevents more-indented lines\n * from being folded; `'quoted'` allows for `\\` escapes, including escaped\n * newlines\n * @param {Object} options\n * @param {number} [options.indentAtStart] Accounts for leading contents on\n * the first line, defaulting to `indent.length`\n * @param {number} [options.lineWidth=80]\n * @param {number} [options.minContentWidth=20] Allow highly indented lines to\n * stretch the line width\n * @param {function} options.onFold Called once if the text is folded\n * @param {function} options.onFold Called once if any line of text exceeds\n * lineWidth characters\n */\n\n\nfunction foldFlowLines(text, indent, mode, {\n indentAtStart,\n lineWidth = 80,\n minContentWidth = 20,\n onFold,\n onOverflow\n}) {\n if (!lineWidth || lineWidth < 0) return text;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep) return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - (typeof indentAtStart === 'number' ? indentAtStart : indent.length);\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i);\n if (i !== -1) end = i + endStep;\n }\n\n for (let ch; ch = text[i += 1];) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n\n case 'u':\n i += 5;\n break;\n\n case 'U':\n i += 9;\n break;\n\n default:\n i += 1;\n }\n }\n\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i);\n end = i + endStep;\n split = undefined;\n } else {\n if (ch === ' ' && prev && prev !== ' ' && prev !== '\\n' && prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t') split = i;\n }\n\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n } else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[i += 1];\n overflow = true;\n } // i - 2 accounts for not-dropped last char + newline-escaping \\\n\n\n folds.push(i - 2);\n escapedFolds[i - 2] = true;\n end = i - 2 + endStep;\n split = undefined;\n } else {\n overflow = true;\n }\n }\n }\n\n prev = ch;\n }\n\n if (overflow && onOverflow) onOverflow();\n if (folds.length === 0) return text;\n if (onFold) onFold();\n let res = text.slice(0, folds[0]);\n\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n\n return res;\n}\n\nconst getFoldOptions = ({\n indentAtStart\n}) => indentAtStart ? Object.assign({\n indentAtStart\n}, strOptions.fold) : strOptions.fold; // Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\n\n\nconst containsDocumentMarker = str => /^(%|---|\\.\\.\\.)/m.test(str);\n\nfunction lineLengthOverLimit(str, limit) {\n const strLen = str.length;\n if (strLen <= limit) return false;\n\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit) return true;\n start = i + 1;\n if (strLen - start <= limit) return false;\n }\n }\n\n return true;\n}\n\nfunction doubleQuotedString(value, ctx) {\n const {\n implicitKey\n } = ctx;\n const {\n jsonEncoding,\n minMultiLineLength\n } = strOptions.doubleQuoted;\n const json = JSON.stringify(value);\n if (jsonEncoding) return json;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n\n if (ch === '\\\\') switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n\n case '0007':\n str += '\\\\a';\n break;\n\n case '000b':\n str += '\\\\v';\n break;\n\n case '001b':\n str += '\\\\e';\n break;\n\n case '0085':\n str += '\\\\N';\n break;\n\n case '00a0':\n str += '\\\\_';\n break;\n\n case '2028':\n str += '\\\\L';\n break;\n\n case '2029':\n str += '\\\\P';\n break;\n\n default:\n if (code.substr(0, 2) === '00') str += '\\\\x' + code.substr(2);else str += json.substr(i, 6);\n }\n\n i += 5;\n start = i + 1;\n }\n break;\n\n case 'n':\n if (implicitKey || json[i + 2] === '\"' || json.length < minMultiLineLength) {\n i += 1;\n } else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n\n while (json[i + 2] === '\\\\' && json[i + 3] === 'n' && json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n\n str += indent; // space after newline needs to be escaped to not be folded\n\n if (json[i + 2] === ' ') str += '\\\\';\n i += 1;\n start = i + 1;\n }\n\n break;\n\n default:\n i += 1;\n }\n }\n\n str = start ? str + json.slice(start) : json;\n return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx));\n}\n\nfunction singleQuotedString(value, ctx) {\n if (ctx.implicitKey) {\n if (/\\n/.test(value)) return doubleQuotedString(value, ctx);\n } else {\n // single quoted string can't have leading or trailing whitespace around newline\n if (/[ \\t]\\n|\\n[ \\t]/.test(value)) return doubleQuotedString(value, ctx);\n }\n\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx));\n}\n\nfunction blockString({\n comment,\n type,\n value\n}, ctx, onComment, onChompKeep) {\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (/\\n[\\t ]+$/.test(value) || /^\\s*$/.test(value)) {\n return doubleQuotedString(value, ctx);\n }\n\n const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const indentSize = indent ? '2' : '1'; // root is at -1\n\n const literal = type === PlainValue.Type.BLOCK_FOLDED ? false : type === PlainValue.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth - indent.length);\n let header = literal ? '|' : '>';\n if (!value) return header + '\\n';\n let wsStart = '';\n let wsEnd = '';\n value = value.replace(/[\\n\\t ]*$/, ws => {\n const n = ws.indexOf('\\n');\n\n if (n === -1) {\n header += '-'; // strip\n } else if (value === ws || n !== ws.length - 1) {\n header += '+'; // keep\n\n if (onChompKeep) onChompKeep();\n }\n\n wsEnd = ws.replace(/\\n$/, '');\n return '';\n }).replace(/^[\\n ]*/, ws => {\n if (ws.indexOf(' ') !== -1) header += indentSize;\n const m = ws.match(/ +$/);\n\n if (m) {\n wsStart = ws.slice(0, -m[0].length);\n return m[0];\n } else {\n wsStart = ws;\n return '';\n }\n });\n if (wsEnd) wsEnd = wsEnd.replace(/\\n+(?!\\n|$)/g, `$&${indent}`);\n if (wsStart) wsStart = wsStart.replace(/\\n+/g, `$&${indent}`);\n\n if (comment) {\n header += ' #' + comment.replace(/ ?[\\r\\n]+/g, ' ');\n if (onComment) onComment();\n }\n\n if (!value) return `${header}${indentSize}\\n${indent}${wsEnd}`;\n\n if (literal) {\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `${header}\\n${indent}${wsStart}${value}${wsEnd}`;\n }\n\n value = value.replace(/\\n+/g, '\\n$&').replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ ind.line ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n const body = foldFlowLines(`${wsStart}${value}${wsEnd}`, indent, FOLD_BLOCK, strOptions.fold);\n return `${header}\\n${indent}${body}`;\n}\n\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const {\n comment,\n type,\n value\n } = item;\n const {\n actualString,\n implicitKey,\n indent,\n inFlow\n } = ctx;\n\n if (implicitKey && /[\\n[\\]{},]/.test(value) || inFlow && /[[\\]{},]/.test(value)) {\n return doubleQuotedString(value, ctx);\n }\n\n if (!value || /^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - empty string, '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || value.indexOf('\\n') === -1 ? value.indexOf('\"') !== -1 && value.indexOf(\"'\") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);\n }\n\n if (!implicitKey && !inFlow && type !== PlainValue.Type.PLAIN && value.indexOf('\\n') !== -1) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n\n if (indent === '' && containsDocumentMarker(value)) {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n\n const str = value.replace(/\\n+/g, `$&\\n${indent}`); // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n\n if (actualString) {\n const {\n tags\n } = ctx.doc.schema;\n const resolved = resolveScalar(str, tags, tags.scalarFallback).value;\n if (typeof resolved !== 'string') return doubleQuotedString(value, ctx);\n }\n\n const body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx));\n\n if (comment && !inFlow && (body.indexOf('\\n') !== -1 || comment.indexOf('\\n') !== -1)) {\n if (onComment) onComment();\n return addCommentBefore(body, indent, comment);\n }\n\n return body;\n}\n\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const {\n defaultType\n } = strOptions;\n const {\n implicitKey,\n inFlow\n } = ctx;\n let {\n type,\n value\n } = item;\n\n if (typeof value !== 'string') {\n value = String(value);\n item = Object.assign({}, item, {\n value\n });\n }\n\n const _stringify = _type => {\n switch (_type) {\n case PlainValue.Type.BLOCK_FOLDED:\n case PlainValue.Type.BLOCK_LITERAL:\n return blockString(item, ctx, onComment, onChompKeep);\n\n case PlainValue.Type.QUOTE_DOUBLE:\n return doubleQuotedString(value, ctx);\n\n case PlainValue.Type.QUOTE_SINGLE:\n return singleQuotedString(value, ctx);\n\n case PlainValue.Type.PLAIN:\n return plainString(item, ctx, onComment, onChompKeep);\n\n default:\n return null;\n }\n };\n\n if (type !== PlainValue.Type.QUOTE_DOUBLE && /[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/.test(value)) {\n // force double quotes on control characters\n type = PlainValue.Type.QUOTE_DOUBLE;\n } else if ((implicitKey || inFlow) && (type === PlainValue.Type.BLOCK_FOLDED || type === PlainValue.Type.BLOCK_LITERAL)) {\n // should not happen; blocks are not valid inside flow containers\n type = PlainValue.Type.QUOTE_DOUBLE;\n }\n\n let res = _stringify(type);\n\n if (res === null) {\n res = _stringify(defaultType);\n if (res === null) throw new Error(`Unsupported default string type ${defaultType}`);\n }\n\n return res;\n}\n\nfunction stringifyNumber({\n format,\n minFractionDigits,\n tag,\n value\n}) {\n if (typeof value === 'bigint') return String(value);\n if (!isFinite(value)) return isNaN(value) ? '.nan' : value < 0 ? '-.inf' : '.inf';\n let n = JSON.stringify(value);\n\n if (!format && minFractionDigits && (!tag || tag === 'tag:yaml.org,2002:float') && /^\\d/.test(n)) {\n let i = n.indexOf('.');\n\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n\n let d = minFractionDigits - (n.length - i - 1);\n\n while (d-- > 0) n += '0';\n }\n\n return n;\n}\n\nfunction checkFlowCollectionEnd(errors, cst) {\n let char, name;\n\n switch (cst.type) {\n case PlainValue.Type.FLOW_MAP:\n char = '}';\n name = 'flow map';\n break;\n\n case PlainValue.Type.FLOW_SEQ:\n char = ']';\n name = 'flow sequence';\n break;\n\n default:\n errors.push(new PlainValue.YAMLSemanticError(cst, 'Not a flow collection!?'));\n return;\n }\n\n let lastItem;\n\n for (let i = cst.items.length - 1; i >= 0; --i) {\n const item = cst.items[i];\n\n if (!item || item.type !== PlainValue.Type.COMMENT) {\n lastItem = item;\n break;\n }\n }\n\n if (lastItem && lastItem.char !== char) {\n const msg = `Expected ${name} to end with ${char}`;\n let err;\n\n if (typeof lastItem.offset === 'number') {\n err = new PlainValue.YAMLSemanticError(cst, msg);\n err.offset = lastItem.offset + 1;\n } else {\n err = new PlainValue.YAMLSemanticError(lastItem, msg);\n if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start;\n }\n\n errors.push(err);\n }\n}\nfunction checkFlowCommentSpace(errors, comment) {\n const prev = comment.context.src[comment.range.start - 1];\n\n if (prev !== '\\n' && prev !== '\\t' && prev !== ' ') {\n const msg = 'Comments must be separated from other tokens by white space characters';\n errors.push(new PlainValue.YAMLSemanticError(comment, msg));\n }\n}\nfunction getLongKeyError(source, key) {\n const sk = String(key);\n const k = sk.substr(0, 8) + '...' + sk.substr(-8);\n return new PlainValue.YAMLSemanticError(source, `The \"${k}\" key is too long`);\n}\nfunction resolveComments(collection, comments) {\n for (const {\n afterKey,\n before,\n comment\n } of comments) {\n let item = collection.items[before];\n\n if (!item) {\n if (comment !== undefined) {\n if (collection.comment) collection.comment += '\\n' + comment;else collection.comment = comment;\n }\n } else {\n if (afterKey && item.value) item = item.value;\n\n if (comment === undefined) {\n if (afterKey || !item.commentBefore) item.spaceBefore = true;\n } else {\n if (item.commentBefore) item.commentBefore += '\\n' + comment;else item.commentBefore = comment;\n }\n }\n }\n}\n\n// on error, will return { str: string, errors: Error[] }\nfunction resolveString(doc, node) {\n const res = node.strValue;\n if (!res) return '';\n if (typeof res === 'string') return res;\n res.errors.forEach(error => {\n if (!error.source) error.source = node;\n doc.errors.push(error);\n });\n return res.str;\n}\n\nfunction resolveTagHandle(doc, node) {\n const {\n handle,\n suffix\n } = node.tag;\n let prefix = doc.tagPrefixes.find(p => p.handle === handle);\n\n if (!prefix) {\n const dtp = doc.getDefaults().tagPrefixes;\n if (dtp) prefix = dtp.find(p => p.handle === handle);\n if (!prefix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag handle is non-default and was not declared.`);\n }\n\n if (!suffix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag has no suffix.`);\n\n if (handle === '!' && (doc.version || doc.options.version) === '1.0') {\n if (suffix[0] === '^') {\n doc.warnings.push(new PlainValue.YAMLWarning(node, 'YAML 1.0 ^ tag expansion is not supported'));\n return suffix;\n }\n\n if (/[:/]/.test(suffix)) {\n // word/foo -> tag:word.yaml.org,2002:foo\n const vocab = suffix.match(/^([a-z0-9-]+)\\/(.*)/i);\n return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`;\n }\n }\n\n return prefix.prefix + decodeURIComponent(suffix);\n}\n\nfunction resolveTagName(doc, node) {\n const {\n tag,\n type\n } = node;\n let nonSpecific = false;\n\n if (tag) {\n const {\n handle,\n suffix,\n verbatim\n } = tag;\n\n if (verbatim) {\n if (verbatim !== '!' && verbatim !== '!!') return verbatim;\n const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`;\n doc.errors.push(new PlainValue.YAMLSemanticError(node, msg));\n } else if (handle === '!' && !suffix) {\n nonSpecific = true;\n } else {\n try {\n return resolveTagHandle(doc, node);\n } catch (error) {\n doc.errors.push(error);\n }\n }\n }\n\n switch (type) {\n case PlainValue.Type.BLOCK_FOLDED:\n case PlainValue.Type.BLOCK_LITERAL:\n case PlainValue.Type.QUOTE_DOUBLE:\n case PlainValue.Type.QUOTE_SINGLE:\n return PlainValue.defaultTags.STR;\n\n case PlainValue.Type.FLOW_MAP:\n case PlainValue.Type.MAP:\n return PlainValue.defaultTags.MAP;\n\n case PlainValue.Type.FLOW_SEQ:\n case PlainValue.Type.SEQ:\n return PlainValue.defaultTags.SEQ;\n\n case PlainValue.Type.PLAIN:\n return nonSpecific ? PlainValue.defaultTags.STR : null;\n\n default:\n return null;\n }\n}\n\nfunction resolveByTagName(doc, node, tagName) {\n const {\n tags\n } = doc.schema;\n const matchWithTest = [];\n\n for (const tag of tags) {\n if (tag.tag === tagName) {\n if (tag.test) matchWithTest.push(tag);else {\n const res = tag.resolve(doc, node);\n return res instanceof Collection ? res : new Scalar(res);\n }\n }\n }\n\n const str = resolveString(doc, node);\n if (typeof str === 'string' && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback);\n return null;\n}\n\nfunction getFallbackTagName({\n type\n}) {\n switch (type) {\n case PlainValue.Type.FLOW_MAP:\n case PlainValue.Type.MAP:\n return PlainValue.defaultTags.MAP;\n\n case PlainValue.Type.FLOW_SEQ:\n case PlainValue.Type.SEQ:\n return PlainValue.defaultTags.SEQ;\n\n default:\n return PlainValue.defaultTags.STR;\n }\n}\n\nfunction resolveTag(doc, node, tagName) {\n try {\n const res = resolveByTagName(doc, node, tagName);\n\n if (res) {\n if (tagName && node.tag) res.tag = tagName;\n return res;\n }\n } catch (error) {\n /* istanbul ignore if */\n if (!error.source) error.source = node;\n doc.errors.push(error);\n return null;\n }\n\n try {\n const fallback = getFallbackTagName(node);\n if (!fallback) throw new Error(`The tag ${tagName} is unavailable`);\n const msg = `The tag ${tagName} is unavailable, falling back to ${fallback}`;\n doc.warnings.push(new PlainValue.YAMLWarning(node, msg));\n const res = resolveByTagName(doc, node, fallback);\n res.tag = tagName;\n return res;\n } catch (error) {\n const refError = new PlainValue.YAMLReferenceError(node, error.message);\n refError.stack = error.stack;\n doc.errors.push(refError);\n return null;\n }\n}\n\nconst isCollectionItem = node => {\n if (!node) return false;\n const {\n type\n } = node;\n return type === PlainValue.Type.MAP_KEY || type === PlainValue.Type.MAP_VALUE || type === PlainValue.Type.SEQ_ITEM;\n};\n\nfunction resolveNodeProps(errors, node) {\n const comments = {\n before: [],\n after: []\n };\n let hasAnchor = false;\n let hasTag = false;\n const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props;\n\n for (const {\n start,\n end\n } of props) {\n switch (node.context.src[start]) {\n case PlainValue.Char.COMMENT:\n {\n if (!node.commentHasRequiredWhitespace(start)) {\n const msg = 'Comments must be separated from other tokens by white space characters';\n errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n const {\n header,\n valueRange\n } = node;\n const cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before;\n cc.push(node.context.src.slice(start + 1, end));\n break;\n }\n // Actual anchor & tag resolution is handled by schema, here we just complain\n\n case PlainValue.Char.ANCHOR:\n if (hasAnchor) {\n const msg = 'A node can have at most one anchor';\n errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n hasAnchor = true;\n break;\n\n case PlainValue.Char.TAG:\n if (hasTag) {\n const msg = 'A node can have at most one tag';\n errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n hasTag = true;\n break;\n }\n }\n\n return {\n comments,\n hasAnchor,\n hasTag\n };\n}\n\nfunction resolveNodeValue(doc, node) {\n const {\n anchors,\n errors,\n schema\n } = doc;\n\n if (node.type === PlainValue.Type.ALIAS) {\n const name = node.rawValue;\n const src = anchors.getNode(name);\n\n if (!src) {\n const msg = `Aliased anchor not found: ${name}`;\n errors.push(new PlainValue.YAMLReferenceError(node, msg));\n return null;\n } // Lazy resolution for circular references\n\n\n const res = new Alias(src);\n\n anchors._cstAliases.push(res);\n\n return res;\n }\n\n const tagName = resolveTagName(doc, node);\n if (tagName) return resolveTag(doc, node, tagName);\n\n if (node.type !== PlainValue.Type.PLAIN) {\n const msg = `Failed to resolve ${node.type} node here`;\n errors.push(new PlainValue.YAMLSyntaxError(node, msg));\n return null;\n }\n\n try {\n const str = resolveString(doc, node);\n return resolveScalar(str, schema.tags, schema.tags.scalarFallback);\n } catch (error) {\n if (!error.source) error.source = node;\n errors.push(error);\n return null;\n }\n} // sets node.resolved on success\n\n\nfunction resolveNode(doc, node) {\n if (!node) return null;\n if (node.error) doc.errors.push(node.error);\n const {\n comments,\n hasAnchor,\n hasTag\n } = resolveNodeProps(doc.errors, node);\n\n if (hasAnchor) {\n const {\n anchors\n } = doc;\n const name = node.anchor;\n const prev = anchors.getNode(name); // At this point, aliases for any preceding node with the same anchor\n // name have already been resolved, so it may safely be renamed.\n\n if (prev) anchors.map[anchors.newName(name)] = prev; // During parsing, we need to store the CST node in anchors.map as\n // anchors need to be available during resolution to allow for\n // circular references.\n\n anchors.map[name] = node;\n }\n\n if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) {\n const msg = 'An alias node must not specify any properties';\n doc.errors.push(new PlainValue.YAMLSemanticError(node, msg));\n }\n\n const res = resolveNodeValue(doc, node);\n\n if (res) {\n res.range = [node.range.start, node.range.end];\n if (doc.options.keepCstNodes) res.cstNode = node;\n if (doc.options.keepNodeTypes) res.type = node.type;\n const cb = comments.before.join('\\n');\n\n if (cb) {\n res.commentBefore = res.commentBefore ? `${res.commentBefore}\\n${cb}` : cb;\n }\n\n const ca = comments.after.join('\\n');\n if (ca) res.comment = res.comment ? `${res.comment}\\n${ca}` : ca;\n }\n\n return node.resolved = res;\n}\n\nfunction resolveMap(doc, cst) {\n if (cst.type !== PlainValue.Type.MAP && cst.type !== PlainValue.Type.FLOW_MAP) {\n const msg = `A ${cst.type} node cannot be resolved as a mapping`;\n doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg));\n return null;\n }\n\n const {\n comments,\n items\n } = cst.type === PlainValue.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst);\n const map = new YAMLMap();\n map.items = items;\n resolveComments(map, comments);\n let hasCollectionKey = false;\n\n for (let i = 0; i < items.length; ++i) {\n const {\n key: iKey\n } = items[i];\n if (iKey instanceof Collection) hasCollectionKey = true;\n\n if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) {\n items[i] = new Merge(items[i]);\n const sources = items[i].value.items;\n let error = null;\n sources.some(node => {\n if (node instanceof Alias) {\n // During parsing, alias sources are CST nodes; to account for\n // circular references their resolved values can't be used here.\n const {\n type\n } = node.source;\n if (type === PlainValue.Type.MAP || type === PlainValue.Type.FLOW_MAP) return false;\n return error = 'Merge nodes aliases can only point to maps';\n }\n\n return error = 'Merge nodes can only have Alias nodes as values';\n });\n if (error) doc.errors.push(new PlainValue.YAMLSemanticError(cst, error));\n } else {\n for (let j = i + 1; j < items.length; ++j) {\n const {\n key: jKey\n } = items[j];\n\n if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, 'value') && iKey.value === jKey.value) {\n const msg = `Map keys must be unique; \"${iKey}\" is repeated`;\n doc.errors.push(new PlainValue.YAMLSemanticError(cst, msg));\n break;\n }\n }\n }\n }\n\n if (hasCollectionKey && !doc.options.mapAsMap) {\n const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n doc.warnings.push(new PlainValue.YAMLWarning(cst, warn));\n }\n\n cst.resolved = map;\n return map;\n}\n\nconst valueHasPairComment = ({\n context: {\n lineStart,\n node,\n src\n },\n props\n}) => {\n if (props.length === 0) return false;\n const {\n start\n } = props[0];\n if (node && start > node.valueRange.start) return false;\n if (src[start] !== PlainValue.Char.COMMENT) return false;\n\n for (let i = lineStart; i < start; ++i) if (src[i] === '\\n') return false;\n\n return true;\n};\n\nfunction resolvePairComment(item, pair) {\n if (!valueHasPairComment(item)) return;\n const comment = item.getPropValue(0, PlainValue.Char.COMMENT, true);\n let found = false;\n const cb = pair.value.commentBefore;\n\n if (cb && cb.startsWith(comment)) {\n pair.value.commentBefore = cb.substr(comment.length + 1);\n found = true;\n } else {\n const cc = pair.value.comment;\n\n if (!item.node && cc && cc.startsWith(comment)) {\n pair.value.comment = cc.substr(comment.length + 1);\n found = true;\n }\n }\n\n if (found) pair.comment = comment;\n}\n\nfunction resolveBlockMapItems(doc, cst) {\n const comments = [];\n const items = [];\n let key = undefined;\n let keyStart = null;\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n switch (item.type) {\n case PlainValue.Type.BLANK_LINE:\n comments.push({\n afterKey: !!key,\n before: items.length\n });\n break;\n\n case PlainValue.Type.COMMENT:\n comments.push({\n afterKey: !!key,\n before: items.length,\n comment: item.comment\n });\n break;\n\n case PlainValue.Type.MAP_KEY:\n if (key !== undefined) items.push(new Pair(key));\n if (item.error) doc.errors.push(item.error);\n key = resolveNode(doc, item.node);\n keyStart = null;\n break;\n\n case PlainValue.Type.MAP_VALUE:\n {\n if (key === undefined) key = null;\n if (item.error) doc.errors.push(item.error);\n\n if (!item.context.atLineStart && item.node && item.node.type === PlainValue.Type.MAP && !item.node.context.atLineStart) {\n const msg = 'Nested mappings are not allowed in compact mappings';\n doc.errors.push(new PlainValue.YAMLSemanticError(item.node, msg));\n }\n\n let valueNode = item.node;\n\n if (!valueNode && item.props.length > 0) {\n // Comments on an empty mapping value need to be preserved, so we\n // need to construct a minimal empty node here to use instead of the\n // missing `item.node`. -- eemeli/yaml#19\n valueNode = new PlainValue.PlainValue(PlainValue.Type.PLAIN, []);\n valueNode.context = {\n parent: item,\n src: item.context.src\n };\n const pos = item.range.start + 1;\n valueNode.range = {\n start: pos,\n end: pos\n };\n valueNode.valueRange = {\n start: pos,\n end: pos\n };\n\n if (typeof item.range.origStart === 'number') {\n const origPos = item.range.origStart + 1;\n valueNode.range.origStart = valueNode.range.origEnd = origPos;\n valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos;\n }\n }\n\n const pair = new Pair(key, resolveNode(doc, valueNode));\n resolvePairComment(item, pair);\n items.push(pair);\n\n if (key && typeof keyStart === 'number') {\n if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n }\n\n key = undefined;\n keyStart = null;\n }\n break;\n\n default:\n if (key !== undefined) items.push(new Pair(key));\n key = resolveNode(doc, item);\n keyStart = item.range.start;\n if (item.error) doc.errors.push(item.error);\n\n next: for (let j = i + 1;; ++j) {\n const nextItem = cst.items[j];\n\n switch (nextItem && nextItem.type) {\n case PlainValue.Type.BLANK_LINE:\n case PlainValue.Type.COMMENT:\n continue next;\n\n case PlainValue.Type.MAP_VALUE:\n break next;\n\n default:\n {\n const msg = 'Implicit map keys need to be followed by map values';\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n break next;\n }\n }\n }\n\n if (item.valueRangeContainsNewline) {\n const msg = 'Implicit map keys need to be on a single line';\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n }\n\n }\n }\n\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments,\n items\n };\n}\n\nfunction resolveFlowMapItems(doc, cst) {\n const comments = [];\n const items = [];\n let key = undefined;\n let explicitKey = false;\n let next = '{';\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n if (typeof item.char === 'string') {\n const {\n char,\n offset\n } = item;\n\n if (char === '?' && key === undefined && !explicitKey) {\n explicitKey = true;\n next = ':';\n continue;\n }\n\n if (char === ':') {\n if (key === undefined) key = null;\n\n if (next === ':') {\n next = ',';\n continue;\n }\n } else {\n if (explicitKey) {\n if (key === undefined && char !== ',') key = null;\n explicitKey = false;\n }\n\n if (key !== undefined) {\n items.push(new Pair(key));\n key = undefined;\n\n if (char === ',') {\n next = ':';\n continue;\n }\n }\n }\n\n if (char === '}') {\n if (i === cst.items.length - 1) continue;\n } else if (char === next) {\n next = ':';\n continue;\n }\n\n const msg = `Flow map contains an unexpected ${char}`;\n const err = new PlainValue.YAMLSyntaxError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n } else if (item.type === PlainValue.Type.BLANK_LINE) {\n comments.push({\n afterKey: !!key,\n before: items.length\n });\n } else if (item.type === PlainValue.Type.COMMENT) {\n checkFlowCommentSpace(doc.errors, item);\n comments.push({\n afterKey: !!key,\n before: items.length,\n comment: item.comment\n });\n } else if (key === undefined) {\n if (next === ',') doc.errors.push(new PlainValue.YAMLSemanticError(item, 'Separator , missing in flow map'));\n key = resolveNode(doc, item);\n } else {\n if (next !== ',') doc.errors.push(new PlainValue.YAMLSemanticError(item, 'Indicator : missing in flow map entry'));\n items.push(new Pair(key, resolveNode(doc, item)));\n key = undefined;\n explicitKey = false;\n }\n }\n\n checkFlowCollectionEnd(doc.errors, cst);\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments,\n items\n };\n}\n\nfunction resolveSeq(doc, cst) {\n if (cst.type !== PlainValue.Type.SEQ && cst.type !== PlainValue.Type.FLOW_SEQ) {\n const msg = `A ${cst.type} node cannot be resolved as a sequence`;\n doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg));\n return null;\n }\n\n const {\n comments,\n items\n } = cst.type === PlainValue.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst);\n const seq = new YAMLSeq();\n seq.items = items;\n resolveComments(seq, comments);\n\n if (!doc.options.mapAsMap && items.some(it => it instanceof Pair && it.key instanceof Collection)) {\n const warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n doc.warnings.push(new PlainValue.YAMLWarning(cst, warn));\n }\n\n cst.resolved = seq;\n return seq;\n}\n\nfunction resolveBlockSeqItems(doc, cst) {\n const comments = [];\n const items = [];\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n switch (item.type) {\n case PlainValue.Type.BLANK_LINE:\n comments.push({\n before: items.length\n });\n break;\n\n case PlainValue.Type.COMMENT:\n comments.push({\n comment: item.comment,\n before: items.length\n });\n break;\n\n case PlainValue.Type.SEQ_ITEM:\n if (item.error) doc.errors.push(item.error);\n items.push(resolveNode(doc, item.node));\n\n if (item.hasProps) {\n const msg = 'Sequence items cannot have tags or anchors before the - indicator';\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n }\n\n break;\n\n default:\n if (item.error) doc.errors.push(item.error);\n doc.errors.push(new PlainValue.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`));\n }\n }\n\n return {\n comments,\n items\n };\n}\n\nfunction resolveFlowSeqItems(doc, cst) {\n const comments = [];\n const items = [];\n let explicitKey = false;\n let key = undefined;\n let keyStart = null;\n let next = '[';\n let prevItem = null;\n\n for (let i = 0; i < cst.items.length; ++i) {\n const item = cst.items[i];\n\n if (typeof item.char === 'string') {\n const {\n char,\n offset\n } = item;\n\n if (char !== ':' && (explicitKey || key !== undefined)) {\n if (explicitKey && key === undefined) key = next ? items.pop() : null;\n items.push(new Pair(key));\n explicitKey = false;\n key = undefined;\n keyStart = null;\n }\n\n if (char === next) {\n next = null;\n } else if (!next && char === '?') {\n explicitKey = true;\n } else if (next !== '[' && char === ':' && key === undefined) {\n if (next === ',') {\n key = items.pop();\n\n if (key instanceof Pair) {\n const msg = 'Chaining flow sequence pairs is invalid';\n const err = new PlainValue.YAMLSemanticError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n }\n\n if (!explicitKey && typeof keyStart === 'number') {\n const keyEnd = item.range ? item.range.start : item.offset;\n if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n const {\n src\n } = prevItem.context;\n\n for (let i = keyStart; i < keyEnd; ++i) if (src[i] === '\\n') {\n const msg = 'Implicit keys of flow sequence pairs need to be on a single line';\n doc.errors.push(new PlainValue.YAMLSemanticError(prevItem, msg));\n break;\n }\n }\n } else {\n key = null;\n }\n\n keyStart = null;\n explicitKey = false;\n next = null;\n } else if (next === '[' || char !== ']' || i < cst.items.length - 1) {\n const msg = `Flow sequence contains an unexpected ${char}`;\n const err = new PlainValue.YAMLSyntaxError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n }\n } else if (item.type === PlainValue.Type.BLANK_LINE) {\n comments.push({\n before: items.length\n });\n } else if (item.type === PlainValue.Type.COMMENT) {\n checkFlowCommentSpace(doc.errors, item);\n comments.push({\n comment: item.comment,\n before: items.length\n });\n } else {\n if (next) {\n const msg = `Expected a ${next} in flow sequence`;\n doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));\n }\n\n const value = resolveNode(doc, item);\n\n if (key === undefined) {\n items.push(value);\n prevItem = item;\n } else {\n items.push(new Pair(key, value));\n key = undefined;\n }\n\n keyStart = item.range.start;\n next = ',';\n }\n }\n\n checkFlowCollectionEnd(doc.errors, cst);\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments,\n items\n };\n}\n\nexports.Alias = Alias;\nexports.Collection = Collection;\nexports.Merge = Merge;\nexports.Node = Node;\nexports.Pair = Pair;\nexports.Scalar = Scalar;\nexports.YAMLMap = YAMLMap;\nexports.YAMLSeq = YAMLSeq;\nexports.addComment = addComment;\nexports.binaryOptions = binaryOptions;\nexports.boolOptions = boolOptions;\nexports.findPair = findPair;\nexports.intOptions = intOptions;\nexports.isEmptyPath = isEmptyPath;\nexports.nullOptions = nullOptions;\nexports.resolveMap = resolveMap;\nexports.resolveNode = resolveNode;\nexports.resolveSeq = resolveSeq;\nexports.resolveString = resolveString;\nexports.strOptions = strOptions;\nexports.stringifyNumber = stringifyNumber;\nexports.stringifyString = stringifyString;\nexports.toJSON = toJSON;\n","'use strict';\n\nvar PlainValue = require('./PlainValue-ec8e588e.js');\nvar resolveSeq = require('./resolveSeq-4a68b39b.js');\n\n/* global atob, btoa, Buffer */\nconst binary = {\n identify: value => value instanceof Uint8Array,\n // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve: (doc, node) => {\n const src = resolveSeq.resolveString(doc, node);\n\n if (typeof Buffer === 'function') {\n return Buffer.from(src, 'base64');\n } else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n\n for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i);\n\n return buffer;\n } else {\n const msg = 'This environment does not support reading binary tags; either Buffer or atob is required';\n doc.errors.push(new PlainValue.YAMLReferenceError(node, msg));\n return null;\n }\n },\n options: resolveSeq.binaryOptions,\n stringify: ({\n comment,\n type,\n value\n }, ctx, onComment, onChompKeep) => {\n let src;\n\n if (typeof Buffer === 'function') {\n src = value instanceof Buffer ? value.toString('base64') : Buffer.from(value.buffer).toString('base64');\n } else if (typeof btoa === 'function') {\n let s = '';\n\n for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]);\n\n src = btoa(s);\n } else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n\n if (!type) type = resolveSeq.binaryOptions.defaultType;\n\n if (type === PlainValue.Type.QUOTE_DOUBLE) {\n value = src;\n } else {\n const {\n lineWidth\n } = resolveSeq.binaryOptions;\n const n = Math.ceil(src.length / lineWidth);\n const lines = new Array(n);\n\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = src.substr(o, lineWidth);\n }\n\n value = lines.join(type === PlainValue.Type.BLOCK_LITERAL ? '\\n' : ' ');\n }\n\n return resolveSeq.stringifyString({\n comment,\n type,\n value\n }, ctx, onComment, onChompKeep);\n }\n};\n\nfunction parsePairs(doc, cst) {\n const seq = resolveSeq.resolveSeq(doc, cst);\n\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (item instanceof resolveSeq.Pair) continue;else if (item instanceof resolveSeq.YAMLMap) {\n if (item.items.length > 1) {\n const msg = 'Each pair must have its own sequence indicator';\n throw new PlainValue.YAMLSemanticError(cst, msg);\n }\n\n const pair = item.items[0] || new resolveSeq.Pair();\n if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore}\\n${pair.commentBefore}` : item.commentBefore;\n if (item.comment) pair.comment = pair.comment ? `${item.comment}\\n${pair.comment}` : item.comment;\n item = pair;\n }\n seq.items[i] = item instanceof resolveSeq.Pair ? item : new resolveSeq.Pair(item);\n }\n\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const pairs = new resolveSeq.YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n\n for (const it of iterable) {\n let key, value;\n\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n } else throw new TypeError(`Expected [key, value] tuple: ${it}`);\n } else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n } else throw new TypeError(`Expected { key: value } tuple: ${it}`);\n } else {\n key = it;\n }\n\n const pair = schema.createPair(key, value, ctx);\n pairs.items.push(pair);\n }\n\n return pairs;\n}\nconst pairs = {\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: parsePairs,\n createNode: createPairs\n};\n\nclass YAMLOMap extends resolveSeq.YAMLSeq {\n constructor() {\n super();\n\n PlainValue._defineProperty(this, \"add\", resolveSeq.YAMLMap.prototype.add.bind(this));\n\n PlainValue._defineProperty(this, \"delete\", resolveSeq.YAMLMap.prototype.delete.bind(this));\n\n PlainValue._defineProperty(this, \"get\", resolveSeq.YAMLMap.prototype.get.bind(this));\n\n PlainValue._defineProperty(this, \"has\", resolveSeq.YAMLMap.prototype.has.bind(this));\n\n PlainValue._defineProperty(this, \"set\", resolveSeq.YAMLMap.prototype.set.bind(this));\n\n this.tag = YAMLOMap.tag;\n }\n\n toJSON(_, ctx) {\n const map = new Map();\n if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n for (const pair of this.items) {\n let key, value;\n\n if (pair instanceof resolveSeq.Pair) {\n key = resolveSeq.toJSON(pair.key, '', ctx);\n value = resolveSeq.toJSON(pair.value, key, ctx);\n } else {\n key = resolveSeq.toJSON(pair, '', ctx);\n }\n\n if (map.has(key)) throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n\n return map;\n }\n\n}\n\nPlainValue._defineProperty(YAMLOMap, \"tag\", 'tag:yaml.org,2002:omap');\n\nfunction parseOMap(doc, cst) {\n const pairs = parsePairs(doc, cst);\n const seenKeys = [];\n\n for (const {\n key\n } of pairs.items) {\n if (key instanceof resolveSeq.Scalar) {\n if (seenKeys.includes(key.value)) {\n const msg = 'Ordered maps must not include duplicate keys';\n throw new PlainValue.YAMLSemanticError(cst, msg);\n } else {\n seenKeys.push(key.value);\n }\n }\n }\n\n return Object.assign(new YAMLOMap(), pairs);\n}\n\nfunction createOMap(schema, iterable, ctx) {\n const pairs = createPairs(schema, iterable, ctx);\n const omap = new YAMLOMap();\n omap.items = pairs.items;\n return omap;\n}\n\nconst omap = {\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve: parseOMap,\n createNode: createOMap\n};\n\nclass YAMLSet extends resolveSeq.YAMLMap {\n constructor() {\n super();\n this.tag = YAMLSet.tag;\n }\n\n add(key) {\n const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key);\n const prev = resolveSeq.findPair(this.items, pair.key);\n if (!prev) this.items.push(pair);\n }\n\n get(key, keepPair) {\n const pair = resolveSeq.findPair(this.items, key);\n return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair;\n }\n\n set(key, value) {\n if (typeof value !== 'boolean') throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = resolveSeq.findPair(this.items, key);\n\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n } else if (!prev && value) {\n this.items.push(new resolveSeq.Pair(key));\n }\n }\n\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n\n toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');\n }\n\n}\n\nPlainValue._defineProperty(YAMLSet, \"tag\", 'tag:yaml.org,2002:set');\n\nfunction parseSet(doc, cst) {\n const map = resolveSeq.resolveMap(doc, cst);\n if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, 'Set items must all have null values');\n return Object.assign(new YAMLSet(), map);\n}\n\nfunction createSet(schema, iterable, ctx) {\n const set = new YAMLSet();\n\n for (const value of iterable) set.items.push(schema.createPair(value, null, ctx));\n\n return set;\n}\n\nconst set = {\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n resolve: parseSet,\n createNode: createSet\n};\n\nconst parseSexagesimal = (sign, parts) => {\n const n = parts.split(':').reduce((n, p) => n * 60 + Number(p), 0);\n return sign === '-' ? -n : n;\n}; // hhhh:mm:ss.sss\n\n\nconst stringifySexagesimal = ({\n value\n}) => {\n if (isNaN(value) || !isFinite(value)) return resolveSeq.stringifyNumber(value);\n let sign = '';\n\n if (value < 0) {\n sign = '-';\n value = Math.abs(value);\n }\n\n const parts = [value % 60]; // seconds, including ms\n\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n } else {\n value = Math.round((value - parts[0]) / 60);\n parts.unshift(value % 60); // minutes\n\n if (value >= 60) {\n value = Math.round((value - parts[0]) / 60);\n parts.unshift(value); // hours\n }\n }\n\n return sign + parts.map(n => n < 10 ? '0' + String(n) : String(n)).join(':').replace(/000000\\d*$/, '') // % 60 may introduce error\n ;\n};\n\nconst intTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,\n resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*)$/,\n resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^(?:' + '([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?' + ')$'),\n resolve: (str, year, month, day, hour, minute, second, millisec, tz) => {\n if (millisec) millisec = (millisec + '00').substr(1, 3);\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0);\n\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz[0], tz.slice(1));\n if (Math.abs(d) < 30) d *= 60;\n date -= 60000 * d;\n }\n\n return new Date(date);\n },\n stringify: ({\n value\n }) => value.toISOString().replace(/((T00:00)?:00)?\\.000Z$/, '')\n};\n\n/* global console, process, YAML_SILENCE_DEPRECATION_WARNINGS, YAML_SILENCE_WARNINGS */\nfunction shouldWarn(deprecation) {\n const env = typeof process !== 'undefined' && process.env || {};\n\n if (deprecation) {\n if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== 'undefined') return !YAML_SILENCE_DEPRECATION_WARNINGS;\n return !env.YAML_SILENCE_DEPRECATION_WARNINGS;\n }\n\n if (typeof YAML_SILENCE_WARNINGS !== 'undefined') return !YAML_SILENCE_WARNINGS;\n return !env.YAML_SILENCE_WARNINGS;\n}\n\nfunction warn(warning, type) {\n if (shouldWarn(false)) {\n const emit = typeof process !== 'undefined' && process.emitWarning; // This will throw in Jest if `warning` is an Error instance due to\n // https://github.com/facebook/jest/issues/2549\n\n if (emit) emit(warning, type);else {\n // eslint-disable-next-line no-console\n console.warn(type ? `${type}: ${warning}` : warning);\n }\n }\n}\nfunction warnFileDeprecation(filename) {\n if (shouldWarn(true)) {\n const path = filename.replace(/.*yaml[/\\\\]/i, '').replace(/\\.js$/, '').replace(/\\\\/g, '/');\n warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, 'DeprecationWarning');\n }\n}\nconst warned = {};\nfunction warnOptionDeprecation(name, alternative) {\n if (!warned[name] && shouldWarn(true)) {\n warned[name] = true;\n let msg = `The option '${name}' will be removed in a future release`;\n msg += alternative ? `, use '${alternative}' instead.` : '.';\n warn(msg, 'DeprecationWarning');\n }\n}\n\nexports.binary = binary;\nexports.floatTime = floatTime;\nexports.intTime = intTime;\nexports.omap = omap;\nexports.pairs = pairs;\nexports.set = set;\nexports.timestamp = timestamp;\nexports.warn = warn;\nexports.warnFileDeprecation = warnFileDeprecation;\nexports.warnOptionDeprecation = warnOptionDeprecation;\n","module.exports = require('./dist').YAML\n","const core = require('@actions/core');\nconst fs = require('fs');\nconst glob = require('@actions/glob');\nconst path = require('path');\nconst sha1 = require('sha1-regex');\nconst yaml = require('yaml');\n\nfunction assertUsesSHA(uses) {\n return typeof uses === 'string' &&\n uses.includes('@') &&\n sha1.test(uses.substr(uses.indexOf('@') + 1))\n}\n\nasync function run() {\n try {\n const workflowsPath = '.github/workflows';\n const globber = await glob.create([workflowsPath + '/*.yaml', workflowsPath + '/*.yml'].join('\\n'));\n let actionHasError = false;\n\n for await (const file of globber.globGenerator()) {\n const basename = path.basename(file);\n const fileContents = fs.readFileSync(file, 'utf8');\n const yamlContents = yaml.parse(fileContents);\n const jobs = yamlContents['jobs'];\n let fileHasError = false;\n\n if (jobs === undefined) {\n core.setFailed(`The \"${basename}\" workflow does not contain jobs.`);\n }\n\n core.startGroup(workflowsPath + '/' + basename);\n\n for (const job in jobs) {\n const uses = jobs[job]['uses'];\n const steps = jobs[job]['steps'];\n\n if (uses !== undefined) {\n if (!assertUsesSHA(uses)) {\n actionHasError = true;\n fileHasError = true;\n\n core.error(`${uses} is not pinned to a full length commit SHA.`);\n }\n } else if (steps !== undefined) {\n for (const step of steps) {\n const uses = step['uses'];\n if (!assertUsesSHA(uses)) {\n actionHasError = true;\n fileHasError = true;\n\n core.error(`${uses} is not pinned to a full length commit SHA.`);\n }\n }\n } else {\n core.warning(`The \"${job}\" job of the \"${basename}\" workflow does not contain steps or uses.`);\n }\n }\n\n if (!fileHasError) {\n core.info('No issues were found.')\n }\n\n core.endGroup();\n }\n\n if (actionHasError) {\n throw new Error('At least one workflow contains an unpinned GitHub Action version.');\n }\n } catch (error) {\n core.setFailed(error.message);\n }\n}\n\nrun();\n","module.exports = require(\"assert\");;","module.exports = require(\"fs\");;","module.exports = require(\"os\");;","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\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].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\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\n__webpack_require__.ab = __dirname + \"/\";","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(351);\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;AC55BA;AACA;AACA;A;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACtvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC72BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC3gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACptDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;ACpkEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;ACjaA;AACA;AACA;A;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;AC3EA;AACA;A;;;;;;ACDA;AACA;A;;;;;;ACDA;AACA;A;;;;;;ACDA;AACA;A;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5BA;AACA;ACDA;AACA;AACA;AACA;;A","sourceRoot":""} \ No newline at end of file diff --git a/src/index.js b/src/index.js index 9092f73..4b2cf9a 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,12 @@ const path = require('path'); const sha1 = require('sha1-regex'); const yaml = require('yaml'); +function assertUsesSHA(uses) { + return typeof uses === 'string' && + uses.includes('@') && + sha1.test(uses.substr(uses.indexOf('@') + 1)) +} + async function run() { try { const workflowsPath = '.github/workflows'; @@ -23,27 +29,30 @@ async function run() { } core.startGroup(workflowsPath + '/' + basename); - + for (const job in jobs) { + const uses = jobs[job]['uses']; const steps = jobs[job]['steps']; - if (steps === undefined) { - core.warning(`The "${job}" job of the "${basename}" workflow does not contain steps.`); - } - - for (const step of steps) { - const uses = step['uses']; + if (uses !== undefined) { + if (!assertUsesSHA(uses)) { + actionHasError = true; + fileHasError = true; - if (typeof uses === 'string' && uses.includes('@')) { - const version = uses.substr(uses.indexOf('@') + 1); - - if (!sha1.test(version)) { - actionHasError = true; - fileHasError = true; + core.error(`${uses} is not pinned to a full length commit SHA.`); + } + } else if (steps !== undefined) { + for (const step of steps) { + const uses = step['uses']; + if (!assertUsesSHA(uses)) { + actionHasError = true; + fileHasError = true; - core.error(`${uses} is not pinned to a full length commit SHA.`); + core.error(`${uses} is not pinned to a full length commit SHA.`); + } } - } + } else { + core.warning(`The "${job}" job of the "${basename}" workflow does not contain steps or uses.`); } } @@ -53,7 +62,7 @@ async function run() { core.endGroup(); } - + if (actionHasError) { throw new Error('At least one workflow contains an unpinned GitHub Action version.'); } @@ -62,4 +71,4 @@ async function run() { } } -run(); \ No newline at end of file +run();