diff --git a/dist/index.js b/dist/index.js index 77d0de2..ec08cdd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,14 +1,18 @@ require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 7351: +/***/ 4914: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -21,14 +25,14 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(2037)); -const utils_1 = __nccwpck_require__(5278); +const os = __importStar(__nccwpck_require__(857)); +const utils_1 = __nccwpck_require__(302); /** * Commands * @@ -83,13 +87,13 @@ class Command { } } function escapeData(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') @@ -100,14 +104,18 @@ function escapeProperty(s) { /***/ }), -/***/ 2186: +/***/ 7484: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -120,7 +128,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -134,13 +142,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(7351); -const file_command_1 = __nccwpck_require__(717); -const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(2037)); -const path = __importStar(__nccwpck_require__(1017)); -const oidc_utils_1 = __nccwpck_require__(8041); +exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = __nccwpck_require__(4914); +const file_command_1 = __nccwpck_require__(4753); +const utils_1 = __nccwpck_require__(302); +const os = __importStar(__nccwpck_require__(857)); +const path = __importStar(__nccwpck_require__(6928)); +const oidc_utils_1 = __nccwpck_require__(5306); /** * The code to exit an action */ @@ -154,7 +162,7 @@ var ExitCode; * A code indicating that the action was a failure */ ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +})(ExitCode || (exports.ExitCode = ExitCode = {})); //----------------------------------------------------------------------- // Variables //----------------------------------------------------------------------- @@ -165,13 +173,13 @@ var ExitCode; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val)); } - command_1.issueCommand('set-env', { name }, convertedVal); + (0, command_1.issueCommand)('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; /** @@ -179,7 +187,7 @@ exports.exportVariable = exportVariable; * @param secret value of the secret */ function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); + (0, command_1.issueCommand)('add-mask', {}, secret); } exports.setSecret = setSecret; /** @@ -189,10 +197,10 @@ exports.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env['GITHUB_PATH'] || ''; if (filePath) { - file_command_1.issueFileCommand('PATH', inputPath); + (0, file_command_1.issueFileCommand)('PATH', inputPath); } else { - command_1.issueCommand('add-path', {}, inputPath); + (0, command_1.issueCommand)('add-path', {}, inputPath); } process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } @@ -267,10 +275,10 @@ exports.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env['GITHUB_OUTPUT'] || ''; if (filePath) { - return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value)); } process.stdout.write(os.EOL); - command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); + (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value)); } exports.setOutput = setOutput; /** @@ -279,7 +287,7 @@ exports.setOutput = setOutput; * */ function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); + (0, command_1.issue)('echo', enabled ? 'on' : 'off'); } exports.setCommandEcho = setCommandEcho; //----------------------------------------------------------------------- @@ -310,7 +318,7 @@ exports.isDebug = isDebug; * @param message debug message */ function debug(message) { - command_1.issueCommand('debug', {}, message); + (0, command_1.issueCommand)('debug', {}, message); } exports.debug = debug; /** @@ -319,7 +327,7 @@ exports.debug = debug; * @param properties optional properties to add to the annotation. */ function error(message, properties = {}) { - command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.error = error; /** @@ -328,7 +336,7 @@ exports.error = error; * @param properties optional properties to add to the annotation. */ function warning(message, properties = {}) { - command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning; /** @@ -337,7 +345,7 @@ exports.warning = warning; * @param properties optional properties to add to the annotation. */ function notice(message, properties = {}) { - command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.notice = notice; /** @@ -356,14 +364,14 @@ exports.info = info; * @param name The name of the output group */ function startGroup(name) { - command_1.issue('group', name); + (0, command_1.issue)('group', name); } exports.startGroup = startGroup; /** * End an output group. */ function endGroup() { - command_1.issue('endgroup'); + (0, command_1.issue)('endgroup'); } exports.endGroup = endGroup; /** @@ -401,9 +409,9 @@ exports.group = group; function saveState(name, value) { const filePath = process.env['GITHUB_STATE'] || ''; if (filePath) { - return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value)); } - command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); + (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value)); } exports.saveState = saveState; /** @@ -425,25 +433,29 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __nccwpck_require__(1327); +var summary_1 = __nccwpck_require__(1847); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ -var summary_2 = __nccwpck_require__(1327); +var summary_2 = __nccwpck_require__(1847); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports */ -var path_utils_1 = __nccwpck_require__(2981); +var path_utils_1 = __nccwpck_require__(1976); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +/** + * Platform utilities exports + */ +exports.platform = __importStar(__nccwpck_require__(8968)); //# sourceMappingURL=core.js.map /***/ }), -/***/ 717: +/***/ 4753: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -451,7 +463,11 @@ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: funct // For internal use, subject to change. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -464,7 +480,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -472,10 +488,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(7147)); -const os = __importStar(__nccwpck_require__(2037)); -const uuid_1 = __nccwpck_require__(5840); -const utils_1 = __nccwpck_require__(5278); +const crypto = __importStar(__nccwpck_require__(6982)); +const fs = __importStar(__nccwpck_require__(9896)); +const os = __importStar(__nccwpck_require__(857)); +const utils_1 = __nccwpck_require__(302); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { @@ -484,14 +500,14 @@ function issueFileCommand(command, message) { if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { encoding: 'utf8' }); } exports.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_1.toCommandValue(value); + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); // These should realistically never happen, but just in case someone finds a // way to exploit uuid generation let's not allow keys or values that contain // the delimiter. @@ -508,7 +524,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 8041: +/***/ 5306: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -524,9 +540,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(6255); -const auth_1 = __nccwpck_require__(5526); -const core_1 = __nccwpck_require__(2186); +const http_client_1 = __nccwpck_require__(4844); +const auth_1 = __nccwpck_require__(4552); +const core_1 = __nccwpck_require__(7484); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -576,9 +592,9 @@ class OidcClient { const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } - core_1.debug(`ID token url is ${id_token_url}`); + (0, core_1.debug)(`ID token url is ${id_token_url}`); const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); + (0, core_1.setSecret)(id_token); return id_token; } catch (error) { @@ -592,14 +608,18 @@ exports.OidcClient = OidcClient; /***/ }), -/***/ 2981: +/***/ 1976: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -612,13 +632,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(1017)); +const path = __importStar(__nccwpck_require__(6928)); /** * toPosixPath converts the given path to the posix form. On Windows, \\ will be * replaced with /. @@ -657,7 +677,108 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 1327: +/***/ 8968: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; +const os_1 = __importDefault(__nccwpck_require__(857)); +const exec = __importStar(__nccwpck_require__(5236)); +const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; +}); +const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; + return { + name, + version + }; +}); +const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { + silent: true + }); + const [name, version] = stdout.trim().split('\n'); + return { + name, + version + }; +}); +exports.platform = os_1.default.platform(); +exports.arch = os_1.default.arch(); +exports.isWindows = exports.platform === 'win32'; +exports.isMacOS = exports.platform === 'darwin'; +exports.isLinux = exports.platform === 'linux'; +function getDetails() { + return __awaiter(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, (yield (exports.isWindows + ? getWindowsInfo() + : exports.isMacOS + ? getMacOsInfo() + : getLinuxInfo()))), { platform: exports.platform, + arch: exports.arch, + isWindows: exports.isWindows, + isMacOS: exports.isMacOS, + isLinux: exports.isLinux }); + }); +} +exports.getDetails = getDetails; +//# sourceMappingURL=platform.js.map + +/***/ }), + +/***/ 1847: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -673,8 +794,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(2037); -const fs_1 = __nccwpck_require__(7147); +const os_1 = __nccwpck_require__(857); +const fs_1 = __nccwpck_require__(9896); const { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; @@ -947,7 +1068,7 @@ exports.summary = _summary; /***/ }), -/***/ 5278: +/***/ 302: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -994,11 +1115,30 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 5526: -/***/ (function(__unused_webpack_module, exports) { +/***/ 5236: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -1009,85 +1149,87 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } +exports.getExecOutput = exports.exec = void 0; +const string_decoder_1 = __nccwpck_require__(3193); +const tr = __importStar(__nccwpck_require__(6665)); +/** + * Exec a command. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code + */ +function exec(commandLine, args, options) { + return __awaiter(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + // Path to tool to execute should be first arg + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); } -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } +exports.exec = exec; +/** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ +function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + let stdout = ''; + let stderr = ''; + //Using string decoder covers the case where a mult-byte character is split + const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); + const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + //flush any remaining characters + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); } -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -//# sourceMappingURL=auth.js.map +exports.getExecOutput = getExecOutput; +//# sourceMappingURL=exec.js.map /***/ }), -/***/ 6255: +/***/ 6665: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); @@ -1117,250 +1259,964 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(3685)); -const https = __importStar(__nccwpck_require__(5687)); -const pm = __importStar(__nccwpck_require__(9835)); -const tunnel = __importStar(__nccwpck_require__(4294)); -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com +exports.argStringToArray = exports.ToolRunner = void 0; +const os = __importStar(__nccwpck_require__(857)); +const events = __importStar(__nccwpck_require__(4434)); +const child = __importStar(__nccwpck_require__(5317)); +const path = __importStar(__nccwpck_require__(6928)); +const io = __importStar(__nccwpck_require__(4994)); +const ioUtil = __importStar(__nccwpck_require__(5207)); +const timers_1 = __nccwpck_require__(3557); +/* eslint-disable @typescript-eslint/unbound-method */ +const IS_WINDOWS = process.platform === 'win32'; +/* + * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. */ -function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); +class ToolRunner extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool + if (IS_WINDOWS) { + // Windows + cmd file + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + // Windows + verbatim + else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } + // Windows (regular) + else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } + else { + // OSX/Linux - this can likely be improved with some form of quoting. + // creating processes on Unix is fundamentally different than Windows. + // on Unix, execvp() takes an arg array. + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + // the rest of the string ... + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } + catch (err) { + // streaming lines to console is best effort. Don't fail a build. + this._debug(`error processing line. Failed with error ${err}`); + return ''; + } } - readBody() { + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env['COMSPEC'] || 'cmd.exe'; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += ' '; + argline += options.windowsVerbatimArguments + ? a + : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return (this._endsWith(upperToolPath, '.CMD') || + this._endsWith(upperToolPath, '.BAT')); + } + _windowsQuoteCmdArg(arg) { + // for .exe, apply the normal quoting rules that libuv applies + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + // otherwise apply quoting rules specific to the cmd.exe command line parser. + // the libuv rules are generic and are not designed specifically for cmd.exe + // command line parser. + // + // for a detailed description of the cmd.exe command line parser, refer to + // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 + // need quotes for empty arg + if (!arg) { + return '""'; + } + // determine whether the arg needs to be quoted + const cmdSpecialChars = [ + ' ', + '\t', + '&', + '(', + ')', + '[', + ']', + '{', + '}', + '^', + '=', + ';', + '!', + "'", + '+', + ',', + '`', + '~', + '|', + '<', + '>', + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some(x => x === char)) { + needsQuotes = true; + break; + } + } + // short-circuit if quotes not needed + if (!needsQuotes) { + return arg; + } + // the following quoting rules are very similar to the rules that by libuv applies. + // + // 1) wrap the string in quotes + // + // 2) double-up quotes - i.e. " => "" + // + // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately + // doesn't work well with a cmd.exe command line. + // + // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. + // for example, the command line: + // foo.exe "myarg:""my val""" + // is parsed by a .NET console app into an arg array: + // [ "myarg:\"my val\"" ] + // which is the same end result when applying libuv quoting rules. although the actual + // command line from libuv quoting rules would look like: + // foo.exe "myarg:\"my val\"" + // + // 3) double-up slashes that precede a quote, + // e.g. hello \world => "hello \world" + // hello\"world => "hello\\""world" + // hello\\"world => "hello\\\\""world" + // hello world\ => "hello world\\" + // + // technically this is not required for a cmd.exe command line, or the batch argument parser. + // the reasons for including this as a .cmd quoting rule are: + // + // a) this is optimized for the scenario where the argument is passed from the .cmd file to an + // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. + // + // b) it's what we've been doing previously (by deferring to node default behavior) and we + // haven't heard any complaints about that aspect. + // + // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be + // escaped when used on the command line directly - even though within a .cmd file % can be escaped + // by using %%. + // + // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts + // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. + // + // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would + // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the + // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args + // to an external program. + // + // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. + // % can be escaped within a .cmd file. + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + // walk the string in reverse + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === '\\') { + reverse += '\\'; // double the slash + } + else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; // double the quote + } + else { + quoteHit = false; + } + } + reverse += '"'; + return reverse + .split('') + .reverse() + .join(''); + } + _uvQuoteCmdArg(arg) { + // Tool runner wraps child_process.spawn() and needs to apply the same quoting as + // Node in certain cases where the undocumented spawn option windowsVerbatimArguments + // is used. + // + // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, + // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), + // pasting copyright notice from Node within this function: + // + // Copyright Joyent, Inc. and other Node contributors. All rights reserved. + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the "Software"), to + // deal in the Software without restriction, including without limitation the + // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + // sell copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in + // all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + // IN THE SOFTWARE. + if (!arg) { + // Need double quotation for empty argument + return '""'; + } + if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { + // No quotation needed + return arg; + } + if (!arg.includes('"') && !arg.includes('\\')) { + // No embedded double quotes or backslashes, so I can just wrap + // quote marks around the whole thing. + return `"${arg}"`; + } + // Expected input/output: + // input : hello"world + // output: "hello\"world" + // input : hello""world + // output: "hello\"\"world" + // input : hello\world + // output: hello\world + // input : hello\\world + // output: hello\\world + // input : hello\"world + // output: "hello\\\"world" + // input : hello\\"world + // output: "hello\\\\\"world" + // input : hello world\ + // output: "hello world\\" - note the comment in libuv actually reads "hello world\" + // but it appears the comment is wrong, it should be "hello world\\" + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + // walk the string in reverse + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === '\\') { + reverse += '\\'; + } + else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '\\'; + } + else { + quoteHit = false; + } + } + reverse += '"'; + return reverse + .split('') + .reverse() + .join(''); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 10000 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result['windowsVerbatimArguments'] = + options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); + // root the tool path if it is unrooted and contains relative pathing + if (!ioUtil.isRooted(this.toolPath) && + (this.toolPath.includes('/') || + (IS_WINDOWS && this.toolPath.includes('\\')))) { + // prefer options.cwd if it is specified, however options.cwd may also need to be rooted + this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + // if the tool is only a file name, then resolve it from the PATH + // otherwise verify it exists (add extension on Windows if necessary) + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug('arguments:'); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on('debug', (message) => { + this._debug(message); }); - this.message.on('end', () => { - resolve(output.toString()); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ''; + if (cp.stdout) { + cp.stdout.on('data', (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ''; + if (cp.stderr) { + cp.stderr.on('data', (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && + optionsNonNull.errStream && + optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr + ? optionsNonNull.errStream + : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on('error', (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); + cp.on('exit', (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); + cp.on('close', (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on('done', (error, exitCode) => { + if (stdbuffer.length > 0) { + this.emit('stdline', stdbuffer); + } + if (errbuffer.length > 0) { + this.emit('errline', errbuffer); + } + cp.removeAllListeners(); + if (error) { + reject(error); + } + else { + resolve(exitCode); + } }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error('child process missing stdin'); + } + cp.stdin.end(this.options.input); + } })); }); } } -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; +exports.ToolRunner = ToolRunner; +/** + * Convert an arg string to an array of args. Handles escaping + * + * @param argString string of arguments + * @returns string[] array of arguments + */ +function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ''; + function append(c) { + // we only escape double quotes. + if (escaped && c !== '"') { + arg += '\\'; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + else { + append(c); } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + continue; + } + if (c === '\\' && escaped) { + append(c); + continue; + } + if (c === '\\' && inQuotes) { + escaped = true; + continue; + } + if (c === ' ' && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ''; } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; +} +exports.argStringToArray = argStringToArray; +class ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; // tracks whether the process has exited and stdio is closed + this.processError = ''; + this.processExitCode = 0; + this.processExited = false; // tracks whether the process has exited + this.processStderr = false; // tracks whether stderr was written to + this.delay = 10000; // 10 seconds + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error('toolPath must not be empty'); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } + else if (this.processExited) { + this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit('debug', message); + } + _setResult() { + // determine whether there is an error + let error; + if (this.processExited) { + if (this.processError) { + error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; + else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; + else if (this.processStderr && this.options.failOnStdErr) { + error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } + // clear the timeout + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit('done', error, this.processExitCode); } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / + 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); +} +//# sourceMappingURL=toolrunner.js.map + +/***/ }), + +/***/ 4552: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); + // This handler cannot handle 401 + canHandleAuthentication() { + return false; } - patch(requestUrl, data, additionalHeaders) { + handleAuthentication() { return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + throw new Error('not implemented'); }); } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); + // This handler cannot handle 401 + canHandleAuthentication() { + return false; } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { + handleAuthentication() { return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); + throw new Error('not implemented'); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; } - putJson(requestUrl, obj, additionalHeaders = {}) { + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); + throw new Error('not implemented'); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 4844: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__nccwpck_require__(8611)); +const https = __importStar(__nccwpck_require__(5692)); +const pm = __importStar(__nccwpck_require__(4988)); +const tunnel = __importStar(__nccwpck_require__(770)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on('data', (chunk) => { + chunks.push(chunk); + }); + this.message.on('end', () => { + resolve(Buffer.concat(chunks)); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); + const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { + putJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; @@ -1689,1040 +2545,890 @@ class HttpClient { } else { msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -exports.HttpClient = HttpClient; -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 9835: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkBypass = exports.getProxyUrl = void 0; -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new URL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new URL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -exports.checkBypass = checkBypass; -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -//# sourceMappingURL=proxy.js.map - -/***/ }), - -/***/ 4294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(4219); - - -/***/ }), - -/***/ 4219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(1808); -var tls = __nccwpck_require__(4404); -var http = __nccwpck_require__(3685); -var https = __nccwpck_require__(5687); -var events = __nccwpck_require__(2361); -var assert = __nccwpck_require__(9491); -var util = __nccwpck_require__(3837); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -exports.debug = debug; // for test - - -/***/ }), - -/***/ 5840: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(8628)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(6409)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(5122)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(9120)); - -var _nil = _interopRequireDefault(__nccwpck_require__(5332)); - -var _version = _interopRequireDefault(__nccwpck_require__(1595)); - -var _validate = _interopRequireDefault(__nccwpck_require__(6900)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); - -var _parse = _interopRequireDefault(__nccwpck_require__(2746)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 4569: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 5332: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 2746: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(6900)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; } - -var _default = parse; -exports["default"] = _default; +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 814: +/***/ 4988: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 807: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 5274: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 8950: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(6900)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + try { + return new URL(proxyVar); + } + catch (_a) { + if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) + return new URL(`http://${proxyVar}`); + } + } + else { + return undefined; + } } - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 8628: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(807)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperNoProxyItem === '*' || + upperReqHosts.some(x => x === upperNoProxyItem || + x.endsWith(`.${upperNoProxyItem}`) || + (upperNoProxyItem.startsWith('.') && + x.endsWith(`${upperNoProxyItem}`)))) { + return true; + } + } + return false; } - -var _default = v1; -exports["default"] = _default; +exports.checkBypass = checkBypass; +function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return (hostLower === 'localhost' || + hostLower.startsWith('127.') || + hostLower.startsWith('[::1]') || + hostLower.startsWith('[0:0:0:0:0:0:0:1]')); +} +//# sourceMappingURL=proxy.js.map /***/ }), -/***/ 6409: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 5207: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; })); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(5998)); - -var _md = _interopRequireDefault(__nccwpck_require__(4569)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var _a; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; +const fs = __importStar(__nccwpck_require__(9896)); +const path = __importStar(__nccwpck_require__(6928)); +_a = fs.promises +// export const {open} = 'fs' +, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; +// export const {open} = 'fs' +exports.IS_WINDOWS = process.platform === 'win32'; +// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 +exports.UV_FS_O_EXLOCK = 0x10000000; +exports.READONLY = fs.constants.O_RDONLY; +function exists(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + try { + yield exports.stat(fsPath); + } + catch (err) { + if (err.code === 'ENOENT') { + return false; + } + throw err; + } + return true; + }); +} +exports.exists = exists; +function isDirectory(fsPath, useStat = false) { + return __awaiter(this, void 0, void 0, function* () { + const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + return stats.isDirectory(); + }); +} +exports.isDirectory = isDirectory; +/** + * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: + * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). + */ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports.IS_WINDOWS) { + return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello + ); // e.g. C: or C:\hello + } + return p.startsWith('/'); +} +exports.isRooted = isRooted; +/** + * Best effort attempt to determine whether a file exists and is executable. + * @param filePath file path to check + * @param extensions additional file extensions to try + * @return if file exists and is executable, returns the file path. otherwise empty string. + */ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter(this, void 0, void 0, function* () { + let stats = undefined; + try { + // test file exists + stats = yield exports.stat(filePath); + } + catch (err) { + if (err.code !== 'ENOENT') { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + // on Windows, test for valid extension + const upperExt = path.extname(filePath).toUpperCase(); + if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } + else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + // try each extension + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = undefined; + try { + stats = yield exports.stat(filePath); + } + catch (err) { + if (err.code !== 'ENOENT') { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + // preserve the case of the actual file (since an extension was appended) + try { + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); + for (const actualName of yield exports.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path.join(directory, actualName); + break; + } + } + } + catch (err) { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } + else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ''; + }); +} +exports.tryGetExecutablePath = tryGetExecutablePath; +function normalizeSeparators(p) { + p = p || ''; + if (exports.IS_WINDOWS) { + // convert slashes on Windows + p = p.replace(/\//g, '\\'); + // remove redundant slashes + return p.replace(/\\\\+/g, '\\'); + } + // remove redundant slashes + return p.replace(/\/\/+/g, '/'); +} +// on Mac/Linux, test the execute bit +// R W X R W X R W X +// 256 128 64 32 16 8 4 2 1 +function isUnixExecutable(stats) { + return ((stats.mode & 1) > 0 || + ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || + ((stats.mode & 64) > 0 && stats.uid === process.getuid())); +} +// Get the path of cmd.exe in windows +function getCmdPath() { + var _a; + return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; +} +exports.getCmdPath = getCmdPath; +//# sourceMappingURL=io-util.js.map /***/ }), -/***/ 5998: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 4994: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; })); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); - -var _parse = _interopRequireDefault(__nccwpck_require__(2746)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; +const assert_1 = __nccwpck_require__(2613); +const path = __importStar(__nccwpck_require__(6928)); +const ioUtil = __importStar(__nccwpck_require__(5207)); +/** + * Copies a file or folder. + * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js + * + * @param source source path + * @param dest destination path + * @param options optional. See CopyOptions. + */ +function cp(source, dest, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + // Dest is an existing file, but not forcing + if (destStat && destStat.isFile() && !force) { + return; + } + // If dest is an existing directory, should copy inside. + const newDest = destStat && destStat.isDirectory() && copySourceDirectory + ? path.join(dest, path.basename(source)) + : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } + else { + yield cpDirRecursive(source, newDest, 0, force); + } + } + else { + if (path.relative(source, newDest) === '') { + // a file cannot be copied to itself + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); } - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; +exports.cp = cp; +/** + * Moves a path. + * + * @param source source path + * @param dest destination path + * @param options optional. See MoveOptions. + */ +function mv(source, dest, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + // If dest is directory copy src into dest + dest = path.join(dest, path.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } + else { + throw new Error('Destination already exists'); + } + } + } + yield mkdirP(path.dirname(dest)); + yield ioUtil.rename(source, dest); + }); +} +exports.mv = mv; +/** + * Remove a path recursively with force + * + * @param inputPath path to remove + */ +function rmRF(inputPath) { + return __awaiter(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + // Check for invalid characters + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + // note if path does not exist, error is silent + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } + catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); +} +exports.rmRF = rmRF; +/** + * Make a directory. Creates the full path with folders in between + * Will throw if it fails + * + * @param fsPath path to create + * @returns Promise + */ +function mkdirP(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(fsPath, 'a path argument must be provided'); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); +} +exports.mkdirP = mkdirP; +/** + * Returns path of a tool had the tool actually been invoked. Resolves via paths. + * If you check and the tool does not exist, it will throw. + * + * @param tool name of the tool + * @param check whether to check if tool exists + * @returns Promise path to tool + */ +function which(tool, check) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // recursive when check=true + if (check) { + const result = yield which(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } + else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ''; + }); +} +exports.which = which; +/** + * Returns a list of all occurrences of the given tool on the system path. + * + * @returns Promise the paths of the tool + */ +function findInPath(tool) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // build the list of extensions to try + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { + for (const extension of process.env['PATHEXT'].split(path.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + // if it's rooted, return it if exists. otherwise return empty. + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + // if any path separators, return empty + if (tool.includes(path.sep)) { + return []; + } + // build the list of directories + // + // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, + // it feels like we should not do this. Checking the current directory seems like more of a use + // case of a shell, and the which() function exposed by the toolkit should strive for consistency + // across platforms. + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) { + if (p) { + directories.push(p); + } + } + } + // find all matches + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); +} +exports.findInPath = findInPath; +function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null + ? true + : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; +} +function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter(this, void 0, void 0, function* () { + // Ensure there is not a run away recursive copy + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + // Recurse + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } + else { + yield copyFile(srcFile, destFile, force); + } + } + // Change the mode for the newly created directory + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); } +// Buffered file copy +function copyFile(srcFile, destFile, force) { + return __awaiter(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + // unlink/re-link it + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } + catch (e) { + // Try to override file permission + if (e.code === 'EPERM') { + yield ioUtil.chmod(destFile, '0666'); + yield ioUtil.unlink(destFile); + } + // other errors = it doesn't exist, no work to do + } + // Copy over symlink + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); + } + else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); +} +//# sourceMappingURL=io.js.map /***/ }), -/***/ 5122: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 770: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +module.exports = __nccwpck_require__(218); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(807)); +/***/ }), -var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); +/***/ 218: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +"use strict"; -function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` +var net = __nccwpck_require__(9278); +var tls = __nccwpck_require__(4756); +var http = __nccwpck_require__(8611); +var https = __nccwpck_require__(5692); +var events = __nccwpck_require__(4434); +var assert = __nccwpck_require__(2613); +var util = __nccwpck_require__(9023); - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} - return buf; - } +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} - return (0, _stringify.default)(rnds); +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; } -var _default = v4; -exports["default"] = _default; +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} -/***/ }), -/***/ 9120: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; -"use strict"; + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } -var _v = _interopRequireDefault(__nccwpck_require__(5998)); + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); -var _sha = _interopRequireDefault(__nccwpck_require__(5274)); + function onFree() { + self.emit('free', socket, options); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); -/***/ }), + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } -/***/ 6900: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); -"use strict"; + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); -var _regex = _interopRequireDefault(__nccwpck_require__(814)); + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function onError(cause) { + connectReq.removeAllListeners(); -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; -var _default = validate; -exports["default"] = _default; +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); -/***/ }), + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; -/***/ 1595: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); -"use strict"; + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} -var _validate = _interopRequireDefault(__nccwpck_require__(6900)); +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); } - - return parseInt(uuid.substr(14, 1), 16); +} else { + debug = function() {}; } +exports.debug = debug; // for test -var _default = version; -exports["default"] = _default; /***/ }), -/***/ 2839: +/***/ 6488: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -2741,7 +3447,7 @@ exports["default"] = _default; /***/ }), -/***/ 9267: +/***/ 7882: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -2773,7 +3479,7 @@ exports["default"] = _default; /***/ }), -/***/ 8229: +/***/ 4576: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -2868,7 +3574,7 @@ exports["default"] = _default; /***/ }), -/***/ 9766: +/***/ 9392: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -2885,16 +3591,16 @@ exports["default"] = _default; /***/ }), -/***/ 8376: +/***/ 3977: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLAttribute, XMLNode; - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); // Represents an attribute module.exports = XMLAttribute = (function() { @@ -3022,16 +3728,16 @@ exports["default"] = _default; /***/ }), -/***/ 333: +/***/ 728: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLCData, XMLCharacterData; - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLCharacterData = __nccwpck_require__(7709); + XMLCharacterData = __nccwpck_require__(5278); // Represents a CDATA node module.exports = XMLCData = class XMLCData extends XMLCharacterData { @@ -3070,14 +3776,14 @@ exports["default"] = _default; /***/ }), -/***/ 7709: +/***/ 5278: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var XMLCharacterData, XMLNode; - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); // Represents a character data node module.exports = XMLCharacterData = (function() { @@ -3163,16 +3869,16 @@ exports["default"] = _default; /***/ }), -/***/ 4407: +/***/ 9620: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLCharacterData, XMLComment; - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLCharacterData = __nccwpck_require__(7709); + XMLCharacterData = __nccwpck_require__(5278); // Represents a comment node module.exports = XMLComment = class XMLComment extends XMLCharacterData { @@ -3211,16 +3917,16 @@ exports["default"] = _default; /***/ }), -/***/ 7465: +/***/ 4323: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; - XMLDOMErrorHandler = __nccwpck_require__(6744); + XMLDOMErrorHandler = __nccwpck_require__(1675); - XMLDOMStringList = __nccwpck_require__(7028); + XMLDOMStringList = __nccwpck_require__(5884); // Implements the DOMConfiguration interface module.exports = XMLDOMConfiguration = (function() { @@ -3298,7 +4004,7 @@ exports["default"] = _default; /***/ }), -/***/ 6744: +/***/ 1675: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -3325,7 +4031,7 @@ exports["default"] = _default; /***/ }), -/***/ 8310: +/***/ 9563: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -3387,7 +4093,7 @@ exports["default"] = _default; /***/ }), -/***/ 7028: +/***/ 5884: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -3438,16 +4144,16 @@ exports["default"] = _default; /***/ }), -/***/ 1015: +/***/ 3742: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDTDAttList, XMLNode; - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); // Represents an attribute list module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode { @@ -3511,16 +4217,16 @@ exports["default"] = _default; /***/ }), -/***/ 2421: +/***/ 6189: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDTDElement, XMLNode; - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); // Represents an attribute module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode { @@ -3562,18 +4268,18 @@ exports["default"] = _default; /***/ }), -/***/ 53: +/***/ 6906: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDTDEntity, XMLNode, isObject; - ({isObject} = __nccwpck_require__(8229)); + ({isObject} = __nccwpck_require__(4576)); - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); // Represents an entity declaration in the DTD module.exports = XMLDTDEntity = (function() { @@ -3684,16 +4390,16 @@ exports["default"] = _default; /***/ }), -/***/ 2837: +/***/ 7083: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDTDNotation, XMLNode; - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = (function() { @@ -3757,18 +4463,18 @@ exports["default"] = _default; /***/ }), -/***/ 6364: +/***/ 7645: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDeclaration, XMLNode, isObject; - ({isObject} = __nccwpck_require__(8229)); + ({isObject} = __nccwpck_require__(4576)); - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); // Represents the XML declaration module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode { @@ -3815,28 +4521,28 @@ exports["default"] = _default; /***/ }), -/***/ 1801: +/***/ 7827: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject; - ({isObject} = __nccwpck_require__(8229)); + ({isObject} = __nccwpck_require__(4576)); - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLDTDAttList = __nccwpck_require__(1015); + XMLDTDAttList = __nccwpck_require__(3742); - XMLDTDEntity = __nccwpck_require__(53); + XMLDTDEntity = __nccwpck_require__(6906); - XMLDTDElement = __nccwpck_require__(2421); + XMLDTDElement = __nccwpck_require__(6189); - XMLDTDNotation = __nccwpck_require__(2837); + XMLDTDNotation = __nccwpck_require__(7083); - XMLNamedNodeMap = __nccwpck_require__(4361); + XMLNamedNodeMap = __nccwpck_require__(2748); // Represents doctype declaration module.exports = XMLDocType = (function() { @@ -4057,26 +4763,26 @@ exports["default"] = _default; /***/ }), -/***/ 3730: +/***/ 6500: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject; - ({isPlainObject} = __nccwpck_require__(8229)); + ({isPlainObject} = __nccwpck_require__(4576)); - XMLDOMImplementation = __nccwpck_require__(8310); + XMLDOMImplementation = __nccwpck_require__(9563); - XMLDOMConfiguration = __nccwpck_require__(7465); + XMLDOMConfiguration = __nccwpck_require__(4323); - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLStringifier = __nccwpck_require__(8594); + XMLStringifier = __nccwpck_require__(7431); - XMLStringWriter = __nccwpck_require__(5913); + XMLStringWriter = __nccwpck_require__(9867); // Represents an XML builder module.exports = XMLDocument = (function() { @@ -4346,7 +5052,7 @@ exports["default"] = _default; /***/ }), -/***/ 7356: +/***/ 7789: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 @@ -4354,43 +5060,43 @@ exports["default"] = _default; var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, hasProp = {}.hasOwnProperty; - ({isObject, isFunction, isPlainObject, getValue} = __nccwpck_require__(8229)); + ({isObject, isFunction, isPlainObject, getValue} = __nccwpck_require__(4576)); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLDocument = __nccwpck_require__(3730); + XMLDocument = __nccwpck_require__(6500); - XMLElement = __nccwpck_require__(9437); + XMLElement = __nccwpck_require__(3965); - XMLCData = __nccwpck_require__(333); + XMLCData = __nccwpck_require__(728); - XMLComment = __nccwpck_require__(4407); + XMLComment = __nccwpck_require__(9620); - XMLRaw = __nccwpck_require__(6329); + XMLRaw = __nccwpck_require__(2083); - XMLText = __nccwpck_require__(1318); + XMLText = __nccwpck_require__(9946); - XMLProcessingInstruction = __nccwpck_require__(6939); + XMLProcessingInstruction = __nccwpck_require__(1368); - XMLDeclaration = __nccwpck_require__(6364); + XMLDeclaration = __nccwpck_require__(7645); - XMLDocType = __nccwpck_require__(1801); + XMLDocType = __nccwpck_require__(7827); - XMLDTDAttList = __nccwpck_require__(1015); + XMLDTDAttList = __nccwpck_require__(3742); - XMLDTDEntity = __nccwpck_require__(53); + XMLDTDEntity = __nccwpck_require__(6906); - XMLDTDElement = __nccwpck_require__(2421); + XMLDTDElement = __nccwpck_require__(6189); - XMLDTDNotation = __nccwpck_require__(2837); + XMLDTDNotation = __nccwpck_require__(7083); - XMLAttribute = __nccwpck_require__(8376); + XMLAttribute = __nccwpck_require__(3977); - XMLStringifier = __nccwpck_require__(8594); + XMLStringifier = __nccwpck_require__(7431); - XMLStringWriter = __nccwpck_require__(5913); + XMLStringWriter = __nccwpck_require__(9867); - WriterState = __nccwpck_require__(9766); + WriterState = __nccwpck_require__(9392); // Represents an XML builder module.exports = XMLDocumentCB = class XMLDocumentCB { @@ -5003,16 +5709,16 @@ exports["default"] = _default; /***/ }), -/***/ 3590: +/***/ 6893: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLDummy, XMLNode; - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); // Represents a raw node module.exports = XMLDummy = class XMLDummy extends XMLNode { @@ -5049,7 +5755,7 @@ exports["default"] = _default; /***/ }), -/***/ 9437: +/***/ 3965: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 @@ -5057,15 +5763,15 @@ exports["default"] = _default; var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, hasProp = {}.hasOwnProperty; - ({isObject, isFunction, getValue} = __nccwpck_require__(8229)); + ({isObject, isFunction, getValue} = __nccwpck_require__(4576)); - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLAttribute = __nccwpck_require__(8376); + XMLAttribute = __nccwpck_require__(3977); - XMLNamedNodeMap = __nccwpck_require__(4361); + XMLNamedNodeMap = __nccwpck_require__(2748); // Represents an element of the XML document module.exports = XMLElement = (function() { @@ -5390,7 +6096,7 @@ exports["default"] = _default; /***/ }), -/***/ 4361: +/***/ 2748: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -5474,7 +6180,7 @@ exports["default"] = _default; /***/ }), -/***/ 7608: +/***/ 3401: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 @@ -5483,7 +6189,7 @@ exports["default"] = _default; hasProp = {}.hasOwnProperty, splice = [].splice; - ({isObject, isFunction, isEmpty, getValue} = __nccwpck_require__(8229)); + ({isObject, isFunction, isEmpty, getValue} = __nccwpck_require__(4576)); XMLElement = null; @@ -5529,19 +6235,19 @@ exports["default"] = _default; // first execution, load dependencies that are otherwise // circular (so we can't load them at the top) if (!XMLElement) { - XMLElement = __nccwpck_require__(9437); - XMLCData = __nccwpck_require__(333); - XMLComment = __nccwpck_require__(4407); - XMLDeclaration = __nccwpck_require__(6364); - XMLDocType = __nccwpck_require__(1801); - XMLRaw = __nccwpck_require__(6329); - XMLText = __nccwpck_require__(1318); - XMLProcessingInstruction = __nccwpck_require__(6939); - XMLDummy = __nccwpck_require__(3590); - NodeType = __nccwpck_require__(9267); - XMLNodeList = __nccwpck_require__(6768); - XMLNamedNodeMap = __nccwpck_require__(4361); - DocumentPosition = __nccwpck_require__(2839); + XMLElement = __nccwpck_require__(3965); + XMLCData = __nccwpck_require__(728); + XMLComment = __nccwpck_require__(9620); + XMLDeclaration = __nccwpck_require__(7645); + XMLDocType = __nccwpck_require__(7827); + XMLRaw = __nccwpck_require__(2083); + XMLText = __nccwpck_require__(9946); + XMLProcessingInstruction = __nccwpck_require__(1368); + XMLDummy = __nccwpck_require__(6893); + NodeType = __nccwpck_require__(7882); + XMLNodeList = __nccwpck_require__(3341); + XMLNamedNodeMap = __nccwpck_require__(2748); + DocumentPosition = __nccwpck_require__(6488); } } @@ -6480,7 +7186,7 @@ exports["default"] = _default; /***/ }), -/***/ 6768: +/***/ 3341: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -6532,16 +7238,16 @@ exports["default"] = _default; /***/ }), -/***/ 6939: +/***/ 1368: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLCharacterData, XMLProcessingInstruction; - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLCharacterData = __nccwpck_require__(7709); + XMLCharacterData = __nccwpck_require__(5278); // Represents a processing instruction module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData { @@ -6595,16 +7301,16 @@ exports["default"] = _default; /***/ }), -/***/ 6329: +/***/ 2083: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLNode, XMLRaw; - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLNode = __nccwpck_require__(7608); + XMLNode = __nccwpck_require__(3401); // Represents a raw node module.exports = XMLRaw = class XMLRaw extends XMLNode { @@ -6642,7 +7348,7 @@ exports["default"] = _default; /***/ }), -/***/ 8601: +/***/ 7798: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 @@ -6650,11 +7356,11 @@ exports["default"] = _default; var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, hasProp = {}.hasOwnProperty; - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLWriterBase = __nccwpck_require__(6752); + XMLWriterBase = __nccwpck_require__(6943); - WriterState = __nccwpck_require__(9766); + WriterState = __nccwpck_require__(9392); // Prints XML nodes to a stream module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase { @@ -6858,14 +7564,14 @@ exports["default"] = _default; /***/ }), -/***/ 5913: +/***/ 9867: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var XMLStringWriter, XMLWriterBase; - XMLWriterBase = __nccwpck_require__(6752); + XMLWriterBase = __nccwpck_require__(6943); // Prints XML nodes as plain text module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase { @@ -6905,7 +7611,7 @@ exports["default"] = _default; /***/ }), -/***/ 8594: +/***/ 7431: /***/ (function(module) { // Generated by CoffeeScript 2.4.1 @@ -7203,16 +7909,16 @@ exports["default"] = _default; /***/ }), -/***/ 1318: +/***/ 9946: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, XMLCharacterData, XMLText; - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLCharacterData = __nccwpck_require__(7709); + XMLCharacterData = __nccwpck_require__(5278); // Represents a text node module.exports = XMLText = (function() { @@ -7292,7 +7998,7 @@ exports["default"] = _default; /***/ }), -/***/ 6752: +/***/ 6943: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 @@ -7300,37 +8006,37 @@ exports["default"] = _default; var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign, hasProp = {}.hasOwnProperty; - ({assign} = __nccwpck_require__(8229)); + ({assign} = __nccwpck_require__(4576)); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - XMLDeclaration = __nccwpck_require__(6364); + XMLDeclaration = __nccwpck_require__(7645); - XMLDocType = __nccwpck_require__(1801); + XMLDocType = __nccwpck_require__(7827); - XMLCData = __nccwpck_require__(333); + XMLCData = __nccwpck_require__(728); - XMLComment = __nccwpck_require__(4407); + XMLComment = __nccwpck_require__(9620); - XMLElement = __nccwpck_require__(9437); + XMLElement = __nccwpck_require__(3965); - XMLRaw = __nccwpck_require__(6329); + XMLRaw = __nccwpck_require__(2083); - XMLText = __nccwpck_require__(1318); + XMLText = __nccwpck_require__(9946); - XMLProcessingInstruction = __nccwpck_require__(6939); + XMLProcessingInstruction = __nccwpck_require__(1368); - XMLDummy = __nccwpck_require__(3590); + XMLDummy = __nccwpck_require__(6893); - XMLDTDAttList = __nccwpck_require__(1015); + XMLDTDAttList = __nccwpck_require__(3742); - XMLDTDElement = __nccwpck_require__(2421); + XMLDTDElement = __nccwpck_require__(6189); - XMLDTDEntity = __nccwpck_require__(53); + XMLDTDEntity = __nccwpck_require__(6906); - XMLDTDNotation = __nccwpck_require__(2837); + XMLDTDNotation = __nccwpck_require__(7083); - WriterState = __nccwpck_require__(9766); + WriterState = __nccwpck_require__(9392); // Base class for XML writers module.exports = XMLWriterBase = class XMLWriterBase { @@ -7784,28 +8490,28 @@ exports["default"] = _default; /***/ }), -/***/ 2958: +/***/ 8004: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { // Generated by CoffeeScript 2.4.1 (function() { var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction; - ({assign, isFunction} = __nccwpck_require__(8229)); + ({assign, isFunction} = __nccwpck_require__(4576)); - XMLDOMImplementation = __nccwpck_require__(8310); + XMLDOMImplementation = __nccwpck_require__(9563); - XMLDocument = __nccwpck_require__(3730); + XMLDocument = __nccwpck_require__(6500); - XMLDocumentCB = __nccwpck_require__(7356); + XMLDocumentCB = __nccwpck_require__(7789); - XMLStringWriter = __nccwpck_require__(5913); + XMLStringWriter = __nccwpck_require__(9867); - XMLStreamWriter = __nccwpck_require__(8601); + XMLStreamWriter = __nccwpck_require__(7798); - NodeType = __nccwpck_require__(9267); + NodeType = __nccwpck_require__(7882); - WriterState = __nccwpck_require__(9766); + WriterState = __nccwpck_require__(9392); // Creates a new document and returns the root node for // chain-building the document tree @@ -7911,10 +8617,10 @@ exports["default"] = _default; /***/ }), -/***/ 7656: +/***/ 4656: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const builder = __nccwpck_require__(2958) +const builder = __nccwpck_require__(8004) /** * Builds the version.xml file content. @@ -7987,15 +8693,15 @@ module.exports = { /***/ }), -/***/ 1713: +/***/ 7936: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { // noinspection ExceptionCaughtLocallyJS -const fs = (__nccwpck_require__(7147).promises) -const path = __nccwpck_require__(1017) -const core = __nccwpck_require__(2186) -const { buildVersionXml } = __nccwpck_require__(7656) +const fs = (__nccwpck_require__(9896).promises) +const path = __nccwpck_require__(6928) +const core = __nccwpck_require__(7484) +const { buildVersionXml } = __nccwpck_require__(4656) /** * The main function for the action. @@ -8035,7 +8741,7 @@ module.exports = { /***/ }), -/***/ 9491: +/***/ 2613: /***/ ((module) => { "use strict"; @@ -8043,7 +8749,15 @@ module.exports = require("assert"); /***/ }), -/***/ 6113: +/***/ 5317: +/***/ ((module) => { + +"use strict"; +module.exports = require("child_process"); + +/***/ }), + +/***/ 6982: /***/ ((module) => { "use strict"; @@ -8051,7 +8765,7 @@ module.exports = require("crypto"); /***/ }), -/***/ 2361: +/***/ 4434: /***/ ((module) => { "use strict"; @@ -8059,7 +8773,7 @@ module.exports = require("events"); /***/ }), -/***/ 7147: +/***/ 9896: /***/ ((module) => { "use strict"; @@ -8067,7 +8781,7 @@ module.exports = require("fs"); /***/ }), -/***/ 3685: +/***/ 8611: /***/ ((module) => { "use strict"; @@ -8075,7 +8789,7 @@ module.exports = require("http"); /***/ }), -/***/ 5687: +/***/ 5692: /***/ ((module) => { "use strict"; @@ -8083,7 +8797,7 @@ module.exports = require("https"); /***/ }), -/***/ 1808: +/***/ 9278: /***/ ((module) => { "use strict"; @@ -8091,7 +8805,7 @@ module.exports = require("net"); /***/ }), -/***/ 2037: +/***/ 857: /***/ ((module) => { "use strict"; @@ -8099,7 +8813,7 @@ module.exports = require("os"); /***/ }), -/***/ 1017: +/***/ 6928: /***/ ((module) => { "use strict"; @@ -8107,7 +8821,23 @@ module.exports = require("path"); /***/ }), -/***/ 4404: +/***/ 3193: +/***/ ((module) => { + +"use strict"; +module.exports = require("string_decoder"); + +/***/ }), + +/***/ 3557: +/***/ ((module) => { + +"use strict"; +module.exports = require("timers"); + +/***/ }), + +/***/ 4756: /***/ ((module) => { "use strict"; @@ -8115,7 +8845,7 @@ module.exports = require("tls"); /***/ }), -/***/ 3837: +/***/ 9023: /***/ ((module) => { "use strict"; @@ -8162,17 +8892,13 @@ module.exports = require("util"); /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { /** * The entrypoint for the action. */ -const { run } = __nccwpck_require__(1713) +const { run } = __nccwpck_require__(7936) run() -})(); - module.exports = __webpack_exports__; /******/ })() ; diff --git a/dist/index.js.map b/dist/index.js.map index 13cfd0e..83ca838 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;;;;;;;;ACzmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjFA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxCA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA","sources":[".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/uuid/dist/index.js",".././node_modules/uuid/dist/md5.js",".././node_modules/uuid/dist/nil.js",".././node_modules/uuid/dist/parse.js",".././node_modules/uuid/dist/regex.js",".././node_modules/uuid/dist/rng.js",".././node_modules/uuid/dist/sha1.js",".././node_modules/uuid/dist/stringify.js",".././node_modules/uuid/dist/v1.js",".././node_modules/uuid/dist/v3.js",".././node_modules/uuid/dist/v35.js",".././node_modules/uuid/dist/v4.js",".././node_modules/uuid/dist/v5.js",".././node_modules/uuid/dist/validate.js",".././node_modules/uuid/dist/version.js",".././node_modules/xmlbuilder/lib/DocumentPosition.js",".././node_modules/xmlbuilder/lib/NodeType.js",".././node_modules/xmlbuilder/lib/Utility.js",".././node_modules/xmlbuilder/lib/WriterState.js",".././node_modules/xmlbuilder/lib/XMLAttribute.js",".././node_modules/xmlbuilder/lib/XMLCData.js",".././node_modules/xmlbuilder/lib/XMLCharacterData.js",".././node_modules/xmlbuilder/lib/XMLComment.js",".././node_modules/xmlbuilder/lib/XMLDOMConfiguration.js",".././node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js",".././node_modules/xmlbuilder/lib/XMLDOMImplementation.js",".././node_modules/xmlbuilder/lib/XMLDOMStringList.js",".././node_modules/xmlbuilder/lib/XMLDTDAttList.js",".././node_modules/xmlbuilder/lib/XMLDTDElement.js",".././node_modules/xmlbuilder/lib/XMLDTDEntity.js",".././node_modules/xmlbuilder/lib/XMLDTDNotation.js",".././node_modules/xmlbuilder/lib/XMLDeclaration.js",".././node_modules/xmlbuilder/lib/XMLDocType.js",".././node_modules/xmlbuilder/lib/XMLDocument.js",".././node_modules/xmlbuilder/lib/XMLDocumentCB.js",".././node_modules/xmlbuilder/lib/XMLDummy.js",".././node_modules/xmlbuilder/lib/XMLElement.js",".././node_modules/xmlbuilder/lib/XMLNamedNodeMap.js",".././node_modules/xmlbuilder/lib/XMLNode.js",".././node_modules/xmlbuilder/lib/XMLNodeList.js",".././node_modules/xmlbuilder/lib/XMLProcessingInstruction.js",".././node_modules/xmlbuilder/lib/XMLRaw.js",".././node_modules/xmlbuilder/lib/XMLStreamWriter.js",".././node_modules/xmlbuilder/lib/XMLStringWriter.js",".././node_modules/xmlbuilder/lib/XMLStringifier.js",".././node_modules/xmlbuilder/lib/XMLText.js",".././node_modules/xmlbuilder/lib/XMLWriterBase.js",".././node_modules/xmlbuilder/lib/index.js",".././src/lib/build-version-xml.js",".././src/main.js","../external node-commonjs \"assert\"","../external node-commonjs \"crypto\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"http\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"tls\"","../external node-commonjs \"util\"","../webpack/bootstrap","../webpack/runtime/compat",".././src/index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\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\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\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 return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\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.issueFileCommand('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.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\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 if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\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 const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(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 * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\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 const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(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;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\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 uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(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.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-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 });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.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 });\nexports.toCommandProperties = exports.toCommandValue = void 0;\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/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\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 });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Disconnected: 1,\n Preceding: 2,\n Following: 4,\n Contains: 8,\n ContainedBy: 16,\n ImplementationSpecific: 32\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Element: 1,\n Attribute: 2,\n Text: 3,\n CData: 4,\n EntityReference: 5,\n EntityDeclaration: 6,\n ProcessingInstruction: 7,\n Comment: 8,\n Document: 9,\n DocType: 10,\n DocumentFragment: 11,\n NotationDeclaration: 12,\n // Numeric codes up to 200 are reserved to W3C for possible future use.\n // Following are types internal to this library:\n Declaration: 201,\n Raw: 202,\n AttributeDeclaration: 203,\n ElementDeclaration: 204,\n Dummy: 205\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Copies all enumerable own properties from `sources` to `target`\n var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n assign = function(target, ...sources) {\n var i, key, len, source;\n if (isFunction(Object.assign)) {\n Object.assign.apply(null, arguments);\n } else {\n for (i = 0, len = sources.length; i < len; i++) {\n source = sources[i];\n if (source != null) {\n for (key in source) {\n if (!hasProp.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n\n // Determines if `val` is a Function object\n isFunction = function(val) {\n return !!val && Object.prototype.toString.call(val) === '[object Function]';\n };\n\n // Determines if `val` is an Object\n isObject = function(val) {\n var ref;\n return !!val && ((ref = typeof val) === 'function' || ref === 'object');\n };\n\n // Determines if `val` is an Array\n isArray = function(val) {\n if (isFunction(Array.isArray)) {\n return Array.isArray(val);\n } else {\n return Object.prototype.toString.call(val) === '[object Array]';\n }\n };\n\n // Determines if `val` is an empty Array or an Object with no own properties\n isEmpty = function(val) {\n var key;\n if (isArray(val)) {\n return !val.length;\n } else {\n for (key in val) {\n if (!hasProp.call(val, key)) continue;\n return false;\n }\n return true;\n }\n };\n\n // Determines if `val` is a plain Object\n isPlainObject = function(val) {\n var ctor, proto;\n return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));\n };\n\n // Gets the primitive value of an object\n getValue = function(obj) {\n if (isFunction(obj.valueOf)) {\n return obj.valueOf();\n } else {\n return obj;\n }\n };\n\n module.exports.assign = assign;\n\n module.exports.isFunction = isFunction;\n\n module.exports.isObject = isObject;\n\n module.exports.isArray = isArray;\n\n module.exports.isEmpty = isEmpty;\n\n module.exports.isPlainObject = isPlainObject;\n\n module.exports.getValue = getValue;\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n None: 0,\n OpenTag: 1,\n InsideTag: 2,\n CloseTag: 3\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLNode;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents an attribute\n module.exports = XMLAttribute = (function() {\n class XMLAttribute {\n // Initializes a new instance of `XMLAttribute`\n\n // `parent` the parent node\n // `name` attribute target\n // `value` attribute value\n constructor(parent, name, value) {\n this.parent = parent;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.value = this.stringify.attValue(value);\n this.type = NodeType.Attribute;\n // DOM level 3\n this.isId = false;\n this.schemaTypeInfo = null;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.attribute(this, this.options.writer.filterOptions(options));\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n name = name || this.name;\n if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else {\n return \"attribute: {\" + name + \"}, parent: <\" + this.parent.name + \">\";\n }\n }\n\n isEqualNode(node) {\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.value !== this.value) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLAttribute.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {\n get: function() {\n return this.parent;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLAttribute.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'specified', {\n get: function() {\n return true;\n }\n });\n\n return XMLAttribute;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCData, XMLCharacterData;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a CDATA node\n module.exports = XMLCData = class XMLCData extends XMLCharacterData {\n // Initializes a new instance of `XMLCData`\n\n // `text` CDATA text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing CDATA text. \" + this.debugInfo());\n }\n this.name = \"#cdata-section\";\n this.type = NodeType.CData;\n this.value = this.stringify.cdata(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.cdata(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLCharacterData, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n // Represents a character data node\n module.exports = XMLCharacterData = (function() {\n class XMLCharacterData extends XMLNode {\n // Initializes a new instance of `XMLCharacterData`\n\n constructor(parent) {\n super(parent);\n this.value = '';\n }\n\n \n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // DOM level 1 functions to be implemented later\n substringData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendData(arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n insertData(offset, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n deleteData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n replaceData(offset, count, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.data !== this.data) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLCharacterData.prototype, 'data', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'length', {\n get: function() {\n return this.value.length;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLCharacterData.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n return XMLCharacterData;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLComment;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a comment node\n module.exports = XMLComment = class XMLComment extends XMLCharacterData {\n // Initializes a new instance of `XMLComment`\n\n // `text` comment text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing comment text. \" + this.debugInfo());\n }\n this.name = \"#comment\";\n this.type = NodeType.Comment;\n this.value = this.stringify.comment(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.comment(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;\n\n XMLDOMErrorHandler = require('./XMLDOMErrorHandler');\n\n XMLDOMStringList = require('./XMLDOMStringList');\n\n // Implements the DOMConfiguration interface\n module.exports = XMLDOMConfiguration = (function() {\n class XMLDOMConfiguration {\n constructor() {\n var clonedSelf;\n this.defaultParams = {\n \"canonical-form\": false,\n \"cdata-sections\": false,\n \"comments\": false,\n \"datatype-normalization\": false,\n \"element-content-whitespace\": true,\n \"entities\": true,\n \"error-handler\": new XMLDOMErrorHandler(),\n \"infoset\": true,\n \"validate-if-schema\": false,\n \"namespaces\": true,\n \"namespace-declarations\": true,\n \"normalize-characters\": false,\n \"schema-location\": '',\n \"schema-type\": '',\n \"split-cdata-sections\": true,\n \"validate\": false,\n \"well-formed\": true\n };\n this.params = clonedSelf = Object.create(this.defaultParams);\n }\n\n // Gets the value of a parameter.\n\n // `name` name of the parameter\n getParameter(name) {\n if (this.params.hasOwnProperty(name)) {\n return this.params[name];\n } else {\n return null;\n }\n }\n\n // Checks if setting a parameter to a specific value is supported.\n\n // `name` name of the parameter\n // `value` parameter value\n canSetParameter(name, value) {\n return true;\n }\n\n // Sets the value of a parameter.\n\n // `name` name of the parameter\n // `value` new value or null if the user wishes to unset the parameter\n setParameter(name, value) {\n if (value != null) {\n return this.params[name] = value;\n } else {\n return delete this.params[name];\n }\n }\n\n };\n\n // Returns the list of parameter names\n Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {\n get: function() {\n return new XMLDOMStringList(Object.keys(this.defaultParams));\n }\n });\n\n return XMLDOMConfiguration;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents the error handler for DOM operations\n var XMLDOMErrorHandler;\n\n module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {\n // Initializes a new instance of `XMLDOMErrorHandler`\n\n constructor() {}\n\n // Called on the error handler when an error occurs.\n\n // `error` the error message as a string\n handleError(error) {\n throw new Error(error);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Implements the DOMImplementation interface\n var XMLDOMImplementation;\n\n module.exports = XMLDOMImplementation = class XMLDOMImplementation {\n // Tests if the DOM implementation implements a specific feature.\n\n // `feature` package name of the feature to test. In Level 1, the\n // legal values are \"HTML\" and \"XML\" (case-insensitive).\n // `version` version number of the package name to test. \n // In Level 1, this is the string \"1.0\". If the version is \n // not specified, supporting any version of the feature will \n // cause the method to return true.\n hasFeature(feature, version) {\n return true;\n }\n\n // Creates a new document type declaration.\n\n // `qualifiedName` qualified name of the document type to be created\n // `publicId` public identifier of the external subset\n // `systemId` system identifier of the external subset\n createDocumentType(qualifiedName, publicId, systemId) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new document.\n\n // `namespaceURI` namespace URI of the document element to create\n // `qualifiedName` the qualified name of the document to be created\n // `doctype` the type of document to be created or null\n createDocument(namespaceURI, qualifiedName, doctype) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new HTML document.\n\n // `title` document title\n createHTMLDocument(title) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Returns a specialized object which implements the specialized APIs \n // of the specified feature and version.\n\n // `feature` name of the feature requested.\n // `version` version number of the feature to test\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of string entries\n var XMLDOMStringList;\n\n module.exports = XMLDOMStringList = (function() {\n class XMLDOMStringList {\n // Initializes a new instance of `XMLDOMStringList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `arr` the array of string values\n constructor(arr) {\n this.arr = arr || [];\n }\n\n // Returns the indexth item in the collection.\n\n // `index` index into the collection\n item(index) {\n return this.arr[index] || null;\n }\n\n // Test if a string is part of this DOMStringList.\n\n // `str` the string to look for\n contains(str) {\n return this.arr.indexOf(str) !== -1;\n }\n\n };\n\n // Returns the number of strings in the list.\n Object.defineProperty(XMLDOMStringList.prototype, 'length', {\n get: function() {\n return this.arr.length;\n }\n });\n\n return XMLDOMStringList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute list\n module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {\n // Initializes a new instance of `XMLDTDAttList`\n\n // `parent` the parent `XMLDocType` element\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,\n // #FIXED or #DEFAULT)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n super(parent);\n if (elementName == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (attributeName == null) {\n throw new Error(\"Missing DTD attribute name. \" + this.debugInfo(elementName));\n }\n if (!attributeType) {\n throw new Error(\"Missing DTD attribute type. \" + this.debugInfo(elementName));\n }\n if (!defaultValueType) {\n throw new Error(\"Missing DTD attribute default. \" + this.debugInfo(elementName));\n }\n if (defaultValueType.indexOf('#') !== 0) {\n defaultValueType = '#' + defaultValueType;\n }\n if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Default value only applies to #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n this.elementName = this.stringify.name(elementName);\n this.type = NodeType.AttributeDeclaration;\n this.attributeName = this.stringify.name(attributeName);\n this.attributeType = this.stringify.dtdAttType(attributeType);\n if (defaultValue) {\n this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n }\n this.defaultValueType = defaultValueType;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDElement, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute\n module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {\n // Initializes a new instance of `XMLDTDElement`\n\n // `parent` the parent `XMLDocType` element\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (!value) {\n value = '(#PCDATA)';\n }\n if (Array.isArray(value)) {\n value = '(' + value.join(',') + ')';\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.ElementDeclaration;\n this.value = this.stringify.dtdElementValue(value);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDEntity, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an entity declaration in the DTD\n module.exports = XMLDTDEntity = (function() {\n class XMLDTDEntity extends XMLNode {\n // Initializes a new instance of `XMLDTDEntity`\n\n // `parent` the parent `XMLDocType` element\n // `pe` whether this is a parameter entity or a general entity\n // defaults to `false` (general entity)\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n constructor(parent, pe, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD entity name. \" + this.debugInfo(name));\n }\n if (value == null) {\n throw new Error(\"Missing DTD entity value. \" + this.debugInfo(name));\n }\n this.pe = !!pe;\n this.name = this.stringify.name(name);\n this.type = NodeType.EntityDeclaration;\n if (!isObject(value)) {\n this.value = this.stringify.dtdEntityValue(value);\n this.internal = true;\n } else {\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public and/or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n if (value.pubID && !value.sysID) {\n throw new Error(\"System identifier is required for a public external entity. \" + this.debugInfo(name));\n }\n this.internal = false;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n if (value.nData != null) {\n this.nData = this.stringify.dtdNData(value.nData);\n }\n if (this.pe && this.nData) {\n throw new Error(\"Notation declaration is not allowed in a parameter entity. \" + this.debugInfo(name));\n }\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {\n get: function() {\n return this.nData || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {\n get: function() {\n return null;\n }\n });\n\n return XMLDTDEntity;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDNotation, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a NOTATION entry in the DTD\n module.exports = XMLDTDNotation = (function() {\n class XMLDTDNotation extends XMLNode {\n // Initializes a new instance of `XMLDTDNotation`\n\n // `parent` the parent `XMLDocType` element\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD notation name. \" + this.debugInfo(name));\n }\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.NotationDeclaration;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n return XMLDTDNotation;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDeclaration, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents the XML declaration\n module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {\n // Initializes a new instance of `XMLDeclaration`\n\n // `parent` the document object\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n constructor(parent, version, encoding, standalone) {\n super(parent);\n // arguments may also be passed as an object\n if (isObject(version)) {\n ({version, encoding, standalone} = version);\n }\n if (!version) {\n version = '1.0';\n }\n this.type = NodeType.Declaration;\n this.version = this.stringify.xmlVersion(version);\n if (encoding != null) {\n this.encoding = this.stringify.xmlEncoding(encoding);\n }\n if (standalone != null) {\n this.standalone = this.stringify.xmlStandalone(standalone);\n }\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents doctype declaration\n module.exports = XMLDocType = (function() {\n class XMLDocType extends XMLNode {\n // Initializes a new instance of `XMLDocType`\n\n // `parent` the document object\n\n // `pubID` public identifier of the external subset\n // `sysID` system identifier of the external subset\n constructor(parent, pubID, sysID) {\n var child, i, len, ref;\n super(parent);\n this.type = NodeType.DocType;\n // set DTD name to the name of the root node\n if (parent.children) {\n ref = parent.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.Element) {\n this.name = child.name;\n break;\n }\n }\n }\n this.documentObject = parent;\n // arguments may also be passed as an object\n if (isObject(pubID)) {\n ({pubID, sysID} = pubID);\n }\n if (sysID == null) {\n [sysID, pubID] = [pubID, sysID];\n }\n if (pubID != null) {\n this.pubID = this.stringify.dtdPubID(pubID);\n }\n if (sysID != null) {\n this.sysID = this.stringify.dtdSysID(sysID);\n }\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n element(name, value) {\n var child;\n child = new XMLDTDElement(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var child;\n child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.children.push(child);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var child;\n child = new XMLDTDEntity(this, false, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var child;\n child = new XMLDTDEntity(this, true, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var child;\n child = new XMLDTDNotation(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.docType(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n ele(name, value) {\n return this.element(name, value);\n }\n\n att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n }\n\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n up() {\n return this.root() || this.documentObject;\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.name !== this.name) {\n return false;\n }\n if (node.publicId !== this.publicId) {\n return false;\n }\n if (node.systemId !== this.systemId) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocType.prototype, 'entities', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if ((child.type === NodeType.EntityDeclaration) && !child.pe) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'notations', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.NotationDeclaration) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n // DOM level 2\n Object.defineProperty(XMLDocType.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'internalSubset', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLDocType;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;\n\n ({isPlainObject} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDOMConfiguration = require('./XMLDOMConfiguration');\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n // Represents an XML builder\n module.exports = XMLDocument = (function() {\n class XMLDocument extends XMLNode {\n // Initializes a new instance of `XMLDocument`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n constructor(options) {\n super(null);\n this.name = \"#document\";\n this.type = NodeType.Document;\n this.documentURI = null;\n this.domConfig = new XMLDOMConfiguration();\n options || (options = {});\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.stringify = new XMLStringifier(options);\n }\n\n // Ends the document and passes it to the given XML writer\n\n // `writer` is either an XML writer or a plain object to pass to the\n // constructor of the default XML writer. The default writer is assigned when\n // creating the XML document. Following flags are recognized by the\n // built-in XMLStringWriter:\n // `writer.pretty` pretty prints the result\n // `writer.indent` indentation for pretty print\n // `writer.offset` how many indentations to add to every line for pretty print\n // `writer.newline` newline sequence for pretty print\n end(writer) {\n var writerOptions;\n writerOptions = {};\n if (!writer) {\n writer = this.options.writer;\n } else if (isPlainObject(writer)) {\n writerOptions = writer;\n writer = this.options.writer;\n }\n return writer.document(this, writer.filterOptions(writerOptions));\n }\n\n // Converts the XML document to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.document(this, this.options.writer.filterOptions(options));\n }\n\n // DOM level 1 functions to be implemented later\n createElement(tagName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createDocumentFragment() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTextNode(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createComment(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createCDATASection(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createProcessingInstruction(target, data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttribute(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEntityReference(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2 functions to be implemented later\n importNode(importedNode, deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createElementNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttributeNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementById(elementId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 3 functions to be implemented later\n adoptNode(source) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalizeDocument() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n renameNode(node, namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 4 functions to be implemented later\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEvent(eventInterface) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createRange() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createNodeIterator(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTreeWalker(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocument.prototype, 'implementation', {\n value: new XMLDOMImplementation()\n });\n\n Object.defineProperty(XMLDocument.prototype, 'doctype', {\n get: function() {\n var child, i, len, ref;\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.DocType) {\n return child;\n }\n }\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'documentElement', {\n get: function() {\n return this.rootObject || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {\n get: function() {\n return false;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].encoding;\n } else {\n return null;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].standalone === 'yes';\n } else {\n return false;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].version;\n } else {\n return \"1.0\";\n }\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLDocument.prototype, 'URL', {\n get: function() {\n return this.documentURI;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'origin', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'compatMode', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'characterSet', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'contentType', {\n get: function() {\n return null;\n }\n });\n\n return XMLDocument;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));\n\n NodeType = require('./NodeType');\n\n XMLDocument = require('./XMLDocument');\n\n XMLElement = require('./XMLElement');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n WriterState = require('./WriterState');\n\n // Represents an XML builder\n module.exports = XMLDocumentCB = class XMLDocumentCB {\n // Initializes a new instance of `XMLDocumentCB`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its first\n // argument, and the current indentation level as its second argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n constructor(options, onData, onEnd) {\n var writerOptions;\n this.name = \"?xml\";\n this.type = NodeType.Document;\n options || (options = {});\n writerOptions = {};\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n } else if (isPlainObject(options.writer)) {\n writerOptions = options.writer;\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.writer = options.writer;\n this.writerOptions = this.writer.filterOptions(writerOptions);\n this.stringify = new XMLStringifier(options);\n this.onDataCallback = onData || function() {};\n this.onEndCallback = onEnd || function() {};\n this.currentNode = null;\n this.currentLevel = -1;\n this.openTags = {};\n this.documentStarted = false;\n this.documentCompleted = false;\n this.root = null;\n }\n\n // Creates a child element node from the given XMLNode\n\n // `node` the child node\n createChildNode(node) {\n var att, attName, attributes, child, i, len, ref, ref1;\n switch (node.type) {\n case NodeType.CData:\n this.cdata(node.value);\n break;\n case NodeType.Comment:\n this.comment(node.value);\n break;\n case NodeType.Element:\n attributes = {};\n ref = node.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n attributes[attName] = att.value;\n }\n this.node(node.name, attributes);\n break;\n case NodeType.Dummy:\n this.dummy();\n break;\n case NodeType.Raw:\n this.raw(node.value);\n break;\n case NodeType.Text:\n this.text(node.value);\n break;\n case NodeType.ProcessingInstruction:\n this.instruction(node.target, node.value);\n break;\n default:\n throw new Error(\"This XML node type is not supported in a JS object: \" + node.constructor.name);\n }\n ref1 = node.children;\n // write child nodes recursively\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n return this;\n }\n\n // Creates a dummy node\n\n dummy() {\n // no-op, just return this\n return this;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n if (name == null) {\n throw new Error(\"Missing node name.\");\n }\n if (this.root && this.currentLevel === -1) {\n throw new Error(\"Document can only have one root node. \" + this.debugInfo(name));\n }\n this.openCurrent();\n name = getValue(name);\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n this.currentNode = new XMLElement(this, name, attributes);\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n if (text != null) {\n this.text(text);\n }\n return this;\n }\n\n // Creates a child element node or an element type declaration when called\n // inside the DTD\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var child, i, len, oldValidationFlag, ref, root;\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n this.dtdElement(...arguments);\n } else {\n if (Array.isArray(name) || isObject(name) || isFunction(name)) {\n oldValidationFlag = this.options.noValidation;\n this.options.noValidation = true;\n root = new XMLDocument(this.options).element('TEMP_ROOT');\n root.element(name);\n this.options.noValidation = oldValidationFlag;\n ref = root.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n } else {\n this.node(name, attributes, text);\n }\n }\n return this;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (!this.currentNode || this.currentNode.children) {\n throw new Error(\"att() can only be used immediately after an ele() call in callback mode. \" + this.debugInfo(name));\n }\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var node;\n this.openCurrent();\n node = new XMLText(this, value);\n this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var node;\n this.openCurrent();\n node = new XMLCData(this, value);\n this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var node;\n this.openCurrent();\n node = new XMLComment(this, value);\n this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var node;\n this.openCurrent();\n node = new XMLRaw(this, value);\n this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var i, insTarget, insValue, len, node;\n this.openCurrent();\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (i = 0, len = target.length; i < len; i++) {\n insTarget = target[i];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n node = new XMLProcessingInstruction(this, target, value);\n this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n }\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var node;\n this.openCurrent();\n if (this.documentStarted) {\n throw new Error(\"declaration() must be the first node.\");\n }\n node = new XMLDeclaration(this, version, encoding, standalone);\n this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates the document type declaration\n\n // `root` the name of the root node\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n doctype(root, pubID, sysID) {\n this.openCurrent();\n if (root == null) {\n throw new Error(\"Missing root node name.\");\n }\n if (this.root) {\n throw new Error(\"dtd() must come before the root node.\");\n }\n this.currentNode = new XMLDocType(this, pubID, sysID);\n this.currentNode.rootNodeName = root;\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n return this;\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n dtdElement(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDElement(this, name, value);\n this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var node;\n this.openCurrent();\n node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, false, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, true, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDNotation(this, name, value);\n this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Gets the parent node\n up() {\n if (this.currentLevel < 0) {\n throw new Error(\"The document node has no parent.\");\n }\n if (this.currentNode) {\n if (this.currentNode.children) {\n this.closeNode(this.currentNode);\n } else {\n this.openNode(this.currentNode);\n }\n this.currentNode = null;\n } else {\n this.closeNode(this.openTags[this.currentLevel]);\n }\n delete this.openTags[this.currentLevel];\n this.currentLevel--;\n return this;\n }\n\n // Ends the document\n end() {\n while (this.currentLevel >= 0) {\n this.up();\n }\n return this.onEnd();\n }\n\n // Opens the current parent node\n openCurrent() {\n if (this.currentNode) {\n this.currentNode.children = true;\n return this.openNode(this.currentNode);\n }\n }\n\n // Writes the opening tag of the current node or the entire node if it has\n // no child nodes\n openNode(node) {\n var att, chunk, name, ref;\n if (!node.isOpen) {\n if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {\n this.root = node;\n }\n chunk = '';\n if (node.type === NodeType.Element) {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);\n }\n chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);\n this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType\n } else {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '';\n }\n chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.onData(chunk, this.currentLevel);\n return node.isOpen = true;\n }\n }\n\n // Writes the closing tag of the current node\n closeNode(node) {\n var chunk;\n if (!node.isClosed) {\n chunk = '';\n this.writerOptions.state = WriterState.CloseTag;\n if (node.type === NodeType.Element) {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType\n } else {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.writerOptions.state = WriterState.None;\n this.onData(chunk, this.currentLevel);\n return node.isClosed = true;\n }\n }\n\n // Called when a new chunk of XML is output\n\n // `chunk` a string containing the XML chunk\n // `level` current indentation level\n onData(chunk, level) {\n this.documentStarted = true;\n return this.onDataCallback(chunk, level + 1);\n }\n\n // Called when the XML document is completed\n onEnd() {\n this.documentCompleted = true;\n return this.onEndCallback();\n }\n\n // Returns debug string\n debugInfo(name) {\n if (name == null) {\n return \"\";\n } else {\n return \"node: <\" + name + \">\";\n }\n }\n\n // Node aliases\n ele() {\n return this.element(...arguments);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n dtd(root, pubID, sysID) {\n return this.doctype(root, pubID, sysID);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n // Attribute aliases\n att() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n a() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n // DTD aliases\n // att() and ele() are defined above\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDummy, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a raw node\n module.exports = XMLDummy = class XMLDummy extends XMLNode {\n // Initializes a new instance of `XMLDummy`\n\n // `XMLDummy` is a special node representing a node with \n // a null value. Dummy nodes are created while recursively\n // building the XML tree. Simply skipping null values doesn't\n // work because that would break the recursive chain.\n constructor(parent) {\n super(parent);\n this.type = NodeType.Dummy;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return '';\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, getValue} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents an element of the XML document\n module.exports = XMLElement = (function() {\n class XMLElement extends XMLNode {\n // Initializes a new instance of `XMLElement`\n\n // `parent` the parent node\n // `name` element name\n // `attributes` an object containing name/value pairs of attributes\n constructor(parent, name, attributes) {\n var child, j, len, ref;\n super(parent);\n if (name == null) {\n throw new Error(\"Missing element name. \" + this.debugInfo());\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.Element;\n this.attribs = {};\n this.schemaTypeInfo = null;\n if (attributes != null) {\n this.attribute(attributes);\n }\n // set properties if this is the root node\n if (parent.type === NodeType.Document) {\n this.isRoot = true;\n this.documentObject = parent;\n parent.rootObject = this;\n // set dtd name\n if (parent.children) {\n ref = parent.children;\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n if (child.type === NodeType.DocType) {\n child.name = this.name;\n break;\n }\n }\n }\n }\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n var att, attName, clonedSelf, ref;\n clonedSelf = Object.create(this);\n // remove document element\n if (clonedSelf.isRoot) {\n clonedSelf.documentObject = null;\n }\n // clone attributes\n clonedSelf.attribs = {};\n ref = this.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n clonedSelf.attribs[attName] = att.clone();\n }\n // clone child nodes\n clonedSelf.children = [];\n this.children.forEach(function(child) {\n var clonedChild;\n clonedChild = child.clone();\n clonedChild.parent = clonedSelf;\n return clonedSelf.children.push(clonedChild);\n });\n return clonedSelf;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n var attName, j, len;\n // Also defined in DOM level 1\n // removeAttribute(name) removes an attribute by name.\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo());\n }\n name = getValue(name);\n if (Array.isArray(name)) { // expand if array\n for (j = 0, len = name.length; j < len; j++) {\n attName = name[j];\n delete this.attribs[attName];\n }\n } else {\n delete this.attribs[name];\n }\n return this;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n // `options.allowEmpty` do not self close empty element tags\n toString(options) {\n return this.options.writer.element(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // DOM Level 1\n getAttribute(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].value;\n } else {\n return null;\n }\n }\n\n setAttribute(name, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNode(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name];\n } else {\n return null;\n }\n }\n\n setAttributeNode(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNode(oldAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 2\n getAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNS(namespaceURI, qualifiedName, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNodeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNodeNS(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasAttribute(name) {\n return this.attribs.hasOwnProperty(name);\n }\n\n hasAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 3\n setIdAttribute(name, isId) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].isId;\n } else {\n return isId;\n }\n }\n\n setIdAttributeNS(namespaceURI, localName, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setIdAttributeNode(idAttr, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 4\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref;\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.attribs.length !== this.attribs.length) {\n return false;\n }\n for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {\n if (!this.attribs[i].isEqualNode(node.attribs[i])) {\n return false;\n }\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLElement.prototype, 'tagName', {\n get: function() {\n return this.name;\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLElement.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'id', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'className', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'classList', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'attributes', {\n get: function() {\n if (!this.attributeMap || !this.attributeMap.nodes) {\n this.attributeMap = new XMLNamedNodeMap(this.attribs);\n }\n return this.attributeMap;\n }\n });\n\n return XMLElement;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a map of nodes accessed by a string key\n var XMLNamedNodeMap;\n\n module.exports = XMLNamedNodeMap = (function() {\n class XMLNamedNodeMap {\n // Initializes a new instance of `XMLNamedNodeMap`\n // This is just a wrapper around an ordinary\n // JS object.\n\n // `nodes` the object containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given object. The calling function should check\n // whether the wrapped object is null and supply a new object\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n getNamedItem(name) {\n return this.nodes[name];\n }\n\n setNamedItem(node) {\n var oldNode;\n oldNode = this.nodes[node.nodeName];\n this.nodes[node.nodeName] = node;\n return oldNode || null;\n }\n\n removeNamedItem(name) {\n var oldNode;\n oldNode = this.nodes[name];\n delete this.nodes[name];\n return oldNode || null;\n }\n\n item(index) {\n return this.nodes[Object.keys(this.nodes)[index]] || null;\n }\n\n // DOM level 2 functions to be implemented later\n getNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n setNamedItemNS(node) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n removeNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n \n // DOM level 1\n Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {\n get: function() {\n return Object.keys(this.nodes).length || 0;\n }\n });\n\n return XMLNamedNodeMap;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,\n hasProp = {}.hasOwnProperty,\n splice = [].splice;\n\n ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));\n\n XMLElement = null;\n\n XMLCData = null;\n\n XMLComment = null;\n\n XMLDeclaration = null;\n\n XMLDocType = null;\n\n XMLRaw = null;\n\n XMLText = null;\n\n XMLProcessingInstruction = null;\n\n XMLDummy = null;\n\n NodeType = null;\n\n XMLNodeList = null;\n\n XMLNamedNodeMap = null;\n\n DocumentPosition = null;\n\n // Represents a generic XMl element\n module.exports = XMLNode = (function() {\n class XMLNode {\n // Initializes a new instance of `XMLNode`\n\n // `parent` the parent node\n constructor(parent1) {\n this.parent = parent1;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n this.value = null;\n this.children = [];\n this.baseURI = null;\n // first execution, load dependencies that are otherwise\n // circular (so we can't load them at the top)\n if (!XMLElement) {\n XMLElement = require('./XMLElement');\n XMLCData = require('./XMLCData');\n XMLComment = require('./XMLComment');\n XMLDeclaration = require('./XMLDeclaration');\n XMLDocType = require('./XMLDocType');\n XMLRaw = require('./XMLRaw');\n XMLText = require('./XMLText');\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n XMLDummy = require('./XMLDummy');\n NodeType = require('./NodeType');\n XMLNodeList = require('./XMLNodeList');\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n DocumentPosition = require('./DocumentPosition');\n }\n }\n\n \n // Sets the parent node of this node and its children recursively\n\n // `parent` the parent node\n setParent(parent) {\n var child, j, len, ref1, results;\n this.parent = parent;\n if (parent) {\n this.options = parent.options;\n this.stringify = parent.stringify;\n }\n ref1 = this.children;\n results = [];\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n results.push(child.setParent(this));\n }\n return results;\n }\n\n // Creates a child element node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var childNode, item, j, k, key, lastChild, len, len1, val;\n lastChild = null;\n if (attributes === null && (text == null)) {\n [attributes, text] = [{}, null];\n }\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n if (name != null) {\n name = getValue(name);\n }\n // expand if array\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n item = name[j];\n lastChild = this.element(item);\n }\n // evaluate if function\n } else if (isFunction(name)) {\n lastChild = this.element(name.apply());\n // expand if object\n } else if (isObject(name)) {\n for (key in name) {\n if (!hasProp.call(name, key)) continue;\n val = name[key];\n if (isFunction(val)) {\n // evaluate if function\n val = val.apply();\n }\n // assign attributes\n if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n // skip empty arrays\n } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {\n lastChild = this.dummy();\n // empty objects produce one node\n } else if (isObject(val) && isEmpty(val)) {\n lastChild = this.element(key);\n // skip null and undefined nodes\n } else if (!this.options.keepNullNodes && (val == null)) {\n lastChild = this.dummy();\n \n // expand list by creating child nodes\n } else if (!this.options.separateArrayItems && Array.isArray(val)) {\n for (k = 0, len1 = val.length; k < len1; k++) {\n item = val[k];\n childNode = {};\n childNode[key] = item;\n lastChild = this.element(childNode);\n }\n \n // expand child nodes under parent\n } else if (isObject(val)) {\n // if the key is #text expand child nodes under this node to support mixed content\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.element(val);\n } else {\n lastChild = this.element(key);\n lastChild.element(val);\n }\n } else {\n \n // text node\n lastChild = this.element(key, val);\n }\n }\n // skip null nodes\n } else if (!this.options.keepNullNodes && text === null) {\n lastChild = this.dummy();\n } else {\n // text node\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.text(text);\n // cdata node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n lastChild = this.cdata(text);\n // comment node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n lastChild = this.comment(text);\n // raw text node\n } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n lastChild = this.raw(text);\n // processing instruction\n } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {\n lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);\n } else {\n // element node\n lastChild = this.node(name, attributes, text);\n }\n }\n if (lastChild == null) {\n throw new Error(\"Could not create any elements with: \" + name + \". \" + this.debugInfo());\n }\n return lastChild;\n }\n\n // Creates a child element node before the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertBefore(name, attributes, text) {\n var child, i, newChild, refChild, removed;\n // DOM level 1\n // insertBefore(newChild, refChild) inserts the child node newChild before refChild\n if (name != null ? name.type : void 0) {\n newChild = name;\n refChild = attributes;\n newChild.setParent(this);\n if (refChild) {\n // temporarily remove children starting *with* refChild\n i = children.indexOf(refChild);\n removed = children.splice(i);\n \n // add the new child\n children.push(newChild);\n \n // add back removed children after new child\n Array.prototype.push.apply(children, removed);\n } else {\n children.push(newChild);\n }\n return newChild;\n } else {\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n }\n\n // Creates a child element node after the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertAfter(name, attributes, text) {\n var child, i, removed;\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n\n // Deletes a child element node\n\n remove() {\n var i, ref1;\n if (this.isRoot) {\n throw new Error(\"Cannot remove the root element. \" + this.debugInfo());\n }\n i = this.parent.children.indexOf(this);\n splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;\n return this.parent;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n var child;\n if (name != null) {\n name = getValue(name);\n }\n attributes || (attributes = {});\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n child = new XMLElement(this, name, attributes);\n if (text != null) {\n child.text(text);\n }\n this.children.push(child);\n return child;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var child;\n if (isObject(value)) {\n this.element(value);\n }\n child = new XMLText(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var child;\n child = new XMLCData(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var child;\n child = new XMLComment(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node before the current node\n\n // `value` comment text\n commentBefore(value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a comment node after the current node\n\n // `value` comment text\n commentAfter(value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var child;\n child = new XMLRaw(this, value);\n this.children.push(child);\n return this;\n }\n\n // Adds a dummy node\n dummy() {\n var child;\n child = new XMLDummy(this);\n // Normally when a new node is created it is added to the child node collection.\n // However, dummy nodes are never added to the XML tree. They are created while\n // converting JS objects to XML nodes in order not to break the recursive function\n // chain. They can be thought of as invisible nodes. They can be traversed through\n // by using prev(), next(), up(), etc. functions but they do not exists in the tree.\n\n // @children.push child\n return child;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var insTarget, insValue, instruction, j, len;\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (j = 0, len = target.length; j < len; j++) {\n insTarget = target[j];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n instruction = new XMLProcessingInstruction(this, target, value);\n this.children.push(instruction);\n }\n return this;\n }\n\n // Creates a processing instruction node before the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionBefore(target, value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a processing instruction node after the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionAfter(target, value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var doc, xmldec;\n doc = this.document();\n xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n // Replace XML declaration if exists, otherwise insert at top\n if (doc.children.length === 0) {\n doc.children.unshift(xmldec);\n } else if (doc.children[0].type === NodeType.Declaration) {\n doc.children[0] = xmldec;\n } else {\n doc.children.unshift(xmldec);\n }\n return doc.root() || doc;\n }\n\n // Creates the document type declaration\n\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n dtd(pubID, sysID) {\n var child, doc, doctype, i, j, k, len, len1, ref1, ref2;\n doc = this.document();\n doctype = new XMLDocType(doc, pubID, sysID);\n ref1 = doc.children;\n // Replace DTD if exists\n for (i = j = 0, len = ref1.length; j < len; i = ++j) {\n child = ref1[i];\n if (child.type === NodeType.DocType) {\n doc.children[i] = doctype;\n return doctype;\n }\n }\n ref2 = doc.children;\n // insert before root node if the root node exists\n for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {\n child = ref2[i];\n if (child.isRoot) {\n doc.children.splice(i, 0, doctype);\n return doctype;\n }\n }\n // otherwise append to end\n doc.children.push(doctype);\n return doctype;\n }\n\n // Gets the parent node\n up() {\n if (this.isRoot) {\n throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n }\n return this.parent;\n }\n\n // Gets the root node\n root() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node.rootObject;\n } else if (node.isRoot) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Gets the node representing the XML document\n document() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Ends the document and converts string\n end(options) {\n return this.document().end(options);\n }\n\n // Gets the previous node\n prev() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i < 1) {\n throw new Error(\"Already at the first node. \" + this.debugInfo());\n }\n return this.parent.children[i - 1];\n }\n\n // Gets the next node\n next() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i === -1 || i === this.parent.children.length - 1) {\n throw new Error(\"Already at the last node. \" + this.debugInfo());\n }\n return this.parent.children[i + 1];\n }\n\n // Imports cloned root from another XML document\n\n // `doc` the XML document to insert nodes from\n importDocument(doc) {\n var child, clonedRoot, j, len, ref1;\n clonedRoot = doc.root().clone();\n clonedRoot.parent = this;\n clonedRoot.isRoot = false;\n this.children.push(clonedRoot);\n // set properties if imported element becomes the root node\n if (this.type === NodeType.Document) {\n clonedRoot.isRoot = true;\n clonedRoot.documentObject = this;\n this.rootObject = clonedRoot;\n // set dtd name\n if (this.children) {\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.type === NodeType.DocType) {\n child.name = clonedRoot.name;\n break;\n }\n }\n }\n }\n return this;\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n var ref1, ref2;\n name = name || this.name;\n if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {\n return \"\";\n } else if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {\n return \"node: <\" + name + \">\";\n } else {\n return \"node: <\" + name + \">, parent: <\" + this.parent.name + \">\";\n }\n }\n\n // Aliases\n ele(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n doc() {\n return this.document();\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n u() {\n return this.up();\n }\n\n // can be deprecated in a future release\n importXMLBuilder(doc) {\n return this.importDocument(doc);\n }\n\n // Adds or modifies an attribute.\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n // DOM level 1 functions to be implemented later\n replaceChild(newChild, oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeChild(oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendChild(newChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasChildNodes() {\n return this.children.length !== 0;\n }\n\n cloneNode(deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalize() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2\n isSupported(feature, version) {\n return true;\n }\n\n hasAttributes() {\n return this.attribs.length !== 0;\n }\n\n // DOM level 3 functions to be implemented later\n compareDocumentPosition(other) {\n var ref, res;\n ref = this;\n if (ref === other) {\n return 0;\n } else if (this.document() !== other.document()) {\n res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;\n if (Math.random() < 0.5) {\n res |= DocumentPosition.Preceding;\n } else {\n res |= DocumentPosition.Following;\n }\n return res;\n } else if (ref.isAncestor(other)) {\n return DocumentPosition.Contains | DocumentPosition.Preceding;\n } else if (ref.isDescendant(other)) {\n return DocumentPosition.Contains | DocumentPosition.Following;\n } else if (ref.isPreceding(other)) {\n return DocumentPosition.Preceding;\n } else {\n return DocumentPosition.Following;\n }\n }\n\n isSameNode(other) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupPrefix(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isDefaultNamespace(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupNamespaceURI(prefix) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref1;\n if (node.nodeType !== this.nodeType) {\n return false;\n }\n if (node.children.length !== this.children.length) {\n return false;\n }\n for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {\n if (!this.children[i].isEqualNode(node.children[i])) {\n return false;\n }\n }\n return true;\n }\n\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setUserData(key, data, handler) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getUserData(key) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // Returns true if other is an inclusive descendant of node,\n // and false otherwise.\n contains(other) {\n if (!other) {\n return false;\n }\n return other === this || this.isDescendant(other);\n }\n\n // An object A is called a descendant of an object B, if either A is \n // a child of B or A is a child of an object C that is a descendant of B.\n isDescendant(node) {\n var child, isDescendantChild, j, len, ref1;\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (node === child) {\n return true;\n }\n isDescendantChild = child.isDescendant(node);\n if (isDescendantChild) {\n return true;\n }\n }\n return false;\n }\n\n // An object A is called an ancestor of an object B if and only if\n // B is a descendant of A.\n isAncestor(node) {\n return node.isDescendant(this);\n }\n\n // An object A is preceding an object B if A and B are in the \n // same tree and A comes before B in tree order.\n isPreceding(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos < thisPos;\n }\n }\n\n // An object A is folllowing an object B if A and B are in the \n // same tree and A comes after B in tree order.\n isFollowing(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos > thisPos;\n }\n }\n\n // Returns the preorder position of the given node in the tree, or -1\n // if the node is not in the tree.\n treePosition(node) {\n var found, pos;\n pos = 0;\n found = false;\n this.foreachTreeNode(this.document(), function(childNode) {\n pos++;\n if (!found && childNode === node) {\n return found = true;\n }\n });\n if (found) {\n return pos;\n } else {\n return -1;\n }\n }\n\n \n // Depth-first preorder traversal through the XML tree\n foreachTreeNode(node, func) {\n var child, j, len, ref1, res;\n node || (node = this.document());\n ref1 = node.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (res = func(child)) {\n return res;\n } else {\n res = this.foreachTreeNode(child, func);\n if (res) {\n return res;\n }\n }\n }\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNode.prototype, 'nodeName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeValue', {\n get: function() {\n return this.value;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'parentNode', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'childNodes', {\n get: function() {\n if (!this.childNodeList || !this.childNodeList.nodes) {\n this.childNodeList = new XMLNodeList(this.children);\n }\n return this.childNodeList;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'firstChild', {\n get: function() {\n return this.children[0] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'lastChild', {\n get: function() {\n return this.children[this.children.length - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'previousSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nextSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i + 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'ownerDocument', {\n get: function() {\n return this.document() || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLNode.prototype, 'textContent', {\n get: function() {\n var child, j, len, ref1, str;\n if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {\n str = '';\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.textContent) {\n str += child.textContent;\n }\n }\n return str;\n } else {\n return null;\n }\n },\n set: function(value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLNode;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of nodes\n var XMLNodeList;\n\n module.exports = XMLNodeList = (function() {\n class XMLNodeList {\n // Initializes a new instance of `XMLNodeList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `nodes` the array containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given array. The calling function should check\n // whether the wrapped array is null and supply a new array\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n item(index) {\n return this.nodes[index] || null;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNodeList.prototype, 'length', {\n get: function() {\n return this.nodes.length || 0;\n }\n });\n\n return XMLNodeList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLProcessingInstruction;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a processing instruction\n module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {\n // Initializes a new instance of `XMLProcessingInstruction`\n\n // `parent` the parent node\n // `target` instruction target\n // `value` instruction value\n constructor(parent, target, value) {\n super(parent);\n if (target == null) {\n throw new Error(\"Missing instruction target. \" + this.debugInfo());\n }\n this.type = NodeType.ProcessingInstruction;\n this.target = this.stringify.insTarget(target);\n this.name = this.target;\n if (value) {\n this.value = this.stringify.insValue(value);\n }\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.target !== this.target) {\n return false;\n }\n return true;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLNode, XMLRaw;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents a raw node\n module.exports = XMLRaw = class XMLRaw extends XMLNode {\n // Initializes a new instance of `XMLRaw`\n\n // `text` raw text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing raw text. \" + this.debugInfo());\n }\n this.type = NodeType.Raw;\n this.value = this.stringify.raw(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.raw(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLWriterBase = require('./XMLWriterBase');\n\n WriterState = require('./WriterState');\n\n // Prints XML nodes to a stream\n module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStreamWriter`\n\n // `stream` output stream\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(stream, options) {\n super(options);\n this.stream = stream;\n }\n\n endline(node, options, level) {\n if (node.isLastRootNode && options.state === WriterState.CloseTag) {\n return '';\n } else {\n return super.endline(node, options, level);\n }\n }\n\n document(doc, options) {\n var child, i, j, k, len1, len2, ref, ref1, results;\n ref = doc.children;\n // set a flag so that we don't insert a newline after the last root level node \n for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {\n child = ref[i];\n child.isLastRootNode = i === doc.children.length - 1;\n }\n options = this.filterOptions(options);\n ref1 = doc.children;\n results = [];\n for (k = 0, len2 = ref1.length; k < len2; k++) {\n child = ref1[k];\n results.push(this.writeChildNode(child, options, 0));\n }\n return results;\n }\n\n cdata(node, options, level) {\n return this.stream.write(super.cdata(node, options, level));\n }\n\n comment(node, options, level) {\n return this.stream.write(super.comment(node, options, level));\n }\n\n declaration(node, options, level) {\n return this.stream.write(super.declaration(node, options, level));\n }\n\n docType(node, options, level) {\n var child, j, len1, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level));\n this.stream.write(' 0) {\n this.stream.write(' [');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (j = 0, len1 = ref.length; j < len1; j++) {\n child = ref[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(']');\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '>');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;\n level || (level = 0);\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n this.stream.write(r);\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n this.stream.write('>');\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '/>');\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n this.stream.write('>');\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n this.stream.write('>' + this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref2 = node.children;\n // inner tags\n for (j = 0, len1 = ref2.length; j < len1; j++) {\n child = ref2[j];\n this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(this.indent(node, options, level) + '');\n }\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n processingInstruction(node, options, level) {\n return this.stream.write(super.processingInstruction(node, options, level));\n }\n\n raw(node, options, level) {\n return this.stream.write(super.raw(node, options, level));\n }\n\n text(node, options, level) {\n return this.stream.write(super.text(node, options, level));\n }\n\n dtdAttList(node, options, level) {\n return this.stream.write(super.dtdAttList(node, options, level));\n }\n\n dtdElement(node, options, level) {\n return this.stream.write(super.dtdElement(node, options, level));\n }\n\n dtdEntity(node, options, level) {\n return this.stream.write(super.dtdEntity(node, options, level));\n }\n\n dtdNotation(node, options, level) {\n return this.stream.write(super.dtdNotation(node, options, level));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLStringWriter, XMLWriterBase;\n\n XMLWriterBase = require('./XMLWriterBase');\n\n // Prints XML nodes as plain text\n module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStringWriter`\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(options) {\n super(options);\n }\n\n document(doc, options) {\n var child, i, len, r, ref;\n options = this.filterOptions(options);\n r = '';\n ref = doc.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, 0);\n }\n // remove trailing newline\n if (options.pretty && r.slice(-options.newline.length) === options.newline) {\n r = r.slice(0, -options.newline.length);\n }\n return r;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Converts values to strings\n var XMLStringifier,\n hasProp = {}.hasOwnProperty;\n\n module.exports = XMLStringifier = (function() {\n class XMLStringifier {\n // Initializes a new instance of `XMLStringifier`\n\n // `options.version` The version number string of the XML spec to validate against, e.g. 1.0\n // `options.noDoubleEncoding` whether existing html entities are encoded: true or false\n // `options.stringify` a set of functions to use for converting values to strings\n // `options.noValidation` whether values will be validated and escaped or returned as is\n // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation\n constructor(options) {\n var key, ref, value;\n // Checks whether the given string contains legal characters\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalChar = this.assertLegalChar.bind(this);\n // Checks whether the given string contains legal characters for a name\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalName = this.assertLegalName.bind(this);\n options || (options = {});\n this.options = options;\n if (!this.options.version) {\n this.options.version = '1.0';\n }\n ref = options.stringify || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[key] = value;\n }\n }\n\n // Defaults\n name(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalName('' + val || '');\n }\n\n text(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.textEscape('' + val || ''));\n }\n\n cdata(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n val = val.replace(']]>', ']]]]>');\n return this.assertLegalChar(val);\n }\n\n comment(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/--/)) {\n throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n raw(val) {\n if (this.options.noValidation) {\n return val;\n }\n return '' + val || '';\n }\n\n attValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.attEscape(val = '' + val || ''));\n }\n\n insTarget(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n insValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/\\?>/)) {\n throw new Error(\"Invalid processing instruction value: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlVersion(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/1\\.[0-9]+/)) {\n throw new Error(\"Invalid version number: \" + val);\n }\n return val;\n }\n\n xmlEncoding(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {\n throw new Error(\"Invalid encoding: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlStandalone(val) {\n if (this.options.noValidation) {\n return val;\n }\n if (val) {\n return \"yes\";\n } else {\n return \"no\";\n }\n }\n\n dtdPubID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdSysID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdElementValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttType(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttDefault(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdEntityValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdNData(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n assertLegalChar(str) {\n var regex, res;\n if (this.options.noValidation) {\n return str;\n }\n if (this.options.version === '1.0') {\n // Valid characters from https://www.w3.org/TR/xml/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_10_InvalidChars = regenerate()\n // .addRange(0x0000, 0x0008)\n // .add(0x000B, 0x000C)\n // .addRange(0x000E, 0x001F)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/g;\n if (this.options.invalidCharReplacement !== void 0) {\n str = str.replace(regex, this.options.invalidCharReplacement);\n } else if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n } else if (this.options.version === '1.1') {\n // Valid characters from https://www.w3.org/TR/xml11/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_11_InvalidChars = regenerate()\n // .add(0x0000)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/g;\n if (this.options.invalidCharReplacement !== void 0) {\n str = str.replace(regex, this.options.invalidCharReplacement);\n } else if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n }\n return str;\n }\n\n assertLegalName(str) {\n var regex;\n if (this.options.noValidation) {\n return str;\n }\n str = this.assertLegalChar(str);\n regex = /^([:A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])([\\x2D\\.0-:A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n if (!str.match(regex)) {\n throw new Error(`Invalid character in name: ${str}`);\n }\n return str;\n }\n\n // Escapes special characters in text\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n textEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;\n return str.replace(ampregex, '&').replace(//g, '>').replace(/\\r/g, ' ');\n }\n\n // Escapes special characters in attribute values\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n attEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;\n return str.replace(ampregex, '&').replace(/ 0) {\n return new Array(indentLevel).join(options.indent);\n }\n }\n return '';\n }\n\n // Returns the newline string\n\n // `node` current node\n // `options` writer options\n // `level` current indentation level\n endline(node, options, level) {\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else {\n return options.newline;\n }\n }\n\n attribute(att, options, level) {\n var r;\n this.openAttribute(att, options, level);\n if (options.pretty && options.width > 0) {\n r = att.name + '=\"' + att.value + '\"';\n } else {\n r = ' ' + att.name + '=\"' + att.value + '\"';\n }\n this.closeAttribute(att, options, level);\n return r;\n }\n\n cdata(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n comment(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n declaration(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n docType(node, options, level) {\n var child, i, len1, r, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n r += ' 0) {\n r += ' [';\n r += this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (i = 0, len1 = ref.length; i < len1; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += ']';\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;\n level || (level = 0);\n prettySuppressed = false;\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n r += '>';\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n r += '>';\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n r += this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n // if ANY are a text node, then suppress pretty now\n if (options.dontPrettyTextNodes) {\n ref2 = node.children;\n for (i = 0, len1 = ref2.length; i < len1; i++) {\n child = ref2[i];\n if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) {\n options.suppressPrettyCount++;\n prettySuppressed = true;\n break;\n }\n }\n }\n // close the opening tag, after dealing with newline\n r += '>' + this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref3 = node.children;\n // inner tags\n for (j = 0, len2 = ref3.length; j < len2; j++) {\n child = ref3[j];\n r += this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += this.indent(node, options, level) + '';\n if (prettySuppressed) {\n options.suppressPrettyCount--;\n }\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n }\n this.closeNode(node, options, level);\n return r;\n }\n\n writeChildNode(node, options, level) {\n switch (node.type) {\n case NodeType.CData:\n return this.cdata(node, options, level);\n case NodeType.Comment:\n return this.comment(node, options, level);\n case NodeType.Element:\n return this.element(node, options, level);\n case NodeType.Raw:\n return this.raw(node, options, level);\n case NodeType.Text:\n return this.text(node, options, level);\n case NodeType.ProcessingInstruction:\n return this.processingInstruction(node, options, level);\n case NodeType.Dummy:\n return '';\n case NodeType.Declaration:\n return this.declaration(node, options, level);\n case NodeType.DocType:\n return this.docType(node, options, level);\n case NodeType.AttributeDeclaration:\n return this.dtdAttList(node, options, level);\n case NodeType.ElementDeclaration:\n return this.dtdElement(node, options, level);\n case NodeType.EntityDeclaration:\n return this.dtdEntity(node, options, level);\n case NodeType.NotationDeclaration:\n return this.dtdNotation(node, options, level);\n default:\n throw new Error(\"Unknown XML node type: \" + node.constructor.name);\n }\n }\n\n processingInstruction(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n raw(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n text(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdAttList(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdElement(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdEntity(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdNotation(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n openNode(node, options, level) {}\n\n closeNode(node, options, level) {}\n\n openAttribute(att, options, level) {}\n\n closeAttribute(att, options, level) {}\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;\n\n ({assign, isFunction} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDocument = require('./XMLDocument');\n\n XMLDocumentCB = require('./XMLDocumentCB');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n XMLStreamWriter = require('./XMLStreamWriter');\n\n NodeType = require('./NodeType');\n\n WriterState = require('./WriterState');\n\n // Creates a new document and returns the root node for\n // chain-building the document tree\n\n // `name` name of the root element\n\n // `xmldec.version` A version number string, e.g. 1.0\n // `xmldec.encoding` Encoding declaration, e.g. UTF-8\n // `xmldec.standalone` standalone document declaration: true or false\n\n // `doctype.pubID` public identifier of the external subset\n // `doctype.sysID` system identifier of the external subset\n\n // `options.headless` whether XML declaration and doctype will be included:\n // true or false\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n module.exports.create = function(name, xmldec, doctype, options) {\n var doc, root;\n if (name == null) {\n throw new Error(\"Root element needs a name.\");\n }\n options = assign({}, xmldec, doctype, options);\n // create the document node\n doc = new XMLDocument(options);\n // add the root node\n root = doc.element(name);\n // prolog\n if (!options.headless) {\n doc.declaration(options);\n if ((options.pubID != null) || (options.sysID != null)) {\n doc.dtd(options);\n }\n }\n return root;\n };\n\n // Creates a new document and returns the document node for\n // chain-building the document tree\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its single\n // argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n module.exports.begin = function(options, onData, onEnd) {\n if (isFunction(options)) {\n [onData, onEnd] = [options, onData];\n options = {};\n }\n if (onData) {\n return new XMLDocumentCB(options, onData, onEnd);\n } else {\n return new XMLDocument(options);\n }\n };\n\n module.exports.stringWriter = function(options) {\n return new XMLStringWriter(options);\n };\n\n module.exports.streamWriter = function(stream, options) {\n return new XMLStreamWriter(stream, options);\n };\n\n module.exports.implementation = new XMLDOMImplementation();\n\n module.exports.nodeType = NodeType;\n\n module.exports.writerState = WriterState;\n\n}).call(this);\n","const builder = require('xmlbuilder')\n\n/**\n * Builds the version.xml file content.\n *\n * @param {object} props\n * The properties to use to build the version.xml content.\n * @param {string} props.version\n * The version number to include in the version.xml file.\n * @param {string} props.zip\n * The URL to the zip file to download.\n * @param {string} props.clearPreviousContent\n * The flag ('true' or 'false') to indicate if previous content should be cleared.\n * @return {string}\n */\nfunction buildVersionXml(props) {\n const { version, zip, clearPreviousContent } = props\n\n // Validate that all arguments are strings\n const stringProps = ['version', 'zip', 'clearPreviousContent']\n for (const prop of stringProps) {\n if (typeof props[prop] !== 'string') {\n throw new Error(`${prop} must be a string`)\n }\n }\n\n // Validate that version is an integer string\n if (!/^\\d+$/.test(version)) {\n throw new Error('version must be an integer')\n }\n // Validate that keepPreviousContent is a boolean string\n if (!/^(true|false)$/.test(clearPreviousContent)) {\n throw new Error(\"clear-previous-content must be 'true' or 'false'\")\n }\n\n return builder\n .create(\n 'plist',\n { encoding: 'UTF-8' },\n {\n pubID: '-//Apple//DTD PLIST 1.0//EN',\n sysID: 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'\n }\n )\n .att({ version: '1.0' })\n .ele('dict')\n .ele('key')\n .text('version')\n .up()\n .ele('integer')\n .text(version)\n .up()\n .ele('key')\n .text('zip')\n .up()\n .ele('string')\n .text(zip)\n .up()\n .ele('key')\n .text('clear-previous-content')\n .up()\n .ele(clearPreviousContent === 'true' ? 'true' : 'false')\n .up()\n .end({ pretty: true, indent: '' })\n}\n\nmodule.exports = {\n buildVersionXml\n}\n","// noinspection ExceptionCaughtLocallyJS\n\nconst fs = require('fs').promises\nconst path = require('path')\nconst core = require('@actions/core')\nconst { buildVersionXml } = require('./lib/build-version-xml')\n\n/**\n * The main function for the action.\n * @returns {Promise} Resolves when the action is complete.\n */\nasync function run() {\n try {\n const filename = core.getInput('filename', { required: false })\n const version = core.getInput('version', { required: true })\n const zip = core.getInput('zip', { required: true })\n const clearPreviousContent = core.getInput('clear-previous-content', {\n required: false\n })\n\n const xml = buildVersionXml({\n version,\n zip,\n clearPreviousContent\n })\n\n const outFilePath = path.resolve(process.cwd(), filename)\n core.debug(`Writing to file: ${outFilePath}`)\n await fs.writeFile(outFilePath, xml)\n core.debug('File written successfully')\n\n core.setOutput('filepath', outFilePath)\n } catch (error) {\n // Fail the workflow run if an error occurs\n core.setFailed(error.message)\n }\n}\n\nmodule.exports = {\n run\n}\n","module.exports = require(\"assert\");","module.exports = require(\"crypto\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"tls\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\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","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","/**\n * The entrypoint for the action.\n */\nconst { run } = require('./main')\n\nrun()\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;;;;;;;;ACzmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;;;;;;;;ACtLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1SA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxCA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;;;;ACDA;AACA;AACA;AACA;AACA;AACA","sources":[".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/platform.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/exec/lib/exec.js",".././node_modules/@actions/exec/lib/toolrunner.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/@actions/io/lib/io-util.js",".././node_modules/@actions/io/lib/io.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/xmlbuilder/lib/DocumentPosition.js",".././node_modules/xmlbuilder/lib/NodeType.js",".././node_modules/xmlbuilder/lib/Utility.js",".././node_modules/xmlbuilder/lib/WriterState.js",".././node_modules/xmlbuilder/lib/XMLAttribute.js",".././node_modules/xmlbuilder/lib/XMLCData.js",".././node_modules/xmlbuilder/lib/XMLCharacterData.js",".././node_modules/xmlbuilder/lib/XMLComment.js",".././node_modules/xmlbuilder/lib/XMLDOMConfiguration.js",".././node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js",".././node_modules/xmlbuilder/lib/XMLDOMImplementation.js",".././node_modules/xmlbuilder/lib/XMLDOMStringList.js",".././node_modules/xmlbuilder/lib/XMLDTDAttList.js",".././node_modules/xmlbuilder/lib/XMLDTDElement.js",".././node_modules/xmlbuilder/lib/XMLDTDEntity.js",".././node_modules/xmlbuilder/lib/XMLDTDNotation.js",".././node_modules/xmlbuilder/lib/XMLDeclaration.js",".././node_modules/xmlbuilder/lib/XMLDocType.js",".././node_modules/xmlbuilder/lib/XMLDocument.js",".././node_modules/xmlbuilder/lib/XMLDocumentCB.js",".././node_modules/xmlbuilder/lib/XMLDummy.js",".././node_modules/xmlbuilder/lib/XMLElement.js",".././node_modules/xmlbuilder/lib/XMLNamedNodeMap.js",".././node_modules/xmlbuilder/lib/XMLNode.js",".././node_modules/xmlbuilder/lib/XMLNodeList.js",".././node_modules/xmlbuilder/lib/XMLProcessingInstruction.js",".././node_modules/xmlbuilder/lib/XMLRaw.js",".././node_modules/xmlbuilder/lib/XMLStreamWriter.js",".././node_modules/xmlbuilder/lib/XMLStringWriter.js",".././node_modules/xmlbuilder/lib/XMLStringifier.js",".././node_modules/xmlbuilder/lib/XMLText.js",".././node_modules/xmlbuilder/lib/XMLWriterBase.js",".././node_modules/xmlbuilder/lib/index.js",".././src/lib/build-version-xml.js",".././src/main.js","../external node-commonjs \"assert\"","../external node-commonjs \"child_process\"","../external node-commonjs \"crypto\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"http\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"string_decoder\"","../external node-commonjs \"timers\"","../external node-commonjs \"tls\"","../external node-commonjs \"util\"","../webpack/bootstrap","../webpack/runtime/compat",".././src/index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\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 (0, utils_1.toCommandValue)(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return (0, 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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __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 });\nexports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\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\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\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 = 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 = (0, utils_1.toCommandValue)(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val));\n }\n (0, command_1.issueCommand)('set-env', { name }, convertedVal);\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 (0, 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 (0, file_command_1.issueFileCommand)('PATH', inputPath);\n }\n else {\n (0, 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.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\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 if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\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 const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value));\n }\n process.stdout.write(os.EOL);\n (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(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 (0, 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 (0, 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 * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\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 (0, command_1.issue)('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n (0, 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 const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value));\n }\n (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(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;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n/**\n * Platform utilities exports\n */\nexports.platform = __importStar(require(\"./platform\"));\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst crypto = __importStar(require(\"crypto\"));\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(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, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${crypto.randomUUID()}`;\n const convertedValue = (0, utils_1.toCommandValue)(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n (0, core_1.debug)(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n (0, core_1.setSecret)(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __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 __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0;\nconst os_1 = __importDefault(require(\"os\"));\nconst exec = __importStar(require(\"@actions/exec\"));\nconst getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () {\n const { stdout: version } = yield exec.getExecOutput('powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"', undefined, {\n silent: true\n });\n const { stdout: name } = yield exec.getExecOutput('powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"', undefined, {\n silent: true\n });\n return {\n name: name.trim(),\n version: version.trim()\n };\n});\nconst getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n const { stdout } = yield exec.getExecOutput('sw_vers', undefined, {\n silent: true\n });\n const version = (_b = (_a = stdout.match(/ProductVersion:\\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '';\n const name = (_d = (_c = stdout.match(/ProductName:\\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : '';\n return {\n name,\n version\n };\n});\nconst getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () {\n const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {\n silent: true\n });\n const [name, version] = stdout.trim().split('\\n');\n return {\n name,\n version\n };\n});\nexports.platform = os_1.default.platform();\nexports.arch = os_1.default.arch();\nexports.isWindows = exports.platform === 'win32';\nexports.isMacOS = exports.platform === 'darwin';\nexports.isLinux = exports.platform === 'linux';\nfunction getDetails() {\n return __awaiter(this, void 0, void 0, function* () {\n return Object.assign(Object.assign({}, (yield (exports.isWindows\n ? getWindowsInfo()\n : exports.isMacOS\n ? getMacOsInfo()\n : getLinuxInfo()))), { platform: exports.platform,\n arch: exports.arch,\n isWindows: exports.isWindows,\n isMacOS: exports.isMacOS,\n isLinux: exports.isLinux });\n });\n}\nexports.getDetails = getDetails;\n//# sourceMappingURL=platform.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 });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.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 });\nexports.toCommandProperties = exports.toCommandValue = void 0;\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/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.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 });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\n_a = fs.promises\n// export const {open} = 'fs'\n, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;\n// export const {open} = 'fs'\nexports.IS_WINDOWS = process.platform === 'win32';\n// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691\nexports.UV_FS_O_EXLOCK = 0x10000000;\nexports.READONLY = fs.constants.O_RDONLY;\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Disconnected: 1,\n Preceding: 2,\n Following: 4,\n Contains: 8,\n ContainedBy: 16,\n ImplementationSpecific: 32\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Element: 1,\n Attribute: 2,\n Text: 3,\n CData: 4,\n EntityReference: 5,\n EntityDeclaration: 6,\n ProcessingInstruction: 7,\n Comment: 8,\n Document: 9,\n DocType: 10,\n DocumentFragment: 11,\n NotationDeclaration: 12,\n // Numeric codes up to 200 are reserved to W3C for possible future use.\n // Following are types internal to this library:\n Declaration: 201,\n Raw: 202,\n AttributeDeclaration: 203,\n ElementDeclaration: 204,\n Dummy: 205\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Copies all enumerable own properties from `sources` to `target`\n var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n assign = function(target, ...sources) {\n var i, key, len, source;\n if (isFunction(Object.assign)) {\n Object.assign.apply(null, arguments);\n } else {\n for (i = 0, len = sources.length; i < len; i++) {\n source = sources[i];\n if (source != null) {\n for (key in source) {\n if (!hasProp.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n\n // Determines if `val` is a Function object\n isFunction = function(val) {\n return !!val && Object.prototype.toString.call(val) === '[object Function]';\n };\n\n // Determines if `val` is an Object\n isObject = function(val) {\n var ref;\n return !!val && ((ref = typeof val) === 'function' || ref === 'object');\n };\n\n // Determines if `val` is an Array\n isArray = function(val) {\n if (isFunction(Array.isArray)) {\n return Array.isArray(val);\n } else {\n return Object.prototype.toString.call(val) === '[object Array]';\n }\n };\n\n // Determines if `val` is an empty Array or an Object with no own properties\n isEmpty = function(val) {\n var key;\n if (isArray(val)) {\n return !val.length;\n } else {\n for (key in val) {\n if (!hasProp.call(val, key)) continue;\n return false;\n }\n return true;\n }\n };\n\n // Determines if `val` is a plain Object\n isPlainObject = function(val) {\n var ctor, proto;\n return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));\n };\n\n // Gets the primitive value of an object\n getValue = function(obj) {\n if (isFunction(obj.valueOf)) {\n return obj.valueOf();\n } else {\n return obj;\n }\n };\n\n module.exports.assign = assign;\n\n module.exports.isFunction = isFunction;\n\n module.exports.isObject = isObject;\n\n module.exports.isArray = isArray;\n\n module.exports.isEmpty = isEmpty;\n\n module.exports.isPlainObject = isPlainObject;\n\n module.exports.getValue = getValue;\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n None: 0,\n OpenTag: 1,\n InsideTag: 2,\n CloseTag: 3\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLNode;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents an attribute\n module.exports = XMLAttribute = (function() {\n class XMLAttribute {\n // Initializes a new instance of `XMLAttribute`\n\n // `parent` the parent node\n // `name` attribute target\n // `value` attribute value\n constructor(parent, name, value) {\n this.parent = parent;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.value = this.stringify.attValue(value);\n this.type = NodeType.Attribute;\n // DOM level 3\n this.isId = false;\n this.schemaTypeInfo = null;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.attribute(this, this.options.writer.filterOptions(options));\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n name = name || this.name;\n if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else {\n return \"attribute: {\" + name + \"}, parent: <\" + this.parent.name + \">\";\n }\n }\n\n isEqualNode(node) {\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.value !== this.value) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLAttribute.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {\n get: function() {\n return this.parent;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLAttribute.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'specified', {\n get: function() {\n return true;\n }\n });\n\n return XMLAttribute;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCData, XMLCharacterData;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a CDATA node\n module.exports = XMLCData = class XMLCData extends XMLCharacterData {\n // Initializes a new instance of `XMLCData`\n\n // `text` CDATA text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing CDATA text. \" + this.debugInfo());\n }\n this.name = \"#cdata-section\";\n this.type = NodeType.CData;\n this.value = this.stringify.cdata(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.cdata(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLCharacterData, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n // Represents a character data node\n module.exports = XMLCharacterData = (function() {\n class XMLCharacterData extends XMLNode {\n // Initializes a new instance of `XMLCharacterData`\n\n constructor(parent) {\n super(parent);\n this.value = '';\n }\n\n \n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // DOM level 1 functions to be implemented later\n substringData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendData(arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n insertData(offset, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n deleteData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n replaceData(offset, count, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.data !== this.data) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLCharacterData.prototype, 'data', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'length', {\n get: function() {\n return this.value.length;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLCharacterData.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n return XMLCharacterData;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLComment;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a comment node\n module.exports = XMLComment = class XMLComment extends XMLCharacterData {\n // Initializes a new instance of `XMLComment`\n\n // `text` comment text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing comment text. \" + this.debugInfo());\n }\n this.name = \"#comment\";\n this.type = NodeType.Comment;\n this.value = this.stringify.comment(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.comment(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;\n\n XMLDOMErrorHandler = require('./XMLDOMErrorHandler');\n\n XMLDOMStringList = require('./XMLDOMStringList');\n\n // Implements the DOMConfiguration interface\n module.exports = XMLDOMConfiguration = (function() {\n class XMLDOMConfiguration {\n constructor() {\n var clonedSelf;\n this.defaultParams = {\n \"canonical-form\": false,\n \"cdata-sections\": false,\n \"comments\": false,\n \"datatype-normalization\": false,\n \"element-content-whitespace\": true,\n \"entities\": true,\n \"error-handler\": new XMLDOMErrorHandler(),\n \"infoset\": true,\n \"validate-if-schema\": false,\n \"namespaces\": true,\n \"namespace-declarations\": true,\n \"normalize-characters\": false,\n \"schema-location\": '',\n \"schema-type\": '',\n \"split-cdata-sections\": true,\n \"validate\": false,\n \"well-formed\": true\n };\n this.params = clonedSelf = Object.create(this.defaultParams);\n }\n\n // Gets the value of a parameter.\n\n // `name` name of the parameter\n getParameter(name) {\n if (this.params.hasOwnProperty(name)) {\n return this.params[name];\n } else {\n return null;\n }\n }\n\n // Checks if setting a parameter to a specific value is supported.\n\n // `name` name of the parameter\n // `value` parameter value\n canSetParameter(name, value) {\n return true;\n }\n\n // Sets the value of a parameter.\n\n // `name` name of the parameter\n // `value` new value or null if the user wishes to unset the parameter\n setParameter(name, value) {\n if (value != null) {\n return this.params[name] = value;\n } else {\n return delete this.params[name];\n }\n }\n\n };\n\n // Returns the list of parameter names\n Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {\n get: function() {\n return new XMLDOMStringList(Object.keys(this.defaultParams));\n }\n });\n\n return XMLDOMConfiguration;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents the error handler for DOM operations\n var XMLDOMErrorHandler;\n\n module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {\n // Initializes a new instance of `XMLDOMErrorHandler`\n\n constructor() {}\n\n // Called on the error handler when an error occurs.\n\n // `error` the error message as a string\n handleError(error) {\n throw new Error(error);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Implements the DOMImplementation interface\n var XMLDOMImplementation;\n\n module.exports = XMLDOMImplementation = class XMLDOMImplementation {\n // Tests if the DOM implementation implements a specific feature.\n\n // `feature` package name of the feature to test. In Level 1, the\n // legal values are \"HTML\" and \"XML\" (case-insensitive).\n // `version` version number of the package name to test. \n // In Level 1, this is the string \"1.0\". If the version is \n // not specified, supporting any version of the feature will \n // cause the method to return true.\n hasFeature(feature, version) {\n return true;\n }\n\n // Creates a new document type declaration.\n\n // `qualifiedName` qualified name of the document type to be created\n // `publicId` public identifier of the external subset\n // `systemId` system identifier of the external subset\n createDocumentType(qualifiedName, publicId, systemId) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new document.\n\n // `namespaceURI` namespace URI of the document element to create\n // `qualifiedName` the qualified name of the document to be created\n // `doctype` the type of document to be created or null\n createDocument(namespaceURI, qualifiedName, doctype) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new HTML document.\n\n // `title` document title\n createHTMLDocument(title) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Returns a specialized object which implements the specialized APIs \n // of the specified feature and version.\n\n // `feature` name of the feature requested.\n // `version` version number of the feature to test\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of string entries\n var XMLDOMStringList;\n\n module.exports = XMLDOMStringList = (function() {\n class XMLDOMStringList {\n // Initializes a new instance of `XMLDOMStringList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `arr` the array of string values\n constructor(arr) {\n this.arr = arr || [];\n }\n\n // Returns the indexth item in the collection.\n\n // `index` index into the collection\n item(index) {\n return this.arr[index] || null;\n }\n\n // Test if a string is part of this DOMStringList.\n\n // `str` the string to look for\n contains(str) {\n return this.arr.indexOf(str) !== -1;\n }\n\n };\n\n // Returns the number of strings in the list.\n Object.defineProperty(XMLDOMStringList.prototype, 'length', {\n get: function() {\n return this.arr.length;\n }\n });\n\n return XMLDOMStringList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute list\n module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {\n // Initializes a new instance of `XMLDTDAttList`\n\n // `parent` the parent `XMLDocType` element\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,\n // #FIXED or #DEFAULT)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n super(parent);\n if (elementName == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (attributeName == null) {\n throw new Error(\"Missing DTD attribute name. \" + this.debugInfo(elementName));\n }\n if (!attributeType) {\n throw new Error(\"Missing DTD attribute type. \" + this.debugInfo(elementName));\n }\n if (!defaultValueType) {\n throw new Error(\"Missing DTD attribute default. \" + this.debugInfo(elementName));\n }\n if (defaultValueType.indexOf('#') !== 0) {\n defaultValueType = '#' + defaultValueType;\n }\n if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Default value only applies to #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n this.elementName = this.stringify.name(elementName);\n this.type = NodeType.AttributeDeclaration;\n this.attributeName = this.stringify.name(attributeName);\n this.attributeType = this.stringify.dtdAttType(attributeType);\n if (defaultValue) {\n this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n }\n this.defaultValueType = defaultValueType;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDElement, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute\n module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {\n // Initializes a new instance of `XMLDTDElement`\n\n // `parent` the parent `XMLDocType` element\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (!value) {\n value = '(#PCDATA)';\n }\n if (Array.isArray(value)) {\n value = '(' + value.join(',') + ')';\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.ElementDeclaration;\n this.value = this.stringify.dtdElementValue(value);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDEntity, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an entity declaration in the DTD\n module.exports = XMLDTDEntity = (function() {\n class XMLDTDEntity extends XMLNode {\n // Initializes a new instance of `XMLDTDEntity`\n\n // `parent` the parent `XMLDocType` element\n // `pe` whether this is a parameter entity or a general entity\n // defaults to `false` (general entity)\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n constructor(parent, pe, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD entity name. \" + this.debugInfo(name));\n }\n if (value == null) {\n throw new Error(\"Missing DTD entity value. \" + this.debugInfo(name));\n }\n this.pe = !!pe;\n this.name = this.stringify.name(name);\n this.type = NodeType.EntityDeclaration;\n if (!isObject(value)) {\n this.value = this.stringify.dtdEntityValue(value);\n this.internal = true;\n } else {\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public and/or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n if (value.pubID && !value.sysID) {\n throw new Error(\"System identifier is required for a public external entity. \" + this.debugInfo(name));\n }\n this.internal = false;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n if (value.nData != null) {\n this.nData = this.stringify.dtdNData(value.nData);\n }\n if (this.pe && this.nData) {\n throw new Error(\"Notation declaration is not allowed in a parameter entity. \" + this.debugInfo(name));\n }\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {\n get: function() {\n return this.nData || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {\n get: function() {\n return null;\n }\n });\n\n return XMLDTDEntity;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDNotation, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a NOTATION entry in the DTD\n module.exports = XMLDTDNotation = (function() {\n class XMLDTDNotation extends XMLNode {\n // Initializes a new instance of `XMLDTDNotation`\n\n // `parent` the parent `XMLDocType` element\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD notation name. \" + this.debugInfo(name));\n }\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.NotationDeclaration;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n return XMLDTDNotation;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDeclaration, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents the XML declaration\n module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {\n // Initializes a new instance of `XMLDeclaration`\n\n // `parent` the document object\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n constructor(parent, version, encoding, standalone) {\n super(parent);\n // arguments may also be passed as an object\n if (isObject(version)) {\n ({version, encoding, standalone} = version);\n }\n if (!version) {\n version = '1.0';\n }\n this.type = NodeType.Declaration;\n this.version = this.stringify.xmlVersion(version);\n if (encoding != null) {\n this.encoding = this.stringify.xmlEncoding(encoding);\n }\n if (standalone != null) {\n this.standalone = this.stringify.xmlStandalone(standalone);\n }\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents doctype declaration\n module.exports = XMLDocType = (function() {\n class XMLDocType extends XMLNode {\n // Initializes a new instance of `XMLDocType`\n\n // `parent` the document object\n\n // `pubID` public identifier of the external subset\n // `sysID` system identifier of the external subset\n constructor(parent, pubID, sysID) {\n var child, i, len, ref;\n super(parent);\n this.type = NodeType.DocType;\n // set DTD name to the name of the root node\n if (parent.children) {\n ref = parent.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.Element) {\n this.name = child.name;\n break;\n }\n }\n }\n this.documentObject = parent;\n // arguments may also be passed as an object\n if (isObject(pubID)) {\n ({pubID, sysID} = pubID);\n }\n if (sysID == null) {\n [sysID, pubID] = [pubID, sysID];\n }\n if (pubID != null) {\n this.pubID = this.stringify.dtdPubID(pubID);\n }\n if (sysID != null) {\n this.sysID = this.stringify.dtdSysID(sysID);\n }\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n element(name, value) {\n var child;\n child = new XMLDTDElement(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var child;\n child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.children.push(child);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var child;\n child = new XMLDTDEntity(this, false, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var child;\n child = new XMLDTDEntity(this, true, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var child;\n child = new XMLDTDNotation(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.docType(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n ele(name, value) {\n return this.element(name, value);\n }\n\n att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n }\n\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n up() {\n return this.root() || this.documentObject;\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.name !== this.name) {\n return false;\n }\n if (node.publicId !== this.publicId) {\n return false;\n }\n if (node.systemId !== this.systemId) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocType.prototype, 'entities', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if ((child.type === NodeType.EntityDeclaration) && !child.pe) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'notations', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.NotationDeclaration) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n // DOM level 2\n Object.defineProperty(XMLDocType.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'internalSubset', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLDocType;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;\n\n ({isPlainObject} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDOMConfiguration = require('./XMLDOMConfiguration');\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n // Represents an XML builder\n module.exports = XMLDocument = (function() {\n class XMLDocument extends XMLNode {\n // Initializes a new instance of `XMLDocument`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n constructor(options) {\n super(null);\n this.name = \"#document\";\n this.type = NodeType.Document;\n this.documentURI = null;\n this.domConfig = new XMLDOMConfiguration();\n options || (options = {});\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.stringify = new XMLStringifier(options);\n }\n\n // Ends the document and passes it to the given XML writer\n\n // `writer` is either an XML writer or a plain object to pass to the\n // constructor of the default XML writer. The default writer is assigned when\n // creating the XML document. Following flags are recognized by the\n // built-in XMLStringWriter:\n // `writer.pretty` pretty prints the result\n // `writer.indent` indentation for pretty print\n // `writer.offset` how many indentations to add to every line for pretty print\n // `writer.newline` newline sequence for pretty print\n end(writer) {\n var writerOptions;\n writerOptions = {};\n if (!writer) {\n writer = this.options.writer;\n } else if (isPlainObject(writer)) {\n writerOptions = writer;\n writer = this.options.writer;\n }\n return writer.document(this, writer.filterOptions(writerOptions));\n }\n\n // Converts the XML document to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.document(this, this.options.writer.filterOptions(options));\n }\n\n // DOM level 1 functions to be implemented later\n createElement(tagName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createDocumentFragment() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTextNode(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createComment(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createCDATASection(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createProcessingInstruction(target, data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttribute(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEntityReference(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2 functions to be implemented later\n importNode(importedNode, deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createElementNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttributeNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementById(elementId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 3 functions to be implemented later\n adoptNode(source) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalizeDocument() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n renameNode(node, namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 4 functions to be implemented later\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEvent(eventInterface) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createRange() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createNodeIterator(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTreeWalker(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocument.prototype, 'implementation', {\n value: new XMLDOMImplementation()\n });\n\n Object.defineProperty(XMLDocument.prototype, 'doctype', {\n get: function() {\n var child, i, len, ref;\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.DocType) {\n return child;\n }\n }\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'documentElement', {\n get: function() {\n return this.rootObject || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {\n get: function() {\n return false;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].encoding;\n } else {\n return null;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].standalone === 'yes';\n } else {\n return false;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].version;\n } else {\n return \"1.0\";\n }\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLDocument.prototype, 'URL', {\n get: function() {\n return this.documentURI;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'origin', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'compatMode', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'characterSet', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'contentType', {\n get: function() {\n return null;\n }\n });\n\n return XMLDocument;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));\n\n NodeType = require('./NodeType');\n\n XMLDocument = require('./XMLDocument');\n\n XMLElement = require('./XMLElement');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n WriterState = require('./WriterState');\n\n // Represents an XML builder\n module.exports = XMLDocumentCB = class XMLDocumentCB {\n // Initializes a new instance of `XMLDocumentCB`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its first\n // argument, and the current indentation level as its second argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n constructor(options, onData, onEnd) {\n var writerOptions;\n this.name = \"?xml\";\n this.type = NodeType.Document;\n options || (options = {});\n writerOptions = {};\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n } else if (isPlainObject(options.writer)) {\n writerOptions = options.writer;\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.writer = options.writer;\n this.writerOptions = this.writer.filterOptions(writerOptions);\n this.stringify = new XMLStringifier(options);\n this.onDataCallback = onData || function() {};\n this.onEndCallback = onEnd || function() {};\n this.currentNode = null;\n this.currentLevel = -1;\n this.openTags = {};\n this.documentStarted = false;\n this.documentCompleted = false;\n this.root = null;\n }\n\n // Creates a child element node from the given XMLNode\n\n // `node` the child node\n createChildNode(node) {\n var att, attName, attributes, child, i, len, ref, ref1;\n switch (node.type) {\n case NodeType.CData:\n this.cdata(node.value);\n break;\n case NodeType.Comment:\n this.comment(node.value);\n break;\n case NodeType.Element:\n attributes = {};\n ref = node.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n attributes[attName] = att.value;\n }\n this.node(node.name, attributes);\n break;\n case NodeType.Dummy:\n this.dummy();\n break;\n case NodeType.Raw:\n this.raw(node.value);\n break;\n case NodeType.Text:\n this.text(node.value);\n break;\n case NodeType.ProcessingInstruction:\n this.instruction(node.target, node.value);\n break;\n default:\n throw new Error(\"This XML node type is not supported in a JS object: \" + node.constructor.name);\n }\n ref1 = node.children;\n // write child nodes recursively\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n return this;\n }\n\n // Creates a dummy node\n\n dummy() {\n // no-op, just return this\n return this;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n if (name == null) {\n throw new Error(\"Missing node name.\");\n }\n if (this.root && this.currentLevel === -1) {\n throw new Error(\"Document can only have one root node. \" + this.debugInfo(name));\n }\n this.openCurrent();\n name = getValue(name);\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n this.currentNode = new XMLElement(this, name, attributes);\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n if (text != null) {\n this.text(text);\n }\n return this;\n }\n\n // Creates a child element node or an element type declaration when called\n // inside the DTD\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var child, i, len, oldValidationFlag, ref, root;\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n this.dtdElement(...arguments);\n } else {\n if (Array.isArray(name) || isObject(name) || isFunction(name)) {\n oldValidationFlag = this.options.noValidation;\n this.options.noValidation = true;\n root = new XMLDocument(this.options).element('TEMP_ROOT');\n root.element(name);\n this.options.noValidation = oldValidationFlag;\n ref = root.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n } else {\n this.node(name, attributes, text);\n }\n }\n return this;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (!this.currentNode || this.currentNode.children) {\n throw new Error(\"att() can only be used immediately after an ele() call in callback mode. \" + this.debugInfo(name));\n }\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var node;\n this.openCurrent();\n node = new XMLText(this, value);\n this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var node;\n this.openCurrent();\n node = new XMLCData(this, value);\n this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var node;\n this.openCurrent();\n node = new XMLComment(this, value);\n this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var node;\n this.openCurrent();\n node = new XMLRaw(this, value);\n this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var i, insTarget, insValue, len, node;\n this.openCurrent();\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (i = 0, len = target.length; i < len; i++) {\n insTarget = target[i];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n node = new XMLProcessingInstruction(this, target, value);\n this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n }\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var node;\n this.openCurrent();\n if (this.documentStarted) {\n throw new Error(\"declaration() must be the first node.\");\n }\n node = new XMLDeclaration(this, version, encoding, standalone);\n this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates the document type declaration\n\n // `root` the name of the root node\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n doctype(root, pubID, sysID) {\n this.openCurrent();\n if (root == null) {\n throw new Error(\"Missing root node name.\");\n }\n if (this.root) {\n throw new Error(\"dtd() must come before the root node.\");\n }\n this.currentNode = new XMLDocType(this, pubID, sysID);\n this.currentNode.rootNodeName = root;\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n return this;\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n dtdElement(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDElement(this, name, value);\n this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var node;\n this.openCurrent();\n node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, false, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, true, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDNotation(this, name, value);\n this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Gets the parent node\n up() {\n if (this.currentLevel < 0) {\n throw new Error(\"The document node has no parent.\");\n }\n if (this.currentNode) {\n if (this.currentNode.children) {\n this.closeNode(this.currentNode);\n } else {\n this.openNode(this.currentNode);\n }\n this.currentNode = null;\n } else {\n this.closeNode(this.openTags[this.currentLevel]);\n }\n delete this.openTags[this.currentLevel];\n this.currentLevel--;\n return this;\n }\n\n // Ends the document\n end() {\n while (this.currentLevel >= 0) {\n this.up();\n }\n return this.onEnd();\n }\n\n // Opens the current parent node\n openCurrent() {\n if (this.currentNode) {\n this.currentNode.children = true;\n return this.openNode(this.currentNode);\n }\n }\n\n // Writes the opening tag of the current node or the entire node if it has\n // no child nodes\n openNode(node) {\n var att, chunk, name, ref;\n if (!node.isOpen) {\n if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {\n this.root = node;\n }\n chunk = '';\n if (node.type === NodeType.Element) {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);\n }\n chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);\n this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType\n } else {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '';\n }\n chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.onData(chunk, this.currentLevel);\n return node.isOpen = true;\n }\n }\n\n // Writes the closing tag of the current node\n closeNode(node) {\n var chunk;\n if (!node.isClosed) {\n chunk = '';\n this.writerOptions.state = WriterState.CloseTag;\n if (node.type === NodeType.Element) {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType\n } else {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.writerOptions.state = WriterState.None;\n this.onData(chunk, this.currentLevel);\n return node.isClosed = true;\n }\n }\n\n // Called when a new chunk of XML is output\n\n // `chunk` a string containing the XML chunk\n // `level` current indentation level\n onData(chunk, level) {\n this.documentStarted = true;\n return this.onDataCallback(chunk, level + 1);\n }\n\n // Called when the XML document is completed\n onEnd() {\n this.documentCompleted = true;\n return this.onEndCallback();\n }\n\n // Returns debug string\n debugInfo(name) {\n if (name == null) {\n return \"\";\n } else {\n return \"node: <\" + name + \">\";\n }\n }\n\n // Node aliases\n ele() {\n return this.element(...arguments);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n dtd(root, pubID, sysID) {\n return this.doctype(root, pubID, sysID);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n // Attribute aliases\n att() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n a() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n // DTD aliases\n // att() and ele() are defined above\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDummy, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a raw node\n module.exports = XMLDummy = class XMLDummy extends XMLNode {\n // Initializes a new instance of `XMLDummy`\n\n // `XMLDummy` is a special node representing a node with \n // a null value. Dummy nodes are created while recursively\n // building the XML tree. Simply skipping null values doesn't\n // work because that would break the recursive chain.\n constructor(parent) {\n super(parent);\n this.type = NodeType.Dummy;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return '';\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, getValue} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents an element of the XML document\n module.exports = XMLElement = (function() {\n class XMLElement extends XMLNode {\n // Initializes a new instance of `XMLElement`\n\n // `parent` the parent node\n // `name` element name\n // `attributes` an object containing name/value pairs of attributes\n constructor(parent, name, attributes) {\n var child, j, len, ref;\n super(parent);\n if (name == null) {\n throw new Error(\"Missing element name. \" + this.debugInfo());\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.Element;\n this.attribs = {};\n this.schemaTypeInfo = null;\n if (attributes != null) {\n this.attribute(attributes);\n }\n // set properties if this is the root node\n if (parent.type === NodeType.Document) {\n this.isRoot = true;\n this.documentObject = parent;\n parent.rootObject = this;\n // set dtd name\n if (parent.children) {\n ref = parent.children;\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n if (child.type === NodeType.DocType) {\n child.name = this.name;\n break;\n }\n }\n }\n }\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n var att, attName, clonedSelf, ref;\n clonedSelf = Object.create(this);\n // remove document element\n if (clonedSelf.isRoot) {\n clonedSelf.documentObject = null;\n }\n // clone attributes\n clonedSelf.attribs = {};\n ref = this.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n clonedSelf.attribs[attName] = att.clone();\n }\n // clone child nodes\n clonedSelf.children = [];\n this.children.forEach(function(child) {\n var clonedChild;\n clonedChild = child.clone();\n clonedChild.parent = clonedSelf;\n return clonedSelf.children.push(clonedChild);\n });\n return clonedSelf;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n var attName, j, len;\n // Also defined in DOM level 1\n // removeAttribute(name) removes an attribute by name.\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo());\n }\n name = getValue(name);\n if (Array.isArray(name)) { // expand if array\n for (j = 0, len = name.length; j < len; j++) {\n attName = name[j];\n delete this.attribs[attName];\n }\n } else {\n delete this.attribs[name];\n }\n return this;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n // `options.allowEmpty` do not self close empty element tags\n toString(options) {\n return this.options.writer.element(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // DOM Level 1\n getAttribute(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].value;\n } else {\n return null;\n }\n }\n\n setAttribute(name, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNode(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name];\n } else {\n return null;\n }\n }\n\n setAttributeNode(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNode(oldAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 2\n getAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNS(namespaceURI, qualifiedName, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNodeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNodeNS(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasAttribute(name) {\n return this.attribs.hasOwnProperty(name);\n }\n\n hasAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 3\n setIdAttribute(name, isId) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].isId;\n } else {\n return isId;\n }\n }\n\n setIdAttributeNS(namespaceURI, localName, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setIdAttributeNode(idAttr, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 4\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref;\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.attribs.length !== this.attribs.length) {\n return false;\n }\n for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {\n if (!this.attribs[i].isEqualNode(node.attribs[i])) {\n return false;\n }\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLElement.prototype, 'tagName', {\n get: function() {\n return this.name;\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLElement.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'id', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'className', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'classList', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'attributes', {\n get: function() {\n if (!this.attributeMap || !this.attributeMap.nodes) {\n this.attributeMap = new XMLNamedNodeMap(this.attribs);\n }\n return this.attributeMap;\n }\n });\n\n return XMLElement;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a map of nodes accessed by a string key\n var XMLNamedNodeMap;\n\n module.exports = XMLNamedNodeMap = (function() {\n class XMLNamedNodeMap {\n // Initializes a new instance of `XMLNamedNodeMap`\n // This is just a wrapper around an ordinary\n // JS object.\n\n // `nodes` the object containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given object. The calling function should check\n // whether the wrapped object is null and supply a new object\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n getNamedItem(name) {\n return this.nodes[name];\n }\n\n setNamedItem(node) {\n var oldNode;\n oldNode = this.nodes[node.nodeName];\n this.nodes[node.nodeName] = node;\n return oldNode || null;\n }\n\n removeNamedItem(name) {\n var oldNode;\n oldNode = this.nodes[name];\n delete this.nodes[name];\n return oldNode || null;\n }\n\n item(index) {\n return this.nodes[Object.keys(this.nodes)[index]] || null;\n }\n\n // DOM level 2 functions to be implemented later\n getNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n setNamedItemNS(node) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n removeNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n \n // DOM level 1\n Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {\n get: function() {\n return Object.keys(this.nodes).length || 0;\n }\n });\n\n return XMLNamedNodeMap;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,\n hasProp = {}.hasOwnProperty,\n splice = [].splice;\n\n ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));\n\n XMLElement = null;\n\n XMLCData = null;\n\n XMLComment = null;\n\n XMLDeclaration = null;\n\n XMLDocType = null;\n\n XMLRaw = null;\n\n XMLText = null;\n\n XMLProcessingInstruction = null;\n\n XMLDummy = null;\n\n NodeType = null;\n\n XMLNodeList = null;\n\n XMLNamedNodeMap = null;\n\n DocumentPosition = null;\n\n // Represents a generic XMl element\n module.exports = XMLNode = (function() {\n class XMLNode {\n // Initializes a new instance of `XMLNode`\n\n // `parent` the parent node\n constructor(parent1) {\n this.parent = parent1;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n this.value = null;\n this.children = [];\n this.baseURI = null;\n // first execution, load dependencies that are otherwise\n // circular (so we can't load them at the top)\n if (!XMLElement) {\n XMLElement = require('./XMLElement');\n XMLCData = require('./XMLCData');\n XMLComment = require('./XMLComment');\n XMLDeclaration = require('./XMLDeclaration');\n XMLDocType = require('./XMLDocType');\n XMLRaw = require('./XMLRaw');\n XMLText = require('./XMLText');\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n XMLDummy = require('./XMLDummy');\n NodeType = require('./NodeType');\n XMLNodeList = require('./XMLNodeList');\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n DocumentPosition = require('./DocumentPosition');\n }\n }\n\n \n // Sets the parent node of this node and its children recursively\n\n // `parent` the parent node\n setParent(parent) {\n var child, j, len, ref1, results;\n this.parent = parent;\n if (parent) {\n this.options = parent.options;\n this.stringify = parent.stringify;\n }\n ref1 = this.children;\n results = [];\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n results.push(child.setParent(this));\n }\n return results;\n }\n\n // Creates a child element node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var childNode, item, j, k, key, lastChild, len, len1, val;\n lastChild = null;\n if (attributes === null && (text == null)) {\n [attributes, text] = [{}, null];\n }\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n if (name != null) {\n name = getValue(name);\n }\n // expand if array\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n item = name[j];\n lastChild = this.element(item);\n }\n // evaluate if function\n } else if (isFunction(name)) {\n lastChild = this.element(name.apply());\n // expand if object\n } else if (isObject(name)) {\n for (key in name) {\n if (!hasProp.call(name, key)) continue;\n val = name[key];\n if (isFunction(val)) {\n // evaluate if function\n val = val.apply();\n }\n // assign attributes\n if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n // skip empty arrays\n } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {\n lastChild = this.dummy();\n // empty objects produce one node\n } else if (isObject(val) && isEmpty(val)) {\n lastChild = this.element(key);\n // skip null and undefined nodes\n } else if (!this.options.keepNullNodes && (val == null)) {\n lastChild = this.dummy();\n \n // expand list by creating child nodes\n } else if (!this.options.separateArrayItems && Array.isArray(val)) {\n for (k = 0, len1 = val.length; k < len1; k++) {\n item = val[k];\n childNode = {};\n childNode[key] = item;\n lastChild = this.element(childNode);\n }\n \n // expand child nodes under parent\n } else if (isObject(val)) {\n // if the key is #text expand child nodes under this node to support mixed content\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.element(val);\n } else {\n lastChild = this.element(key);\n lastChild.element(val);\n }\n } else {\n \n // text node\n lastChild = this.element(key, val);\n }\n }\n // skip null nodes\n } else if (!this.options.keepNullNodes && text === null) {\n lastChild = this.dummy();\n } else {\n // text node\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.text(text);\n // cdata node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n lastChild = this.cdata(text);\n // comment node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n lastChild = this.comment(text);\n // raw text node\n } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n lastChild = this.raw(text);\n // processing instruction\n } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {\n lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);\n } else {\n // element node\n lastChild = this.node(name, attributes, text);\n }\n }\n if (lastChild == null) {\n throw new Error(\"Could not create any elements with: \" + name + \". \" + this.debugInfo());\n }\n return lastChild;\n }\n\n // Creates a child element node before the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertBefore(name, attributes, text) {\n var child, i, newChild, refChild, removed;\n // DOM level 1\n // insertBefore(newChild, refChild) inserts the child node newChild before refChild\n if (name != null ? name.type : void 0) {\n newChild = name;\n refChild = attributes;\n newChild.setParent(this);\n if (refChild) {\n // temporarily remove children starting *with* refChild\n i = children.indexOf(refChild);\n removed = children.splice(i);\n \n // add the new child\n children.push(newChild);\n \n // add back removed children after new child\n Array.prototype.push.apply(children, removed);\n } else {\n children.push(newChild);\n }\n return newChild;\n } else {\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n }\n\n // Creates a child element node after the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertAfter(name, attributes, text) {\n var child, i, removed;\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n\n // Deletes a child element node\n\n remove() {\n var i, ref1;\n if (this.isRoot) {\n throw new Error(\"Cannot remove the root element. \" + this.debugInfo());\n }\n i = this.parent.children.indexOf(this);\n splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;\n return this.parent;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n var child;\n if (name != null) {\n name = getValue(name);\n }\n attributes || (attributes = {});\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n child = new XMLElement(this, name, attributes);\n if (text != null) {\n child.text(text);\n }\n this.children.push(child);\n return child;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var child;\n if (isObject(value)) {\n this.element(value);\n }\n child = new XMLText(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var child;\n child = new XMLCData(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var child;\n child = new XMLComment(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node before the current node\n\n // `value` comment text\n commentBefore(value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a comment node after the current node\n\n // `value` comment text\n commentAfter(value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var child;\n child = new XMLRaw(this, value);\n this.children.push(child);\n return this;\n }\n\n // Adds a dummy node\n dummy() {\n var child;\n child = new XMLDummy(this);\n // Normally when a new node is created it is added to the child node collection.\n // However, dummy nodes are never added to the XML tree. They are created while\n // converting JS objects to XML nodes in order not to break the recursive function\n // chain. They can be thought of as invisible nodes. They can be traversed through\n // by using prev(), next(), up(), etc. functions but they do not exists in the tree.\n\n // @children.push child\n return child;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var insTarget, insValue, instruction, j, len;\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (j = 0, len = target.length; j < len; j++) {\n insTarget = target[j];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n instruction = new XMLProcessingInstruction(this, target, value);\n this.children.push(instruction);\n }\n return this;\n }\n\n // Creates a processing instruction node before the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionBefore(target, value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a processing instruction node after the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionAfter(target, value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var doc, xmldec;\n doc = this.document();\n xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n // Replace XML declaration if exists, otherwise insert at top\n if (doc.children.length === 0) {\n doc.children.unshift(xmldec);\n } else if (doc.children[0].type === NodeType.Declaration) {\n doc.children[0] = xmldec;\n } else {\n doc.children.unshift(xmldec);\n }\n return doc.root() || doc;\n }\n\n // Creates the document type declaration\n\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n dtd(pubID, sysID) {\n var child, doc, doctype, i, j, k, len, len1, ref1, ref2;\n doc = this.document();\n doctype = new XMLDocType(doc, pubID, sysID);\n ref1 = doc.children;\n // Replace DTD if exists\n for (i = j = 0, len = ref1.length; j < len; i = ++j) {\n child = ref1[i];\n if (child.type === NodeType.DocType) {\n doc.children[i] = doctype;\n return doctype;\n }\n }\n ref2 = doc.children;\n // insert before root node if the root node exists\n for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {\n child = ref2[i];\n if (child.isRoot) {\n doc.children.splice(i, 0, doctype);\n return doctype;\n }\n }\n // otherwise append to end\n doc.children.push(doctype);\n return doctype;\n }\n\n // Gets the parent node\n up() {\n if (this.isRoot) {\n throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n }\n return this.parent;\n }\n\n // Gets the root node\n root() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node.rootObject;\n } else if (node.isRoot) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Gets the node representing the XML document\n document() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Ends the document and converts string\n end(options) {\n return this.document().end(options);\n }\n\n // Gets the previous node\n prev() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i < 1) {\n throw new Error(\"Already at the first node. \" + this.debugInfo());\n }\n return this.parent.children[i - 1];\n }\n\n // Gets the next node\n next() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i === -1 || i === this.parent.children.length - 1) {\n throw new Error(\"Already at the last node. \" + this.debugInfo());\n }\n return this.parent.children[i + 1];\n }\n\n // Imports cloned root from another XML document\n\n // `doc` the XML document to insert nodes from\n importDocument(doc) {\n var child, clonedRoot, j, len, ref1;\n clonedRoot = doc.root().clone();\n clonedRoot.parent = this;\n clonedRoot.isRoot = false;\n this.children.push(clonedRoot);\n // set properties if imported element becomes the root node\n if (this.type === NodeType.Document) {\n clonedRoot.isRoot = true;\n clonedRoot.documentObject = this;\n this.rootObject = clonedRoot;\n // set dtd name\n if (this.children) {\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.type === NodeType.DocType) {\n child.name = clonedRoot.name;\n break;\n }\n }\n }\n }\n return this;\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n var ref1, ref2;\n name = name || this.name;\n if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {\n return \"\";\n } else if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {\n return \"node: <\" + name + \">\";\n } else {\n return \"node: <\" + name + \">, parent: <\" + this.parent.name + \">\";\n }\n }\n\n // Aliases\n ele(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n doc() {\n return this.document();\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n u() {\n return this.up();\n }\n\n // can be deprecated in a future release\n importXMLBuilder(doc) {\n return this.importDocument(doc);\n }\n\n // Adds or modifies an attribute.\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n // DOM level 1 functions to be implemented later\n replaceChild(newChild, oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeChild(oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendChild(newChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasChildNodes() {\n return this.children.length !== 0;\n }\n\n cloneNode(deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalize() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2\n isSupported(feature, version) {\n return true;\n }\n\n hasAttributes() {\n return this.attribs.length !== 0;\n }\n\n // DOM level 3 functions to be implemented later\n compareDocumentPosition(other) {\n var ref, res;\n ref = this;\n if (ref === other) {\n return 0;\n } else if (this.document() !== other.document()) {\n res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;\n if (Math.random() < 0.5) {\n res |= DocumentPosition.Preceding;\n } else {\n res |= DocumentPosition.Following;\n }\n return res;\n } else if (ref.isAncestor(other)) {\n return DocumentPosition.Contains | DocumentPosition.Preceding;\n } else if (ref.isDescendant(other)) {\n return DocumentPosition.Contains | DocumentPosition.Following;\n } else if (ref.isPreceding(other)) {\n return DocumentPosition.Preceding;\n } else {\n return DocumentPosition.Following;\n }\n }\n\n isSameNode(other) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupPrefix(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isDefaultNamespace(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupNamespaceURI(prefix) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref1;\n if (node.nodeType !== this.nodeType) {\n return false;\n }\n if (node.children.length !== this.children.length) {\n return false;\n }\n for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {\n if (!this.children[i].isEqualNode(node.children[i])) {\n return false;\n }\n }\n return true;\n }\n\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setUserData(key, data, handler) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getUserData(key) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // Returns true if other is an inclusive descendant of node,\n // and false otherwise.\n contains(other) {\n if (!other) {\n return false;\n }\n return other === this || this.isDescendant(other);\n }\n\n // An object A is called a descendant of an object B, if either A is \n // a child of B or A is a child of an object C that is a descendant of B.\n isDescendant(node) {\n var child, isDescendantChild, j, len, ref1;\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (node === child) {\n return true;\n }\n isDescendantChild = child.isDescendant(node);\n if (isDescendantChild) {\n return true;\n }\n }\n return false;\n }\n\n // An object A is called an ancestor of an object B if and only if\n // B is a descendant of A.\n isAncestor(node) {\n return node.isDescendant(this);\n }\n\n // An object A is preceding an object B if A and B are in the \n // same tree and A comes before B in tree order.\n isPreceding(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos < thisPos;\n }\n }\n\n // An object A is folllowing an object B if A and B are in the \n // same tree and A comes after B in tree order.\n isFollowing(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos > thisPos;\n }\n }\n\n // Returns the preorder position of the given node in the tree, or -1\n // if the node is not in the tree.\n treePosition(node) {\n var found, pos;\n pos = 0;\n found = false;\n this.foreachTreeNode(this.document(), function(childNode) {\n pos++;\n if (!found && childNode === node) {\n return found = true;\n }\n });\n if (found) {\n return pos;\n } else {\n return -1;\n }\n }\n\n \n // Depth-first preorder traversal through the XML tree\n foreachTreeNode(node, func) {\n var child, j, len, ref1, res;\n node || (node = this.document());\n ref1 = node.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (res = func(child)) {\n return res;\n } else {\n res = this.foreachTreeNode(child, func);\n if (res) {\n return res;\n }\n }\n }\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNode.prototype, 'nodeName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeValue', {\n get: function() {\n return this.value;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'parentNode', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'childNodes', {\n get: function() {\n if (!this.childNodeList || !this.childNodeList.nodes) {\n this.childNodeList = new XMLNodeList(this.children);\n }\n return this.childNodeList;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'firstChild', {\n get: function() {\n return this.children[0] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'lastChild', {\n get: function() {\n return this.children[this.children.length - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'previousSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nextSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i + 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'ownerDocument', {\n get: function() {\n return this.document() || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLNode.prototype, 'textContent', {\n get: function() {\n var child, j, len, ref1, str;\n if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {\n str = '';\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.textContent) {\n str += child.textContent;\n }\n }\n return str;\n } else {\n return null;\n }\n },\n set: function(value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLNode;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of nodes\n var XMLNodeList;\n\n module.exports = XMLNodeList = (function() {\n class XMLNodeList {\n // Initializes a new instance of `XMLNodeList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `nodes` the array containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given array. The calling function should check\n // whether the wrapped array is null and supply a new array\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n item(index) {\n return this.nodes[index] || null;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNodeList.prototype, 'length', {\n get: function() {\n return this.nodes.length || 0;\n }\n });\n\n return XMLNodeList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLProcessingInstruction;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a processing instruction\n module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {\n // Initializes a new instance of `XMLProcessingInstruction`\n\n // `parent` the parent node\n // `target` instruction target\n // `value` instruction value\n constructor(parent, target, value) {\n super(parent);\n if (target == null) {\n throw new Error(\"Missing instruction target. \" + this.debugInfo());\n }\n this.type = NodeType.ProcessingInstruction;\n this.target = this.stringify.insTarget(target);\n this.name = this.target;\n if (value) {\n this.value = this.stringify.insValue(value);\n }\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.target !== this.target) {\n return false;\n }\n return true;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLNode, XMLRaw;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents a raw node\n module.exports = XMLRaw = class XMLRaw extends XMLNode {\n // Initializes a new instance of `XMLRaw`\n\n // `text` raw text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing raw text. \" + this.debugInfo());\n }\n this.type = NodeType.Raw;\n this.value = this.stringify.raw(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.raw(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLWriterBase = require('./XMLWriterBase');\n\n WriterState = require('./WriterState');\n\n // Prints XML nodes to a stream\n module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStreamWriter`\n\n // `stream` output stream\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(stream, options) {\n super(options);\n this.stream = stream;\n }\n\n endline(node, options, level) {\n if (node.isLastRootNode && options.state === WriterState.CloseTag) {\n return '';\n } else {\n return super.endline(node, options, level);\n }\n }\n\n document(doc, options) {\n var child, i, j, k, len1, len2, ref, ref1, results;\n ref = doc.children;\n // set a flag so that we don't insert a newline after the last root level node \n for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {\n child = ref[i];\n child.isLastRootNode = i === doc.children.length - 1;\n }\n options = this.filterOptions(options);\n ref1 = doc.children;\n results = [];\n for (k = 0, len2 = ref1.length; k < len2; k++) {\n child = ref1[k];\n results.push(this.writeChildNode(child, options, 0));\n }\n return results;\n }\n\n cdata(node, options, level) {\n return this.stream.write(super.cdata(node, options, level));\n }\n\n comment(node, options, level) {\n return this.stream.write(super.comment(node, options, level));\n }\n\n declaration(node, options, level) {\n return this.stream.write(super.declaration(node, options, level));\n }\n\n docType(node, options, level) {\n var child, j, len1, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level));\n this.stream.write(' 0) {\n this.stream.write(' [');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (j = 0, len1 = ref.length; j < len1; j++) {\n child = ref[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(']');\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '>');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;\n level || (level = 0);\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n this.stream.write(r);\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n this.stream.write('>');\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '/>');\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n this.stream.write('>');\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n this.stream.write('>' + this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref2 = node.children;\n // inner tags\n for (j = 0, len1 = ref2.length; j < len1; j++) {\n child = ref2[j];\n this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(this.indent(node, options, level) + '');\n }\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n processingInstruction(node, options, level) {\n return this.stream.write(super.processingInstruction(node, options, level));\n }\n\n raw(node, options, level) {\n return this.stream.write(super.raw(node, options, level));\n }\n\n text(node, options, level) {\n return this.stream.write(super.text(node, options, level));\n }\n\n dtdAttList(node, options, level) {\n return this.stream.write(super.dtdAttList(node, options, level));\n }\n\n dtdElement(node, options, level) {\n return this.stream.write(super.dtdElement(node, options, level));\n }\n\n dtdEntity(node, options, level) {\n return this.stream.write(super.dtdEntity(node, options, level));\n }\n\n dtdNotation(node, options, level) {\n return this.stream.write(super.dtdNotation(node, options, level));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLStringWriter, XMLWriterBase;\n\n XMLWriterBase = require('./XMLWriterBase');\n\n // Prints XML nodes as plain text\n module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStringWriter`\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(options) {\n super(options);\n }\n\n document(doc, options) {\n var child, i, len, r, ref;\n options = this.filterOptions(options);\n r = '';\n ref = doc.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, 0);\n }\n // remove trailing newline\n if (options.pretty && r.slice(-options.newline.length) === options.newline) {\n r = r.slice(0, -options.newline.length);\n }\n return r;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Converts values to strings\n var XMLStringifier,\n hasProp = {}.hasOwnProperty;\n\n module.exports = XMLStringifier = (function() {\n class XMLStringifier {\n // Initializes a new instance of `XMLStringifier`\n\n // `options.version` The version number string of the XML spec to validate against, e.g. 1.0\n // `options.noDoubleEncoding` whether existing html entities are encoded: true or false\n // `options.stringify` a set of functions to use for converting values to strings\n // `options.noValidation` whether values will be validated and escaped or returned as is\n // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation\n constructor(options) {\n var key, ref, value;\n // Checks whether the given string contains legal characters\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalChar = this.assertLegalChar.bind(this);\n // Checks whether the given string contains legal characters for a name\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalName = this.assertLegalName.bind(this);\n options || (options = {});\n this.options = options;\n if (!this.options.version) {\n this.options.version = '1.0';\n }\n ref = options.stringify || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[key] = value;\n }\n }\n\n // Defaults\n name(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalName('' + val || '');\n }\n\n text(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.textEscape('' + val || ''));\n }\n\n cdata(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n val = val.replace(']]>', ']]]]>');\n return this.assertLegalChar(val);\n }\n\n comment(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/--/)) {\n throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n raw(val) {\n if (this.options.noValidation) {\n return val;\n }\n return '' + val || '';\n }\n\n attValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.attEscape(val = '' + val || ''));\n }\n\n insTarget(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n insValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/\\?>/)) {\n throw new Error(\"Invalid processing instruction value: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlVersion(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/1\\.[0-9]+/)) {\n throw new Error(\"Invalid version number: \" + val);\n }\n return val;\n }\n\n xmlEncoding(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {\n throw new Error(\"Invalid encoding: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlStandalone(val) {\n if (this.options.noValidation) {\n return val;\n }\n if (val) {\n return \"yes\";\n } else {\n return \"no\";\n }\n }\n\n dtdPubID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdSysID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdElementValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttType(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttDefault(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdEntityValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdNData(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n assertLegalChar(str) {\n var regex, res;\n if (this.options.noValidation) {\n return str;\n }\n if (this.options.version === '1.0') {\n // Valid characters from https://www.w3.org/TR/xml/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_10_InvalidChars = regenerate()\n // .addRange(0x0000, 0x0008)\n // .add(0x000B, 0x000C)\n // .addRange(0x000E, 0x001F)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/g;\n if (this.options.invalidCharReplacement !== void 0) {\n str = str.replace(regex, this.options.invalidCharReplacement);\n } else if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n } else if (this.options.version === '1.1') {\n // Valid characters from https://www.w3.org/TR/xml11/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_11_InvalidChars = regenerate()\n // .add(0x0000)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/g;\n if (this.options.invalidCharReplacement !== void 0) {\n str = str.replace(regex, this.options.invalidCharReplacement);\n } else if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n }\n return str;\n }\n\n assertLegalName(str) {\n var regex;\n if (this.options.noValidation) {\n return str;\n }\n str = this.assertLegalChar(str);\n regex = /^([:A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])([\\x2D\\.0-:A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n if (!str.match(regex)) {\n throw new Error(`Invalid character in name: ${str}`);\n }\n return str;\n }\n\n // Escapes special characters in text\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n textEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;\n return str.replace(ampregex, '&').replace(//g, '>').replace(/\\r/g, ' ');\n }\n\n // Escapes special characters in attribute values\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n attEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;\n return str.replace(ampregex, '&').replace(/ 0) {\n return new Array(indentLevel).join(options.indent);\n }\n }\n return '';\n }\n\n // Returns the newline string\n\n // `node` current node\n // `options` writer options\n // `level` current indentation level\n endline(node, options, level) {\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else {\n return options.newline;\n }\n }\n\n attribute(att, options, level) {\n var r;\n this.openAttribute(att, options, level);\n if (options.pretty && options.width > 0) {\n r = att.name + '=\"' + att.value + '\"';\n } else {\n r = ' ' + att.name + '=\"' + att.value + '\"';\n }\n this.closeAttribute(att, options, level);\n return r;\n }\n\n cdata(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n comment(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n declaration(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n docType(node, options, level) {\n var child, i, len1, r, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n r += ' 0) {\n r += ' [';\n r += this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (i = 0, len1 = ref.length; i < len1; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += ']';\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;\n level || (level = 0);\n prettySuppressed = false;\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n r += '>';\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n r += '>';\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n r += this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n // if ANY are a text node, then suppress pretty now\n if (options.dontPrettyTextNodes) {\n ref2 = node.children;\n for (i = 0, len1 = ref2.length; i < len1; i++) {\n child = ref2[i];\n if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) {\n options.suppressPrettyCount++;\n prettySuppressed = true;\n break;\n }\n }\n }\n // close the opening tag, after dealing with newline\n r += '>' + this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref3 = node.children;\n // inner tags\n for (j = 0, len2 = ref3.length; j < len2; j++) {\n child = ref3[j];\n r += this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += this.indent(node, options, level) + '';\n if (prettySuppressed) {\n options.suppressPrettyCount--;\n }\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n }\n this.closeNode(node, options, level);\n return r;\n }\n\n writeChildNode(node, options, level) {\n switch (node.type) {\n case NodeType.CData:\n return this.cdata(node, options, level);\n case NodeType.Comment:\n return this.comment(node, options, level);\n case NodeType.Element:\n return this.element(node, options, level);\n case NodeType.Raw:\n return this.raw(node, options, level);\n case NodeType.Text:\n return this.text(node, options, level);\n case NodeType.ProcessingInstruction:\n return this.processingInstruction(node, options, level);\n case NodeType.Dummy:\n return '';\n case NodeType.Declaration:\n return this.declaration(node, options, level);\n case NodeType.DocType:\n return this.docType(node, options, level);\n case NodeType.AttributeDeclaration:\n return this.dtdAttList(node, options, level);\n case NodeType.ElementDeclaration:\n return this.dtdElement(node, options, level);\n case NodeType.EntityDeclaration:\n return this.dtdEntity(node, options, level);\n case NodeType.NotationDeclaration:\n return this.dtdNotation(node, options, level);\n default:\n throw new Error(\"Unknown XML node type: \" + node.constructor.name);\n }\n }\n\n processingInstruction(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n raw(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n text(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdAttList(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdElement(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdEntity(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdNotation(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n openNode(node, options, level) {}\n\n closeNode(node, options, level) {}\n\n openAttribute(att, options, level) {}\n\n closeAttribute(att, options, level) {}\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;\n\n ({assign, isFunction} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDocument = require('./XMLDocument');\n\n XMLDocumentCB = require('./XMLDocumentCB');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n XMLStreamWriter = require('./XMLStreamWriter');\n\n NodeType = require('./NodeType');\n\n WriterState = require('./WriterState');\n\n // Creates a new document and returns the root node for\n // chain-building the document tree\n\n // `name` name of the root element\n\n // `xmldec.version` A version number string, e.g. 1.0\n // `xmldec.encoding` Encoding declaration, e.g. UTF-8\n // `xmldec.standalone` standalone document declaration: true or false\n\n // `doctype.pubID` public identifier of the external subset\n // `doctype.sysID` system identifier of the external subset\n\n // `options.headless` whether XML declaration and doctype will be included:\n // true or false\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n module.exports.create = function(name, xmldec, doctype, options) {\n var doc, root;\n if (name == null) {\n throw new Error(\"Root element needs a name.\");\n }\n options = assign({}, xmldec, doctype, options);\n // create the document node\n doc = new XMLDocument(options);\n // add the root node\n root = doc.element(name);\n // prolog\n if (!options.headless) {\n doc.declaration(options);\n if ((options.pubID != null) || (options.sysID != null)) {\n doc.dtd(options);\n }\n }\n return root;\n };\n\n // Creates a new document and returns the document node for\n // chain-building the document tree\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its single\n // argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n module.exports.begin = function(options, onData, onEnd) {\n if (isFunction(options)) {\n [onData, onEnd] = [options, onData];\n options = {};\n }\n if (onData) {\n return new XMLDocumentCB(options, onData, onEnd);\n } else {\n return new XMLDocument(options);\n }\n };\n\n module.exports.stringWriter = function(options) {\n return new XMLStringWriter(options);\n };\n\n module.exports.streamWriter = function(stream, options) {\n return new XMLStreamWriter(stream, options);\n };\n\n module.exports.implementation = new XMLDOMImplementation();\n\n module.exports.nodeType = NodeType;\n\n module.exports.writerState = WriterState;\n\n}).call(this);\n","const builder = require('xmlbuilder')\n\n/**\n * Builds the version.xml file content.\n *\n * @param {object} props\n * The properties to use to build the version.xml content.\n * @param {string} props.version\n * The version number to include in the version.xml file.\n * @param {string} props.zip\n * The URL to the zip file to download.\n * @param {string} props.clearPreviousContent\n * The flag ('true' or 'false') to indicate if previous content should be cleared.\n * @return {string}\n */\nfunction buildVersionXml(props) {\n const { version, zip, clearPreviousContent } = props\n\n // Validate that all arguments are strings\n const stringProps = ['version', 'zip', 'clearPreviousContent']\n for (const prop of stringProps) {\n if (typeof props[prop] !== 'string') {\n throw new Error(`${prop} must be a string`)\n }\n }\n\n // Validate that version is an integer string\n if (!/^\\d+$/.test(version)) {\n throw new Error('version must be an integer')\n }\n // Validate that keepPreviousContent is a boolean string\n if (!/^(true|false)$/.test(clearPreviousContent)) {\n throw new Error(\"clear-previous-content must be 'true' or 'false'\")\n }\n\n return builder\n .create(\n 'plist',\n { encoding: 'UTF-8' },\n {\n pubID: '-//Apple//DTD PLIST 1.0//EN',\n sysID: 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'\n }\n )\n .att({ version: '1.0' })\n .ele('dict')\n .ele('key')\n .text('version')\n .up()\n .ele('integer')\n .text(version)\n .up()\n .ele('key')\n .text('zip')\n .up()\n .ele('string')\n .text(zip)\n .up()\n .ele('key')\n .text('clear-previous-content')\n .up()\n .ele(clearPreviousContent === 'true' ? 'true' : 'false')\n .up()\n .end({ pretty: true, indent: '' })\n}\n\nmodule.exports = {\n buildVersionXml\n}\n","// noinspection ExceptionCaughtLocallyJS\n\nconst fs = require('fs').promises\nconst path = require('path')\nconst core = require('@actions/core')\nconst { buildVersionXml } = require('./lib/build-version-xml')\n\n/**\n * The main function for the action.\n * @returns {Promise} Resolves when the action is complete.\n */\nasync function run() {\n try {\n const filename = core.getInput('filename', { required: false })\n const version = core.getInput('version', { required: true })\n const zip = core.getInput('zip', { required: true })\n const clearPreviousContent = core.getInput('clear-previous-content', {\n required: false\n })\n\n const xml = buildVersionXml({\n version,\n zip,\n clearPreviousContent\n })\n\n const outFilePath = path.resolve(process.cwd(), filename)\n core.debug(`Writing to file: ${outFilePath}`)\n await fs.writeFile(outFilePath, xml)\n core.debug('File written successfully')\n\n core.setOutput('filepath', outFilePath)\n } catch (error) {\n // Fail the workflow run if an error occurs\n core.setFailed(error.message)\n }\n}\n\nmodule.exports = {\n run\n}\n","module.exports = require(\"assert\");","module.exports = require(\"child_process\");","module.exports = require(\"crypto\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"string_decoder\");","module.exports = require(\"timers\");","module.exports = require(\"tls\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\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","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","/**\n * The entrypoint for the action.\n */\nconst { run } = require('./main')\n\nrun()\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/licenses.txt b/dist/licenses.txt index 3d2d172..842cc4e 100644 --- a/dist/licenses.txt +++ b/dist/licenses.txt @@ -10,6 +10,18 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@actions/exec +MIT +The MIT License (MIT) + +Copyright 2019 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + @actions/http-client MIT Actions Http Client for Node.js @@ -35,6 +47,18 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@actions/io +MIT +The MIT License (MIT) + +Copyright 2019 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + tunnel MIT The MIT License (MIT) @@ -60,19 +84,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -uuid -MIT -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - xmlbuilder MIT The MIT License (MIT) diff --git a/dist/sourcemap-register.js b/dist/sourcemap-register.js index 466141d..cb1fb13 100644 --- a/dist/sourcemap-register.js +++ b/dist/sourcemap-register.js @@ -1 +1 @@ -(()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},274:(e,r,n)=>{var t=n(339);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(190);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},680:(e,r,n)=>{var t=n(339);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},758:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(339);var i=n(345);var a=n(274).I;var u=n(449);var s=n(758).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){d.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(d,o.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(449);var o=n(339);var i=n(274).I;var a=n(680).H;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.h=SourceMapGenerator},351:(e,r,n)=>{var t;var o=n(591).h;var i=n(339);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},997:(e,r,n)=>{n(591).h;r.SourceMapConsumer=n(952).SourceMapConsumer;n(351)},284:(e,r,n)=>{e=n.nmd(e);var t=n(997).SourceMapConsumer;var o=n(17);var i;try{i=n(147);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function globalProcessVersion(){if(typeof process==="object"&&process!==null){return process.version}else{return""}}function globalProcessStderr(){if(typeof process==="object"&&process!==null){return process.stderr}}function globalProcessExit(e){if(typeof process==="object"&&process!==null&&typeof process.exit==="function"){return process.exit(e)}}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(globalProcessVersion())?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);var n=globalProcessStderr();if(n&&n._handle&&n._handle.setBlocking){n._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);globalProcessExit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=h.slice(0);var _=d.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){h.length=0}h.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){d.length=0}d.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){h.length=0;d.length=0;h=S.slice(0);d=_.slice(0);v=handlerExec(d);m=handlerExec(h)}},147:e=>{"use strict";e.exports=require("fs")},17:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};(()=>{__webpack_require__(284).install()})();module.exports=n})(); \ No newline at end of file +(()=>{var e={296:e=>{var r=Object.prototype.toString;var n=typeof Buffer!=="undefined"&&typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},599:(e,r,n)=>{e=n.nmd(e);var t=n(927).SourceMapConsumer;var o=n(928);var i;try{i=n(896);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(296);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var d=[];var h=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function globalProcessVersion(){if(typeof process==="object"&&process!==null){return process.version}else{return""}}function globalProcessStderr(){if(typeof process==="object"&&process!==null){return process.stderr}}function globalProcessExit(e){if(typeof process==="object"&&process!==null&&typeof process.exit==="function"){return process.exit(e)}}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(globalProcessVersion())?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);var n=globalProcessStderr();if(n&&n._handle&&n._handle.setBlocking){n._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);globalProcessExit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=d.slice(0);var _=h.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){d.length=0}d.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){h.length=0}h.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){d.length=0;h.length=0;d=S.slice(0);h=_.slice(0);v=handlerExec(h);m=handlerExec(d)}},517:(e,r,n)=>{var t=n(297);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(158);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},24:(e,r,n)=>{var t=n(297);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.P=MappingList},299:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(297);var i=n(197);var a=n(517).C;var u=n(818);var s=n(299).g;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){h.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(h,o.compareByOriginalPositions);this.__originalMappings=h};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(818);var o=n(297);var i=n(517).C;var a=n(24).P;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var d=0,h=g.length;d0){if(!o.compareByGeneratedPositionsInflated(c,g[d-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.x=SourceMapGenerator},565:(e,r,n)=>{var t;var o=n(163).x;var i=n(297);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},927:(e,r,n)=>{n(163).x;r.SourceMapConsumer=n(684).SourceMapConsumer;n(565)},896:e=>{"use strict";e.exports=require("fs")},928:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};__webpack_require__(599).install();module.exports=n})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7518ecf..372ee17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "javascript-action", + "name": "kiosk-pro-version-file-action", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "javascript-action", + "name": "kiosk-pro-version-file-action", "version": "0.0.0", "license": "MIT", "dependencies": {