/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["IndexLibrary"] = factory();
	else
		root["IndexLibrary"] = factory();
})(self, () => {
return /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./node_modules/azure-devops-extension-api/Common/Client.js":
/*!******************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Common/Client.js ***!
  \******************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! azure-devops-extension-sdk */ \"./node_modules/azure-devops-extension-sdk/SDK.min.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, azure_devops_extension_sdk_1) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    function getClient(clientClass, clientOptions) {\r\n        var options = clientOptions || {};\r\n        if (!options.rootPath) {\r\n            options.rootPath = azure_devops_extension_sdk_1.getService(\"ms.vss-features.location-service\" /* LocationService */).then(function (locationService) {\r\n                if (clientClass.RESOURCE_AREA_ID) {\r\n                    return locationService.getResourceAreaLocation(clientClass.RESOURCE_AREA_ID);\r\n                }\r\n                else {\r\n                    return locationService.getServiceLocation();\r\n                }\r\n            });\r\n        }\r\n        if (!options.authTokenProvider) {\r\n            options.authTokenProvider = {\r\n                getAuthorizationHeader: function () {\r\n                    return azure_devops_extension_sdk_1.getAccessToken().then(function (token) { return token ? (\"Bearer \" + token) : \"\"; });\r\n                }\r\n            };\r\n        }\r\n        return new clientClass(options);\r\n    }\r\n    exports.getClient = getClient;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Common/Client.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Common/CommonServices.js":
/*!**************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Common/CommonServices.js ***!
  \**************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * Contribution ids of core DevOps services which can be obtained from DevOps.getService\r\n     */\r\n    var CommonServiceIds;\r\n    (function (CommonServiceIds) {\r\n        /**\r\n         * Service for interacting with the extension data service\r\n         */\r\n        CommonServiceIds[\"ExtensionDataService\"] = \"ms.vss-features.extension-data-service\";\r\n        /**\r\n         * Service for showing global message banners at the top of the page\r\n         */\r\n        CommonServiceIds[\"GlobalMessagesService\"] = \"ms.vss-tfs-web.tfs-global-messages-service\";\r\n        /**\r\n         * Service for interacting with the host window's navigation (URLs, new windows, etc.)\r\n         */\r\n        CommonServiceIds[\"HostNavigationService\"] = \"ms.vss-features.host-navigation-service\";\r\n        /**\r\n         * Service for interacting with the layout of the page: managing full-screen mode,\r\n         * opening dialogs and panels\r\n         */\r\n        CommonServiceIds[\"HostPageLayoutService\"] = \"ms.vss-features.host-page-layout-service\";\r\n        /**\r\n         * Service for getting URLs/locations from the host context\r\n         */\r\n        CommonServiceIds[\"LocationService\"] = \"ms.vss-features.location-service\";\r\n        /**\r\n         * Exposes project-related information from the current page\r\n         */\r\n        CommonServiceIds[\"ProjectPageService\"] = \"ms.vss-tfs-web.tfs-page-data-service\";\r\n    })(CommonServiceIds = exports.CommonServiceIds || (exports.CommonServiceIds = {}));\r\n    /**\r\n     * Host level for a VSS service\r\n     */\r\n    var TeamFoundationHostType;\r\n    (function (TeamFoundationHostType) {\r\n        /**\r\n         * The Deployment host\r\n         */\r\n        TeamFoundationHostType[TeamFoundationHostType[\"Deployment\"] = 1] = \"Deployment\";\r\n        /**\r\n         * The Enterprise host\r\n         */\r\n        TeamFoundationHostType[TeamFoundationHostType[\"Enterprise\"] = 2] = \"Enterprise\";\r\n        /**\r\n         * The organization/project collection host\r\n         */\r\n        TeamFoundationHostType[TeamFoundationHostType[\"Organization\"] = 4] = \"Organization\";\r\n    })(TeamFoundationHostType = exports.TeamFoundationHostType || (exports.TeamFoundationHostType = {}));\r\n    /**\r\n     * Size (width) options for panel\r\n     */\r\n    var PanelSize;\r\n    (function (PanelSize) {\r\n        PanelSize[PanelSize[\"Small\"] = 0] = \"Small\";\r\n        PanelSize[PanelSize[\"Medium\"] = 1] = \"Medium\";\r\n        PanelSize[PanelSize[\"Large\"] = 2] = \"Large\";\r\n    })(PanelSize = exports.PanelSize || (exports.PanelSize = {}));\r\n    /**\r\n     * The severity of the message.\r\n     */\r\n    var MessageBannerLevel;\r\n    (function (MessageBannerLevel) {\r\n        MessageBannerLevel[MessageBannerLevel[\"info\"] = 0] = \"info\";\r\n        MessageBannerLevel[MessageBannerLevel[\"warning\"] = 1] = \"warning\";\r\n        MessageBannerLevel[MessageBannerLevel[\"error\"] = 2] = \"error\";\r\n        MessageBannerLevel[MessageBannerLevel[\"success\"] = 3] = \"success\";\r\n    })(MessageBannerLevel = exports.MessageBannerLevel || (exports.MessageBannerLevel = {}));\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Common/CommonServices.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Common/Fetch.js":
/*!*****************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Common/Fetch.js ***!
  \*****************************************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! whatwg-fetch */ \"./node_modules/whatwg-fetch/fetch.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * Issue a fetch request. This is a wrapper around the browser fetch method that handles VSS authentication\r\n     * and triggers events that can be listened to by other modules.\r\n     *\r\n     * @param requestUrl Url to send the request to\r\n     * @param options fetch settings/options for the request\r\n     * @param vssRequestOptions VSS specific request options\r\n     *\r\n     * Triggered Events:\r\n     *  afterRequest -> IPostRequestEvent is sent after the request has completed.\r\n     *  beforeRequest -> IPreRequestEvent is sent before the request is made.\r\n     */\r\n    function issueRequest(requestUrl, options, vssRequestOptions) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var response, headers, key, sessionId, command, refreshToken, authHeader, ex_1, error, error, _a;\r\n            return __generator(this, function (_b) {\r\n                switch (_b.label) {\r\n                    case 0:\r\n                        response = undefined;\r\n                        // Add a X-VSS-ReauthenticationAction header to all fetch requests\r\n                        if (!options) {\r\n                            options = {};\r\n                        }\r\n                        // If options.headers is set, check if it is a Headers object, and if not, convert it to one.\r\n                        if (options.headers) {\r\n                            if (options.headers instanceof Headers) {\r\n                                headers = options.headers;\r\n                            }\r\n                            else {\r\n                                headers = new Headers();\r\n                                if (typeof options.headers.hasOwnProperty === \"function\") {\r\n                                    for (key in options.headers) {\r\n                                        if (options.headers.hasOwnProperty(key)) {\r\n                                            headers.append(key, options.headers[key]);\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else {\r\n                            headers = new Headers();\r\n                        }\r\n                        options.headers = headers;\r\n                        headers.append(\"X-VSS-ReauthenticationAction\", \"Suppress\");\r\n                        // Add a X-TFS-Session header with the current sessionId and command for correlation\r\n                        if (vssRequestOptions) {\r\n                            sessionId = vssRequestOptions.sessionId;\r\n                            command = vssRequestOptions.command;\r\n                            if (sessionId) {\r\n                                if (command) {\r\n                                    headers.append(\"X-TFS-Session\", sessionId + \",\" + command);\r\n                                }\r\n                                else {\r\n                                    headers.append(\"X-TFS-Session\", sessionId);\r\n                                }\r\n                            }\r\n                        }\r\n                        // Send credentials to the same origin, we will use tokens for differing origins.\r\n                        options.credentials = \"same-origin\";\r\n                        refreshToken = false;\r\n                        _b.label = 1;\r\n                    case 1:\r\n                        if (!(vssRequestOptions && vssRequestOptions.authTokenProvider)) return [3 /*break*/, 3];\r\n                        return [4 /*yield*/, vssRequestOptions.authTokenProvider.getAuthorizationHeader(refreshToken)];\r\n                    case 2:\r\n                        authHeader = _b.sent();\r\n                        if (authHeader) {\r\n                            headers.append(\"Authorization\", authHeader);\r\n                            refreshToken = true;\r\n                        }\r\n                        headers.append(\"X-TFS-FedAuthRedirect\", \"Suppress\");\r\n                        _b.label = 3;\r\n                    case 3:\r\n                        _b.trys.push([3, 5, , 6]);\r\n                        return [4 /*yield*/, fetch(requestUrl, options)];\r\n                    case 4:\r\n                        response = _b.sent();\r\n                        return [3 /*break*/, 6];\r\n                    case 5:\r\n                        ex_1 = _b.sent();\r\n                        console.warn(\"Unhandled exception in fetch for \" + requestUrl + \": \" + (ex_1 && ex_1.toString()));\r\n                        error = new Error(\"TF400893: Unable to contact the server. Please check your network connection and try again.\");\r\n                        error.name = \"NetworkException\";\r\n                        throw error;\r\n                    case 6:\r\n                        // If we recieved a 401 and have a token manager, we will refresh our token and try again.\r\n                        if (response.status === 401 && !refreshToken && vssRequestOptions && vssRequestOptions.authTokenProvider) {\r\n                            refreshToken = true;\r\n                            return [3 /*break*/, 7];\r\n                        }\r\n                        _b.label = 7;\r\n                    case 7:\r\n                        if (false) // removed by dead control flow\n{}\r\n                        _b.label = 8;\r\n                    case 8:\r\n                        if (!!response.ok) return [3 /*break*/, 10];\r\n                        error = new Error();\r\n                        error.name = \"TFS.WebApi.Exception\";\r\n                        error.status = response.status;\r\n                        _a = error;\r\n                        return [4 /*yield*/, response.text()];\r\n                    case 9:\r\n                        _a.responseText = _b.sent();\r\n                        // Attempt to parse the response as a json object, for many of the failures\r\n                        // the server will serialize details into the body.\r\n                        if (error.responseText && error.responseText !== \"\") {\r\n                            try {\r\n                                error.serverError = JSON.parse(error.responseText);\r\n                                if (error.serverError && error.serverError.message) {\r\n                                    error.message = error.serverError.message;\r\n                                }\r\n                            }\r\n                            catch (exception) {\r\n                            }\r\n                        }\r\n                        if (!error.message) {\r\n                            error.message = response.status + \": \" + response.statusText;\r\n                        }\r\n                        throw error;\r\n                    case 10: return [2 /*return*/, response];\r\n                }\r\n            });\r\n        });\r\n    }\r\n    exports.issueRequest = issueRequest;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Common/Fetch.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Common/RestClientBase.js":
/*!**************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Common/RestClientBase.js ***!
  \**************************************************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./Fetch */ \"./node_modules/azure-devops-extension-api/Common/Fetch.js\"), __webpack_require__(/*! ./Util/Serialization */ \"./node_modules/azure-devops-extension-api/Common/Util/Serialization.js\"), __webpack_require__(/*! ./Util/Url */ \"./node_modules/azure-devops-extension-api/Common/Util/Url.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, Fetch_1, Serialization_1, Url_1) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n    * Base class that should be used (derived from) to make requests to VSS REST apis\r\n    */\r\n    var RestClientBase = /** @class */ (function () {\r\n        function RestClientBase(options) {\r\n            this._options = options || {};\r\n            if (typeof this._options.rootPath === \"string\") {\r\n                this._rootPath = Promise.resolve(this._options.rootPath);\r\n            }\r\n            else {\r\n                this._rootPath = this._options.rootPath || Promise.resolve(\"/\");\r\n            }\r\n        }\r\n        /**\r\n        * Gets the root path of the Service\r\n        *\r\n        * @returns Promise for the resolving the root path of the service.\r\n        */\r\n        RestClientBase.prototype.getRootPath = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this._rootPath];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n        * Issue a request to a VSS REST endpoint.\r\n        *\r\n        * @param requestParams request options\r\n        * @returns Promise for the response\r\n        */\r\n        RestClientBase.prototype.beginRequest = function (requestParams) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this._rootPath.then(function (rootPath) {\r\n                            var requestUrl = rootPath + Url_1.replaceRouteValues(requestParams.routeTemplate, requestParams.routeValues || {});\r\n                            if (requestParams.queryParams) {\r\n                                var uri = new Url_1.Uri(requestUrl);\r\n                                uri.addQueryParams(requestParams.queryParams);\r\n                                requestUrl = uri.absoluteUri;\r\n                            }\r\n                            return _this._issueRequest(requestUrl, requestParams.apiVersion, requestParams);\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Issue a request to a VSS REST endpoint at the specified location\r\n         *\r\n         * @param requestUrl Resolved URL of the request\r\n         * @param apiVersion API version\r\n         * @param requestParams Optional request parameters\r\n         */\r\n        RestClientBase.prototype._issueRequest = function (requestUrl, apiVersion, requestParams) {\r\n            var fetchOptions = {};\r\n            fetchOptions.method = requestParams.method || \"GET\";\r\n            fetchOptions.mode = \"cors\";\r\n            if (!requestParams.isRawData && requestParams.body && fetchOptions.method.toUpperCase() !== 'GET') {\r\n                fetchOptions.body = JSON.stringify(requestParams.body);\r\n            }\r\n            else {\r\n                fetchOptions.body = requestParams.body;\r\n            }\r\n            var acceptType = requestParams.httpResponseType || \"application/json\";\r\n            var acceptHeaderValue = acceptType + \";api-version=\" + apiVersion + \";excludeUrls=true;enumsAsNumbers=true;msDateFormat=true;noArrayWrap=true\";\r\n            fetchOptions.headers = Object.assign({\r\n                \"Accept\": acceptHeaderValue,\r\n                \"Content-Type\": requestParams.body && \"application/json\"\r\n            }, requestParams.customHeaders) /* lib.dom.d.ts does not have the correct type for Headers */;\r\n            var vssRequestOptions = {\r\n                authTokenProvider: this._options.authTokenProvider,\r\n                sessionId: this._options.sessionId,\r\n                command: requestParams.command || this._options.command\r\n            };\r\n            var result = Fetch_1.issueRequest(requestUrl, fetchOptions, vssRequestOptions);\r\n            return result.then(function (response) {\r\n                if (requestParams.returnRawResponse) {\r\n                    return response;\r\n                }\r\n                else if (acceptType.toLowerCase().indexOf(\"json\") >= 0) {\r\n                    // MSJSON date formats must be replaced in the raw text before JSON parsing\r\n                    return response.text().then(Serialization_1.deserializeVssJsonObject);\r\n                }\r\n                else if (acceptType.toLowerCase() === \"text/plain\") {\r\n                    return response.text();\r\n                }\r\n                else {\r\n                    return response.arrayBuffer();\r\n                }\r\n            });\r\n        };\r\n        return RestClientBase;\r\n    }());\r\n    exports.RestClientBase = RestClientBase;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Common/RestClientBase.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Common/Util/Serialization.js":
/*!******************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Common/Util/Serialization.js ***!
  \******************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    var msAjaxDateRegEx = new RegExp('(^|[^\\\\\\\\])\\\\\"\\\\\\\\/Date\\\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\\\+|-)[0-9]{4})?\\\\)\\\\\\\\/\\\\\"', 'g');\r\n    /**\r\n     * Handle the raw text of a JSON response which may contain MSJSON style dates and\r\n     * deserialize (JSON.parse) the data in a way that restores Date objects rather than\r\n     * strings.\r\n     *\r\n     * MSJSON style dates are in the form:\r\n     *\r\n     *     \"lastModified\": \"\\/Date(1496158224000)\\/\"\r\n     *\r\n     * This format unnecessarily (but intentionally) escapes the \"/\" character. So the parsed\r\n     * JSON will have no trace of the escape character (\\).\r\n     *\r\n     * @param text The raw JSON text\r\n     */\r\n    function deserializeVssJsonObject(text) {\r\n        function replaceMsJsonDates(object, parentObject, parentObjectKey) {\r\n            if (parentObject && typeof object.__msjson_date__ === \"number\") {\r\n                parentObject[parentObjectKey] = new Date(object.__msjson_date__);\r\n                return;\r\n            }\r\n            for (var key in object) {\r\n                var value = object[key];\r\n                if (value !== null && typeof value === \"object\") {\r\n                    replaceMsJsonDates(object[key], object, key);\r\n                }\r\n            }\r\n        }\r\n        var deserializedData = null;\r\n        if (text) {\r\n            // Replace MSJSON dates with an object that we can easily identify after JSON.parse.\r\n            // This replaces the string value (like \"\\/Date(1496158224000)\\/\") with a JSON object that \r\n            // has an \"__msjson_date__\" key.\r\n            var replacedText = text.replace(msAjaxDateRegEx, \"$1{\\\"__msjson_date__\\\":$2 }\");\r\n            // Do the actual JSON deserialization\r\n            deserializedData = JSON.parse(replacedText);\r\n            // Go through the parsed object and create actual Date objects for our replacements made above\r\n            if (replacedText !== text) {\r\n                replaceMsJsonDates(deserializedData, null, \"\");\r\n            }\r\n        }\r\n        return deserializedData;\r\n    }\r\n    exports.deserializeVssJsonObject = deserializeVssJsonObject;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Common/Util/Serialization.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Common/Util/Url.js":
/*!********************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Common/Util/Url.js ***!
  \********************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * Key constants used by route parsing.\r\n     */\r\n    var KeyCodes;\r\n    (function (KeyCodes) {\r\n        KeyCodes[KeyCodes[\"asterisk\"] = 42] = \"asterisk\";\r\n        KeyCodes[KeyCodes[\"endCurlyBrace\"] = 125] = \"endCurlyBrace\";\r\n        KeyCodes[KeyCodes[\"startCurlyBrace\"] = 123] = \"startCurlyBrace\";\r\n    })(KeyCodes || (KeyCodes = {}));\r\n    function prepareForComparison(value, upperCase) {\r\n        return value ? (upperCase ? value.toLocaleUpperCase() : value) : \"\";\r\n    }\r\n    function stringEquals(str1, str2, ignoreCase) {\r\n        if (str1 === str2) {\r\n            return true;\r\n        }\r\n        return prepareForComparison(str1, ignoreCase).localeCompare(prepareForComparison(str2, ignoreCase)) === 0;\r\n    }\r\n    /**\r\n    * Class that represents a Uri and allows parsing/getting and setting of individual parts\r\n    */\r\n    var Uri = /** @class */ (function () {\r\n        /**\r\n        * Create a new Uri.\r\n        *\r\n        * @param uri Optional uri string to populate values with\r\n        * @param options Options for parsing the uri string\r\n        */\r\n        function Uri(uri, options) {\r\n            /**\r\n            * The uri scheme such as http or https\r\n            */\r\n            this.scheme = \"\";\r\n            /**\r\n             * If true, do not emit the \"//\" separator after the scheme:\r\n             * Set to true for schemes like mailto (e.g. mailto:foo@bar)\r\n             */\r\n            this.noSchemeSeparator = false;\r\n            /**\r\n            * The uri hostname (does not include port or scheme)\r\n            */\r\n            this.host = \"\";\r\n            /**\r\n            * The port number of the uri as supplied in the url. 0 if left out in the url (e.g. the default port for the scheme).\r\n            */\r\n            this.port = 0;\r\n            /**\r\n            * The relative path of the uri\r\n            */\r\n            this.path = \"\";\r\n            /**\r\n            * The array of query parameters in the uri\r\n            */\r\n            this.queryParameters = [];\r\n            /**\r\n            * The hash string of the uri\r\n            */\r\n            this.hashString = \"\";\r\n            if (uri) {\r\n                this._setFromUriString(uri, options);\r\n            }\r\n        }\r\n        Uri.prototype._setFromUriString = function (uriString, options) {\r\n            var uri = uriString;\r\n            // Parse out the hash string\r\n            var hashSplit = this._singleSplit(uri, \"#\");\r\n            if (hashSplit) {\r\n                uri = hashSplit.part1;\r\n                this.hashString = this._decodeUriComponent(hashSplit.part2);\r\n            }\r\n            else {\r\n                this.hashString = \"\";\r\n            }\r\n            // Parse the query parameters\r\n            var querySplit = this._singleSplit(uri, \"?\");\r\n            if (querySplit) {\r\n                uri = querySplit.part1;\r\n                this.queryString = querySplit.part2;\r\n            }\r\n            else {\r\n                this.queryParameters = [];\r\n            }\r\n            this.scheme = \"\";\r\n            this.host = \"\";\r\n            this.port = 0;\r\n            this.path = \"\";\r\n            // Parse out the scheme components of the uri\r\n            this.noSchemeSeparator = false;\r\n            var schemeSplit = this._singleSplit(uri, \":\");\r\n            if (schemeSplit) {\r\n                this.scheme = schemeSplit.part1;\r\n                uri = schemeSplit.part2;\r\n                if (uri.substr(0, 2) === \"//\") {\r\n                    uri = uri.substr(2);\r\n                    // Parse out the path part of the uri\r\n                    var pathSplit = this._singleSplit(uri, \"/\");\r\n                    if (pathSplit) {\r\n                        uri = pathSplit.part1;\r\n                        this.path = pathSplit.part2;\r\n                    }\r\n                    else {\r\n                        this.path = \"\";\r\n                    }\r\n                    // Parse out the port number\r\n                    var portSplit = this._singleSplit(uri, \":\");\r\n                    if (portSplit) {\r\n                        this.host = portSplit.part1;\r\n                        this.port = parseInt(portSplit.part2);\r\n                        if (isNaN(this.port)) {\r\n                            // Segment after : was not a port, consider it part of the path\r\n                            this.host += \":\";\r\n                            this.path = portSplit.part2 + \"/\" + this.path;\r\n                        }\r\n                    }\r\n                    else {\r\n                        this.host = uri;\r\n                    }\r\n                }\r\n                else {\r\n                    // No host for schemes like mailto: just use path\r\n                    this.noSchemeSeparator = true;\r\n                    this.path = uri;\r\n                }\r\n            }\r\n            else {\r\n                // Relative Url was given\r\n                this.path = uri;\r\n            }\r\n            if (options && options.absoluteUriRequired && !this.scheme) {\r\n                throw new Error(\"The uri string \\\"\" + uriString + \"\\\" does not represent a valid absolute uri.\");\r\n            }\r\n        };\r\n        Uri.prototype._singleSplit = function (value, separator) {\r\n            var matchIndex = value.indexOf(separator);\r\n            if (matchIndex >= 0) {\r\n                return {\r\n                    part1: value.substr(0, matchIndex),\r\n                    part2: value.substr(matchIndex + 1)\r\n                };\r\n            }\r\n            else {\r\n                return undefined;\r\n            }\r\n        };\r\n        Uri.prototype._decodeUriComponent = function (value) {\r\n            if (value) {\r\n                // Replace \"+\" character with %20.\r\n                value = value.replace(/\\+/g, \"%20\");\r\n                value = decodeURIComponent(value);\r\n            }\r\n            return value;\r\n        };\r\n        Object.defineProperty(Uri.prototype, \"absoluteUri\", {\r\n            /**\r\n            * Get the absolute uri string for this Uri\r\n            */\r\n            get: function () {\r\n                var uri = \"\";\r\n                if (this.scheme) {\r\n                    uri = encodeURI(decodeURI(this.scheme)) + \":\";\r\n                    if (!this.noSchemeSeparator) {\r\n                        uri += \"//\";\r\n                    }\r\n                }\r\n                if (this.host) {\r\n                    uri += encodeURI(decodeURI(this.host));\r\n                    if (this.port) {\r\n                        uri += \":\" + this.port;\r\n                    }\r\n                    if (!this.noSchemeSeparator || this.path) {\r\n                        uri += \"/\";\r\n                    }\r\n                }\r\n                if (this.path) {\r\n                    var encodedPath = void 0;\r\n                    if (this.noSchemeSeparator) {\r\n                        // Only do simple encoding for schemes like mailto: or blob: where\r\n                        // we can't determine host versus path\r\n                        encodedPath = encodeURI(decodeURI(this.path));\r\n                    }\r\n                    else {\r\n                        var parts = this.path.split('/');\r\n                        encodedPath = parts.map(function (p) { return encodeURIComponent(decodeURIComponent(p)); }).join(\"/\");\r\n                    }\r\n                    if (this.host) {\r\n                        uri = combineUrlPaths(uri, encodedPath);\r\n                    }\r\n                    else {\r\n                        uri = uri + encodedPath;\r\n                    }\r\n                }\r\n                var queryString = this.queryString;\r\n                if (queryString) {\r\n                    uri += \"?\" + queryString;\r\n                }\r\n                if (this.hashString) {\r\n                    var params = this._splitStringIntoParams(this.hashString);\r\n                    var encodedString = this._getParamsAsString(params);\r\n                    uri += \"#\" + encodedString;\r\n                }\r\n                return uri;\r\n            },\r\n            /**\r\n            * Set the absolute uri string for this Uri. Replaces all existing values\r\n            */\r\n            set: function (uri) {\r\n                this._setFromUriString(uri || \"\");\r\n            },\r\n            enumerable: true,\r\n            configurable: true\r\n        });\r\n        /**\r\n         * Gets the effective port number, returning the default port number if omitted for the given scheme.\r\n         */\r\n        Uri.prototype.getEffectivePort = function () {\r\n            if (this.port) {\r\n                return this.port;\r\n            }\r\n            else {\r\n                if (stringEquals(this.scheme, \"http\", true)) {\r\n                    return 80;\r\n                }\r\n                else if (stringEquals(this.scheme, \"https\", true)) {\r\n                    return 443;\r\n                }\r\n                else {\r\n                    return 0;\r\n                }\r\n            }\r\n        };\r\n        /**\r\n         * Builds an encoded key/value pair string\r\n         * like query string or hash strings\r\n         */\r\n        Uri.prototype._getParamsAsString = function (params) {\r\n            if (params && params.length) {\r\n                return params.map(function (param) {\r\n                    if (param.value !== null) {\r\n                        return encodeURIComponent(param.name) + \"=\" + encodeURIComponent(param.value);\r\n                    }\r\n                    else {\r\n                        return encodeURIComponent(param.name);\r\n                    }\r\n                }).join(\"&\");\r\n            }\r\n            else {\r\n                return \"\";\r\n            }\r\n        };\r\n        Object.defineProperty(Uri.prototype, \"queryString\", {\r\n            /**\r\n            * Get the query string for this Uri.\r\n            */\r\n            get: function () {\r\n                return this._getParamsAsString(this.queryParameters);\r\n            },\r\n            /**\r\n            * Set the query string for this Uri. Replaces existing value\r\n            */\r\n            set: function (queryString) {\r\n                this.queryParameters = this._splitStringIntoParams(queryString);\r\n            },\r\n            enumerable: true,\r\n            configurable: true\r\n        });\r\n        /**\r\n         * Coverts a key/value pair string into parameters array\r\n         * @param paramString String such as a=b&c=d\r\n         */\r\n        Uri.prototype._splitStringIntoParams = function (paramString) {\r\n            var _this = this;\r\n            var params = [];\r\n            paramString.split('&').forEach(function (pair) {\r\n                if (pair) {\r\n                    var valueSplit = _this._singleSplit(pair, \"=\");\r\n                    if (valueSplit) {\r\n                        params.push({\r\n                            name: _this._decodeUriComponent(valueSplit.part1),\r\n                            value: _this._decodeUriComponent(valueSplit.part2)\r\n                        });\r\n                    }\r\n                    else {\r\n                        params.push({\r\n                            name: _this._decodeUriComponent(pair),\r\n                            value: null\r\n                        });\r\n                    }\r\n                }\r\n            });\r\n            return params;\r\n        };\r\n        /**\r\n        * Get the value of the query parameter with the given key\r\n        *\r\n        * @param name Query parameter name\r\n        */\r\n        Uri.prototype.getQueryParam = function (name) {\r\n            var value;\r\n            if (this.queryParameters) {\r\n                var matchingPairs = this.queryParameters.filter(function (p) { return stringEquals(p.name, name, true); });\r\n                if (matchingPairs.length > 0) {\r\n                    value = matchingPairs[0].value;\r\n                }\r\n            }\r\n            return value;\r\n        };\r\n        /**\r\n         * Adds a query string parameter to the current uri\r\n         *\r\n         * @param name The Query parameter name\r\n         * @param value The Query parameter value\r\n         * @param replaceExisting If true, replace all existing parameters with the same name\r\n         */\r\n        Uri.prototype.addQueryParam = function (name, value, replaceExisting) {\r\n            if (replaceExisting) {\r\n                this.removeQueryParam(name);\r\n            }\r\n            if (!this.queryParameters) {\r\n                this.queryParameters = [];\r\n            }\r\n            this.queryParameters.push({ name: name, value: value });\r\n        };\r\n        /**\r\n         * Adds query string parameters to the current uri\r\n         *\r\n         * @param parameters Query parameters to add\r\n         * @param replaceExisting If true, replace all existing parameters with the same name\r\n         * @param keyPrefix If specified, a value to prepend to all query parameter keys\r\n         */\r\n        Uri.prototype.addQueryParams = function (parameters, replaceExisting, keyPrefix) {\r\n            var _this = this;\r\n            var _loop_1 = function (key) {\r\n                var value = parameters[key];\r\n                if (value !== null && value !== undefined) {\r\n                    var keyWithPrefix_1 = (keyPrefix || \"\") + key;\r\n                    if (value instanceof Date) {\r\n                        this_1.addQueryParam(keyWithPrefix_1, value.toJSON(), replaceExisting);\r\n                    }\r\n                    else if (Array.isArray(value)) {\r\n                        value.forEach(function (v) { return _this.addQueryParam(keyWithPrefix_1, \"\" + v, replaceExisting); });\r\n                    }\r\n                    else if (typeof value === \"object\") {\r\n                        this_1.addQueryParams(value, replaceExisting, keyWithPrefix_1 + \".\");\r\n                    }\r\n                    else {\r\n                        this_1.addQueryParam(keyWithPrefix_1, \"\" + value, replaceExisting);\r\n                    }\r\n                }\r\n            };\r\n            var this_1 = this;\r\n            for (var key in parameters) {\r\n                _loop_1(key);\r\n            }\r\n        };\r\n        /**\r\n         * Removes a query string parameter\r\n         *\r\n         * @param name The Query parameter name\r\n         */\r\n        Uri.prototype.removeQueryParam = function (name) {\r\n            if (this.queryParameters) {\r\n                this.queryParameters = this.queryParameters.filter(function (p) { return !stringEquals(p.name, name, true); });\r\n            }\r\n        };\r\n        return Uri;\r\n    }());\r\n    exports.Uri = Uri;\r\n    /**\r\n     * Take url segments and join them with a single slash character. Takes care of path segements that start and/or end\r\n     * with a slash to ensure that the resulting URL does not have double-slashes\r\n     *\r\n     * @param paths Path segments to concatenate\r\n     */\r\n    function combineUrlPaths() {\r\n        var paths = [];\r\n        for (var _i = 0; _i < arguments.length; _i++) {\r\n            paths[_i] = arguments[_i];\r\n        }\r\n        var segmentsToJoin = [];\r\n        // Trim leading and trailing slash in each segment\r\n        for (var i = 0, last = paths.length - 1; i <= last; i++) {\r\n            var path = paths[i];\r\n            if (path) {\r\n                if (path === \"/\" && (i === 0 || i === last)) {\r\n                    // For a \"/\" segment at the beginning or end of the list, insert an empty entry to force\r\n                    // a leading or trailing slash in the resulting URL\r\n                    segmentsToJoin.push(\"\");\r\n                }\r\n                else {\r\n                    if (i > 0 && path[0] === \"/\") {\r\n                        // Trim leading slash in any segment except the first one\r\n                        path = path.substr(1);\r\n                    }\r\n                    if (i < last && path[path.length - 1] === \"/\") {\r\n                        // Trim trailing slash in any segment except the last one\r\n                        path = path.substr(0, path.length - 1);\r\n                    }\r\n                    if (path) {\r\n                        segmentsToJoin.push(path);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        if (segmentsToJoin.length === 1 && segmentsToJoin[0] === \"\") {\r\n            return \"/\";\r\n        }\r\n        // Join segments by slash\r\n        return segmentsToJoin.join(\"/\");\r\n    }\r\n    exports.combineUrlPaths = combineUrlPaths;\r\n    /**\r\n     * Parse a route template into a structure that can be used to quickly do route replacements\r\n     *\r\n     * @param routeTemplate MVC route template string (like \"/foo/{id}/{*params}\")\r\n     */\r\n    function parseRouteTemplate(routeTemplate) {\r\n        var parsedRoute = {\r\n            segments: []\r\n        };\r\n        var paramStartIndex = -1;\r\n        var segmentStartIndex = -1;\r\n        var segmentPrefix = \"\";\r\n        for (var charIndex = 0, routeTemplateLen = routeTemplate.length; charIndex < routeTemplateLen; charIndex++) {\r\n            var c = routeTemplate.charCodeAt(charIndex);\r\n            if (paramStartIndex >= 0) {\r\n                if (c === 125 /* endCurlyBrace */) {\r\n                    var paramName = routeTemplate.substring(paramStartIndex, charIndex);\r\n                    var isWildCardParam = false;\r\n                    if (paramName.charCodeAt(0) === 42 /* asterisk */) {\r\n                        paramName = paramName.substr(1);\r\n                        isWildCardParam = true;\r\n                    }\r\n                    parsedRoute.segments.push({\r\n                        paramName: paramName,\r\n                        isWildCardParam: isWildCardParam\r\n                    });\r\n                    paramStartIndex = -1;\r\n                }\r\n            }\r\n            else {\r\n                if (c === 123 /* startCurlyBrace */ && routeTemplate.charCodeAt(charIndex + 1) !== 123 /* startCurlyBrace */) {\r\n                    // Start of a parameter\r\n                    if (segmentPrefix || segmentStartIndex >= 0) {\r\n                        // Store the previous segment\r\n                        var segmentText = segmentPrefix;\r\n                        if (segmentStartIndex >= 0) {\r\n                            segmentText += routeTemplate.substring(segmentStartIndex, charIndex);\r\n                        }\r\n                        if (segmentText) {\r\n                            parsedRoute.segments.push({\r\n                                text: segmentText\r\n                            });\r\n                        }\r\n                        // Reset the segment tracking info\r\n                        segmentStartIndex = -1;\r\n                        segmentPrefix = \"\";\r\n                    }\r\n                    paramStartIndex = charIndex + 1;\r\n                }\r\n                else {\r\n                    // Handle double {{ or double }} as an escape sequence. This is rare. For simplicity we will \r\n                    if ((c === 123 /* startCurlyBrace */ && routeTemplate.charCodeAt(charIndex + 1) === 123 /* startCurlyBrace */) ||\r\n                        (c === 125 /* endCurlyBrace */ && routeTemplate.charCodeAt(charIndex + 1) === 125 /* endCurlyBrace */)) {\r\n                        segmentPrefix = segmentPrefix + routeTemplate.substring(segmentStartIndex >= 0 ? segmentStartIndex : charIndex, charIndex + 1);\r\n                        segmentStartIndex = -1;\r\n                        charIndex++;\r\n                    }\r\n                    if (segmentStartIndex < 0) {\r\n                        segmentStartIndex = charIndex;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        // Store any pending segment\r\n        if (segmentStartIndex >= 0 || paramStartIndex >= 0) {\r\n            var segmentText = segmentPrefix + routeTemplate.substring(segmentStartIndex >= 0 ? segmentStartIndex : paramStartIndex);\r\n            if (segmentText) {\r\n                parsedRoute.segments.push({\r\n                    text: segmentText\r\n                });\r\n            }\r\n        }\r\n        // Mark any param as required if it has a text segment (other than just \"/\") after it\r\n        var required = false;\r\n        for (var i = parsedRoute.segments.length - 1; i >= 0; i--) {\r\n            var segment = parsedRoute.segments[i];\r\n            if (segment.text && segment.text !== \"/\") {\r\n                required = true;\r\n            }\r\n            else if (required && segment.paramName) {\r\n                segment.isRequiredParam = true;\r\n            }\r\n        }\r\n        return parsedRoute;\r\n    }\r\n    exports.parseRouteTemplate = parseRouteTemplate;\r\n    /**\r\n     * Take a set of routes and route values and form a url using the best match. The best match\r\n     * is the route with the highest number of replacements (of the given routeValues dictionary).\r\n     * In the event of a tie (same number of replacements) the route that came first wins.\r\n     *\r\n     * @param routeCollection Array of parsed routes\r\n     * @param routeValues Replacement values\r\n     */\r\n    function routeUrl(routeCollection, routeValues) {\r\n        var bestMatch = getBestRouteMatch(routeCollection, routeValues);\r\n        if (!bestMatch) {\r\n            return \"\";\r\n        }\r\n        var uri = new Uri(bestMatch.url);\r\n        for (var routeValueKey in routeValues) {\r\n            if (!bestMatch.matchedParameters[routeValueKey]) {\r\n                uri.addQueryParam(routeValueKey, routeValues[routeValueKey]);\r\n            }\r\n        }\r\n        return uri.absoluteUri;\r\n    }\r\n    exports.routeUrl = routeUrl;\r\n    /**\r\n     * Take a set of routes and find the best match. The best match is the route with the highest number of replacements\r\n     * (of the given routeValues dictionary). In the event of a tie (same number of replacements) the route that came first wins.\r\n     *\r\n     * @param routeCollection Array of parsed routes\r\n     * @param routeValues Replacement values\r\n     */\r\n    function getBestRouteMatch(routeCollection, routeValues) {\r\n        var bestMatch;\r\n        var totalRouteValues = Object.keys(routeValues).length;\r\n        for (var _i = 0, routeCollection_1 = routeCollection; _i < routeCollection_1.length; _i++) {\r\n            var route = routeCollection_1[_i];\r\n            var match = replaceParsedRouteValues(route, routeValues, false);\r\n            if (match && (!bestMatch || match.matchedParametersCount > bestMatch.matchedParametersCount)) {\r\n                bestMatch = match;\r\n                if (match.matchedParametersCount === totalRouteValues) {\r\n                    // This route matched all route values. Return its url directly (no need to even add query params)\r\n                    return bestMatch;\r\n                }\r\n            }\r\n        }\r\n        return bestMatch;\r\n    }\r\n    exports.getBestRouteMatch = getBestRouteMatch;\r\n    /**\r\n     * Replace route values for a specific parsed route\r\n     *\r\n     * @param parsedRoute The route to evaluate\r\n     * @param routeValues Dictionary of route replacement parameters\r\n     * @param continueOnUnmatchedSegements If true, continue with replacements even after a miss. By default (false), stop replacements once a parameter is not present.\r\n     */\r\n    function replaceParsedRouteValues(parsedRoute, routeValues, continueOnUnmatchedSegements) {\r\n        var urlParts = [];\r\n        var matchedParameters = {};\r\n        var matchedParametersCount = 0;\r\n        for (var segmentIndex = 0, l = parsedRoute.segments.length; segmentIndex < l; segmentIndex++) {\r\n            var segment = parsedRoute.segments[segmentIndex];\r\n            if (segment.text) {\r\n                var segmentText = segment.text;\r\n                if (continueOnUnmatchedSegements) {\r\n                    // Make sure we don't have consecutive slash (/) characters in the case of missing segments\r\n                    if (segmentIndex > 0 && segmentText.charAt(0) === \"/\") {\r\n                        if (urlParts.length === 0) {\r\n                            // First text segment after one or more missing parameter segments. Remove the leading slash.\r\n                            segmentText = segmentText.substr(1);\r\n                        }\r\n                    }\r\n                }\r\n                if (segmentText) {\r\n                    urlParts.push(segmentText);\r\n                }\r\n            }\r\n            else {\r\n                var value = routeValues[segment.paramName];\r\n                if (!value && value !== 0) {\r\n                    // The route value was not supplied\r\n                    if (!continueOnUnmatchedSegements) {\r\n                        if (segment.isRequiredParam) {\r\n                            // This is a required parameter. Return undefined since this route was not a match.\r\n                            return undefined;\r\n                        }\r\n                        else {\r\n                            // This is an omitted optional parameter. Return what we've computed so far.\r\n                            break;\r\n                        }\r\n                    }\r\n                    else if (urlParts.length) {\r\n                        // Unmatched segment being omitted. Remove any previously trailing slash\r\n                        var lastSegment = urlParts[urlParts.length - 1];\r\n                        if (lastSegment[lastSegment.length - 1] === \"/\") {\r\n                            urlParts[urlParts.length - 1] = lastSegment.substr(0, lastSegment.length - 1);\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    urlParts.push(segment.isWildCardParam ? encodeURI(\"\" + value) : encodeURIComponent(\"\" + value));\r\n                    matchedParameters[segment.paramName] = true;\r\n                    matchedParametersCount++;\r\n                }\r\n            }\r\n        }\r\n        return {\r\n            url: urlParts.join(\"\"),\r\n            matchedParameters: matchedParameters,\r\n            matchedParametersCount: matchedParametersCount\r\n        };\r\n    }\r\n    exports.replaceParsedRouteValues = replaceParsedRouteValues;\r\n    /**\r\n     * Take an MVC route template (like \"/foo/{id}/{*params}\") and replace the templated parts with values from the given dictionary\r\n     *\r\n     * @param routeTemplate MVC route template (like \"/foo/{id}/{*params}\")\r\n     * @param routeValues Route value replacements\r\n     */\r\n    function replaceRouteValues(routeTemplate, routeValues) {\r\n        var parsedRoute = parseRouteTemplate(routeTemplate);\r\n        return replaceParsedRouteValues(parsedRoute, routeValues, true).url;\r\n    }\r\n    exports.replaceRouteValues = replaceRouteValues;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Common/Util/Url.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Common/index.js":
/*!*****************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Common/index.js ***!
  \*****************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./Client */ \"./node_modules/azure-devops-extension-api/Common/Client.js\"), __webpack_require__(/*! ./CommonServices */ \"./node_modules/azure-devops-extension-api/Common/CommonServices.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, Client_1, CommonServices_1) {\r\n    \"use strict\";\r\n    function __export(m) {\r\n        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n    }\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    __export(Client_1);\r\n    __export(CommonServices_1);\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Common/index.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Core/Core.js":
/*!**************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Core/Core.js ***!
  \**************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    var ConnectedServiceKind;\r\n    (function (ConnectedServiceKind) {\r\n        /**\r\n         * Custom or unknown service\r\n         */\r\n        ConnectedServiceKind[ConnectedServiceKind[\"Custom\"] = 0] = \"Custom\";\r\n        /**\r\n         * Azure Subscription\r\n         */\r\n        ConnectedServiceKind[ConnectedServiceKind[\"AzureSubscription\"] = 1] = \"AzureSubscription\";\r\n        /**\r\n         * Chef Connection\r\n         */\r\n        ConnectedServiceKind[ConnectedServiceKind[\"Chef\"] = 2] = \"Chef\";\r\n        /**\r\n         * Generic Connection\r\n         */\r\n        ConnectedServiceKind[ConnectedServiceKind[\"Generic\"] = 3] = \"Generic\";\r\n    })(ConnectedServiceKind = exports.ConnectedServiceKind || (exports.ConnectedServiceKind = {}));\r\n    /**\r\n     * Type of process customization on a collection.\r\n     */\r\n    var ProcessCustomizationType;\r\n    (function (ProcessCustomizationType) {\r\n        /**\r\n         * Process customization can't be computed.\r\n         */\r\n        ProcessCustomizationType[ProcessCustomizationType[\"Unknown\"] = -1] = \"Unknown\";\r\n        /**\r\n         * Customization based on project-scoped xml customization\r\n         */\r\n        ProcessCustomizationType[ProcessCustomizationType[\"Xml\"] = 0] = \"Xml\";\r\n        /**\r\n         * Customization based on process inheritance\r\n         */\r\n        ProcessCustomizationType[ProcessCustomizationType[\"Inherited\"] = 1] = \"Inherited\";\r\n    })(ProcessCustomizationType = exports.ProcessCustomizationType || (exports.ProcessCustomizationType = {}));\r\n    var ProcessType;\r\n    (function (ProcessType) {\r\n        ProcessType[ProcessType[\"System\"] = 0] = \"System\";\r\n        ProcessType[ProcessType[\"Custom\"] = 1] = \"Custom\";\r\n        ProcessType[ProcessType[\"Inherited\"] = 2] = \"Inherited\";\r\n    })(ProcessType = exports.ProcessType || (exports.ProcessType = {}));\r\n    var ProjectChangeType;\r\n    (function (ProjectChangeType) {\r\n        ProjectChangeType[ProjectChangeType[\"Modified\"] = 0] = \"Modified\";\r\n        ProjectChangeType[ProjectChangeType[\"Deleted\"] = 1] = \"Deleted\";\r\n        ProjectChangeType[ProjectChangeType[\"Added\"] = 2] = \"Added\";\r\n    })(ProjectChangeType = exports.ProjectChangeType || (exports.ProjectChangeType = {}));\r\n    var ProjectVisibility;\r\n    (function (ProjectVisibility) {\r\n        ProjectVisibility[ProjectVisibility[\"Unchanged\"] = -1] = \"Unchanged\";\r\n        /**\r\n         * The project is only visible to users with explicit access.\r\n         */\r\n        ProjectVisibility[ProjectVisibility[\"Private\"] = 0] = \"Private\";\r\n        /**\r\n         * Enterprise level project visibility\r\n         */\r\n        ProjectVisibility[ProjectVisibility[\"Organization\"] = 1] = \"Organization\";\r\n        /**\r\n         * The project is visible to all.\r\n         */\r\n        ProjectVisibility[ProjectVisibility[\"Public\"] = 2] = \"Public\";\r\n        ProjectVisibility[ProjectVisibility[\"SystemPrivate\"] = 3] = \"SystemPrivate\";\r\n    })(ProjectVisibility = exports.ProjectVisibility || (exports.ProjectVisibility = {}));\r\n    var SourceControlTypes;\r\n    (function (SourceControlTypes) {\r\n        SourceControlTypes[SourceControlTypes[\"Tfvc\"] = 1] = \"Tfvc\";\r\n        SourceControlTypes[SourceControlTypes[\"Git\"] = 2] = \"Git\";\r\n    })(SourceControlTypes = exports.SourceControlTypes || (exports.SourceControlTypes = {}));\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Core/Core.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Core/CoreClient.js":
/*!********************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Core/CoreClient.js ***!
  \********************************************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\nvar __extends = (this && this.__extends) || (function () {\r\n    var extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n    return function (d, b) {\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    };\r\n})();\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ../Common/RestClientBase */ \"./node_modules/azure-devops-extension-api/Common/RestClientBase.js\"), __webpack_require__(/*! ../Common/Util/Serialization */ \"./node_modules/azure-devops-extension-api/Common/Util/Serialization.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, RestClientBase_1, Serialization_1) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    var CoreRestClient = /** @class */ (function (_super) {\r\n        __extends(CoreRestClient, _super);\r\n        function CoreRestClient(options) {\r\n            return _super.call(this, options) || this;\r\n        }\r\n        /**\r\n         * Removes the avatar for the project.\r\n         *\r\n         * @param projectId - The ID or name of the project.\r\n         */\r\n        CoreRestClient.prototype.removeProjectAvatar = function (projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/avatar\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Sets the avatar for the project.\r\n         *\r\n         * @param avatarBlob - The avatar blob data object to upload.\r\n         * @param projectId - The ID or name of the project.\r\n         */\r\n        CoreRestClient.prototype.setProjectAvatar = function (avatarBlob, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PUT\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/avatar\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            body: avatarBlob\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets list of user readable teams in a project and teams user is member of (excluded from readable list).\r\n         *\r\n         * @param projectId - The name or ID (GUID) of the team project containing the teams to retrieve.\r\n         * @param expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.\r\n         * @param top - Maximum number of teams to return.\r\n         * @param skip - Number of teams to skip.\r\n         */\r\n        CoreRestClient.prototype.getProjectTeamsByCategory = function (projectId, expandIdentity, top, skip) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expandIdentity': expandIdentity,\r\n                        '$top': top,\r\n                        '$skip': skip\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/categorizedTeams/\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param connectedServiceCreationData -\r\n         * @param projectId -\r\n         */\r\n        CoreRestClient.prototype.createConnectedService = function (connectedServiceCreationData, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/connectedServices/{name}\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            body: connectedServiceCreationData\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param projectId -\r\n         * @param name -\r\n         */\r\n        CoreRestClient.prototype.getConnectedServiceDetails = function (projectId, name) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/connectedServices/{name}\",\r\n                            routeValues: {\r\n                                projectId: projectId,\r\n                                name: name\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param projectId -\r\n         * @param kind -\r\n         */\r\n        CoreRestClient.prototype.getConnectedServices = function (projectId, kind) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        kind: kind\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/connectedServices/{name}\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param mruData -\r\n         * @param mruName -\r\n         */\r\n        CoreRestClient.prototype.createIdentityMru = function (mruData, mruName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/core/identityMru/{mruName}\",\r\n                            routeValues: {\r\n                                mruName: mruName\r\n                            },\r\n                            body: mruData\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param mruData -\r\n         * @param mruName -\r\n         */\r\n        CoreRestClient.prototype.deleteIdentityMru = function (mruData, mruName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"_apis/core/identityMru/{mruName}\",\r\n                            routeValues: {\r\n                                mruName: mruName\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param mruName -\r\n         */\r\n        CoreRestClient.prototype.getIdentityMru = function (mruName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/core/identityMru/{mruName}\",\r\n                            routeValues: {\r\n                                mruName: mruName\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param mruData -\r\n         * @param mruName -\r\n         */\r\n        CoreRestClient.prototype.updateIdentityMru = function (mruData, mruName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"_apis/core/identityMru/{mruName}\",\r\n                            routeValues: {\r\n                                mruName: mruName\r\n                            },\r\n                            body: mruData\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a list of members for a specific team.\r\n         *\r\n         * @param projectId - The name or ID (GUID) of the team project the team belongs to.\r\n         * @param teamId - The name or ID (GUID) of the team .\r\n         * @param top -\r\n         * @param skip -\r\n         */\r\n        CoreRestClient.prototype.getTeamMembersWithExtendedProperties = function (projectId, teamId, top, skip) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$top': top,\r\n                        '$skip': skip\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/teams/{teamId}/members\",\r\n                            routeValues: {\r\n                                projectId: projectId,\r\n                                teamId: teamId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a process by ID.\r\n         *\r\n         * @param processId - ID for a process.\r\n         */\r\n        CoreRestClient.prototype.getProcessById = function (processId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/process/processes/{*processId}\",\r\n                            routeValues: {\r\n                                processId: processId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a list of processes.\r\n         *\r\n         */\r\n        CoreRestClient.prototype.getProcesses = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/process/processes/{*processId}\"\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get project collection with the specified id or name.\r\n         *\r\n         * @param collectionId -\r\n         */\r\n        CoreRestClient.prototype.getProjectCollection = function (collectionId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"_apis/projectCollections/{collectionId}\",\r\n                            routeValues: {\r\n                                collectionId: collectionId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get project collection references for this application.\r\n         *\r\n         * @param top -\r\n         * @param skip -\r\n         */\r\n        CoreRestClient.prototype.getProjectCollections = function (top, skip) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$top': top,\r\n                        '$skip': skip\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"_apis/projectCollections/{collectionId}\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the history of changes to the project.\r\n         *\r\n         * @param minRevision - The minimum revision number to return in the history.\r\n         */\r\n        CoreRestClient.prototype.getProjectHistoryEntries = function (minRevision) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        minRevision: minRevision\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"_apis/projectHistory\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get project with the specified id or name, optionally including capabilities.\r\n         *\r\n         * @param projectId -\r\n         * @param includeCapabilities - Include capabilities (such as source control) in the team project result (default: false).\r\n         * @param includeHistory - Search within renamed projects (that had such name in the past).\r\n         */\r\n        CoreRestClient.prototype.getProject = function (projectId, includeCapabilities, includeHistory) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeCapabilities: includeCapabilities,\r\n                        includeHistory: includeHistory\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.4\",\r\n                            routeTemplate: \"_apis/projects/{*projectId}\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get all projects in the organization that the authenticated user has access to.\r\n         *\r\n         * @param stateFilter - Filter on team projects in a specific team project state (default: WellFormed).\r\n         * @param top -\r\n         * @param skip -\r\n         * @param continuationToken - Pointer that shows how many projects already been fetched.\r\n         * @param getDefaultTeamImageUrl -\r\n         */\r\n        CoreRestClient.prototype.getProjects = function (stateFilter, top, skip, continuationToken, getDefaultTeamImageUrl) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        stateFilter: stateFilter,\r\n                        '$top': top,\r\n                        '$skip': skip,\r\n                        continuationToken: continuationToken,\r\n                        getDefaultTeamImageUrl: getDefaultTeamImageUrl\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.4\",\r\n                            routeTemplate: \"_apis/projects/{*projectId}\",\r\n                            queryParams: queryValues,\r\n                            returnRawResponse: true\r\n                        }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {\r\n                            var body;\r\n                            return __generator(this, function (_a) {\r\n                                switch (_a.label) {\r\n                                    case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];\r\n                                    case 1:\r\n                                        body = _a.sent();\r\n                                        body.continuationToken = response.headers.get(\"x-ms-continuationtoken\");\r\n                                        return [2 /*return*/, body];\r\n                                }\r\n                            });\r\n                        }); })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status.\r\n         *\r\n         * @param projectToCreate - The project to create.\r\n         */\r\n        CoreRestClient.prototype.queueCreateProject = function (projectToCreate) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.4\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/projects/{*projectId}\",\r\n                            body: projectToCreate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.\r\n         *\r\n         * @param projectId - The project id of the project to delete.\r\n         */\r\n        CoreRestClient.prototype.queueDeleteProject = function (projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.4\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"_apis/projects/{*projectId}\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update an existing project's name, abbreviation, description, or restore a project.\r\n         *\r\n         * @param projectUpdate - The updates for the project. The state must be set to wellFormed to restore the project.\r\n         * @param projectId - The project id of the project to update.\r\n         */\r\n        CoreRestClient.prototype.updateProject = function (projectUpdate, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.4\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"_apis/projects/{*projectId}\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            body: projectUpdate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a collection of team project properties for multiple projects.\r\n         *\r\n         * @param projectIds - A comma-delimited string of team project IDs\r\n         * @param properties -\r\n         */\r\n        CoreRestClient.prototype.getProjectsProperties = function (projectIds, properties) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectIds: projectIds && projectIds.join(\",\"),\r\n                        properties: properties && properties.join(\",\")\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/projectsproperties\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a collection of team project properties.\r\n         *\r\n         * @param projectId - The team project ID.\r\n         * @param keys - A comma-delimited string of team project property names. Wildcard characters (\"?\" and \"*\") are supported. If no key is specified, all properties will be returned.\r\n         */\r\n        CoreRestClient.prototype.getProjectProperties = function (projectId, keys) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        keys: keys && keys.join(\",\")\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/properties\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create, update, and delete team project properties.\r\n         *\r\n         * @param projectId - The team project ID.\r\n         * @param patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name.\r\n         */\r\n        CoreRestClient.prototype.setProjectProperties = function (projectId, patchDocument) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/properties\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/json-patch+json\",\r\n                            },\r\n                            body: patchDocument\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param proxy -\r\n         */\r\n        CoreRestClient.prototype.createOrUpdateProxy = function (proxy) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"PUT\",\r\n                            routeTemplate: \"_apis/proxies\",\r\n                            body: proxy\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param proxyUrl -\r\n         * @param site -\r\n         */\r\n        CoreRestClient.prototype.deleteProxy = function (proxyUrl, site) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        proxyUrl: proxyUrl,\r\n                        site: site\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"_apis/proxies\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param proxyUrl -\r\n         */\r\n        CoreRestClient.prototype.getProxies = function (proxyUrl) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        proxyUrl: proxyUrl\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"_apis/proxies\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a list of all teams.\r\n         *\r\n         * @param mine - If true, then return all teams requesting user is member. Otherwise return all teams user has read access.\r\n         * @param top - Maximum number of teams to return.\r\n         * @param skip - Number of teams to skip.\r\n         * @param expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.\r\n         */\r\n        CoreRestClient.prototype.getAllTeams = function (mine, top, skip, expandIdentity) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$mine': mine,\r\n                        '$top': top,\r\n                        '$skip': skip,\r\n                        '$expandIdentity': expandIdentity\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            routeTemplate: \"_apis/teams\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a team in a team project.\r\n         *\r\n         * @param team - The team data used to create the team.\r\n         * @param projectId - The name or ID (GUID) of the team project in which to create the team.\r\n         */\r\n        CoreRestClient.prototype.createTeam = function (team, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/teams/{*teamId}\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            body: team\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete a team.\r\n         *\r\n         * @param projectId - The name or ID (GUID) of the team project containing the team to delete.\r\n         * @param teamId - The name or ID of the team to delete.\r\n         */\r\n        CoreRestClient.prototype.deleteTeam = function (projectId, teamId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/teams/{*teamId}\",\r\n                            routeValues: {\r\n                                projectId: projectId,\r\n                                teamId: teamId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a specific team.\r\n         *\r\n         * @param projectId - The name or ID (GUID) of the team project containing the team.\r\n         * @param teamId - The name or ID (GUID) of the team.\r\n         * @param expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.\r\n         */\r\n        CoreRestClient.prototype.getTeam = function (projectId, teamId, expandIdentity) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expandIdentity': expandIdentity\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/teams/{*teamId}\",\r\n                            routeValues: {\r\n                                projectId: projectId,\r\n                                teamId: teamId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a list of teams.\r\n         *\r\n         * @param projectId -\r\n         * @param mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access.\r\n         * @param top - Maximum number of teams to return.\r\n         * @param skip - Number of teams to skip.\r\n         * @param expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.\r\n         */\r\n        CoreRestClient.prototype.getTeams = function (projectId, mine, top, skip, expandIdentity) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$mine': mine,\r\n                        '$top': top,\r\n                        '$skip': skip,\r\n                        '$expandIdentity': expandIdentity\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/teams/{*teamId}\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update a team's name and/or description.\r\n         *\r\n         * @param teamData -\r\n         * @param projectId - The name or ID (GUID) of the team project containing the team to update.\r\n         * @param teamId - The name of ID of the team to update.\r\n         */\r\n        CoreRestClient.prototype.updateTeam = function (teamData, projectId, teamId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"_apis/projects/{projectId}/teams/{*teamId}\",\r\n                            routeValues: {\r\n                                projectId: projectId,\r\n                                teamId: teamId\r\n                            },\r\n                            body: teamData\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        CoreRestClient.RESOURCE_AREA_ID = \"79134c72-4a58-4b42-976c-04e7115f32bf\";\r\n        return CoreRestClient;\r\n    }(RestClientBase_1.RestClientBase));\r\n    exports.CoreRestClient = CoreRestClient;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Core/CoreClient.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Core/index.js":
/*!***************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Core/index.js ***!
  \***************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./Core */ \"./node_modules/azure-devops-extension-api/Core/Core.js\"), __webpack_require__(/*! ./CoreClient */ \"./node_modules/azure-devops-extension-api/Core/CoreClient.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, Core_1, CoreClient_1) {\r\n    \"use strict\";\r\n    function __export(m) {\r\n        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n    }\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    __export(Core_1);\r\n    __export(CoreClient_1);\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Core/index.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Git/CodeEditorTypes.js":
/*!************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Git/CodeEditorTypes.js ***!
  \************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * Describes what to do with the indentation when pressing Enter.\r\n     */\r\n    var IndentAction;\r\n    (function (IndentAction) {\r\n        /**\r\n         * Insert new line and copy the previous line's indentation.\r\n         */\r\n        IndentAction[IndentAction[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Insert new line and indent once (relative to the previous line's indentation).\r\n         */\r\n        IndentAction[IndentAction[\"Indent\"] = 1] = \"Indent\";\r\n        /**\r\n         * Insert two new lines:\r\n         *  - the first one indented which will hold the cursor\r\n         *  - the second one at the same indentation level\r\n         */\r\n        IndentAction[IndentAction[\"IndentOutdent\"] = 2] = \"IndentOutdent\";\r\n        /**\r\n         * Insert new line and outdent once (relative to the previous line's indentation).\r\n         */\r\n        IndentAction[IndentAction[\"Outdent\"] = 3] = \"Outdent\";\r\n    })(IndentAction = exports.IndentAction || (exports.IndentAction = {}));\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Git/CodeEditorTypes.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Git/Git.js":
/*!************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Git/Git.js ***!
  \************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * The status of a comment thread.\r\n     */\r\n    var CommentThreadStatus;\r\n    (function (CommentThreadStatus) {\r\n        /**\r\n         * The thread status is unknown.\r\n         */\r\n        CommentThreadStatus[CommentThreadStatus[\"Unknown\"] = 0] = \"Unknown\";\r\n        /**\r\n         * The thread status is active.\r\n         */\r\n        CommentThreadStatus[CommentThreadStatus[\"Active\"] = 1] = \"Active\";\r\n        /**\r\n         * The thread status is resolved as fixed.\r\n         */\r\n        CommentThreadStatus[CommentThreadStatus[\"Fixed\"] = 2] = \"Fixed\";\r\n        /**\r\n         * The thread status is resolved as won't fix.\r\n         */\r\n        CommentThreadStatus[CommentThreadStatus[\"WontFix\"] = 3] = \"WontFix\";\r\n        /**\r\n         * The thread status is closed.\r\n         */\r\n        CommentThreadStatus[CommentThreadStatus[\"Closed\"] = 4] = \"Closed\";\r\n        /**\r\n         * The thread status is resolved as by design.\r\n         */\r\n        CommentThreadStatus[CommentThreadStatus[\"ByDesign\"] = 5] = \"ByDesign\";\r\n        /**\r\n         * The thread status is pending.\r\n         */\r\n        CommentThreadStatus[CommentThreadStatus[\"Pending\"] = 6] = \"Pending\";\r\n    })(CommentThreadStatus = exports.CommentThreadStatus || (exports.CommentThreadStatus = {}));\r\n    /**\r\n     * The type of a comment.\r\n     */\r\n    var CommentType;\r\n    (function (CommentType) {\r\n        /**\r\n         * The comment type is not known.\r\n         */\r\n        CommentType[CommentType[\"Unknown\"] = 0] = \"Unknown\";\r\n        /**\r\n         * This is a regular user comment.\r\n         */\r\n        CommentType[CommentType[\"Text\"] = 1] = \"Text\";\r\n        /**\r\n         * The comment comes as a result of a code change.\r\n         */\r\n        CommentType[CommentType[\"CodeChange\"] = 2] = \"CodeChange\";\r\n        /**\r\n         * The comment represents a system message.\r\n         */\r\n        CommentType[CommentType[\"System\"] = 3] = \"System\";\r\n    })(CommentType = exports.CommentType || (exports.CommentType = {}));\r\n    /**\r\n     * Current status of the asynchronous operation.\r\n     */\r\n    var GitAsyncOperationStatus;\r\n    (function (GitAsyncOperationStatus) {\r\n        /**\r\n         * The operation is waiting in a queue and has not yet started.\r\n         */\r\n        GitAsyncOperationStatus[GitAsyncOperationStatus[\"Queued\"] = 1] = \"Queued\";\r\n        /**\r\n         * The operation is currently in progress.\r\n         */\r\n        GitAsyncOperationStatus[GitAsyncOperationStatus[\"InProgress\"] = 2] = \"InProgress\";\r\n        /**\r\n         * The operation has completed.\r\n         */\r\n        GitAsyncOperationStatus[GitAsyncOperationStatus[\"Completed\"] = 3] = \"Completed\";\r\n        /**\r\n         * The operation has failed. Check for an error message.\r\n         */\r\n        GitAsyncOperationStatus[GitAsyncOperationStatus[\"Failed\"] = 4] = \"Failed\";\r\n        /**\r\n         * The operation has been abandoned.\r\n         */\r\n        GitAsyncOperationStatus[GitAsyncOperationStatus[\"Abandoned\"] = 5] = \"Abandoned\";\r\n    })(GitAsyncOperationStatus = exports.GitAsyncOperationStatus || (exports.GitAsyncOperationStatus = {}));\r\n    var GitAsyncRefOperationFailureStatus;\r\n    (function (GitAsyncRefOperationFailureStatus) {\r\n        /**\r\n         * No status\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid.\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"InvalidRefName\"] = 1] = \"InvalidRefName\";\r\n        /**\r\n         * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name.\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"RefNameConflict\"] = 2] = \"RefNameConflict\";\r\n        /**\r\n         * The ref update request could not be completed because the user lacks the permission to create a branch\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"CreateBranchPermissionRequired\"] = 3] = \"CreateBranchPermissionRequired\";\r\n        /**\r\n         * The ref update request could not be completed because the user lacks write permissions required to write this ref\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"WritePermissionRequired\"] = 4] = \"WritePermissionRequired\";\r\n        /**\r\n         * Target branch was deleted after Git async operation started\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"TargetBranchDeleted\"] = 5] = \"TargetBranchDeleted\";\r\n        /**\r\n         * Git object is too large to materialize into memory\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"GitObjectTooLarge\"] = 6] = \"GitObjectTooLarge\";\r\n        /**\r\n         * Identity who authorized the operation was not found\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"OperationIndentityNotFound\"] = 7] = \"OperationIndentityNotFound\";\r\n        /**\r\n         * Async operation was not found\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"AsyncOperationNotFound\"] = 8] = \"AsyncOperationNotFound\";\r\n        /**\r\n         * Unexpected failure\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"Other\"] = 9] = \"Other\";\r\n        /**\r\n         * Initiator of async operation has signature with empty name or email\r\n         */\r\n        GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus[\"EmptyCommitterSignature\"] = 10] = \"EmptyCommitterSignature\";\r\n    })(GitAsyncRefOperationFailureStatus = exports.GitAsyncRefOperationFailureStatus || (exports.GitAsyncRefOperationFailureStatus = {}));\r\n    /**\r\n     * The type of a merge conflict.\r\n     */\r\n    var GitConflictType;\r\n    (function (GitConflictType) {\r\n        /**\r\n         * No conflict\r\n         */\r\n        GitConflictType[GitConflictType[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Added on source and target; content differs\r\n         */\r\n        GitConflictType[GitConflictType[\"AddAdd\"] = 1] = \"AddAdd\";\r\n        /**\r\n         * Added on source and rename destination on target\r\n         */\r\n        GitConflictType[GitConflictType[\"AddRename\"] = 2] = \"AddRename\";\r\n        /**\r\n         * Deleted on source and edited on target\r\n         */\r\n        GitConflictType[GitConflictType[\"DeleteEdit\"] = 3] = \"DeleteEdit\";\r\n        /**\r\n         * Deleted on source and renamed on target\r\n         */\r\n        GitConflictType[GitConflictType[\"DeleteRename\"] = 4] = \"DeleteRename\";\r\n        /**\r\n         * Path is a directory on source and a file on target\r\n         */\r\n        GitConflictType[GitConflictType[\"DirectoryFile\"] = 5] = \"DirectoryFile\";\r\n        /**\r\n         * Children of directory which has DirectoryFile or FileDirectory conflict\r\n         */\r\n        GitConflictType[GitConflictType[\"DirectoryChild\"] = 6] = \"DirectoryChild\";\r\n        /**\r\n         * Edited on source and deleted on target\r\n         */\r\n        GitConflictType[GitConflictType[\"EditDelete\"] = 7] = \"EditDelete\";\r\n        /**\r\n         * Edited on source and target; content differs\r\n         */\r\n        GitConflictType[GitConflictType[\"EditEdit\"] = 8] = \"EditEdit\";\r\n        /**\r\n         * Path is a file on source and a directory on target\r\n         */\r\n        GitConflictType[GitConflictType[\"FileDirectory\"] = 9] = \"FileDirectory\";\r\n        /**\r\n         * Same file renamed on both source and target; destination paths differ\r\n         */\r\n        GitConflictType[GitConflictType[\"Rename1to2\"] = 10] = \"Rename1to2\";\r\n        /**\r\n         * Different files renamed to same destination path on both source and target\r\n         */\r\n        GitConflictType[GitConflictType[\"Rename2to1\"] = 11] = \"Rename2to1\";\r\n        /**\r\n         * Rename destination on source and new file on target\r\n         */\r\n        GitConflictType[GitConflictType[\"RenameAdd\"] = 12] = \"RenameAdd\";\r\n        /**\r\n         * Renamed on source and deleted on target\r\n         */\r\n        GitConflictType[GitConflictType[\"RenameDelete\"] = 13] = \"RenameDelete\";\r\n        /**\r\n         * Rename destination on both source and target; content differs\r\n         */\r\n        GitConflictType[GitConflictType[\"RenameRename\"] = 14] = \"RenameRename\";\r\n    })(GitConflictType = exports.GitConflictType || (exports.GitConflictType = {}));\r\n    /**\r\n     * Represents the possible outcomes from a request to update a pull request conflict\r\n     */\r\n    var GitConflictUpdateStatus;\r\n    (function (GitConflictUpdateStatus) {\r\n        /**\r\n         * Indicates that pull request conflict update request was completed successfully\r\n         */\r\n        GitConflictUpdateStatus[GitConflictUpdateStatus[\"Succeeded\"] = 0] = \"Succeeded\";\r\n        /**\r\n         * Indicates that the update request did not fit the expected data contract\r\n         */\r\n        GitConflictUpdateStatus[GitConflictUpdateStatus[\"BadRequest\"] = 1] = \"BadRequest\";\r\n        /**\r\n         * Indicates that the requested resolution was not valid\r\n         */\r\n        GitConflictUpdateStatus[GitConflictUpdateStatus[\"InvalidResolution\"] = 2] = \"InvalidResolution\";\r\n        /**\r\n         * Indicates that the conflict in the update request was not a supported conflict type\r\n         */\r\n        GitConflictUpdateStatus[GitConflictUpdateStatus[\"UnsupportedConflictType\"] = 3] = \"UnsupportedConflictType\";\r\n        /**\r\n         * Indicates that the conflict could not be found\r\n         */\r\n        GitConflictUpdateStatus[GitConflictUpdateStatus[\"NotFound\"] = 4] = \"NotFound\";\r\n    })(GitConflictUpdateStatus = exports.GitConflictUpdateStatus || (exports.GitConflictUpdateStatus = {}));\r\n    /**\r\n     * Accepted types of version\r\n     */\r\n    var GitHistoryMode;\r\n    (function (GitHistoryMode) {\r\n        /**\r\n         * The history mode used by \\`git log\\`. This is the default.\r\n         */\r\n        GitHistoryMode[GitHistoryMode[\"SimplifiedHistory\"] = 0] = \"SimplifiedHistory\";\r\n        /**\r\n         * The history mode used by \\`git log --first-parent\\`\r\n         */\r\n        GitHistoryMode[GitHistoryMode[\"FirstParent\"] = 1] = \"FirstParent\";\r\n        /**\r\n         * The history mode used by \\`git log --full-history\\`\r\n         */\r\n        GitHistoryMode[GitHistoryMode[\"FullHistory\"] = 2] = \"FullHistory\";\r\n        /**\r\n         * The history mode used by \\`git log --full-history --simplify-merges\\`\r\n         */\r\n        GitHistoryMode[GitHistoryMode[\"FullHistorySimplifyMerges\"] = 3] = \"FullHistorySimplifyMerges\";\r\n    })(GitHistoryMode = exports.GitHistoryMode || (exports.GitHistoryMode = {}));\r\n    var GitObjectType;\r\n    (function (GitObjectType) {\r\n        GitObjectType[GitObjectType[\"Bad\"] = 0] = \"Bad\";\r\n        GitObjectType[GitObjectType[\"Commit\"] = 1] = \"Commit\";\r\n        GitObjectType[GitObjectType[\"Tree\"] = 2] = \"Tree\";\r\n        GitObjectType[GitObjectType[\"Blob\"] = 3] = \"Blob\";\r\n        GitObjectType[GitObjectType[\"Tag\"] = 4] = \"Tag\";\r\n        GitObjectType[GitObjectType[\"Ext2\"] = 5] = \"Ext2\";\r\n        GitObjectType[GitObjectType[\"OfsDelta\"] = 6] = \"OfsDelta\";\r\n        GitObjectType[GitObjectType[\"RefDelta\"] = 7] = \"RefDelta\";\r\n    })(GitObjectType = exports.GitObjectType || (exports.GitObjectType = {}));\r\n    var GitPathActions;\r\n    (function (GitPathActions) {\r\n        GitPathActions[GitPathActions[\"None\"] = 0] = \"None\";\r\n        GitPathActions[GitPathActions[\"Edit\"] = 1] = \"Edit\";\r\n        GitPathActions[GitPathActions[\"Delete\"] = 2] = \"Delete\";\r\n        GitPathActions[GitPathActions[\"Add\"] = 3] = \"Add\";\r\n        GitPathActions[GitPathActions[\"Rename\"] = 4] = \"Rename\";\r\n    })(GitPathActions = exports.GitPathActions || (exports.GitPathActions = {}));\r\n    /**\r\n     * Enumeration of possible merge strategies which can be used to complete a pull request.\r\n     */\r\n    var GitPullRequestMergeStrategy;\r\n    (function (GitPullRequestMergeStrategy) {\r\n        /**\r\n         * A two-parent, no-fast-forward merge. The source branch is unchanged. This is the default behavior.\r\n         */\r\n        GitPullRequestMergeStrategy[GitPullRequestMergeStrategy[\"NoFastForward\"] = 1] = \"NoFastForward\";\r\n        /**\r\n         * Put all changes from the pull request into a single-parent commit.\r\n         */\r\n        GitPullRequestMergeStrategy[GitPullRequestMergeStrategy[\"Squash\"] = 2] = \"Squash\";\r\n        /**\r\n         * Rebase the source branch on top of the target branch HEAD commit, and fast-forward the target branch. The source branch is updated during the rebase operation.\r\n         */\r\n        GitPullRequestMergeStrategy[GitPullRequestMergeStrategy[\"Rebase\"] = 3] = \"Rebase\";\r\n        /**\r\n         * Rebase the source branch on top of the target branch HEAD commit, and create a two-parent, no-fast-forward merge. The source branch is updated during the rebase operation.\r\n         */\r\n        GitPullRequestMergeStrategy[GitPullRequestMergeStrategy[\"RebaseMerge\"] = 4] = \"RebaseMerge\";\r\n    })(GitPullRequestMergeStrategy = exports.GitPullRequestMergeStrategy || (exports.GitPullRequestMergeStrategy = {}));\r\n    /**\r\n     * Options for including additional elements in the pull request query response.\r\n     */\r\n    var GitPullRequestQueryIncludeOptions;\r\n    (function (GitPullRequestQueryIncludeOptions) {\r\n        /**\r\n         * No additional elements included.\r\n         */\r\n        GitPullRequestQueryIncludeOptions[GitPullRequestQueryIncludeOptions[\"NotSet\"] = 0] = \"NotSet\";\r\n        /**\r\n         * Enforces adding associated labels to the response.\r\n         */\r\n        GitPullRequestQueryIncludeOptions[GitPullRequestQueryIncludeOptions[\"Labels\"] = 1] = \"Labels\";\r\n    })(GitPullRequestQueryIncludeOptions = exports.GitPullRequestQueryIncludeOptions || (exports.GitPullRequestQueryIncludeOptions = {}));\r\n    /**\r\n     * Accepted types of pull request queries.\r\n     */\r\n    var GitPullRequestQueryType;\r\n    (function (GitPullRequestQueryType) {\r\n        /**\r\n         * No query type set.\r\n         */\r\n        GitPullRequestQueryType[GitPullRequestQueryType[\"NotSet\"] = 0] = \"NotSet\";\r\n        /**\r\n         * Search for pull requests that created the supplied merge commits.\r\n         */\r\n        GitPullRequestQueryType[GitPullRequestQueryType[\"LastMergeCommit\"] = 1] = \"LastMergeCommit\";\r\n        /**\r\n         * Search for pull requests that merged the supplied commits.\r\n         */\r\n        GitPullRequestQueryType[GitPullRequestQueryType[\"Commit\"] = 2] = \"Commit\";\r\n    })(GitPullRequestQueryType = exports.GitPullRequestQueryType || (exports.GitPullRequestQueryType = {}));\r\n    var GitPullRequestReviewFileType;\r\n    (function (GitPullRequestReviewFileType) {\r\n        GitPullRequestReviewFileType[GitPullRequestReviewFileType[\"ChangeEntry\"] = 0] = \"ChangeEntry\";\r\n        GitPullRequestReviewFileType[GitPullRequestReviewFileType[\"Attachment\"] = 1] = \"Attachment\";\r\n    })(GitPullRequestReviewFileType = exports.GitPullRequestReviewFileType || (exports.GitPullRequestReviewFileType = {}));\r\n    /**\r\n     * Search type on ref name\r\n     */\r\n    var GitRefSearchType;\r\n    (function (GitRefSearchType) {\r\n        GitRefSearchType[GitRefSearchType[\"Exact\"] = 0] = \"Exact\";\r\n        GitRefSearchType[GitRefSearchType[\"StartsWith\"] = 1] = \"StartsWith\";\r\n        GitRefSearchType[GitRefSearchType[\"Contains\"] = 2] = \"Contains\";\r\n    })(GitRefSearchType = exports.GitRefSearchType || (exports.GitRefSearchType = {}));\r\n    /**\r\n     * Enumerates the modes under which ref updates can be written to their repositories.\r\n     */\r\n    var GitRefUpdateMode;\r\n    (function (GitRefUpdateMode) {\r\n        /**\r\n         * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding.\r\n         */\r\n        GitRefUpdateMode[GitRefUpdateMode[\"BestEffort\"] = 0] = \"BestEffort\";\r\n        /**\r\n         * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail.\r\n         */\r\n        GitRefUpdateMode[GitRefUpdateMode[\"AllOrNone\"] = 1] = \"AllOrNone\";\r\n    })(GitRefUpdateMode = exports.GitRefUpdateMode || (exports.GitRefUpdateMode = {}));\r\n    /**\r\n     * Represents the possible outcomes from a request to update a ref in a repository.\r\n     */\r\n    var GitRefUpdateStatus;\r\n    (function (GitRefUpdateStatus) {\r\n        /**\r\n         * Indicates that the ref update request was completed successfully.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"Succeeded\"] = 0] = \"Succeeded\";\r\n        /**\r\n         * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"ForcePushRequired\"] = 1] = \"ForcePushRequired\";\r\n        /**\r\n         * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"StaleOldObjectId\"] = 2] = \"StaleOldObjectId\";\r\n        /**\r\n         * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"InvalidRefName\"] = 3] = \"InvalidRefName\";\r\n        /**\r\n         * The request was not processed\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"Unprocessed\"] = 4] = \"Unprocessed\";\r\n        /**\r\n         * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags)\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"UnresolvableToCommit\"] = 5] = \"UnresolvableToCommit\";\r\n        /**\r\n         * The ref update request could not be completed because the user lacks write permissions required to write this ref\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"WritePermissionRequired\"] = 6] = \"WritePermissionRequired\";\r\n        /**\r\n         * The ref update request could not be completed because the user lacks note creation permissions required to write this note\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"ManageNotePermissionRequired\"] = 7] = \"ManageNotePermissionRequired\";\r\n        /**\r\n         * The ref update request could not be completed because the user lacks the permission to create a branch\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"CreateBranchPermissionRequired\"] = 8] = \"CreateBranchPermissionRequired\";\r\n        /**\r\n         * The ref update request could not be completed because the user lacks the permission to create a tag\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"CreateTagPermissionRequired\"] = 9] = \"CreateTagPermissionRequired\";\r\n        /**\r\n         * The ref update could not be completed because it was rejected by the plugin.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"RejectedByPlugin\"] = 10] = \"RejectedByPlugin\";\r\n        /**\r\n         * The ref update could not be completed because the ref is locked by another user.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"Locked\"] = 11] = \"Locked\";\r\n        /**\r\n         * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"RefNameConflict\"] = 12] = \"RefNameConflict\";\r\n        /**\r\n         * The ref update could not be completed because it was rejected by policy.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"RejectedByPolicy\"] = 13] = \"RejectedByPolicy\";\r\n        /**\r\n         * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made.  This should only happen during deletes.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"SucceededNonExistentRef\"] = 14] = \"SucceededNonExistentRef\";\r\n        /**\r\n         * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad.  This should only happen during deletes.\r\n         */\r\n        GitRefUpdateStatus[GitRefUpdateStatus[\"SucceededCorruptRef\"] = 15] = \"SucceededCorruptRef\";\r\n    })(GitRefUpdateStatus = exports.GitRefUpdateStatus || (exports.GitRefUpdateStatus = {}));\r\n    /**\r\n     * The type of a merge conflict.\r\n     */\r\n    var GitResolutionError;\r\n    (function (GitResolutionError) {\r\n        /**\r\n         * No error\r\n         */\r\n        GitResolutionError[GitResolutionError[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * User set a blob id for resolving a content merge, but blob was not found in repo during application\r\n         */\r\n        GitResolutionError[GitResolutionError[\"MergeContentNotFound\"] = 1] = \"MergeContentNotFound\";\r\n        /**\r\n         * Attempted to resolve a conflict by moving a file to another path, but path was already in use\r\n         */\r\n        GitResolutionError[GitResolutionError[\"PathInUse\"] = 2] = \"PathInUse\";\r\n        /**\r\n         * No error\r\n         */\r\n        GitResolutionError[GitResolutionError[\"InvalidPath\"] = 3] = \"InvalidPath\";\r\n        /**\r\n         * GitResolutionAction was set to an unrecognized value\r\n         */\r\n        GitResolutionError[GitResolutionError[\"UnknownAction\"] = 4] = \"UnknownAction\";\r\n        /**\r\n         * GitResolutionMergeType was set to an unrecognized value\r\n         */\r\n        GitResolutionError[GitResolutionError[\"UnknownMergeType\"] = 5] = \"UnknownMergeType\";\r\n        /**\r\n         * Any error for which a more specific code doesn't apply\r\n         */\r\n        GitResolutionError[GitResolutionError[\"OtherError\"] = 255] = \"OtherError\";\r\n    })(GitResolutionError = exports.GitResolutionError || (exports.GitResolutionError = {}));\r\n    var GitResolutionMergeType;\r\n    (function (GitResolutionMergeType) {\r\n        GitResolutionMergeType[GitResolutionMergeType[\"Undecided\"] = 0] = \"Undecided\";\r\n        GitResolutionMergeType[GitResolutionMergeType[\"TakeSourceContent\"] = 1] = \"TakeSourceContent\";\r\n        GitResolutionMergeType[GitResolutionMergeType[\"TakeTargetContent\"] = 2] = \"TakeTargetContent\";\r\n        GitResolutionMergeType[GitResolutionMergeType[\"AutoMerged\"] = 3] = \"AutoMerged\";\r\n        GitResolutionMergeType[GitResolutionMergeType[\"UserMerged\"] = 4] = \"UserMerged\";\r\n    })(GitResolutionMergeType = exports.GitResolutionMergeType || (exports.GitResolutionMergeType = {}));\r\n    var GitResolutionPathConflictAction;\r\n    (function (GitResolutionPathConflictAction) {\r\n        GitResolutionPathConflictAction[GitResolutionPathConflictAction[\"Undecided\"] = 0] = \"Undecided\";\r\n        GitResolutionPathConflictAction[GitResolutionPathConflictAction[\"KeepSourceRenameTarget\"] = 1] = \"KeepSourceRenameTarget\";\r\n        GitResolutionPathConflictAction[GitResolutionPathConflictAction[\"KeepSourceDeleteTarget\"] = 2] = \"KeepSourceDeleteTarget\";\r\n        GitResolutionPathConflictAction[GitResolutionPathConflictAction[\"KeepTargetRenameSource\"] = 3] = \"KeepTargetRenameSource\";\r\n        GitResolutionPathConflictAction[GitResolutionPathConflictAction[\"KeepTargetDeleteSource\"] = 4] = \"KeepTargetDeleteSource\";\r\n    })(GitResolutionPathConflictAction = exports.GitResolutionPathConflictAction || (exports.GitResolutionPathConflictAction = {}));\r\n    var GitResolutionRename1to2Action;\r\n    (function (GitResolutionRename1to2Action) {\r\n        GitResolutionRename1to2Action[GitResolutionRename1to2Action[\"Undecided\"] = 0] = \"Undecided\";\r\n        GitResolutionRename1to2Action[GitResolutionRename1to2Action[\"KeepSourcePath\"] = 1] = \"KeepSourcePath\";\r\n        GitResolutionRename1to2Action[GitResolutionRename1to2Action[\"KeepTargetPath\"] = 2] = \"KeepTargetPath\";\r\n        GitResolutionRename1to2Action[GitResolutionRename1to2Action[\"KeepBothFiles\"] = 3] = \"KeepBothFiles\";\r\n    })(GitResolutionRename1to2Action = exports.GitResolutionRename1to2Action || (exports.GitResolutionRename1to2Action = {}));\r\n    /**\r\n     * Resolution status of a conflict.\r\n     */\r\n    var GitResolutionStatus;\r\n    (function (GitResolutionStatus) {\r\n        GitResolutionStatus[GitResolutionStatus[\"Unresolved\"] = 0] = \"Unresolved\";\r\n        GitResolutionStatus[GitResolutionStatus[\"PartiallyResolved\"] = 1] = \"PartiallyResolved\";\r\n        GitResolutionStatus[GitResolutionStatus[\"Resolved\"] = 2] = \"Resolved\";\r\n    })(GitResolutionStatus = exports.GitResolutionStatus || (exports.GitResolutionStatus = {}));\r\n    var GitResolutionWhichAction;\r\n    (function (GitResolutionWhichAction) {\r\n        GitResolutionWhichAction[GitResolutionWhichAction[\"Undecided\"] = 0] = \"Undecided\";\r\n        GitResolutionWhichAction[GitResolutionWhichAction[\"PickSourceAction\"] = 1] = \"PickSourceAction\";\r\n        GitResolutionWhichAction[GitResolutionWhichAction[\"PickTargetAction\"] = 2] = \"PickTargetAction\";\r\n    })(GitResolutionWhichAction = exports.GitResolutionWhichAction || (exports.GitResolutionWhichAction = {}));\r\n    /**\r\n     * State of the status.\r\n     */\r\n    var GitStatusState;\r\n    (function (GitStatusState) {\r\n        /**\r\n         * Status state not set. Default state.\r\n         */\r\n        GitStatusState[GitStatusState[\"NotSet\"] = 0] = \"NotSet\";\r\n        /**\r\n         * Status pending.\r\n         */\r\n        GitStatusState[GitStatusState[\"Pending\"] = 1] = \"Pending\";\r\n        /**\r\n         * Status succeeded.\r\n         */\r\n        GitStatusState[GitStatusState[\"Succeeded\"] = 2] = \"Succeeded\";\r\n        /**\r\n         * Status failed.\r\n         */\r\n        GitStatusState[GitStatusState[\"Failed\"] = 3] = \"Failed\";\r\n        /**\r\n         * Status with an error.\r\n         */\r\n        GitStatusState[GitStatusState[\"Error\"] = 4] = \"Error\";\r\n        /**\r\n         * Status is not applicable to the target object.\r\n         */\r\n        GitStatusState[GitStatusState[\"NotApplicable\"] = 5] = \"NotApplicable\";\r\n        /**\r\n         * Status Partially Succeeded, build finished with warnings.\r\n         */\r\n        GitStatusState[GitStatusState[\"PartiallySucceeded\"] = 6] = \"PartiallySucceeded\";\r\n    })(GitStatusState = exports.GitStatusState || (exports.GitStatusState = {}));\r\n    /**\r\n     * Accepted types of version options\r\n     */\r\n    var GitVersionOptions;\r\n    (function (GitVersionOptions) {\r\n        /**\r\n         * Not specified\r\n         */\r\n        GitVersionOptions[GitVersionOptions[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Commit that changed item prior to the current version\r\n         */\r\n        GitVersionOptions[GitVersionOptions[\"PreviousChange\"] = 1] = \"PreviousChange\";\r\n        /**\r\n         * First parent of commit (HEAD^)\r\n         */\r\n        GitVersionOptions[GitVersionOptions[\"FirstParent\"] = 2] = \"FirstParent\";\r\n    })(GitVersionOptions = exports.GitVersionOptions || (exports.GitVersionOptions = {}));\r\n    /**\r\n     * Accepted types of version\r\n     */\r\n    var GitVersionType;\r\n    (function (GitVersionType) {\r\n        /**\r\n         * Interpret the version as a branch name\r\n         */\r\n        GitVersionType[GitVersionType[\"Branch\"] = 0] = \"Branch\";\r\n        /**\r\n         * Interpret the version as a tag name\r\n         */\r\n        GitVersionType[GitVersionType[\"Tag\"] = 1] = \"Tag\";\r\n        /**\r\n         * Interpret the version as a commit ID (SHA1)\r\n         */\r\n        GitVersionType[GitVersionType[\"Commit\"] = 2] = \"Commit\";\r\n    })(GitVersionType = exports.GitVersionType || (exports.GitVersionType = {}));\r\n    var ItemContentType;\r\n    (function (ItemContentType) {\r\n        ItemContentType[ItemContentType[\"RawText\"] = 0] = \"RawText\";\r\n        ItemContentType[ItemContentType[\"Base64Encoded\"] = 1] = \"Base64Encoded\";\r\n    })(ItemContentType = exports.ItemContentType || (exports.ItemContentType = {}));\r\n    /**\r\n     * The reason for which the pull request iteration was created.\r\n     */\r\n    var IterationReason;\r\n    (function (IterationReason) {\r\n        IterationReason[IterationReason[\"Push\"] = 0] = \"Push\";\r\n        IterationReason[IterationReason[\"ForcePush\"] = 1] = \"ForcePush\";\r\n        IterationReason[IterationReason[\"Create\"] = 2] = \"Create\";\r\n        IterationReason[IterationReason[\"Rebase\"] = 4] = \"Rebase\";\r\n        IterationReason[IterationReason[\"Unknown\"] = 8] = \"Unknown\";\r\n        IterationReason[IterationReason[\"Retarget\"] = 16] = \"Retarget\";\r\n        IterationReason[IterationReason[\"ResolveConflicts\"] = 32] = \"ResolveConflicts\";\r\n    })(IterationReason = exports.IterationReason || (exports.IterationReason = {}));\r\n    /**\r\n     * Type of change for a line diff block\r\n     */\r\n    var LineDiffBlockChangeType;\r\n    (function (LineDiffBlockChangeType) {\r\n        /**\r\n         * No change - both the blocks are identical\r\n         */\r\n        LineDiffBlockChangeType[LineDiffBlockChangeType[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Lines were added to the block in the modified file\r\n         */\r\n        LineDiffBlockChangeType[LineDiffBlockChangeType[\"Add\"] = 1] = \"Add\";\r\n        /**\r\n         * Lines were deleted from the block in the original file\r\n         */\r\n        LineDiffBlockChangeType[LineDiffBlockChangeType[\"Delete\"] = 2] = \"Delete\";\r\n        /**\r\n         * Lines were modified\r\n         */\r\n        LineDiffBlockChangeType[LineDiffBlockChangeType[\"Edit\"] = 3] = \"Edit\";\r\n    })(LineDiffBlockChangeType = exports.LineDiffBlockChangeType || (exports.LineDiffBlockChangeType = {}));\r\n    /**\r\n     * The status of a pull request merge.\r\n     */\r\n    var PullRequestAsyncStatus;\r\n    (function (PullRequestAsyncStatus) {\r\n        /**\r\n         * Status is not set. Default state.\r\n         */\r\n        PullRequestAsyncStatus[PullRequestAsyncStatus[\"NotSet\"] = 0] = \"NotSet\";\r\n        /**\r\n         * Pull request merge is queued.\r\n         */\r\n        PullRequestAsyncStatus[PullRequestAsyncStatus[\"Queued\"] = 1] = \"Queued\";\r\n        /**\r\n         * Pull request merge failed due to conflicts.\r\n         */\r\n        PullRequestAsyncStatus[PullRequestAsyncStatus[\"Conflicts\"] = 2] = \"Conflicts\";\r\n        /**\r\n         * Pull request merge succeeded.\r\n         */\r\n        PullRequestAsyncStatus[PullRequestAsyncStatus[\"Succeeded\"] = 3] = \"Succeeded\";\r\n        /**\r\n         * Pull request merge rejected by policy.\r\n         */\r\n        PullRequestAsyncStatus[PullRequestAsyncStatus[\"RejectedByPolicy\"] = 4] = \"RejectedByPolicy\";\r\n        /**\r\n         * Pull request merge failed.\r\n         */\r\n        PullRequestAsyncStatus[PullRequestAsyncStatus[\"Failure\"] = 5] = \"Failure\";\r\n    })(PullRequestAsyncStatus = exports.PullRequestAsyncStatus || (exports.PullRequestAsyncStatus = {}));\r\n    /**\r\n     * The specific type of a pull request merge failure.\r\n     */\r\n    var PullRequestMergeFailureType;\r\n    (function (PullRequestMergeFailureType) {\r\n        /**\r\n         * Type is not set. Default type.\r\n         */\r\n        PullRequestMergeFailureType[PullRequestMergeFailureType[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Pull request merge failure type unknown.\r\n         */\r\n        PullRequestMergeFailureType[PullRequestMergeFailureType[\"Unknown\"] = 1] = \"Unknown\";\r\n        /**\r\n         * Pull request merge failed due to case mismatch.\r\n         */\r\n        PullRequestMergeFailureType[PullRequestMergeFailureType[\"CaseSensitive\"] = 2] = \"CaseSensitive\";\r\n        /**\r\n         * Pull request merge failed due to an object being too large.\r\n         */\r\n        PullRequestMergeFailureType[PullRequestMergeFailureType[\"ObjectTooLarge\"] = 3] = \"ObjectTooLarge\";\r\n    })(PullRequestMergeFailureType = exports.PullRequestMergeFailureType || (exports.PullRequestMergeFailureType = {}));\r\n    /**\r\n     * Status of a pull request.\r\n     */\r\n    var PullRequestStatus;\r\n    (function (PullRequestStatus) {\r\n        /**\r\n         * Status not set. Default state.\r\n         */\r\n        PullRequestStatus[PullRequestStatus[\"NotSet\"] = 0] = \"NotSet\";\r\n        /**\r\n         * Pull request is active.\r\n         */\r\n        PullRequestStatus[PullRequestStatus[\"Active\"] = 1] = \"Active\";\r\n        /**\r\n         * Pull request is abandoned.\r\n         */\r\n        PullRequestStatus[PullRequestStatus[\"Abandoned\"] = 2] = \"Abandoned\";\r\n        /**\r\n         * Pull request is completed.\r\n         */\r\n        PullRequestStatus[PullRequestStatus[\"Completed\"] = 3] = \"Completed\";\r\n        /**\r\n         * Used in pull request search criteria to include all statuses.\r\n         */\r\n        PullRequestStatus[PullRequestStatus[\"All\"] = 4] = \"All\";\r\n    })(PullRequestStatus = exports.PullRequestStatus || (exports.PullRequestStatus = {}));\r\n    /**\r\n     * Specifies the desired type of time range for pull requests queries.\r\n     */\r\n    var PullRequestTimeRangeType;\r\n    (function (PullRequestTimeRangeType) {\r\n        /**\r\n         * The date when the pull request was created.\r\n         */\r\n        PullRequestTimeRangeType[PullRequestTimeRangeType[\"Created\"] = 1] = \"Created\";\r\n        /**\r\n         * The date when the pull request was closed (completed, abandoned, or merged externally).\r\n         */\r\n        PullRequestTimeRangeType[PullRequestTimeRangeType[\"Closed\"] = 2] = \"Closed\";\r\n    })(PullRequestTimeRangeType = exports.PullRequestTimeRangeType || (exports.PullRequestTimeRangeType = {}));\r\n    var RefFavoriteType;\r\n    (function (RefFavoriteType) {\r\n        RefFavoriteType[RefFavoriteType[\"Invalid\"] = 0] = \"Invalid\";\r\n        RefFavoriteType[RefFavoriteType[\"Folder\"] = 1] = \"Folder\";\r\n        RefFavoriteType[RefFavoriteType[\"Ref\"] = 2] = \"Ref\";\r\n    })(RefFavoriteType = exports.RefFavoriteType || (exports.RefFavoriteType = {}));\r\n    /**\r\n     * Enumeration that represents the types of IDEs supported.\r\n     */\r\n    var SupportedIdeType;\r\n    (function (SupportedIdeType) {\r\n        SupportedIdeType[SupportedIdeType[\"Unknown\"] = 0] = \"Unknown\";\r\n        SupportedIdeType[SupportedIdeType[\"AndroidStudio\"] = 1] = \"AndroidStudio\";\r\n        SupportedIdeType[SupportedIdeType[\"AppCode\"] = 2] = \"AppCode\";\r\n        SupportedIdeType[SupportedIdeType[\"CLion\"] = 3] = \"CLion\";\r\n        SupportedIdeType[SupportedIdeType[\"DataGrip\"] = 4] = \"DataGrip\";\r\n        SupportedIdeType[SupportedIdeType[\"Eclipse\"] = 13] = \"Eclipse\";\r\n        SupportedIdeType[SupportedIdeType[\"IntelliJ\"] = 5] = \"IntelliJ\";\r\n        SupportedIdeType[SupportedIdeType[\"MPS\"] = 6] = \"MPS\";\r\n        SupportedIdeType[SupportedIdeType[\"PhpStorm\"] = 7] = \"PhpStorm\";\r\n        SupportedIdeType[SupportedIdeType[\"PyCharm\"] = 8] = \"PyCharm\";\r\n        SupportedIdeType[SupportedIdeType[\"RubyMine\"] = 9] = \"RubyMine\";\r\n        SupportedIdeType[SupportedIdeType[\"Tower\"] = 10] = \"Tower\";\r\n        SupportedIdeType[SupportedIdeType[\"VisualStudio\"] = 11] = \"VisualStudio\";\r\n        SupportedIdeType[SupportedIdeType[\"VSCode\"] = 14] = \"VSCode\";\r\n        SupportedIdeType[SupportedIdeType[\"WebStorm\"] = 12] = \"WebStorm\";\r\n    })(SupportedIdeType = exports.SupportedIdeType || (exports.SupportedIdeType = {}));\r\n    /**\r\n     * Options for Version handling.\r\n     */\r\n    var TfvcVersionOption;\r\n    (function (TfvcVersionOption) {\r\n        /**\r\n         * None.\r\n         */\r\n        TfvcVersionOption[TfvcVersionOption[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Return the previous version.\r\n         */\r\n        TfvcVersionOption[TfvcVersionOption[\"Previous\"] = 1] = \"Previous\";\r\n        /**\r\n         * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier.\r\n         */\r\n        TfvcVersionOption[TfvcVersionOption[\"UseRename\"] = 2] = \"UseRename\";\r\n    })(TfvcVersionOption = exports.TfvcVersionOption || (exports.TfvcVersionOption = {}));\r\n    /**\r\n     * Type of Version object\r\n     */\r\n    var TfvcVersionType;\r\n    (function (TfvcVersionType) {\r\n        /**\r\n         * Version is treated as a ChangesetId.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Version is treated as a ChangesetId.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"Changeset\"] = 1] = \"Changeset\";\r\n        /**\r\n         * Version is treated as a Shelveset name and owner.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"Shelveset\"] = 2] = \"Shelveset\";\r\n        /**\r\n         * Version is treated as a Change.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"Change\"] = 3] = \"Change\";\r\n        /**\r\n         * Version is treated as a Date.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"Date\"] = 4] = \"Date\";\r\n        /**\r\n         * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"Latest\"] = 5] = \"Latest\";\r\n        /**\r\n         * Version will be treated as a Tip, if no version is defined latest will be used.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"Tip\"] = 6] = \"Tip\";\r\n        /**\r\n         * Version will be treated as a MergeSource.\r\n         */\r\n        TfvcVersionType[TfvcVersionType[\"MergeSource\"] = 7] = \"MergeSource\";\r\n    })(TfvcVersionType = exports.TfvcVersionType || (exports.TfvcVersionType = {}));\r\n    var VersionControlChangeType;\r\n    (function (VersionControlChangeType) {\r\n        VersionControlChangeType[VersionControlChangeType[\"None\"] = 0] = \"None\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Add\"] = 1] = \"Add\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Edit\"] = 2] = \"Edit\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Encoding\"] = 4] = \"Encoding\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Rename\"] = 8] = \"Rename\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Delete\"] = 16] = \"Delete\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Undelete\"] = 32] = \"Undelete\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Branch\"] = 64] = \"Branch\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Merge\"] = 128] = \"Merge\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Lock\"] = 256] = \"Lock\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Rollback\"] = 512] = \"Rollback\";\r\n        VersionControlChangeType[VersionControlChangeType[\"SourceRename\"] = 1024] = \"SourceRename\";\r\n        VersionControlChangeType[VersionControlChangeType[\"TargetRename\"] = 2048] = \"TargetRename\";\r\n        VersionControlChangeType[VersionControlChangeType[\"Property\"] = 4096] = \"Property\";\r\n        VersionControlChangeType[VersionControlChangeType[\"All\"] = 8191] = \"All\";\r\n    })(VersionControlChangeType = exports.VersionControlChangeType || (exports.VersionControlChangeType = {}));\r\n    var VersionControlRecursionType;\r\n    (function (VersionControlRecursionType) {\r\n        /**\r\n         * Only return the specified item.\r\n         */\r\n        VersionControlRecursionType[VersionControlRecursionType[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Return the specified item and its direct children.\r\n         */\r\n        VersionControlRecursionType[VersionControlRecursionType[\"OneLevel\"] = 1] = \"OneLevel\";\r\n        /**\r\n         * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder.\r\n         */\r\n        VersionControlRecursionType[VersionControlRecursionType[\"OneLevelPlusNestedEmptyFolders\"] = 4] = \"OneLevelPlusNestedEmptyFolders\";\r\n        /**\r\n         * Return specified item and all descendants\r\n         */\r\n        VersionControlRecursionType[VersionControlRecursionType[\"Full\"] = 120] = \"Full\";\r\n    })(VersionControlRecursionType = exports.VersionControlRecursionType || (exports.VersionControlRecursionType = {}));\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Git/Git.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Git/GitClient.js":
/*!******************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Git/GitClient.js ***!
  \******************************************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\nvar __extends = (this && this.__extends) || (function () {\r\n    var extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n    return function (d, b) {\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    };\r\n})();\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ../Common/RestClientBase */ \"./node_modules/azure-devops-extension-api/Common/RestClientBase.js\"), __webpack_require__(/*! ../Common/Util/Serialization */ \"./node_modules/azure-devops-extension-api/Common/Util/Serialization.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, RestClientBase_1, Serialization_1) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    var GitRestClient = /** @class */ (function (_super) {\r\n        __extends(GitRestClient, _super);\r\n        function GitRestClient(options) {\r\n            return _super.call(this, options) || this;\r\n        }\r\n        /**\r\n         * DELETE Deletes Enablement status and BillableCommitters data from DB. Deleting the enablement data will effectively disable it for the repositories affected.\r\n         *\r\n         * @param allProjects -\r\n         * @param includeBillableCommitters -\r\n         * @param projectIds -\r\n         */\r\n        GitRestClient.prototype.deleteEnablementStatus = function (allProjects, includeBillableCommitters, projectIds) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$allProjects': allProjects,\r\n                        '$includeBillableCommitters': includeBillableCommitters,\r\n                        projectIds: projectIds\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"_apis/git/advsecEnablement\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * GET Enablement status for project's repositories.\r\n         *\r\n         * @param projectIds - Null defaults to all projects in the host, list of project's repos status to return\r\n         * @param billingDate - UTC expected, Null defaults to UtcNow(), can be provided for a point in time status\r\n         * @param skip - Skip X rows of resultset to simulate paging.\r\n         * @param take - Return Y rows of resultset to simulate paging.\r\n         */\r\n        GitRestClient.prototype.getEnablementStatus = function (projectIds, billingDate, skip, take) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectIds: projectIds,\r\n                        '$billingDate': billingDate,\r\n                        '$skip': skip,\r\n                        '$take': take\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/git/advsecEnablement\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param enableOnCreateHost -\r\n         */\r\n        GitRestClient.prototype.getEnableOnCreateHost = function (enableOnCreateHost) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$enableOnCreateHost': enableOnCreateHost\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/git/advsecEnablement\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param enableOnCreateProjectId -\r\n         */\r\n        GitRestClient.prototype.getEnableOnCreateProject = function (enableOnCreateProjectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$enableOnCreateProjectId': enableOnCreateProjectId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/git/advsecEnablement\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param enableOnCreateHost -\r\n         */\r\n        GitRestClient.prototype.setEnableOnCreateHost = function (enableOnCreateHost) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$enableOnCreateHost': enableOnCreateHost\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PUT\",\r\n                            routeTemplate: \"_apis/git/advsecEnablement\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param enableOnCreateProjectId -\r\n         * @param enableOnStatus -\r\n         */\r\n        GitRestClient.prototype.setEnableOnCreateProject = function (enableOnCreateProjectId, enableOnStatus) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$enableOnCreateProjectId': enableOnCreateProjectId,\r\n                        '$enableOnStatus': enableOnStatus\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PUT\",\r\n                            routeTemplate: \"_apis/git/advsecEnablement\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * POST Enablement status for repositories.\r\n         *\r\n         * @param enablementUpdates -\r\n         */\r\n        GitRestClient.prototype.updateEnablementStatus = function (enablementUpdates) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/git/advsecEnablement\",\r\n                            body: enablementUpdates\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get estimated billable pushers for an Organization for last 90 days.\r\n         *\r\n         */\r\n        GitRestClient.prototype.getEstimatedBillablePushersOrg = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/git/advsecEstimate\"\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get estimated billable pushers for a project for last 90 days.\r\n         *\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getEstimatedBillablePushersProject = function (project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/advsecEstimate\",\r\n                            routeValues: {\r\n                                project: project\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get estimated billable committers for a repository for the last 90 days.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId -\r\n         */\r\n        GitRestClient.prototype.getEstimatedBillableCommittersRepo = function (project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/advsecEstimate\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * GET Advanced Security Permission status.\r\n         *\r\n         * @param projectName -\r\n         * @param repositoryId - Repository user is trying to access\r\n         * @param permission - Permission being requestd, must be \"viewAlert\" \"dismissAlert\" \"manage\" \"viewEnablement\" or \"repoRead\"\r\n         */\r\n        GitRestClient.prototype.getPermission = function (projectName, repositoryId, permission) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$projectName': projectName,\r\n                        '$repositoryId': repositoryId,\r\n                        '$permission': permission\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/git/advsecPermissions\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create an annotated tag.\r\n         *\r\n         * @param tagObject - Object containing details of tag to be created.\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - ID or name of the repository.\r\n         */\r\n        GitRestClient.prototype.createAnnotatedTag = function (tagObject, project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: tagObject\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get an annotated tag.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - ID or name of the repository.\r\n         * @param objectId - ObjectId (Sha1Id) of tag to get.\r\n         */\r\n        GitRestClient.prototype.getAnnotatedTag = function (project, repositoryId, objectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                objectId: objectId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve actual billable committers for Advanced Security service for a given date.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param billingDate - UTC expected.  If not specified defaults to the previous billing day.\r\n         * @param skip - Skip X rows of resultset to simulate paging.\r\n         * @param take - Return Y rows of resultset to simulate paging.\r\n         */\r\n        GitRestClient.prototype.getBillableCommitters = function (project, billingDate, skip, take) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$billingDate': billingDate,\r\n                        '$skip': skip,\r\n                        '$take': take\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/billableCommitters\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve detailed actual billable committers for Advanced Security service for a given date. Detailed results intentionally does not filter out soft deleted projects and repositories to help diagnose billing issues.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param includeDetails - Return all the details on the billable committers.\r\n         * @param billingDate - UTC expected. If not specified defaults to the previous billing day.\r\n         */\r\n        GitRestClient.prototype.getBillableCommittersDetail = function (project, includeDetails, billingDate) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$includeDetails': includeDetails,\r\n                        '$billingDate': billingDate\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/billableCommitters\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a single blob.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the \"Git/Items/Get Item\" endpoint.\r\n         * @param project - Project ID or project name\r\n         * @param download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip\r\n         * @param fileName - Provide a fileName to use for a download.\r\n         * @param resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types\r\n         */\r\n        GitRestClient.prototype.getBlob = function (repositoryId, sha1, project, download, fileName, resolveLfs) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        download: download,\r\n                        fileName: fileName,\r\n                        resolveLfs: resolveLfs\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                sha1: sha1\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a single blob.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the \"Git/Items/Get Item\" endpoint.\r\n         * @param project - Project ID or project name\r\n         * @param download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip\r\n         * @param fileName - Provide a fileName to use for a download.\r\n         * @param resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types\r\n         */\r\n        GitRestClient.prototype.getBlobContent = function (repositoryId, sha1, project, download, fileName, resolveLfs) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        download: download,\r\n                        fileName: fileName,\r\n                        resolveLfs: resolveLfs\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/octet-stream\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                sha1: sha1\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets one or more blobs in a zip file download.\r\n         *\r\n         * @param blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file.\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param filename -\r\n         */\r\n        GitRestClient.prototype.getBlobsZip = function (blobIds, repositoryId, project, filename) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        filename: filename\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            httpResponseType: \"application/zip\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: blobIds\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a single blob.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the \"Git/Items/Get Item\" endpoint.\r\n         * @param project - Project ID or project name\r\n         * @param download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip\r\n         * @param fileName - Provide a fileName to use for a download.\r\n         * @param resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types\r\n         */\r\n        GitRestClient.prototype.getBlobZip = function (repositoryId, sha1, project, download, fileName, resolveLfs) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        download: download,\r\n                        fileName: fileName,\r\n                        resolveLfs: resolveLfs\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/zip\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                sha1: sha1\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve statistics about a single branch.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param name - Name of the branch.\r\n         * @param project - Project ID or project name\r\n         * @param baseVersionDescriptor - Identifies the commit or branch to use as the base.\r\n         */\r\n        GitRestClient.prototype.getBranch = function (repositoryId, name, project, baseVersionDescriptor) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        name: name,\r\n                        baseVersionDescriptor: baseVersionDescriptor\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/stats/branches\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve statistics about all branches within a repository.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param baseVersionDescriptor - Identifies the commit or branch to use as the base.\r\n         */\r\n        GitRestClient.prototype.getBranches = function (repositoryId, project, baseVersionDescriptor) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        baseVersionDescriptor: baseVersionDescriptor\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/stats/branches\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve statistics for multiple commits\r\n         *\r\n         * @param searchCriteria - Base Commit and List of Target Commits to compare.\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getBranchStatsBatch = function (searchCriteria, repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/stats/branches\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: searchCriteria\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve changes for a particular commit.\r\n         *\r\n         * @param commitId - The id of the commit.\r\n         * @param repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.\r\n         * @param project - Project ID or project name\r\n         * @param top - The maximum number of changes to return.\r\n         * @param skip - The number of changes to skip.\r\n         */\r\n        GitRestClient.prototype.getChanges = function (commitId, repositoryId, project, top, skip) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        top: top,\r\n                        skip: skip\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Changes\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                commitId: commitId,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve one conflict for a cherry pick by ID\r\n         *\r\n         * @param repositoryId -\r\n         * @param cherryPickId -\r\n         * @param conflictId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getCherryPickConflict = function (repositoryId, cherryPickId, conflictId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                cherryPickId: cherryPickId,\r\n                                conflictId: conflictId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all conflicts for a cherry pick\r\n         *\r\n         * @param repositoryId -\r\n         * @param cherryPickId -\r\n         * @param project - Project ID or project name\r\n         * @param continuationToken -\r\n         * @param top -\r\n         * @param excludeResolved -\r\n         * @param onlyResolved -\r\n         * @param includeObsolete -\r\n         */\r\n        GitRestClient.prototype.getCherryPickConflicts = function (repositoryId, cherryPickId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        continuationToken: continuationToken,\r\n                        '$top': top,\r\n                        excludeResolved: excludeResolved,\r\n                        onlyResolved: onlyResolved,\r\n                        includeObsolete: includeObsolete\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                cherryPickId: cherryPickId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            returnRawResponse: true\r\n                        }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {\r\n                            var body;\r\n                            return __generator(this, function (_a) {\r\n                                switch (_a.label) {\r\n                                    case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];\r\n                                    case 1:\r\n                                        body = _a.sent();\r\n                                        body.continuationToken = response.headers.get(\"x-ms-continuationtoken\");\r\n                                        return [2 /*return*/, body];\r\n                                }\r\n                            });\r\n                        }); })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update merge conflict resolution\r\n         *\r\n         * @param conflict -\r\n         * @param repositoryId -\r\n         * @param cherryPickId -\r\n         * @param conflictId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updateCherryPickConflict = function (conflict, repositoryId, cherryPickId, conflictId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                cherryPickId: cherryPickId,\r\n                                conflictId: conflictId\r\n                            },\r\n                            body: conflict\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update multiple merge conflict resolutions\r\n         *\r\n         * @param conflictUpdates -\r\n         * @param repositoryId -\r\n         * @param cherryPickId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updateCherryPickConflicts = function (conflictUpdates, repositoryId, cherryPickId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                cherryPickId: cherryPickId\r\n                            },\r\n                            body: conflictUpdates\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Given a commitId, returns a list of commits that are in the same cherry-pick family.\r\n         *\r\n         * @param repositoryNameOrId -\r\n         * @param commitId -\r\n         * @param project - Project ID or project name\r\n         * @param includeLinks -\r\n         */\r\n        GitRestClient.prototype.getCherryPickRelationships = function (repositoryNameOrId, commitId, project, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/cherryPickRelationships/{commitId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId,\r\n                                commitId: commitId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Cherry pick a specific commit or commits that are associated to a pull request into a new branch.\r\n         *\r\n         * @param cherryPickToCreate -\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - ID of the repository.\r\n         */\r\n        GitRestClient.prototype.createCherryPick = function (cherryPickToCreate, project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: cherryPickToCreate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve information about a cherry pick operation by cherry pick Id.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param cherryPickId - ID of the cherry pick.\r\n         * @param repositoryId - ID of the repository.\r\n         */\r\n        GitRestClient.prototype.getCherryPick = function (project, cherryPickId, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                cherryPickId: cherryPickId,\r\n                                repositoryId: repositoryId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - ID of the repository.\r\n         * @param refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation.\r\n         */\r\n        GitRestClient.prototype.getCherryPickForRefName = function (project, repositoryId, refName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        refName: refName\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits.\r\n         * @param top - Maximum number of changes to return. Defaults to 100.\r\n         * @param skip - Number of changes to skip\r\n         * @param baseVersionDescriptor - Descriptor for base commit.\r\n         * @param targetVersionDescriptor - Descriptor for target commit.\r\n         */\r\n        GitRestClient.prototype.getCommitDiffs = function (repositoryId, project, diffCommonCommit, top, skip, baseVersionDescriptor, targetVersionDescriptor) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        diffCommonCommit: diffCommonCommit,\r\n                        '$top': top,\r\n                        '$skip': skip,\r\n                    };\r\n                    if (baseVersionDescriptor) {\r\n                        queryValues.baseVersionType = baseVersionDescriptor.versionType;\r\n                        queryValues.baseVersion = baseVersionDescriptor.version;\r\n                        queryValues.baseVersionOptions = baseVersionDescriptor.versionOptions;\r\n                    }\r\n                    if (targetVersionDescriptor) {\r\n                        queryValues.targetVersionType = targetVersionDescriptor.versionType;\r\n                        queryValues.targetVersion = targetVersionDescriptor.version;\r\n                        queryValues.targetVersionOptions = targetVersionDescriptor.versionOptions;\r\n                    }\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/diffs/commits\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a particular commit.\r\n         *\r\n         * @param commitId - The id of the commit.\r\n         * @param repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.\r\n         * @param project - Project ID or project name\r\n         * @param changeCount - The number of changes to include in the result.\r\n         */\r\n        GitRestClient.prototype.getCommit = function (commitId, repositoryId, project, changeCount) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        changeCount: changeCount\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                commitId: commitId,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve git commits for a project\r\n         *\r\n         * @param repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.\r\n         * @param searchCriteria -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getCommits = function (repositoryId, searchCriteria, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        searchCriteria: searchCriteria\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a list of commits associated with a particular push.\r\n         *\r\n         * @param repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.\r\n         * @param pushId - The id of the push.\r\n         * @param project - Project ID or project name\r\n         * @param top - The maximum number of commits to return (\"get the top x commits\").\r\n         * @param skip - The number of commits to skip.\r\n         * @param includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true.\r\n         */\r\n        GitRestClient.prototype.getPushCommits = function (repositoryId, pushId, project, top, skip, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        pushId: pushId,\r\n                        top: top,\r\n                        skip: skip,\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve git commits for a project matching the search criteria\r\n         *\r\n         * @param searchCriteria - Search options\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param skip - Number of commits to skip. The value cannot exceed 3,000,000.\r\n         * @param top - Maximum number of commits to return. The value cannot exceed 50,000.\r\n         * @param includeStatuses - True to include additional commit status information.\r\n         */\r\n        GitRestClient.prototype.getCommitsBatch = function (searchCriteria, repositoryId, project, skip, top, includeStatuses) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$skip': skip,\r\n                        '$top': top,\r\n                        includeStatuses: includeStatuses\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/CommitsBatch\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: searchCriteria\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve deleted git repositories.\r\n         *\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getDeletedRepositories = function (project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/DeletedRepositories\",\r\n                            routeValues: {\r\n                                project: project\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the file diffs for each of the specified files\r\n         *\r\n         * @param fileDiffsCriteria - List of file parameters objects\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The name or ID of the repository\r\n         */\r\n        GitRestClient.prototype.getFileDiffs = function (fileDiffsCriteria, project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/FileDiffs\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: fileDiffsCriteria\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all forks of a repository in the collection.\r\n         *\r\n         * @param repositoryNameOrId - The name or ID of the repository.\r\n         * @param collectionId - Team project collection ID.\r\n         * @param project - Project ID or project name\r\n         * @param includeLinks - True to include links.\r\n         */\r\n        GitRestClient.prototype.getForks = function (repositoryNameOrId, collectionId, project, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId,\r\n                                collectionId: collectionId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the \\<a href=\"https://docs.microsoft.com/en-us/rest/api/vsts/git/repositories/create?view=azure-devops-rest-5.1\"\\> repositories endpoint\\</a\\>\r\n         *\r\n         * @param syncParams - Source repository and ref mapping.\r\n         * @param repositoryNameOrId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param includeLinks - True to include links\r\n         */\r\n        GitRestClient.prototype.createForkSyncRequest = function (syncParams, repositoryNameOrId, project, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: syncParams\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a specific fork sync operation's details.\r\n         *\r\n         * @param repositoryNameOrId - The name or ID of the repository.\r\n         * @param forkSyncOperationId - OperationId of the sync request.\r\n         * @param project - Project ID or project name\r\n         * @param includeLinks - True to include links.\r\n         */\r\n        GitRestClient.prototype.getForkSyncRequest = function (repositoryNameOrId, forkSyncOperationId, project, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId,\r\n                                forkSyncOperationId: forkSyncOperationId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all requested fork sync operations on this repository.\r\n         *\r\n         * @param repositoryNameOrId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param includeAbandoned - True to include abandoned requests.\r\n         * @param includeLinks - True to include links.\r\n         */\r\n        GitRestClient.prototype.getForkSyncRequests = function (repositoryNameOrId, project, includeAbandoned, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeAbandoned: includeAbandoned,\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS.  Default is true.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getHfsItem = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveHfs: resolveHfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS.  Default is true.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getHfsItemContent = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveHfs: resolveHfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/octet-stream\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param includeLinks - Set to true to include links to items.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks\r\n         */\r\n        GitRestClient.prototype.getHfsItems = function (repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor, zipForUnix) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        includeLinks: includeLinks,\r\n                        versionDescriptor: versionDescriptor,\r\n                        zipForUnix: zipForUnix\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS.  Default is true.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getHfsItemText = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveHfs: resolveHfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"text/plain\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS.  Default is true.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getHfsItemZip = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveHfs: resolveHfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/zip\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create an import request.\r\n         *\r\n         * @param importRequest - The import request to create.\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The name or ID of the repository.\r\n         */\r\n        GitRestClient.prototype.createImportRequest = function (importRequest, project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: importRequest\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a particular import request.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param importRequestId - The unique identifier for the import request.\r\n         */\r\n        GitRestClient.prototype.getImportRequest = function (project, repositoryId, importRequestId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                importRequestId: importRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve import requests for a repository.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param includeAbandoned - True to include abandoned import requests in the results.\r\n         */\r\n        GitRestClient.prototype.queryImportRequests = function (project, repositoryId, includeAbandoned) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeAbandoned: includeAbandoned\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retry or abandon a failed import request.\r\n         *\r\n         * @param importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned.\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param importRequestId - The unique identifier for the import request to update.\r\n         */\r\n        GitRestClient.prototype.updateImportRequest = function (importRequestToUpdate, project, repositoryId, importRequestId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                importRequestId: importRequestId\r\n                            },\r\n                            body: importRequestToUpdate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS.  Default is false.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getItem = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveLfs: resolveLfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS.  Default is false.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getItemContent = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveLfs: resolveLfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/octet-stream\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param includeLinks - Set to true to include links to items.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks\r\n         */\r\n        GitRestClient.prototype.getItems = function (repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor, zipForUnix) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        includeLinks: includeLinks,\r\n                        versionDescriptor: versionDescriptor,\r\n                        zipForUnix: zipForUnix\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS.  Default is false.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getItemText = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveLfs: resolveLfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"text/plain\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param path - The item path.\r\n         * @param project - Project ID or project name\r\n         * @param scopePath - The path scope.  The default is null.\r\n         * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.\r\n         * @param includeContentMetadata - Set to true to include content metadata.  Default is false.\r\n         * @param latestProcessedChange - Set to true to include the latest changes.  Default is false.\r\n         * @param download - Set to true to download the response as a file.  Default is false.\r\n         * @param versionDescriptor - Version descriptor.  Default is the default branch for the repository.\r\n         * @param includeContent - Set to true to include item content when requesting json.  Default is false.\r\n         * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS.  Default is false.\r\n         * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.\r\n         */\r\n        GitRestClient.prototype.getItemZip = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        path: path,\r\n                        scopePath: scopePath,\r\n                        recursionLevel: recursionLevel,\r\n                        includeContentMetadata: includeContentMetadata,\r\n                        latestProcessedChange: latestProcessedChange,\r\n                        download: download,\r\n                        versionDescriptor: versionDescriptor,\r\n                        includeContent: includeContent,\r\n                        resolveLfs: resolveLfs,\r\n                        sanitize: sanitize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/zip\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Items/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieves a batch of items in a repo / project for a given list of paths or a long path\r\n         *\r\n         * @param requestData - Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references.\r\n         * @param repositoryId - The name or ID of the repository\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getItemsBatch = function (requestData, repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/ItemsBatch\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: requestData\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId.\r\n         *\r\n         * @param repositoryNameOrId - ID or name of the local repository.\r\n         * @param commitId - First commit, usually the tip of the target branch of the potential merge.\r\n         * @param otherCommitId - Other commit, usually the tip of the source branch of the potential merge.\r\n         * @param project - Project ID or project name\r\n         * @param otherCollectionId - The collection ID where otherCommitId lives.\r\n         * @param otherRepositoryId - The repository ID where otherCommitId lives.\r\n         */\r\n        GitRestClient.prototype.getMergeBases = function (repositoryNameOrId, commitId, otherCommitId, project, otherCollectionId, otherRepositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        otherCommitId: otherCommitId,\r\n                        otherCollectionId: otherCollectionId,\r\n                        otherRepositoryId: otherRepositoryId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/commits/{commitId}/mergeBases\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId,\r\n                                commitId: commitId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Request a git merge operation. Currently we support merging only 2 commits.\r\n         *\r\n         * @param mergeParameters - Parents commitIds and merge commit messsage.\r\n         * @param project - Project ID or project name\r\n         * @param repositoryNameOrId - The name or ID of the repository.\r\n         * @param includeLinks - True to include links\r\n         */\r\n        GitRestClient.prototype.createMergeRequest = function (mergeParameters, project, repositoryNameOrId, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/merges/{mergeOperationId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: mergeParameters\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a specific merge operation's details.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryNameOrId - The name or ID of the repository.\r\n         * @param mergeOperationId - OperationId of the merge request.\r\n         * @param includeLinks - True to include links\r\n         */\r\n        GitRestClient.prototype.getMergeRequest = function (project, repositoryNameOrId, mergeOperationId, includeLinks) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryNameOrId}/merges/{mergeOperationId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryNameOrId: repositoryNameOrId,\r\n                                mergeOperationId: mergeOperationId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Attach a new file to a pull request.\r\n         *\r\n         * @param content - Content to upload\r\n         * @param fileName - The name of the file.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createAttachment = function (content, fileName, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                fileName: fileName,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/octet-stream\",\r\n                            },\r\n                            body: content,\r\n                            isRawData: true\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete a pull request attachment.\r\n         *\r\n         * @param fileName - The name of the attachment to delete.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.deleteAttachment = function (fileName, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                fileName: fileName,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the file content of a pull request attachment.\r\n         *\r\n         * @param fileName - The name of the attachment.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getAttachmentContent = function (fileName, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/octet-stream\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                fileName: fileName,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a list of files attached to a given pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getAttachments = function (repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the file content of a pull request attachment.\r\n         *\r\n         * @param fileName - The name of the attachment.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getAttachmentZip = function (fileName, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/zip\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                fileName: fileName,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Add a like on a comment.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - The ID of the thread that contains the comment.\r\n         * @param commentId - The ID of the comment.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createLike = function (repositoryId, pullRequestId, threadId, commentId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId,\r\n                                commentId: commentId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete a like on a comment.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - The ID of the thread that contains the comment.\r\n         * @param commentId - The ID of the comment.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.deleteLike = function (repositoryId, pullRequestId, threadId, commentId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId,\r\n                                commentId: commentId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get likes for a comment.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - The ID of the thread that contains the comment.\r\n         * @param commentId - The ID of the comment.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getLikes = function (repositoryId, pullRequestId, threadId, commentId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId,\r\n                                commentId: commentId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the commits for the specified iteration of a pull request.\r\n         *\r\n         * @param repositoryId - ID or name of the repository.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the iteration from which to get the commits.\r\n         * @param project - Project ID or project name\r\n         * @param top - Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500.\r\n         * @param skip - Number of commits to skip.\r\n         */\r\n        GitRestClient.prototype.getPullRequestIterationCommits = function (repositoryId, pullRequestId, iterationId, project, top, skip) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        top: top,\r\n                        skip: skip\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/commits\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the commits for the specified pull request.\r\n         *\r\n         * @param repositoryId - ID or name of the repository.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestCommits = function (repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/commits\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            returnRawResponse: true\r\n                        }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {\r\n                            var body;\r\n                            return __generator(this, function (_a) {\r\n                                switch (_a.label) {\r\n                                    case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];\r\n                                    case 1:\r\n                                        body = _a.sent();\r\n                                        body.continuationToken = response.headers.get(\"x-ms-continuationtoken\");\r\n                                        return [2 /*return*/, body];\r\n                                }\r\n                            });\r\n                        }); })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve one conflict for a pull request by ID\r\n         *\r\n         * @param repositoryId -\r\n         * @param pullRequestId -\r\n         * @param conflictId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestConflict = function (repositoryId, pullRequestId, conflictId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                conflictId: conflictId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all conflicts for a pull request\r\n         *\r\n         * @param repositoryId - The repository of the Pull Request.\r\n         * @param pullRequestId - The pull request ID.\r\n         * @param project - Project ID or project name\r\n         * @param skip - Conflicts to skip.\r\n         * @param top - Conflicts to return after skip.\r\n         * @param includeObsolete - Includes obsolete conflicts.\r\n         * @param excludeResolved - Excludes conflicts already resolved.\r\n         * @param onlyResolved - Returns only the conflicts that are resolved.\r\n         */\r\n        GitRestClient.prototype.getPullRequestConflicts = function (repositoryId, pullRequestId, project, skip, top, includeObsolete, excludeResolved, onlyResolved) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$skip': skip,\r\n                        '$top': top,\r\n                        includeObsolete: includeObsolete,\r\n                        excludeResolved: excludeResolved,\r\n                        onlyResolved: onlyResolved\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update merge conflict resolution\r\n         *\r\n         * @param conflict -\r\n         * @param repositoryId -\r\n         * @param pullRequestId -\r\n         * @param conflictId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequestConflict = function (conflict, repositoryId, pullRequestId, conflictId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                conflictId: conflictId\r\n                            },\r\n                            body: conflict\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update multiple merge conflict resolutions\r\n         *\r\n         * @param conflictUpdates -\r\n         * @param repositoryId -\r\n         * @param pullRequestId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequestConflicts = function (conflictUpdates, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: conflictUpdates\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve the changes made in a pull request between two iterations.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the pull request iteration. \\<br /\\> Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request.\r\n         * @param project - Project ID or project name\r\n         * @param top - Optional. The number of changes to retrieve.  The default value is 100 and the maximum value is 2000.\r\n         * @param skip - Optional. The number of changes to ignore.  For example, to retrieve changes 101-150, set top 50 and skip to 100.\r\n         * @param compareTo - ID of the pull request iteration to compare against.  The default value is zero which indicates the comparison is made against the common commit between the source and target branches\r\n         */\r\n        GitRestClient.prototype.getPullRequestIterationChanges = function (repositoryId, pullRequestId, iterationId, project, top, skip, compareTo) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$top': top,\r\n                        '$skip': skip,\r\n                        '$compareTo': compareTo\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the specified iteration for a pull request.\r\n         *\r\n         * @param repositoryId - ID or name of the repository.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the pull request iteration to return.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestIteration = function (repositoryId, pullRequestId, iterationId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the list of iterations for the specified pull request.\r\n         *\r\n         * @param repositoryId - ID or name of the repository.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         * @param includeCommits - If true, include the commits associated with each iteration in the response.\r\n         */\r\n        GitRestClient.prototype.getPullRequestIterations = function (repositoryId, pullRequestId, project, includeCommits) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeCommits: includeCommits\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body.\r\n         *\r\n         * @param status - Pull request status to create.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the pull request iteration.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createPullRequestIterationStatus = function (status, repositoryId, pullRequestId, iterationId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId\r\n                            },\r\n                            body: status\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete pull request iteration status.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the pull request iteration.\r\n         * @param statusId - ID of the pull request status.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.deletePullRequestIterationStatus = function (repositoryId, pullRequestId, iterationId, statusId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId,\r\n                                statusId: statusId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the pull request iteration.\r\n         * @param statusId - ID of the pull request status.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestIterationStatus = function (repositoryId, pullRequestId, iterationId, statusId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId,\r\n                                statusId: statusId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get all the statuses associated with a pull request iteration.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the pull request iteration.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestIterationStatuses = function (repositoryId, pullRequestId, iterationId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update pull request iteration statuses collection. The only supported operation type is \\`remove\\`.\r\n         *\r\n         * @param patchDocument - Operations to apply to the pull request statuses in JSON Patch format.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param iterationId - ID of the pull request iteration.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequestIterationStatuses = function (patchDocument, repositoryId, pullRequestId, iterationId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                iterationId: iterationId\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/json-patch+json\",\r\n                            },\r\n                            body: patchDocument\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a tag (if that does not exists yet) and add that as a label (tag) for a specified pull request. The only required field is the name of the new label (tag).\r\n         *\r\n         * @param label - Label to assign to the pull request.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         * @param projectId - Project ID or project name.\r\n         */\r\n        GitRestClient.prototype.createPullRequestLabel = function (label, repositoryId, pullRequestId, project, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectId: projectId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: label\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Removes a label (tag) from the set of those assigned to the pull request. The tag itself will not be deleted.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param labelIdOrName - The name or ID of the label requested.\r\n         * @param project - Project ID or project name\r\n         * @param projectId - Project ID or project name.\r\n         */\r\n        GitRestClient.prototype.deletePullRequestLabels = function (repositoryId, pullRequestId, labelIdOrName, project, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectId: projectId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                labelIdOrName: labelIdOrName\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieves a single label (tag) that has been assigned to a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param labelIdOrName - The name or ID of the label requested.\r\n         * @param project - Project ID or project name\r\n         * @param projectId - Project ID or project name.\r\n         */\r\n        GitRestClient.prototype.getPullRequestLabel = function (repositoryId, pullRequestId, labelIdOrName, project, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectId: projectId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                labelIdOrName: labelIdOrName\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get all the labels (tags) assigned to a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         * @param projectId - Project ID or project name.\r\n         */\r\n        GitRestClient.prototype.getPullRequestLabels = function (repositoryId, pullRequestId, project, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectId: projectId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get external properties of the pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestProperties = function (repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create or update pull request external properties. The patch operation can be \\`add\\`, \\`replace\\` or \\`remove\\`. For \\`add\\` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For \\`replace\\` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For \\`remove\\` operation, the path cannot be empty. If the path does not exist, no action will be performed.\r\n         *\r\n         * @param patchDocument - Properties to add, replace or remove in JSON Patch format.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequestProperties = function (patchDocument, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/json-patch+json\",\r\n                            },\r\n                            body: patchDocument\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * This API is used to find what pull requests are related to a given commit.  It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit.  The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -\\> pull requests.\r\n         *\r\n         * @param queries - The list of queries to perform.\r\n         * @param repositoryId - ID of the repository.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestQuery = function (queries, repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/PullRequestQuery\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: queries\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Add a reviewer to a pull request or cast a vote.\r\n         *\r\n         * @param reviewer - Reviewer's vote.\\<br /\\>If the reviewer's ID is included here, it must match the reviewerID parameter.\\<br /\\>Reviewers can set their own vote with this method.  When adding other reviewers, vote must be set to zero.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param reviewerId - ID of the reviewer.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createPullRequestReviewer = function (reviewer, repositoryId, pullRequestId, reviewerId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PUT\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                reviewerId: reviewerId\r\n                            },\r\n                            body: reviewer\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Add reviewers to a pull request.\r\n         *\r\n         * @param reviewers - Reviewers to add to the pull request.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createPullRequestReviewers = function (reviewers, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: reviewers\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Add an unmaterialized identity to the reviewers of a pull request.\r\n         *\r\n         * @param reviewer - Reviewer to add to the pull request.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createUnmaterializedPullRequestReviewer = function (reviewer, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PUT\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: reviewer\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Remove a reviewer from a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param reviewerId - ID of the reviewer to remove.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.deletePullRequestReviewer = function (repositoryId, pullRequestId, reviewerId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                reviewerId: reviewerId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve information about a particular reviewer on a pull request\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param reviewerId - ID of the reviewer.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestReviewer = function (repositoryId, pullRequestId, reviewerId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                reviewerId: reviewerId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve the reviewers for a pull request\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestReviewers = function (repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined\r\n         *\r\n         * @param reviewer - Reviewer data.\\<br /\\>If the reviewer's ID is included here, it must match the reviewerID parameter.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param reviewerId - ID of the reviewer.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequestReviewer = function (reviewer, repositoryId, pullRequestId, reviewerId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                reviewerId: reviewerId\r\n                            },\r\n                            body: reviewer\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Reset the votes of multiple reviewers on a pull request.  NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names.\r\n         *\r\n         * @param patchVotes - IDs of the reviewers whose votes will be reset to zero\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequestReviewers = function (patchVotes, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: patchVotes\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a pull request.\r\n         *\r\n         * @param pullRequestId - The ID of the pull request to retrieve.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestById = function (pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/pullRequests/{pullRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all pull requests matching a specified criteria.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param searchCriteria - Pull requests will be returned that match this search criteria.\r\n         * @param maxCommentLength - Not used.\r\n         * @param skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.\r\n         * @param top - The number of pull requests to retrieve.\r\n         */\r\n        GitRestClient.prototype.getPullRequestsByProject = function (project, searchCriteria, maxCommentLength, skip, top) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        searchCriteria: searchCriteria,\r\n                        maxCommentLength: maxCommentLength,\r\n                        '$skip': skip,\r\n                        '$top': top\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/pullRequests\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a pull request.\r\n         *\r\n         * @param gitPullRequestToCreate - The pull request to create.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param project - Project ID or project name\r\n         * @param supportsIterations - If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed.\r\n         */\r\n        GitRestClient.prototype.createPullRequest = function (gitPullRequestToCreate, repositoryId, project, supportsIterations) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        supportsIterations: supportsIterations\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: gitPullRequestToCreate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - The ID of the pull request to retrieve.\r\n         * @param project - Project ID or project name\r\n         * @param maxCommentLength - Not used.\r\n         * @param skip - Not used.\r\n         * @param top - Not used.\r\n         * @param includeCommits - If true, the pull request will be returned with the associated commits.\r\n         * @param includeWorkItemRefs - If true, the pull request will be returned with the associated work item references.\r\n         */\r\n        GitRestClient.prototype.getPullRequest = function (repositoryId, pullRequestId, project, maxCommentLength, skip, top, includeCommits, includeWorkItemRefs) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        maxCommentLength: maxCommentLength,\r\n                        '$skip': skip,\r\n                        '$top': top,\r\n                        includeCommits: includeCommits,\r\n                        includeWorkItemRefs: includeWorkItemRefs\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all pull requests matching a specified criteria.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param searchCriteria - Pull requests will be returned that match this search criteria.\r\n         * @param project - Project ID or project name\r\n         * @param maxCommentLength - Not used.\r\n         * @param skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.\r\n         * @param top - The number of pull requests to retrieve.\r\n         */\r\n        GitRestClient.prototype.getPullRequests = function (repositoryId, searchCriteria, project, maxCommentLength, skip, top) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        searchCriteria: searchCriteria,\r\n                        maxCommentLength: maxCommentLength,\r\n                        '$skip': skip,\r\n                        '$top': top\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update a pull request\r\n         *\r\n         * @param gitPullRequestToUpdate - The pull request content that should be updated.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request to update.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequest = function (gitPullRequestToUpdate, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: gitPullRequestToUpdate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Sends an e-mail notification about a specific pull request to a set of recipients\r\n         *\r\n         * @param userMessage -\r\n         * @param repositoryId - ID of the git repository.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.sharePullRequest = function (userMessage, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/share\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: userMessage\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a pull request status.\r\n         *\r\n         * @param status - Pull request status to create.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createPullRequestStatus = function (status, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: status\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete pull request status.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param statusId - ID of the pull request status.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.deletePullRequestStatus = function (repositoryId, pullRequestId, statusId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                statusId: statusId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param statusId - ID of the pull request status.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestStatus = function (repositoryId, pullRequestId, statusId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                statusId: statusId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get all the statuses associated with a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestStatuses = function (repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update pull request statuses collection. The only supported operation type is \\`remove\\`.\r\n         *\r\n         * @param patchDocument - Operations to apply to the pull request statuses in JSON Patch format.\r\n         * @param repositoryId - The repository ID of the pull request’s target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updatePullRequestStatuses = function (patchDocument, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/json-patch+json\",\r\n                            },\r\n                            body: patchDocument\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread).\r\n         *\r\n         * @param comment - The comment to create. Comments can be up to 150,000 characters.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - ID of the thread that the desired comment is in.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createComment = function (comment, repositoryId, pullRequestId, threadId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId\r\n                            },\r\n                            body: comment\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete a comment associated with a specific thread in a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - ID of the thread that the desired comment is in.\r\n         * @param commentId - ID of the comment.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.deleteComment = function (repositoryId, pullRequestId, threadId, commentId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId,\r\n                                commentId: commentId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a comment associated with a specific thread in a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - ID of the thread that the desired comment is in.\r\n         * @param commentId - ID of the comment.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getComment = function (repositoryId, pullRequestId, threadId, commentId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId,\r\n                                commentId: commentId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all comments associated with a specific thread in a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - ID of the thread.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getComments = function (repositoryId, pullRequestId, threadId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update a comment associated with a specific thread in a pull request.\r\n         *\r\n         * @param comment - The comment content that should be updated. Comments can be up to 150,000 characters.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - ID of the thread that the desired comment is in.\r\n         * @param commentId - ID of the comment to update.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updateComment = function (comment, repositoryId, pullRequestId, threadId, commentId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId,\r\n                                commentId: commentId\r\n                            },\r\n                            body: comment\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a thread in a pull request.\r\n         *\r\n         * @param commentThread - The thread to create. Thread must contain at least one comment.\r\n         * @param repositoryId - Repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createThread = function (commentThread, repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            body: commentThread\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a thread in a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - ID of the thread.\r\n         * @param project - Project ID or project name\r\n         * @param iteration - If specified, thread position will be tracked using this iteration as the right side of the diff.\r\n         * @param baseIteration - If specified, thread position will be tracked using this iteration as the left side of the diff.\r\n         */\r\n        GitRestClient.prototype.getPullRequestThread = function (repositoryId, pullRequestId, threadId, project, iteration, baseIteration) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$iteration': iteration,\r\n                        '$baseIteration': baseIteration\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all threads in a pull request.\r\n         *\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         * @param iteration - If specified, thread positions will be tracked using this iteration as the right side of the diff.\r\n         * @param baseIteration - If specified, thread positions will be tracked using this iteration as the left side of the diff.\r\n         */\r\n        GitRestClient.prototype.getThreads = function (repositoryId, pullRequestId, project, iteration, baseIteration) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$iteration': iteration,\r\n                        '$baseIteration': baseIteration\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update a thread in a pull request.\r\n         *\r\n         * @param commentThread - The thread content that should be updated.\r\n         * @param repositoryId - The repository ID of the pull request's target branch.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param threadId - ID of the thread to update.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updateThread = function (commentThread, repositoryId, pullRequestId, threadId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId,\r\n                                threadId: threadId\r\n                            },\r\n                            body: commentThread\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a list of work items associated with a pull request.\r\n         *\r\n         * @param repositoryId - ID or name of the repository.\r\n         * @param pullRequestId - ID of the pull request.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getPullRequestWorkItemRefs = function (repositoryId, pullRequestId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pullRequestId: pullRequestId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Push changes to the repository.\r\n         *\r\n         * @param push -\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createPush = function (push, repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: push\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieves a particular push.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param pushId - ID of the push.\r\n         * @param project - Project ID or project name\r\n         * @param includeCommits - The number of commits to include in the result.\r\n         * @param includeRefUpdates - If true, include the list of refs that were updated by the push.\r\n         */\r\n        GitRestClient.prototype.getPush = function (repositoryId, pushId, project, includeCommits, includeRefUpdates) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeCommits: includeCommits,\r\n                        includeRefUpdates: includeRefUpdates\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                pushId: pushId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieves pushes associated with the specified repository.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param skip - Number of pushes to skip.\r\n         * @param top - Number of pushes to return.\r\n         * @param searchCriteria - Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references.\r\n         */\r\n        GitRestClient.prototype.getPushes = function (repositoryId, project, skip, top, searchCriteria) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$skip': skip,\r\n                        '$top': top,\r\n                        searchCriteria: searchCriteria\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Destroy (hard delete) a soft-deleted Git repository.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The ID of the repository.\r\n         */\r\n        GitRestClient.prototype.deleteRepositoryFromRecycleBin = function (project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/recycleBin/repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve soft-deleted git repositories from the recycle bin.\r\n         *\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getRecycleBinRepositories = function (project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/recycleBin/repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable.\r\n         *\r\n         * @param repositoryDetails -\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The ID of the repository.\r\n         */\r\n        GitRestClient.prototype.restoreRepositoryFromRecycleBin = function (repositoryDetails, project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/recycleBin/repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: repositoryDetails\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Queries the provided repository for its refs and returns them.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param filter - [optional] A filter to apply to the refs (starts with).\r\n         * @param includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false.\r\n         * @param includeStatuses - [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false.\r\n         * @param includeMyBranches - [optional] Includes only branches that the user owns, the branches the user favorites, and the default branch. The default value is false. Cannot be combined with the filter parameter.\r\n         * @param latestStatusesOnly - [optional] True to include only the tip commit status for each ref. This option requires \\`includeStatuses\\` to be true. The default value is false.\r\n         * @param peelTags - [optional] Annotated tags will populate the PeeledObjectId property. default is false.\r\n         * @param filterContains - [optional] A filter to apply to the refs (contains).\r\n         */\r\n        GitRestClient.prototype.getRefs = function (repositoryId, project, filter, includeLinks, includeStatuses, includeMyBranches, latestStatusesOnly, peelTags, filterContains) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        filter: filter,\r\n                        includeLinks: includeLinks,\r\n                        includeStatuses: includeStatuses,\r\n                        includeMyBranches: includeMyBranches,\r\n                        latestStatusesOnly: latestStatusesOnly,\r\n                        peelTags: peelTags,\r\n                        filterContains: filterContains\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            returnRawResponse: true\r\n                        }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {\r\n                            var body;\r\n                            return __generator(this, function (_a) {\r\n                                switch (_a.label) {\r\n                                    case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];\r\n                                    case 1:\r\n                                        body = _a.sent();\r\n                                        body.continuationToken = response.headers.get(\"x-ms-continuationtoken\");\r\n                                        return [2 /*return*/, body];\r\n                                }\r\n                            });\r\n                        }); })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Lock or Unlock a branch.\r\n         *\r\n         * @param newRefInfo - The ref update action (lock/unlock) to perform\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param filter - The name of the branch to lock/unlock\r\n         * @param project - Project ID or project name\r\n         * @param projectId - ID or name of the team project. Optional if specifying an ID for repository.\r\n         */\r\n        GitRestClient.prototype.updateRef = function (newRefInfo, repositoryId, filter, project, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        filter: filter,\r\n                        projectId: projectId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: newRefInfo\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Creating, updating, or deleting refs(branches).\r\n         *\r\n         * @param refUpdates - List of ref updates to attempt to perform\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param projectId - ID or name of the team project. Optional if specifying an ID for repository.\r\n         */\r\n        GitRestClient.prototype.updateRefs = function (refUpdates, repositoryId, project, projectId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectId: projectId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: refUpdates\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Creates a ref favorite\r\n         *\r\n         * @param favorite - The ref favorite to create.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createFavorite = function (favorite, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/favorites/refs/{favoriteId}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            body: favorite\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Deletes the refs favorite specified\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param favoriteId - The Id of the ref favorite to delete.\r\n         */\r\n        GitRestClient.prototype.deleteRefFavorite = function (project, favoriteId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/favorites/refs/{favoriteId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                favoriteId: favoriteId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the refs favorite for a favorite Id.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param favoriteId - The Id of the requested ref favorite.\r\n         */\r\n        GitRestClient.prototype.getRefFavorite = function (project, favoriteId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/favorites/refs/{favoriteId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                favoriteId: favoriteId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the refs favorites for a repo and an identity.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - The id of the repository.\r\n         * @param identityId - The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used.\r\n         */\r\n        GitRestClient.prototype.getRefFavorites = function (project, repositoryId, identityId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        repositoryId: repositoryId,\r\n                        identityId: identityId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/favorites/refs/{favoriteId}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * @param project - Project ID or project name\r\n         * @param identityId -\r\n         */\r\n        GitRestClient.prototype.getRefFavoritesForProject = function (project, identityId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        identityId: identityId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/favorites/refsForProject\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a git repository in a team project.\r\n         *\r\n         * @param gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id).\r\n         * @param project - Project ID or project name\r\n         * @param sourceRef - [optional] Specify the source refs to use while creating a fork repo\r\n         */\r\n        GitRestClient.prototype.createRepository = function (gitRepositoryToCreate, project, sourceRef) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        sourceRef: sourceRef\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/Repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: gitRepositoryToCreate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete a git repository\r\n         *\r\n         * @param repositoryId - The ID of the repository.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.deleteRepository = function (repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/git/Repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve git repositories.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param includeLinks - [optional] True to include reference links. The default value is false.\r\n         * @param includeAllUrls - [optional] True to include all remote URLs. The default value is false.\r\n         * @param includeHidden - [optional] True to include hidden repositories. The default value is false.\r\n         */\r\n        GitRestClient.prototype.getRepositories = function (project, includeLinks, includeAllUrls, includeHidden) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks,\r\n                        includeAllUrls: includeAllUrls,\r\n                        includeHidden: includeHidden\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/Repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a git repository.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getRepository = function (repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/Repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a git repository.\r\n         *\r\n         * @param repositoryId - The name or ID of the repository.\r\n         * @param includeParent - True to include parent repository. Only available in authenticated calls.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getRepositoryWithParent = function (repositoryId, includeParent, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeParent: includeParent\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/Repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Updates the Git repository with either a new repo name or a new default branch.\r\n         *\r\n         * @param newRepositoryInfo - Specify a new repo name or a new default branch of the repository\r\n         * @param repositoryId - The ID of the repository.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updateRepository = function (newRepositoryInfo, repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/Repositories/{repositoryId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: newRepositoryInfo\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve git repositories with filter by name and pagination.\r\n         *\r\n         * @param projectId - ID or name of the team project.\r\n         * @param includeLinks - [optional] True to include reference links. The default value is false.\r\n         * @param includeAllUrls - [optional] True to include all remote URLs. The default value is false.\r\n         * @param includeHidden - [optional] True to include hidden repositories. The default value is false.\r\n         * @param filterContains - [optional] A filter to apply to the refs (contains).\r\n         * @param top - [optional] Maximum number of repositories to return. It cannot be bigger than 500. If it is not provided but continuationToken is, top will default to 100.\r\n         * @param continuationToken - The continuation token used for pagination.\r\n         */\r\n        GitRestClient.prototype.getRepositoriesPaged = function (projectId, includeLinks, includeAllUrls, includeHidden, filterContains, top, continuationToken) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        includeLinks: includeLinks,\r\n                        includeAllUrls: includeAllUrls,\r\n                        includeHidden: includeHidden,\r\n                        filterContains: filterContains,\r\n                        '$top': top,\r\n                        continuationToken: continuationToken\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"_apis/git/{projectId}/repositoriesPaged\",\r\n                            routeValues: {\r\n                                projectId: projectId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            returnRawResponse: true\r\n                        }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {\r\n                            var body;\r\n                            return __generator(this, function (_a) {\r\n                                switch (_a.label) {\r\n                                    case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];\r\n                                    case 1:\r\n                                        body = _a.sent();\r\n                                        body.continuationToken = response.headers.get(\"x-ms-continuationtoken\");\r\n                                        return [2 /*return*/, body];\r\n                                }\r\n                            });\r\n                        }); })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve one conflict for a revert by ID\r\n         *\r\n         * @param repositoryId -\r\n         * @param revertId -\r\n         * @param conflictId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.getRevertConflict = function (repositoryId, revertId, conflictId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                revertId: revertId,\r\n                                conflictId: conflictId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve all conflicts for a revert\r\n         *\r\n         * @param repositoryId -\r\n         * @param revertId -\r\n         * @param project - Project ID or project name\r\n         * @param continuationToken -\r\n         * @param top -\r\n         * @param excludeResolved -\r\n         * @param onlyResolved -\r\n         * @param includeObsolete -\r\n         */\r\n        GitRestClient.prototype.getRevertConflicts = function (repositoryId, revertId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        continuationToken: continuationToken,\r\n                        '$top': top,\r\n                        excludeResolved: excludeResolved,\r\n                        onlyResolved: onlyResolved,\r\n                        includeObsolete: includeObsolete\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                revertId: revertId\r\n                            },\r\n                            queryParams: queryValues,\r\n                            returnRawResponse: true\r\n                        }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {\r\n                            var body;\r\n                            return __generator(this, function (_a) {\r\n                                switch (_a.label) {\r\n                                    case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];\r\n                                    case 1:\r\n                                        body = _a.sent();\r\n                                        body.continuationToken = response.headers.get(\"x-ms-continuationtoken\");\r\n                                        return [2 /*return*/, body];\r\n                                }\r\n                            });\r\n                        }); })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update merge conflict resolution\r\n         *\r\n         * @param conflict -\r\n         * @param repositoryId -\r\n         * @param revertId -\r\n         * @param conflictId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updateRevertConflict = function (conflict, repositoryId, revertId, conflictId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                revertId: revertId,\r\n                                conflictId: conflictId\r\n                            },\r\n                            body: conflict\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update multiple merge conflict resolutions\r\n         *\r\n         * @param conflictUpdates -\r\n         * @param repositoryId -\r\n         * @param revertId -\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.updateRevertConflicts = function (conflictUpdates, repositoryId, revertId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                revertId: revertId\r\n                            },\r\n                            body: conflictUpdates\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request.\r\n         *\r\n         * @param revertToCreate -\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - ID of the repository.\r\n         */\r\n        GitRestClient.prototype.createRevert = function (revertToCreate, project, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: revertToCreate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve information about a revert operation by revert Id.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param revertId - ID of the revert operation.\r\n         * @param repositoryId - ID of the repository.\r\n         */\r\n        GitRestClient.prototype.getRevert = function (project, revertId, repositoryId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                revertId: revertId,\r\n                                repositoryId: repositoryId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve information about a revert operation for a specific branch.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param repositoryId - ID of the repository.\r\n         * @param refName - The GitAsyncRefOperationParameters generatedRefName used for the revert operation.\r\n         */\r\n        GitRestClient.prototype.getRevertForRefName = function (project, repositoryId, refName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        refName: refName\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create Git commit status.\r\n         *\r\n         * @param gitCommitStatusToCreate - Git commit status object to create.\r\n         * @param commitId - ID of the Git commit.\r\n         * @param repositoryId - ID of the repository.\r\n         * @param project - Project ID or project name\r\n         */\r\n        GitRestClient.prototype.createCommitStatus = function (gitCommitStatusToCreate, commitId, repositoryId, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                commitId: commitId,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            body: gitCommitStatusToCreate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get statuses associated with the Git commit.\r\n         *\r\n         * @param commitId - ID of the Git commit.\r\n         * @param repositoryId - ID of the repository.\r\n         * @param project - Project ID or project name\r\n         * @param top - Optional. The number of statuses to retrieve. Default is 1000.\r\n         * @param skip - Optional. The number of statuses to ignore. Default is 0. For example, to retrieve results 101-150, set top to 50 and skip to 100.\r\n         * @param latestOnly - The flag indicates whether to get only latest statuses grouped by \\`Context.Name\\` and \\`Context.Genre\\`.\r\n         */\r\n        GitRestClient.prototype.getStatuses = function (commitId, repositoryId, project, top, skip, latestOnly) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        top: top,\r\n                        skip: skip,\r\n                        latestOnly: latestOnly\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                commitId: commitId,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieve a pull request suggestion for a particular repository or team project.\r\n         *\r\n         * @param repositoryId - ID of the git repository.\r\n         * @param project - Project ID or project name\r\n         * @param preferCompareBranch - If true, prefer the compare branch over the default branch as target branch for pull requests.\r\n         */\r\n        GitRestClient.prototype.getSuggestions = function (repositoryId, project, preferCompareBranch) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        preferCompareBranch: preferCompareBranch\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/suggestions\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository.\r\n         *\r\n         * @param repositoryId - Repository Id.\r\n         * @param sha1 - SHA1 hash of the tree object.\r\n         * @param project - Project ID or project name\r\n         * @param projectId - Project Id.\r\n         * @param recursive - Search recursively. Include trees underneath this tree. Default is false.\r\n         * @param fileName - Name to use if a .zip file is returned. Default is the object ID.\r\n         */\r\n        GitRestClient.prototype.getTree = function (repositoryId, sha1, project, projectId, recursive, fileName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectId: projectId,\r\n                        recursive: recursive,\r\n                        fileName: fileName\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                sha1: sha1\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository.\r\n         *\r\n         * @param repositoryId - Repository Id.\r\n         * @param sha1 - SHA1 hash of the tree object.\r\n         * @param project - Project ID or project name\r\n         * @param projectId - Project Id.\r\n         * @param recursive - Search recursively. Include trees underneath this tree. Default is false.\r\n         * @param fileName - Name to use if a .zip file is returned. Default is the object ID.\r\n         */\r\n        GitRestClient.prototype.getTreeZip = function (repositoryId, sha1, project, projectId, recursive, fileName) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        projectId: projectId,\r\n                        recursive: recursive,\r\n                        fileName: fileName\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"7.2-preview.1\",\r\n                            httpResponseType: \"application/zip\",\r\n                            routeTemplate: \"{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                repositoryId: repositoryId,\r\n                                sha1: sha1\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        GitRestClient.RESOURCE_AREA_ID = \"4e080c62-fa21-4fbc-8fef-2a10a2b38049\";\r\n        return GitRestClient;\r\n    }(RestClientBase_1.RestClientBase));\r\n    exports.GitRestClient = GitRestClient;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Git/GitClient.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Git/GitServices.js":
/*!********************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Git/GitServices.js ***!
  \********************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * Contribution ids of Azure Pipelines services which can be obtained from DevOps.getService\r\n     */\r\n    var GitServiceIds;\r\n    (function (GitServiceIds) {\r\n        GitServiceIds[\"VersionControlRepositoryService\"] = \"ms.vss-code-web.vc-repository-service\";\r\n    })(GitServiceIds = exports.GitServiceIds || (exports.GitServiceIds = {}));\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Git/GitServices.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/Git/index.js":
/*!**************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/Git/index.js ***!
  \**************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./CodeEditorTypes */ \"./node_modules/azure-devops-extension-api/Git/CodeEditorTypes.js\"), __webpack_require__(/*! ./Git */ \"./node_modules/azure-devops-extension-api/Git/Git.js\"), __webpack_require__(/*! ./GitClient */ \"./node_modules/azure-devops-extension-api/Git/GitClient.js\"), __webpack_require__(/*! ./GitServices */ \"./node_modules/azure-devops-extension-api/Git/GitServices.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, CodeEditorTypes_1, Git_1, GitClient_1, GitServices_1) {\r\n    \"use strict\";\r\n    function __export(m) {\r\n        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n    }\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    __export(CodeEditorTypes_1);\r\n    __export(Git_1);\r\n    __export(GitClient_1);\r\n    __export(GitServices_1);\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/Git/index.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTracking.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTracking.js ***!
  \**************************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * Flag to control error policy in a batch classification nodes get request.\r\n     */\r\n    var ClassificationNodesErrorPolicy;\r\n    (function (ClassificationNodesErrorPolicy) {\r\n        ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy[\"Fail\"] = 1] = \"Fail\";\r\n        ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy[\"Omit\"] = 2] = \"Omit\";\r\n    })(ClassificationNodesErrorPolicy = exports.ClassificationNodesErrorPolicy || (exports.ClassificationNodesErrorPolicy = {}));\r\n    /**\r\n     * Specifies the additional data retrieval options for work item comments.\r\n     */\r\n    var CommentExpandOptions;\r\n    (function (CommentExpandOptions) {\r\n        CommentExpandOptions[CommentExpandOptions[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Include comment reactions.\r\n         */\r\n        CommentExpandOptions[CommentExpandOptions[\"Reactions\"] = 1] = \"Reactions\";\r\n        /**\r\n         * Include the rendered text (html) in addition to MD text.\r\n         */\r\n        CommentExpandOptions[CommentExpandOptions[\"RenderedText\"] = 8] = \"RenderedText\";\r\n        /**\r\n         * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes.\r\n         */\r\n        CommentExpandOptions[CommentExpandOptions[\"RenderedTextOnly\"] = 16] = \"RenderedTextOnly\";\r\n        CommentExpandOptions[CommentExpandOptions[\"All\"] = -17] = \"All\";\r\n    })(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {}));\r\n    /**\r\n     * Represents the possible types for the comment format. Should be in sync with WorkItemCommentFormat.cs\r\n     */\r\n    var CommentFormat;\r\n    (function (CommentFormat) {\r\n        CommentFormat[CommentFormat[\"Markdown\"] = 0] = \"Markdown\";\r\n        CommentFormat[CommentFormat[\"Html\"] = 1] = \"Html\";\r\n    })(CommentFormat = exports.CommentFormat || (exports.CommentFormat = {}));\r\n    /**\r\n     * Represents different reaction types for a work item comment.\r\n     */\r\n    var CommentReactionType;\r\n    (function (CommentReactionType) {\r\n        CommentReactionType[CommentReactionType[\"Like\"] = 0] = \"Like\";\r\n        CommentReactionType[CommentReactionType[\"Dislike\"] = 1] = \"Dislike\";\r\n        CommentReactionType[CommentReactionType[\"Heart\"] = 2] = \"Heart\";\r\n        CommentReactionType[CommentReactionType[\"Hooray\"] = 3] = \"Hooray\";\r\n        CommentReactionType[CommentReactionType[\"Smile\"] = 4] = \"Smile\";\r\n        CommentReactionType[CommentReactionType[\"Confused\"] = 5] = \"Confused\";\r\n    })(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {}));\r\n    var CommentSortOrder;\r\n    (function (CommentSortOrder) {\r\n        /**\r\n         * The results will be sorted in Ascending order.\r\n         */\r\n        CommentSortOrder[CommentSortOrder[\"Asc\"] = 1] = \"Asc\";\r\n        /**\r\n         * The results will be sorted in Descending order.\r\n         */\r\n        CommentSortOrder[CommentSortOrder[\"Desc\"] = 2] = \"Desc\";\r\n    })(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {}));\r\n    /**\r\n     * Enum for field types.\r\n     */\r\n    var FieldType;\r\n    (function (FieldType) {\r\n        /**\r\n         * String field type.\r\n         */\r\n        FieldType[FieldType[\"String\"] = 0] = \"String\";\r\n        /**\r\n         * Integer field type.\r\n         */\r\n        FieldType[FieldType[\"Integer\"] = 1] = \"Integer\";\r\n        /**\r\n         * Datetime field type.\r\n         */\r\n        FieldType[FieldType[\"DateTime\"] = 2] = \"DateTime\";\r\n        /**\r\n         * Plain text field type.\r\n         */\r\n        FieldType[FieldType[\"PlainText\"] = 3] = \"PlainText\";\r\n        /**\r\n         * HTML (Multiline) field type.\r\n         */\r\n        FieldType[FieldType[\"Html\"] = 4] = \"Html\";\r\n        /**\r\n         * Treepath field type.\r\n         */\r\n        FieldType[FieldType[\"TreePath\"] = 5] = \"TreePath\";\r\n        /**\r\n         * History field type.\r\n         */\r\n        FieldType[FieldType[\"History\"] = 6] = \"History\";\r\n        /**\r\n         * Double field type.\r\n         */\r\n        FieldType[FieldType[\"Double\"] = 7] = \"Double\";\r\n        /**\r\n         * Guid field type.\r\n         */\r\n        FieldType[FieldType[\"Guid\"] = 8] = \"Guid\";\r\n        /**\r\n         * Boolean field type.\r\n         */\r\n        FieldType[FieldType[\"Boolean\"] = 9] = \"Boolean\";\r\n        /**\r\n         * Identity field type.\r\n         */\r\n        FieldType[FieldType[\"Identity\"] = 10] = \"Identity\";\r\n        /**\r\n         * String picklist field type. When creating a string picklist field from REST API, use \"String\" FieldType.\r\n         */\r\n        FieldType[FieldType[\"PicklistString\"] = 11] = \"PicklistString\";\r\n        /**\r\n         * Integer picklist field type. When creating a integer picklist field from REST API, use \"Integer\" FieldType.\r\n         */\r\n        FieldType[FieldType[\"PicklistInteger\"] = 12] = \"PicklistInteger\";\r\n        /**\r\n         * Double picklist field type. When creating a double picklist field from REST API, use \"Double\" FieldType.\r\n         */\r\n        FieldType[FieldType[\"PicklistDouble\"] = 13] = \"PicklistDouble\";\r\n    })(FieldType = exports.FieldType || (exports.FieldType = {}));\r\n    /**\r\n     * Enum for field usages.\r\n     */\r\n    var FieldUsage;\r\n    (function (FieldUsage) {\r\n        /**\r\n         * Empty usage.\r\n         */\r\n        FieldUsage[FieldUsage[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Work item field usage.\r\n         */\r\n        FieldUsage[FieldUsage[\"WorkItem\"] = 1] = \"WorkItem\";\r\n        /**\r\n         * Work item link field usage.\r\n         */\r\n        FieldUsage[FieldUsage[\"WorkItemLink\"] = 2] = \"WorkItemLink\";\r\n        /**\r\n         * Treenode field usage.\r\n         */\r\n        FieldUsage[FieldUsage[\"Tree\"] = 3] = \"Tree\";\r\n        /**\r\n         * Work Item Type Extension usage.\r\n         */\r\n        FieldUsage[FieldUsage[\"WorkItemTypeExtension\"] = 4] = \"WorkItemTypeExtension\";\r\n    })(FieldUsage = exports.FieldUsage || (exports.FieldUsage = {}));\r\n    /**\r\n     * Flag to expand types of fields.\r\n     */\r\n    var GetFieldsExpand;\r\n    (function (GetFieldsExpand) {\r\n        /**\r\n         * Default behavior.\r\n         */\r\n        GetFieldsExpand[GetFieldsExpand[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Adds extension fields to the response.\r\n         */\r\n        GetFieldsExpand[GetFieldsExpand[\"ExtensionFields\"] = 1] = \"ExtensionFields\";\r\n        /**\r\n         * Includes fields that have been deleted.\r\n         */\r\n        GetFieldsExpand[GetFieldsExpand[\"IncludeDeleted\"] = 2] = \"IncludeDeleted\";\r\n    })(GetFieldsExpand = exports.GetFieldsExpand || (exports.GetFieldsExpand = {}));\r\n    /**\r\n     * Format for multiline field selected by the last edit user.\r\n     */\r\n    var LargeTextCustomHtmlFormat;\r\n    (function (LargeTextCustomHtmlFormat) {\r\n        /**\r\n         * Markdown format for text content.\r\n         */\r\n        LargeTextCustomHtmlFormat[LargeTextCustomHtmlFormat[\"Markdown\"] = 0] = \"Markdown\";\r\n        /**\r\n         * HTML format for text content.\r\n         */\r\n        LargeTextCustomHtmlFormat[LargeTextCustomHtmlFormat[\"Html\"] = 1] = \"Html\";\r\n    })(LargeTextCustomHtmlFormat = exports.LargeTextCustomHtmlFormat || (exports.LargeTextCustomHtmlFormat = {}));\r\n    /**\r\n     * The link query mode which determines the behavior of the query.\r\n     */\r\n    var LinkQueryMode;\r\n    (function (LinkQueryMode) {\r\n        /**\r\n         * Returns flat list of work items.\r\n         */\r\n        LinkQueryMode[LinkQueryMode[\"WorkItems\"] = 0] = \"WorkItems\";\r\n        /**\r\n         * Returns work items where the source, target, and link criteria are all satisfied.\r\n         */\r\n        LinkQueryMode[LinkQueryMode[\"LinksOneHopMustContain\"] = 1] = \"LinksOneHopMustContain\";\r\n        /**\r\n         * Returns work items that satisfy the source and link criteria, even if no linked work item satisfies the target criteria.\r\n         */\r\n        LinkQueryMode[LinkQueryMode[\"LinksOneHopMayContain\"] = 2] = \"LinksOneHopMayContain\";\r\n        /**\r\n         * Returns work items that satisfy the source, only if no linked work item satisfies the link and target criteria.\r\n         */\r\n        LinkQueryMode[LinkQueryMode[\"LinksOneHopDoesNotContain\"] = 3] = \"LinksOneHopDoesNotContain\";\r\n        LinkQueryMode[LinkQueryMode[\"LinksRecursiveMustContain\"] = 4] = \"LinksRecursiveMustContain\";\r\n        /**\r\n         * Returns work items a hierarchy of work items that by default satisfy the source\r\n         */\r\n        LinkQueryMode[LinkQueryMode[\"LinksRecursiveMayContain\"] = 5] = \"LinksRecursiveMayContain\";\r\n        LinkQueryMode[LinkQueryMode[\"LinksRecursiveDoesNotContain\"] = 6] = \"LinksRecursiveDoesNotContain\";\r\n    })(LinkQueryMode = exports.LinkQueryMode || (exports.LinkQueryMode = {}));\r\n    var LogicalOperation;\r\n    (function (LogicalOperation) {\r\n        LogicalOperation[LogicalOperation[\"NONE\"] = 0] = \"NONE\";\r\n        LogicalOperation[LogicalOperation[\"AND\"] = 1] = \"AND\";\r\n        LogicalOperation[LogicalOperation[\"OR\"] = 2] = \"OR\";\r\n    })(LogicalOperation = exports.LogicalOperation || (exports.LogicalOperation = {}));\r\n    /**\r\n     * Enumerates the possible provisioning actions that can be triggered on process template update.\r\n     */\r\n    var ProvisioningActionType;\r\n    (function (ProvisioningActionType) {\r\n        ProvisioningActionType[ProvisioningActionType[\"Import\"] = 0] = \"Import\";\r\n        ProvisioningActionType[ProvisioningActionType[\"Validate\"] = 1] = \"Validate\";\r\n    })(ProvisioningActionType = exports.ProvisioningActionType || (exports.ProvisioningActionType = {}));\r\n    /**\r\n     * Enum to control error policy in a query batch request.\r\n     */\r\n    var QueryErrorPolicy;\r\n    (function (QueryErrorPolicy) {\r\n        QueryErrorPolicy[QueryErrorPolicy[\"Fail\"] = 1] = \"Fail\";\r\n        QueryErrorPolicy[QueryErrorPolicy[\"Omit\"] = 2] = \"Omit\";\r\n    })(QueryErrorPolicy = exports.QueryErrorPolicy || (exports.QueryErrorPolicy = {}));\r\n    /**\r\n     * Determines which set of additional query properties to display\r\n     */\r\n    var QueryExpand;\r\n    (function (QueryExpand) {\r\n        /**\r\n         * Expands Columns, Links and ChangeInfo\r\n         */\r\n        QueryExpand[QueryExpand[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Expands Columns, Links,  ChangeInfo and WIQL text\r\n         */\r\n        QueryExpand[QueryExpand[\"Wiql\"] = 1] = \"Wiql\";\r\n        /**\r\n         * Expands Columns, Links, ChangeInfo, WIQL text and clauses\r\n         */\r\n        QueryExpand[QueryExpand[\"Clauses\"] = 2] = \"Clauses\";\r\n        /**\r\n         * Expands all properties\r\n         */\r\n        QueryExpand[QueryExpand[\"All\"] = 3] = \"All\";\r\n        /**\r\n         * Displays minimal properties and the WIQL text\r\n         */\r\n        QueryExpand[QueryExpand[\"Minimal\"] = 4] = \"Minimal\";\r\n    })(QueryExpand = exports.QueryExpand || (exports.QueryExpand = {}));\r\n    var QueryOption;\r\n    (function (QueryOption) {\r\n        QueryOption[QueryOption[\"Doing\"] = 1] = \"Doing\";\r\n        QueryOption[QueryOption[\"Done\"] = 2] = \"Done\";\r\n        QueryOption[QueryOption[\"Followed\"] = 3] = \"Followed\";\r\n    })(QueryOption = exports.QueryOption || (exports.QueryOption = {}));\r\n    /**\r\n     * Determines whether a tree query matches parents or children first.\r\n     */\r\n    var QueryRecursionOption;\r\n    (function (QueryRecursionOption) {\r\n        /**\r\n         * Returns work items that satisfy the source, even if no linked work item satisfies the target and link criteria.\r\n         */\r\n        QueryRecursionOption[QueryRecursionOption[\"ParentFirst\"] = 0] = \"ParentFirst\";\r\n        /**\r\n         * Returns work items that satisfy the target criteria, even if no work item satisfies the source and link criteria.\r\n         */\r\n        QueryRecursionOption[QueryRecursionOption[\"ChildFirst\"] = 1] = \"ChildFirst\";\r\n    })(QueryRecursionOption = exports.QueryRecursionOption || (exports.QueryRecursionOption = {}));\r\n    /**\r\n     * The query result type\r\n     */\r\n    var QueryResultType;\r\n    (function (QueryResultType) {\r\n        /**\r\n         * A list of work items (for flat queries).\r\n         */\r\n        QueryResultType[QueryResultType[\"WorkItem\"] = 1] = \"WorkItem\";\r\n        /**\r\n         * A list of work item links (for OneHop and Tree queries).\r\n         */\r\n        QueryResultType[QueryResultType[\"WorkItemLink\"] = 2] = \"WorkItemLink\";\r\n    })(QueryResultType = exports.QueryResultType || (exports.QueryResultType = {}));\r\n    /**\r\n     * The type of query.\r\n     */\r\n    var QueryType;\r\n    (function (QueryType) {\r\n        /**\r\n         * Gets a flat list of work items.\r\n         */\r\n        QueryType[QueryType[\"Flat\"] = 1] = \"Flat\";\r\n        /**\r\n         * Gets a tree of work items showing their link hierarchy.\r\n         */\r\n        QueryType[QueryType[\"Tree\"] = 2] = \"Tree\";\r\n        /**\r\n         * Gets a list of work items and their direct links.\r\n         */\r\n        QueryType[QueryType[\"OneHop\"] = 3] = \"OneHop\";\r\n    })(QueryType = exports.QueryType || (exports.QueryType = {}));\r\n    /**\r\n     * The reporting revision expand level.\r\n     */\r\n    var ReportingRevisionsExpand;\r\n    (function (ReportingRevisionsExpand) {\r\n        /**\r\n         * Default behavior.\r\n         */\r\n        ReportingRevisionsExpand[ReportingRevisionsExpand[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Add fields to the response.\r\n         */\r\n        ReportingRevisionsExpand[ReportingRevisionsExpand[\"Fields\"] = 1] = \"Fields\";\r\n    })(ReportingRevisionsExpand = exports.ReportingRevisionsExpand || (exports.ReportingRevisionsExpand = {}));\r\n    /**\r\n     * Enumerates types of supported xml templates used for customization.\r\n     */\r\n    var TemplateType;\r\n    (function (TemplateType) {\r\n        TemplateType[TemplateType[\"WorkItemType\"] = 0] = \"WorkItemType\";\r\n        TemplateType[TemplateType[\"GlobalWorkflow\"] = 1] = \"GlobalWorkflow\";\r\n    })(TemplateType = exports.TemplateType || (exports.TemplateType = {}));\r\n    /**\r\n     * Types of tree node structures.\r\n     */\r\n    var TreeNodeStructureType;\r\n    (function (TreeNodeStructureType) {\r\n        /**\r\n         * Area type.\r\n         */\r\n        TreeNodeStructureType[TreeNodeStructureType[\"Area\"] = 0] = \"Area\";\r\n        /**\r\n         * Iteration type.\r\n         */\r\n        TreeNodeStructureType[TreeNodeStructureType[\"Iteration\"] = 1] = \"Iteration\";\r\n    })(TreeNodeStructureType = exports.TreeNodeStructureType || (exports.TreeNodeStructureType = {}));\r\n    /**\r\n     * Types of tree structures groups.\r\n     */\r\n    var TreeStructureGroup;\r\n    (function (TreeStructureGroup) {\r\n        TreeStructureGroup[TreeStructureGroup[\"Areas\"] = 0] = \"Areas\";\r\n        TreeStructureGroup[TreeStructureGroup[\"Iterations\"] = 1] = \"Iterations\";\r\n    })(TreeStructureGroup = exports.TreeStructureGroup || (exports.TreeStructureGroup = {}));\r\n    /**\r\n     * Enum to control error policy in a bulk get work items request.\r\n     */\r\n    var WorkItemErrorPolicy;\r\n    (function (WorkItemErrorPolicy) {\r\n        /**\r\n         * Fail work error policy.\r\n         */\r\n        WorkItemErrorPolicy[WorkItemErrorPolicy[\"Fail\"] = 1] = \"Fail\";\r\n        /**\r\n         * Omit work error policy.\r\n         */\r\n        WorkItemErrorPolicy[WorkItemErrorPolicy[\"Omit\"] = 2] = \"Omit\";\r\n    })(WorkItemErrorPolicy = exports.WorkItemErrorPolicy || (exports.WorkItemErrorPolicy = {}));\r\n    /**\r\n     * Flag to control payload properties from get work item command.\r\n     */\r\n    var WorkItemExpand;\r\n    (function (WorkItemExpand) {\r\n        /**\r\n         * Default behavior.\r\n         */\r\n        WorkItemExpand[WorkItemExpand[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Relations work item expand.\r\n         */\r\n        WorkItemExpand[WorkItemExpand[\"Relations\"] = 1] = \"Relations\";\r\n        /**\r\n         * Fields work item expand.\r\n         */\r\n        WorkItemExpand[WorkItemExpand[\"Fields\"] = 2] = \"Fields\";\r\n        /**\r\n         * Links work item expand.\r\n         */\r\n        WorkItemExpand[WorkItemExpand[\"Links\"] = 3] = \"Links\";\r\n        /**\r\n         * Expands all.\r\n         */\r\n        WorkItemExpand[WorkItemExpand[\"All\"] = 4] = \"All\";\r\n    })(WorkItemExpand = exports.WorkItemExpand || (exports.WorkItemExpand = {}));\r\n    /**\r\n     * Type of the activity\r\n     */\r\n    var WorkItemRecentActivityType;\r\n    (function (WorkItemRecentActivityType) {\r\n        WorkItemRecentActivityType[WorkItemRecentActivityType[\"Visited\"] = 0] = \"Visited\";\r\n        WorkItemRecentActivityType[WorkItemRecentActivityType[\"Edited\"] = 1] = \"Edited\";\r\n        WorkItemRecentActivityType[WorkItemRecentActivityType[\"Deleted\"] = 2] = \"Deleted\";\r\n        WorkItemRecentActivityType[WorkItemRecentActivityType[\"Restored\"] = 3] = \"Restored\";\r\n    })(WorkItemRecentActivityType = exports.WorkItemRecentActivityType || (exports.WorkItemRecentActivityType = {}));\r\n    /**\r\n     * Expand options for the work item field(s) request.\r\n     */\r\n    var WorkItemTypeFieldsExpandLevel;\r\n    (function (WorkItemTypeFieldsExpandLevel) {\r\n        /**\r\n         * Includes only basic properties of the field.\r\n         */\r\n        WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel[\"None\"] = 0] = \"None\";\r\n        /**\r\n         * Includes allowed values for the field.\r\n         */\r\n        WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel[\"AllowedValues\"] = 1] = \"AllowedValues\";\r\n        /**\r\n         * Includes dependent fields of the field.\r\n         */\r\n        WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel[\"DependentFields\"] = 2] = \"DependentFields\";\r\n        /**\r\n         * Includes allowed values and dependent fields of the field.\r\n         */\r\n        WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel[\"All\"] = 3] = \"All\";\r\n    })(WorkItemTypeFieldsExpandLevel = exports.WorkItemTypeFieldsExpandLevel || (exports.WorkItemTypeFieldsExpandLevel = {}));\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTracking.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingClient.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingClient.js ***!
  \********************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * ---------------------------------------------------------\r\n * Copyright(C) Microsoft Corporation. All rights reserved.\r\n * ---------------------------------------------------------\r\n */\r\nvar __extends = (this && this.__extends) || (function () {\r\n    var extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n    return function (d, b) {\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    };\r\n})();\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ../Common/RestClientBase */ \"./node_modules/azure-devops-extension-api/Common/RestClientBase.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, RestClientBase_1) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    var WorkItemTrackingRestClient = /** @class */ (function (_super) {\r\n        __extends(WorkItemTrackingRestClient, _super);\r\n        function WorkItemTrackingRestClient(options) {\r\n            return _super.call(this, options) || this;\r\n        }\r\n        /**\r\n         * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details.\r\n         *\r\n         * @param queryOption -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getAccountMyWorkData = function (queryOption) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$queryOption': queryOption\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"_apis/work/accountMyWork\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets recent work item activities\r\n         *\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getRecentActivityData = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"_apis/work/accountMyWorkRecentActivity\"\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE.\r\n         *\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getRecentMentions = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"_apis/work/accountRecentMentions\"\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get the list of work item tracking outbound artifact link types.\r\n         *\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkArtifactLinkTypes = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"_apis/wit/artifactLinkTypes\"\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Queries work items linked to a given list of artifact URI.\r\n         *\r\n         * @param artifactUriQuery - Defines a list of artifact URI for querying work items.\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.queryWorkItemsForArtifactUris = function (artifactUriQuery, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/artifactUriQuery\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            body: artifactUriQuery\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Uploads an attachment.\r\n         *\r\n         * @param content - Content to upload\r\n         * @param project - Project ID or project name\r\n         * @param fileName - The name of the file\r\n         * @param uploadType - Attachment upload type: Simple or Chunked\r\n         * @param areaPath - Target project Area Path\r\n         */\r\n        WorkItemTrackingRestClient.prototype.createAttachment = function (content, project, fileName, uploadType, areaPath) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        fileName: fileName,\r\n                        uploadType: uploadType,\r\n                        areaPath: areaPath\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/attachments/{id}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/octet-stream\",\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: content,\r\n                            isRawData: true\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Downloads an attachment.\r\n         *\r\n         * @param id - Attachment ID\r\n         * @param project - Project ID or project name\r\n         * @param fileName - Name of the file\r\n         * @param download - If set to \\<c\\>true\\</c\\> always download attachment\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getAttachmentContent = function (id, project, fileName, download) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        fileName: fileName,\r\n                        download: download\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            httpResponseType: \"application/octet-stream\",\r\n                            routeTemplate: \"{project}/_apis/wit/attachments/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Downloads an attachment.\r\n         *\r\n         * @param id - Attachment ID\r\n         * @param project - Project ID or project name\r\n         * @param fileName - Name of the file\r\n         * @param download - If set to \\<c\\>true\\</c\\> always download attachment\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getAttachmentZip = function (id, project, fileName, download) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        fileName: fileName,\r\n                        download: download\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            httpResponseType: \"application/zip\",\r\n                            routeTemplate: \"{project}/_apis/wit/attachments/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will  get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param ids - Comma separated integer classification nodes ids. It's not required, if you want root nodes.\r\n         * @param depth - Depth of children to fetch.\r\n         * @param errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getClassificationNodes = function (project, ids, depth, errorPolicy) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        ids: ids && ids.join(\",\"),\r\n                        '$depth': depth,\r\n                        errorPolicy: errorPolicy\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/classificationNodes\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets root classification nodes under the project.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param depth - Depth of children to fetch.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getRootNodes = function (project, depth) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$depth': depth\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/classificationNodes\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create new or update an existing classification node.\r\n         *\r\n         * @param postedNode - Node to create or update.\r\n         * @param project - Project ID or project name\r\n         * @param structureGroup - Structure group of the classification node, area or iteration.\r\n         * @param path - Path of the classification node.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.createOrUpdateClassificationNode = function (postedNode, project, structureGroup, path) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                structureGroup: structureGroup,\r\n                                path: path\r\n                            },\r\n                            body: postedNode\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete an existing classification node.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param structureGroup - Structure group of the classification node, area or iteration.\r\n         * @param path - Path of the classification node.\r\n         * @param reclassifyId - Id of the target classification node for reclassification.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.deleteClassificationNode = function (project, structureGroup, path, reclassifyId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$reclassifyId': reclassifyId\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                structureGroup: structureGroup,\r\n                                path: path\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the classification node for a given node path.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param structureGroup - Structure group of the classification node, area or iteration.\r\n         * @param path - Path of the classification node.\r\n         * @param depth - Depth of children to fetch.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getClassificationNode = function (project, structureGroup, path, depth) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$depth': depth\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                structureGroup: structureGroup,\r\n                                path: path\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update an existing classification node.\r\n         *\r\n         * @param postedNode - Node to create or update.\r\n         * @param project - Project ID or project name\r\n         * @param structureGroup - Structure group of the classification node, area or iteration.\r\n         * @param path - Path of the classification node.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.updateClassificationNode = function (postedNode, project, structureGroup, path) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                structureGroup: structureGroup,\r\n                                path: path\r\n                            },\r\n                            body: postedNode\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets a comment for a work item at the specified revision.\r\n         *\r\n         * @param id - Work item id\r\n         * @param revision - Revision for which the comment need to be fetched\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getComment = function (id, revision, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}/comments/{revision}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id,\r\n                                revision: revision\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the specified number of comments for a work item from the specified revision.\r\n         *\r\n         * @param id - Work item id\r\n         * @param project - Project ID or project name\r\n         * @param fromRevision - Revision from which comments are to be fetched (default is 1)\r\n         * @param top - The number of comments to return (default is 200)\r\n         * @param order - Ascending or descending by revision id (default is ascending)\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getComments = function (id, project, fromRevision, top, order) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        fromRevision: fromRevision,\r\n                        '$top': top,\r\n                        order: order\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}/comments/{revision}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Create a new field.\r\n         *\r\n         * @param workItemField - New field definition\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.createField = function (workItemField, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/fields/{fieldNameOrRefName}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            body: workItemField\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Deletes the field. To undelete a filed, see \"Update Field\" API.\r\n         *\r\n         * @param fieldNameOrRefName - Field simple name or reference name\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.deleteField = function (fieldNameOrRefName, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/wit/fields/{fieldNameOrRefName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                fieldNameOrRefName: fieldNameOrRefName\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets information on a specific field.\r\n         *\r\n         * @param fieldNameOrRefName - Field simple name or reference name\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getField = function (fieldNameOrRefName, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/fields/{fieldNameOrRefName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                fieldNameOrRefName: fieldNameOrRefName\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns information for all fields. The project ID/name parameter is optional.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getFields = function (project, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/fields/{fieldNameOrRefName}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update a field.\r\n         *\r\n         * @param payload - Payload contains desired value of the field's properties\r\n         * @param fieldNameOrRefName - Name/reference name of the field to be updated\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.updateField = function (payload, fieldNameOrRefName, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/wit/fields/{fieldNameOrRefName}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                fieldNameOrRefName: fieldNameOrRefName\r\n                            },\r\n                            body: payload\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Creates a query, or moves a query.\r\n         *\r\n         * @param postedQuery - The query to create.\r\n         * @param project - Project ID or project name\r\n         * @param query - The parent id or path under which the query is to be created.\r\n         * @param validateWiqlOnly - If you only want to validate your WIQL query without actually creating one, set it to true. Default is false.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.createQuery = function (postedQuery, project, query, validateWiqlOnly) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        validateWiqlOnly: validateWiqlOnly\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/queries/{*query}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                query: query\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: postedQuery\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param query - ID or path of the query or folder to delete.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.deleteQuery = function (project, query) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/wit/queries/{*query}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                query: query\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the root queries and their children\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.\r\n         * @param depth - In the folder of queries, return child queries and folders to this depth.\r\n         * @param includeDeleted - Include deleted queries and folders\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getQueries = function (project, expand, depth, includeDeleted) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expand': expand,\r\n                        '$depth': depth,\r\n                        '$includeDeleted': includeDeleted\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/queries/{*query}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Retrieves an individual query and its children\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param query - ID or path of the query.\r\n         * @param expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.\r\n         * @param depth - In the folder of queries, return child queries and folders to this depth.\r\n         * @param includeDeleted - Include deleted queries and folders\r\n         * @param useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getQuery = function (project, query, expand, depth, includeDeleted, useIsoDateFormat) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expand': expand,\r\n                        '$depth': depth,\r\n                        '$includeDeleted': includeDeleted,\r\n                        '$useIsoDateFormat': useIsoDateFormat\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/queries/{*query}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                query: query\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Searches all queries the user has access to in the current project\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param filter - The text to filter the queries with.\r\n         * @param top - The number of queries to return (Default is 50 and maximum is 200).\r\n         * @param expand -\r\n         * @param includeDeleted - Include deleted queries and folders\r\n         */\r\n        WorkItemTrackingRestClient.prototype.searchQueries = function (project, filter, top, expand, includeDeleted) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$filter': filter,\r\n                        '$top': top,\r\n                        '$expand': expand,\r\n                        '$includeDeleted': includeDeleted\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/queries/{*query}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Update a query or a folder. This allows you to update, rename and move queries and folders.\r\n         *\r\n         * @param queryUpdate - The query to update.\r\n         * @param project - Project ID or project name\r\n         * @param query - The ID or path for the query to update.\r\n         * @param undeleteDescendants - Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.updateQuery = function (queryUpdate, project, query, undeleteDescendants) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$undeleteDescendants': undeleteDescendants\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/wit/queries/{*query}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                query: query\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: queryUpdate\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets a list of queries by ids (Maximum 1000)\r\n         *\r\n         * @param queryGetRequest -\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getQueriesBatch = function (queryGetRequest, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/queriesBatch\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            body: queryGetRequest\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.\r\n         *\r\n         * @param id - ID of the work item to be destroyed permanently\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.destroyWorkItem = function (id, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/wit/recyclebin/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets a deleted work item from Recycle Bin.\r\n         *\r\n         * @param id - ID of the work item to be returned\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getDeletedWorkItem = function (id, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/recyclebin/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the work items from the recycle bin, whose IDs have been specified in the parameters\r\n         *\r\n         * @param ids - Comma separated list of IDs of the deleted work items to be returned\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getDeletedWorkItems = function (ids, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        ids: ids && ids.join(\",\")\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/recyclebin/{id}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.\r\n         *\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getDeletedWorkItemShallowReferences = function (project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/recyclebin/{id}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Restores the deleted work item from Recycle Bin.\r\n         *\r\n         * @param payload - Paylod with instructions to update the IsDeleted flag to false\r\n         * @param id - ID of the work item to be restored\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.restoreWorkItem = function (payload, id, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/wit/recyclebin/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            body: payload\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns a fully hydrated work item for the requested revision\r\n         *\r\n         * @param id -\r\n         * @param revisionNumber -\r\n         * @param project - Project ID or project name\r\n         * @param expand -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getRevision = function (id, revisionNumber, project, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id,\r\n                                revisionNumber: revisionNumber\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns the list of fully hydrated work item revisions, paged.\r\n         *\r\n         * @param id -\r\n         * @param project - Project ID or project name\r\n         * @param top -\r\n         * @param skip -\r\n         * @param expand -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getRevisions = function (id, project, top, skip, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$top': top,\r\n                        '$skip': skip,\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * RESTful method to send mail for selected/queried work items.\r\n         *\r\n         * @param body -\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.sendMail = function (body, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/sendMail\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            body: body\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Creates a template\r\n         *\r\n         * @param template - Template contents\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.createTemplate = function (template, project, team) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/templates\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team\r\n                            },\r\n                            body: template\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets template\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         * @param workitemtypename - Optional, When specified returns templates for given Work item type.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getTemplates = function (project, team, workitemtypename) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        workitemtypename: workitemtypename\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/templates\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Deletes the template with given id\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         * @param templateId - Template id\r\n         */\r\n        WorkItemTrackingRestClient.prototype.deleteTemplate = function (project, team, templateId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/templates/{templateId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team,\r\n                                templateId: templateId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the template with specified id\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         * @param templateId - Template Id\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getTemplate = function (project, team, templateId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/templates/{templateId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team,\r\n                                templateId: templateId\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Replace template contents\r\n         *\r\n         * @param templateContent - Template contents to replace with\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         * @param templateId - Template id\r\n         */\r\n        WorkItemTrackingRestClient.prototype.replaceTemplate = function (templateContent, project, team, templateId) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"PUT\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/templates/{templateId}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team,\r\n                                templateId: templateId\r\n                            },\r\n                            body: templateContent\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns a single update for a work item\r\n         *\r\n         * @param id -\r\n         * @param updateNumber -\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getUpdate = function (id, updateNumber, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}/updates/{updateNumber}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id,\r\n                                updateNumber: updateNumber\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns the deltas between work item revisions\r\n         *\r\n         * @param id -\r\n         * @param project - Project ID or project name\r\n         * @param top -\r\n         * @param skip -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getUpdates = function (id, project, top, skip) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$top': top,\r\n                        '$skip': skip\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}/updates/{updateNumber}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the results of the query given its WIQL.\r\n         *\r\n         * @param wiql - The query containing the WIQL.\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         * @param timePrecision - Whether or not to use time precision.\r\n         * @param top - The max number of results to return.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.queryByWiql = function (wiql, project, team, timePrecision, top) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        timePrecision: timePrecision,\r\n                        '$top': top\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/wiql\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: wiql\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the results of the query given the query ID.\r\n         *\r\n         * @param id - The query ID.\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         * @param timePrecision - Whether or not to use time precision.\r\n         * @param top - The max number of results to return.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getQueryResultCount = function (id, project, team, timePrecision, top) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                var _this = this;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        timePrecision: timePrecision,\r\n                        '$top': top\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"HEAD\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/wiql/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues,\r\n                            returnRawResponse: true\r\n                        }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {\r\n                            return __generator(this, function (_a) {\r\n                                return [2 /*return*/, Number(response.headers.get(\"X-Total-Count\"))];\r\n                            });\r\n                        }); })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the results of the query given the query ID.\r\n         *\r\n         * @param id - The query ID.\r\n         * @param project - Project ID or project name\r\n         * @param team - Team ID or team name\r\n         * @param timePrecision - Whether or not to use time precision.\r\n         * @param top - The max number of results to return.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.queryById = function (id, project, team, timePrecision, top) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        timePrecision: timePrecision,\r\n                        '$top': top\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/{team}/_apis/wit/wiql/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                team: team,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a work item icon given the friendly name and icon color.\r\n         *\r\n         * @param icon - The name of the icon\r\n         * @param color - The 6-digit hex color for the icon\r\n         * @param v - The version of the icon (used only for cache invalidation)\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemIconJson = function (icon, color, v) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        color: color,\r\n                        v: v\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"_apis/wit/workItemIcons/{icon}\",\r\n                            routeValues: {\r\n                                icon: icon\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a list of all work item icons.\r\n         *\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemIcons = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"_apis/wit/workItemIcons/{icon}\"\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a work item icon given the friendly name and icon color.\r\n         *\r\n         * @param icon - The name of the icon\r\n         * @param color - The 6-digit hex color for the icon\r\n         * @param v - The version of the icon (used only for cache invalidation)\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemIconSvg = function (icon, color, v) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        color: color,\r\n                        v: v\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            httpResponseType: \"image/svg+xml\",\r\n                            routeTemplate: \"_apis/wit/workItemIcons/{icon}\",\r\n                            routeValues: {\r\n                                icon: icon\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a work item icon given the friendly name and icon color.\r\n         *\r\n         * @param icon - The name of the icon\r\n         * @param color - The 6-digit hex color for the icon\r\n         * @param v - The version of the icon (used only for cache invalidation)\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemIconXaml = function (icon, color, v) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        color: color,\r\n                        v: v\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            httpResponseType: \"image/xaml+xml\",\r\n                            routeTemplate: \"_apis/wit/workItemIcons/{icon}\",\r\n                            routeValues: {\r\n                                icon: icon\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a batch of work item links\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param linkTypes - A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types.\r\n         * @param types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types.\r\n         * @param continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links.\r\n         * @param startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getReportingLinksByLinkType = function (project, linkTypes, types, continuationToken, startDateTime) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        linkTypes: linkTypes && linkTypes.join(\",\"),\r\n                        types: types && types.join(\",\"),\r\n                        continuationToken: continuationToken,\r\n                        startDateTime: startDateTime\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/reporting/workItemLinks\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the work item relation type definition.\r\n         *\r\n         * @param relation - The relation name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getRelationType = function (relation) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"_apis/wit/workItemRelationTypes/{relation}\",\r\n                            routeValues: {\r\n                                relation: relation\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets the work item relation types.\r\n         *\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getRelationTypes = function () {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"_apis/wit/workItemRelationTypes/{relation}\"\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a batch of work item revisions with the option of including deleted items\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.\r\n         * @param types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types.\r\n         * @param continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.\r\n         * @param startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.\r\n         * @param includeIdentityRef - Return an identity reference instead of a string value for identity fields.\r\n         * @param includeDeleted - Specify if the deleted item should be returned.\r\n         * @param includeTagRef - Specify if the tag objects should be returned for System.Tags field.\r\n         * @param includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions\r\n         * @param expand - Return all the fields in work item revisions, including long text fields which are not returned by default\r\n         * @param includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed\r\n         * @param maxPageSize - The maximum number of results to return in this batch\r\n         */\r\n        WorkItemTrackingRestClient.prototype.readReportingRevisionsGet = function (project, fields, types, continuationToken, startDateTime, includeIdentityRef, includeDeleted, includeTagRef, includeLatestOnly, expand, includeDiscussionChangesOnly, maxPageSize) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        fields: fields && fields.join(\",\"),\r\n                        types: types && types.join(\",\"),\r\n                        continuationToken: continuationToken,\r\n                        startDateTime: startDateTime,\r\n                        includeIdentityRef: includeIdentityRef,\r\n                        includeDeleted: includeDeleted,\r\n                        includeTagRef: includeTagRef,\r\n                        includeLatestOnly: includeLatestOnly,\r\n                        '$expand': expand,\r\n                        includeDiscussionChangesOnly: includeDiscussionChangesOnly,\r\n                        '$maxPageSize': maxPageSize\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/reporting/workItemRevisions\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit.\r\n         *\r\n         * @param filter - An object that contains request settings: field filter, type filter, identity format\r\n         * @param project - Project ID or project name\r\n         * @param continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.\r\n         * @param startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.\r\n         * @param expand -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.readReportingRevisionsPost = function (filter, project, continuationToken, startDateTime, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        continuationToken: continuationToken,\r\n                        startDateTime: startDateTime,\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/reporting/workItemRevisions\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: filter\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Creates a single work item.\r\n         *\r\n         * @param document - The JSON Patch document representing the work item\r\n         * @param project - Project ID or project name\r\n         * @param type - The work item type of the work item to create\r\n         * @param validateOnly - Indicate if you only want to validate the changes without saving the work item\r\n         * @param bypassRules - Do not enforce the work item type rules on this update\r\n         * @param suppressNotifications - Do not fire any notifications for this change\r\n         * @param expand - The expand parameters for work item attributes. Possible options are \\{ None, Relations, Fields, Links, All \\}.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.createWorkItem = function (document, project, type, validateOnly, bypassRules, suppressNotifications, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        validateOnly: validateOnly,\r\n                        bypassRules: bypassRules,\r\n                        suppressNotifications: suppressNotifications,\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/${type}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                type: type\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/json-patch+json\",\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: document\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns a single work item from a template.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param type - The work item type name\r\n         * @param fields - Comma-separated list of requested fields\r\n         * @param asOf - AsOf UTC date time string\r\n         * @param expand - The expand parameters for work item attributes. Possible options are \\{ None, Relations, Fields, Links, All \\}.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTemplate = function (project, type, fields, asOf, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        fields: fields,\r\n                        asOf: asOf,\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/${type}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                type: type\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.\r\n         *\r\n         * @param id - ID of the work item to be deleted\r\n         * @param project - Project ID or project name\r\n         * @param destroy - Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.deleteWorkItem = function (id, project, destroy) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        destroy: destroy\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            method: \"DELETE\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns a single work item.\r\n         *\r\n         * @param id - The work item id\r\n         * @param project - Project ID or project name\r\n         * @param fields - Comma-separated list of requested fields\r\n         * @param asOf - AsOf UTC date time string\r\n         * @param expand - The expand parameters for work item attributes. Possible options are \\{ None, Relations, Fields, Links, All \\}.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItem = function (id, project, fields, asOf, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        fields: fields && fields.join(\",\"),\r\n                        asOf: asOf,\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns a list of work items (Maximum 200)\r\n         *\r\n         * @param ids - The comma-separated list of requested work item ids. (Maximum 200 ids allowed).\r\n         * @param project - Project ID or project name\r\n         * @param fields - Comma-separated list of requested fields\r\n         * @param asOf - AsOf UTC date time string\r\n         * @param expand - The expand parameters for work item attributes. Possible options are \\{ None, Relations, Fields, Links, All \\}.\r\n         * @param errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are \\{Fail, Omit\\}.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItems = function (ids, project, fields, asOf, expand, errorPolicy) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        ids: ids && ids.join(\",\"),\r\n                        fields: fields && fields.join(\",\"),\r\n                        asOf: asOf,\r\n                        '$expand': expand,\r\n                        errorPolicy: errorPolicy\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Updates a single work item.\r\n         *\r\n         * @param document - The JSON Patch document representing the update\r\n         * @param id - The id of the work item to update\r\n         * @param project - Project ID or project name\r\n         * @param validateOnly - Indicate if you only want to validate the changes without saving the work item\r\n         * @param bypassRules - Do not enforce the work item type rules on this update\r\n         * @param suppressNotifications - Do not fire any notifications for this change\r\n         * @param expand - The expand parameters for work item attributes. Possible options are \\{ None, Relations, Fields, Links, All \\}.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.updateWorkItem = function (document, id, project, validateOnly, bypassRules, suppressNotifications, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        validateOnly: validateOnly,\r\n                        bypassRules: bypassRules,\r\n                        suppressNotifications: suppressNotifications,\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            method: \"PATCH\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItems/{id}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                id: id\r\n                            },\r\n                            customHeaders: {\r\n                                \"Content-Type\": \"application/json-patch+json\",\r\n                            },\r\n                            queryParams: queryValues,\r\n                            body: document\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Gets work items for a list of work item ids (Maximum 200)\r\n         *\r\n         * @param workItemGetRequest -\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemsBatch = function (workItemGetRequest, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItemsBatch\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            body: workItemGetRequest\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects\r\n         *\r\n         * @param projectNames -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemStateColors = function (projectNames) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/work/workitemStateColor\",\r\n                            body: projectNames\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns the next state on the given work item IDs.\r\n         *\r\n         * @param ids - list of work item ids\r\n         * @param action - possible actions. Currently only supports checkin\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemNextStatesOnCheckinAction = function (ids, action) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        ids: ids && ids.join(\",\"),\r\n                        action: action\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"_apis/wit/workItemTransitions\",\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get all work item type categories.\r\n         *\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypeCategories = function (project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItemTypeCategories/{category}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get specific work item type category by name.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param category - The category name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypeCategory = function (project, category) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItemTypeCategories/{category}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                category: category\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects\r\n         *\r\n         * @param projectNames -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypeColors = function (projectNames) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/work/workitemTypeColor\",\r\n                            body: projectNames\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects\r\n         *\r\n         * @param projectNames -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypeColorAndIcons = function (projectNames) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"_apis/wit/workItemTypeColorAndIcon\",\r\n                            body: projectNames\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns a work item type definition.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param type - Work item type name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemType = function (project, type) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItemTypes/{type}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                type: type\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns the list of work item types\r\n         *\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypes = function (project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.2\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItemTypes/{type}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a list of fields for a work item type with detailed references.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param type - Work item type.\r\n         * @param expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypeFieldsWithReferences = function (project, type, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workitemtypes/{type}/fields/{field}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                type: type\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Get a field for a work item type with detailed references.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param type - Work item type.\r\n         * @param field -\r\n         * @param expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypeFieldWithReferences = function (project, type, field, expand) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        '$expand': expand\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.3\",\r\n                            routeTemplate: \"{project}/_apis/wit/workitemtypes/{type}/fields/{field}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                type: type,\r\n                                field: field\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Returns the state names and colors for a work item type.\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param type - The state name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.getWorkItemTypeStates = function (project, type) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/wit/workitemtypes/{type}/states\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                type: type\r\n                            }\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Export work item type\r\n         *\r\n         * @param project - Project ID or project name\r\n         * @param type -\r\n         * @param exportGlobalLists -\r\n         */\r\n        WorkItemTrackingRestClient.prototype.exportWorkItemTypeDefinition = function (project, type, exportGlobalLists) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                var queryValues;\r\n                return __generator(this, function (_a) {\r\n                    queryValues = {\r\n                        exportGlobalLists: exportGlobalLists\r\n                    };\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItemTypeTemplate/{type}\",\r\n                            routeValues: {\r\n                                project: project,\r\n                                type: type\r\n                            },\r\n                            queryParams: queryValues\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        /**\r\n         * Add/updates a work item type\r\n         *\r\n         * @param updateModel -\r\n         * @param project - Project ID or project name\r\n         */\r\n        WorkItemTrackingRestClient.prototype.updateWorkItemTypeDefinition = function (updateModel, project) {\r\n            return __awaiter(this, void 0, void 0, function () {\r\n                return __generator(this, function (_a) {\r\n                    return [2 /*return*/, this.beginRequest({\r\n                            apiVersion: \"5.0-preview.1\",\r\n                            method: \"POST\",\r\n                            routeTemplate: \"{project}/_apis/wit/workItemTypeTemplate/{type}\",\r\n                            routeValues: {\r\n                                project: project\r\n                            },\r\n                            body: updateModel\r\n                        })];\r\n                });\r\n            });\r\n        };\r\n        WorkItemTrackingRestClient.RESOURCE_AREA_ID = \"5264459e-e5e0-4bd8-b118-0985e68a4ec5\";\r\n        return WorkItemTrackingRestClient;\r\n    }(RestClientBase_1.RestClientBase));\r\n    exports.WorkItemTrackingRestClient = WorkItemTrackingRestClient;\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingClient.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingServices.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingServices.js ***!
  \**********************************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\r\n    \"use strict\";\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    /**\r\n     * Contribution ids of Azure Boards services which can be obtained from DevOps.getService\r\n     */\r\n    var WorkItemTrackingServiceIds;\r\n    (function (WorkItemTrackingServiceIds) {\r\n        /**\r\n         * Host service for opening the work item form\r\n         */\r\n        WorkItemTrackingServiceIds[\"WorkItemFormNavigationService\"] = \"ms.vss-work-web.work-item-form-navigation-service\";\r\n        /**\r\n         * Host service for interacting with the currently active work item form (work item currently displayed in the UI).\r\n         * Form service depends on the current active work item context. Will throw an error when there is no open work item.\r\n         */\r\n        WorkItemTrackingServiceIds[\"WorkItemFormService\"] = \"ms.vss-work-web.work-item-form\";\r\n    })(WorkItemTrackingServiceIds = exports.WorkItemTrackingServiceIds || (exports.WorkItemTrackingServiceIds = {}));\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingServices.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/WorkItemTracking/index.js":
/*!***************************************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/WorkItemTracking/index.js ***!
  \***************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./WorkItemTracking */ \"./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTracking.js\"), __webpack_require__(/*! ./WorkItemTrackingClient */ \"./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingClient.js\"), __webpack_require__(/*! ./WorkItemTrackingServices */ \"./node_modules/azure-devops-extension-api/WorkItemTracking/WorkItemTrackingServices.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, WorkItemTracking_1, WorkItemTrackingClient_1, WorkItemTrackingServices_1) {\r\n    \"use strict\";\r\n    function __export(m) {\r\n        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n    }\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    __export(WorkItemTracking_1);\r\n    __export(WorkItemTrackingClient_1);\r\n    __export(WorkItemTrackingServices_1);\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/WorkItemTracking/index.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-api/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/azure-devops-extension-api/index.js ***!
  \**********************************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./Common/index */ \"./node_modules/azure-devops-extension-api/Common/index.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, index_1) {\r\n    \"use strict\";\r\n    function __export(m) {\r\n        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n    }\r\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n    __export(index_1);\r\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-api/index.js?\n}");

/***/ }),

/***/ "./node_modules/azure-devops-extension-sdk/SDK.min.js":
/*!************************************************************!*\
  !*** ./node_modules/azure-devops-extension-sdk/SDK.min.js ***!
  \************************************************************/
/***/ ((module, exports) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function(e){\"use strict\";var t=function(){return t=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.apply(this,arguments)};function n(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{a(o.next(e))}catch(e){i(e)}}function c(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,c)}a((o=o.apply(e,t||[])).next())}))}function o(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(n)throw new TypeError(\"Generator is already executing.\");for(;i&&(i=0,c[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,o=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){s=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){s.label=c[1];break}if(6===c[0]&&s.label<r[1]){s.label=r[1],r=c;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(c);break}r[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}\"function\"==typeof SuppressedError&&SuppressedError;var r=parseInt(\"10000000000\",36),i=Number.MAX_SAFE_INTEGER||9007199254740991;var s,c=function(){function e(){this.objects={}}return e.prototype.register=function(e,t){this.objects[e]=t},e.prototype.unregister=function(e){delete this.objects[e]},e.prototype.getInstance=function(e,t){var n=this.objects[e];if(n)return\"function\"==typeof n?n(t):n},e}(),a=1,u=function(){function e(e,t){this.promises={},this.nextMessageId=1,this.nextProxyId=1,this.proxyFunctions={},this.postToWindow=e,this.targetOrigin=t,this.registry=new c,this.channelId=a++,this.targetOrigin||(this.handshakeToken=Math.floor(Math.random()*(i-r)+r).toString(36)+Math.floor(Math.random()*(i-r)+r).toString(36))}return e.prototype.getObjectRegistry=function(){return this.registry},e.prototype.invokeRemoteMethod=function(e,t,r,i,s){return n(this,void 0,void 0,(function(){var n,c,a=this;return o(this,(function(o){return n={id:this.nextMessageId++,methodName:e,instanceId:t,instanceContext:i,params:this._customSerializeObject(r,s),serializationSettings:s},this.targetOrigin||(n.handshakeToken=this.handshakeToken),c=new Promise((function(e,t){a.promises[n.id]={resolve:e,reject:t}})),this._sendRpcMessage(n),[2,c]}))}))},e.prototype.getRemoteObjectProxy=function(e,t){return this.invokeRemoteMethod(\"\",e,void 0,t)},e.prototype.invokeMethod=function(e,t){var n=this;if(t.methodName){var o=e[t.methodName];if(\"function\"==typeof o)try{var r=[];t.params&&(r=this._customDeserializeObject(t.params,{}));var i=o.apply(e,r);i&&i.then&&\"function\"==typeof i.then?i.then((function(e){n._success(t,e,t.handshakeToken)}),(function(e){n.error(t,e)})):this._success(t,i,t.handshakeToken)}catch(e){this.error(t,e)}else this.error(t,new Error(\"RPC method not found: \"+t.methodName))}else this._success(t,e,t.handshakeToken)},e.prototype.getRegisteredObject=function(e,t){if(\"__proxyFunctions\"===e)return this.proxyFunctions;var n=this.registry.getInstance(e,t);return n||(n=h.getInstance(e,t)),n},e.prototype.onMessage=function(e){var t=this;if(e.instanceId){var n=this.getRegisteredObject(e.instanceId,e.instanceContext);if(!n)return!1;\"function\"==typeof n.then?n.then((function(n){t.invokeMethod(n,e)}),(function(n){t.error(e,n)})):this.invokeMethod(n,e)}else{var o=this.promises[e.id];if(!o)return!1;e.error?o.reject(this._customDeserializeObject([e.error],{})[0]):o.resolve(this._customDeserializeObject([e.result],{})[0]),delete this.promises[e.id]}return!0},e.prototype.owns=function(e,t,n){if(this.postToWindow===e){if(this.targetOrigin)return!!t&&(\"null\"===t.toLowerCase()||0===this.targetOrigin.toLowerCase().indexOf(t.toLowerCase()));if(n.handshakeToken&&n.handshakeToken===this.handshakeToken)return this.targetOrigin=t,!0}return!1},e.prototype.error=function(e,t){this._sendRpcMessage({id:e.id,error:this._customSerializeObject([t],e.serializationSettings)[0],handshakeToken:e.handshakeToken})},e.prototype._success=function(e,t,n){this._sendRpcMessage({id:e.id,result:this._customSerializeObject([t],e.serializationSettings)[0],handshakeToken:n})},e.prototype._sendRpcMessage=function(e){this.postToWindow.postMessage(JSON.stringify(e),\"*\")},e.prototype._customSerializeObject=function(e,t,n,o,r){var i=this;if(void 0===o&&(o=1),void 0===r&&(r=1),e&&!(r>100)&&!(e instanceof Node||e instanceof Window||e instanceof Event)){var s,c;(c=n||{newObjects:[],originalObjects:[]}).originalObjects.push(e);var a=function(n,s,a){var u;try{u=n[a]}catch(e){}var f=typeof u;if(\"undefined\"!==f){var h=-1;if(\"object\"===f&&(h=c.originalObjects.indexOf(u)),h>=0){var d=c.newObjects[h];d.__circularReferenceId||(d.__circularReferenceId=o++),s[a]={__circularReference:d.__circularReferenceId}}else\"function\"===f?(i.nextProxyId++,s[a]={__proxyFunctionId:i._registerProxyFunction(u,e),_channelId:i.channelId}):\"object\"===f?u&&u instanceof Date?s[a]={__proxyDate:u.getTime()}:s[a]=i._customSerializeObject(u,t,c,o,r+1):\"__proxyFunctionId\"!==a&&(s[a]=u)}};if(e instanceof Array){s=[],c.newObjects.push(s);for(var u=0,f=e.length;u<f;u++)a(e,s,u)}else{s={},c.newObjects.push(s);var h={};try{h=function(e){for(var t={};e&&e!==Object.prototype;){for(var n=0,o=Object.getOwnPropertyNames(e);n<o.length;n++){var r=o[n];\"constructor\"!==r&&(t[r]=!0)}e=Object.getPrototypeOf(e)}return t}(e)}catch(e){}for(var d in h)(d&&\"_\"!==d[0]||t&&t.includeUnderscoreProperties)&&a(e,s,d)}return c.originalObjects.pop(),c.newObjects.pop(),s}},e.prototype._registerProxyFunction=function(e,t){var n=this.nextProxyId++;return this.proxyFunctions[\"proxy\"+n]=function(){return e.apply(t,Array.prototype.slice.call(arguments,0))},n},e.prototype._customDeserializeObject=function(e,t){var n=this,o=this;if(!e)return null;var r=function(e,r){var i=e[r],s=typeof i;\"__circularReferenceId\"===r&&\"number\"===s?(t[i]=e,delete e[r]):\"object\"===s&&i&&(i.__proxyFunctionId?e[r]=function(){return o.invokeRemoteMethod(\"proxy\"+i.__proxyFunctionId,\"__proxyFunctions\",Array.prototype.slice.call(arguments,0),{},{includeUnderscoreProperties:!0})}:i.__proxyDate?e[r]=new Date(i.__proxyDate):i.__circularReference?e[r]=t[i.__circularReference]:n._customDeserializeObject(i,t))};if(e instanceof Array)for(var i=0,s=e.length;i<s;i++)r(e,i);else if(\"object\"==typeof e)for(var c in e)r(e,c);return e},e}(),f=function(){function e(){var e=this;this._channels=[],this._handleMessageReceived=function(t){var n;if(\"string\"==typeof t.data)try{n=JSON.parse(t.data)}catch(e){}if(n){for(var o=!1,r=void 0,i=0,s=e._channels;i<s.length;i++){var c=s[i];c.owns(t.source,t.origin,n)&&(r=c,o=c.onMessage(n)||o)}r&&!o&&(window.console&&console.error(\"No handler found on any channel for message: \".concat(JSON.stringify(n))),n.instanceId&&r.error(n,new Error(\"The registered object \".concat(n.instanceId,\" could not be found.\"))))}},window.addEventListener(\"message\",this._handleMessageReceived)}return e.prototype.addChannel=function(e,t){var n=new u(e,t);return this._channels.push(n),n},e.prototype.removeChannel=function(e){this._channels=this._channels.filter((function(t){return t!==e}))},e}(),h=new c,d=new f,p=window;p._AzureDevOpsSDKVersion&&console.error(\"The AzureDevOps SDK is already loaded. Only one version of this module can be loaded in a given document.\"),p._AzureDevOpsSDKVersion=4.2,exports.HostType=void 0,(s=e.HostType||(exports.HostType={}))[s.Unknown=0]=\"Unknown\",s[s.Deployment=1]=\"Deployment\",s[s.Enterprise=2]=\"Enterprise\",s[s.Organization=4]=\"Organization\";var l,v,g,y,b,m,w,_,x,k,O=\"DevOps.HostControl\",j=d.addChannel(window.parent),C=new Promise((function(e){k=e}));function R(e,t){var n,o=window;\"function\"==typeof o.CustomEvent?n=new o.CustomEvent(e,t):(t=t||{bubbles:!1,cancelable:!1},(n=document.createEvent(\"CustomEvent\")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail)),window.dispatchEvent(n)}function E(){return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,C]}))}))}function I(e){return\"Attempted to call \".concat(e,\"() before init() was complete. Wait for init to complete or place within a ready() callback.\")}function T(e){x||((x=document.createElement(\"style\")).type=\"text/css\",document.head.appendChild(x));var t=[];if(e)for(var n in e)t.push(\"--\"+n+\": \"+e[n]);x.innerText=\":root { \"+t.join(\"; \")+\" } body { color: var(--text-primary-color) }\",R(\"themeApplied\",{detail:e})}j.getObjectRegistry().register(\"DevOps.SdkClient\",{dispatchEvent:R}),exports.applyTheme=T,exports.getAccessToken=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,j.invokeRemoteMethod(\"getAccessToken\",O).then((function(e){return e.token}))]}))}))},exports.getAppToken=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,j.invokeRemoteMethod(\"getAppToken\",O).then((function(e){return e.token}))]}))}))},exports.getConfiguration=function(){if(!b)throw new Error(I(\"getConfiguration\"));return b},exports.getContributionId=function(){if(!m)throw new Error(I(\"getContributionId\"));return m},exports.getExtensionContext=function(){if(!y)throw new Error(I(\"getExtensionContext\"));return y},exports.getHost=function(){if(!_)throw new Error(I(\"getHost\"));return _},exports.getPageContext=function(){if(!g)throw new Error(I(\"getPageContext\"));return g},exports.getService=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,E().then((function(){return j.invokeRemoteMethod(\"getService\",\"DevOps.ServiceManager\",[e])}))]}))}))},exports.getTeamContext=function(){if(!l)throw new Error(I(\"getTeamContext\"));return l},exports.getUser=function(){if(!w)throw new Error(I(\"getUser\"));return w},exports.getWebContext=function(){if(!v)throw new Error(I(\"getWebContext\"));return v},exports.init=function(e){return new Promise((function(n){var o=t(t({},e),{sdkVersion:4.2});j.invokeRemoteMethod(\"initialHandshake\",O,[o]).then((function(e){if(\"pageContext\"in e){if(g=(o=e).pageContext,v=g?g.webContext:void 0,l=v?v.team:void 0,b=o.initialConfig||{},m=o.contribution.id,(y=o.extensionContext).id=y.publisherId+\".\"+y.extensionId,\"context\"in e){var t=e.context;w=t.user,_=t.host}}else{var o;t=(o=e).context;g=t.pageContext,v=g?g.webContext:void 0,l=v?v.team:void 0,b=o.initialConfig||{},m=o.contributionId,y=t.extension,w=t.user,_=t.host}e.themeData&&(T(e.themeData),window.addEventListener(\"themeChanged\",(function(e){T(e.detail.data)}))),k(),n()}))}))},exports.notifyLoadFailed=function(e){return j.invokeRemoteMethod(\"notifyLoadFailed\",O,[e])},exports.notifyLoadSucceeded=function(){return j.invokeRemoteMethod(\"notifyLoadSucceeded\",O)},exports.ready=E,exports.register=function(e,t){j.getObjectRegistry().register(e,t)},exports.resize=function(e,t){var n=document.body;if(n){var o=\"number\"==typeof e?e:n?n.scrollWidth:void 0,r=\"number\"==typeof t?t:n?n.scrollHeight:void 0;j.invokeRemoteMethod(\"resize\",O,[o,r])}},exports.sdkVersion=4.2,exports.unregister=function(e){j.getObjectRegistry().unregister(e)}}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/azure-devops-extension-sdk/SDK.min.js?\n}");

/***/ }),

/***/ "./node_modules/dompurify/dist/purify.cjs.js":
/*!***************************************************!*\
  !*** ./node_modules/dompurify/dist/purify.cjs.js ***!
  \***************************************************/
/***/ ((module) => {

"use strict";
eval("{/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */\r\n\r\n\r\n\r\nfunction _arrayLikeToArray(r, a) {\r\n  (null == a || a > r.length) && (a = r.length);\r\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\r\n  return n;\r\n}\r\nfunction _arrayWithHoles(r) {\r\n  if (Array.isArray(r)) return r;\r\n}\r\nfunction _iterableToArrayLimit(r, l) {\r\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\r\n  if (null != t) {\r\n    var e,\r\n      n,\r\n      i,\r\n      u,\r\n      a = [],\r\n      f = true,\r\n      o = false;\r\n    try {\r\n      if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\r\n    } catch (r) {\r\n      o = true, n = r;\r\n    } finally {\r\n      try {\r\n        if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\r\n      } finally {\r\n        if (o) throw n;\r\n      }\r\n    }\r\n    return a;\r\n  }\r\n}\r\nfunction _nonIterableRest() {\r\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\r\n}\r\nfunction _slicedToArray(r, e) {\r\n  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\r\n}\r\nfunction _unsupportedIterableToArray(r, a) {\r\n  if (r) {\r\n    if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\r\n    var t = {}.toString.call(r).slice(8, -1);\r\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\r\n  }\r\n}\r\n\r\nconst entries = Object.entries,\r\n  setPrototypeOf = Object.setPrototypeOf,\r\n  isFrozen = Object.isFrozen,\r\n  getPrototypeOf = Object.getPrototypeOf,\r\n  getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\r\nlet freeze = Object.freeze,\r\n  seal = Object.seal,\r\n  create = Object.create; // eslint-disable-line import/no-mutable-exports\r\nlet _ref = typeof Reflect !== 'undefined' && Reflect,\r\n  apply = _ref.apply,\r\n  construct = _ref.construct;\r\nif (!freeze) {\r\n  freeze = function freeze(x) {\r\n    return x;\r\n  };\r\n}\r\nif (!seal) {\r\n  seal = function seal(x) {\r\n    return x;\r\n  };\r\n}\r\nif (!apply) {\r\n  apply = function apply(func, thisArg) {\r\n    for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\r\n      args[_key - 2] = arguments[_key];\r\n    }\r\n    return func.apply(thisArg, args);\r\n  };\r\n}\r\nif (!construct) {\r\n  construct = function construct(Func) {\r\n    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\r\n      args[_key2 - 1] = arguments[_key2];\r\n    }\r\n    return new Func(...args);\r\n  };\r\n}\r\nconst arrayForEach = unapply(Array.prototype.forEach);\r\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\r\nconst arrayPop = unapply(Array.prototype.pop);\r\nconst arrayPush = unapply(Array.prototype.push);\r\nconst arraySplice = unapply(Array.prototype.splice);\r\nconst arrayIsArray = Array.isArray;\r\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\r\nconst stringToString = unapply(String.prototype.toString);\r\nconst stringMatch = unapply(String.prototype.match);\r\nconst stringReplace = unapply(String.prototype.replace);\r\nconst stringIndexOf = unapply(String.prototype.indexOf);\r\nconst stringTrim = unapply(String.prototype.trim);\r\nconst numberToString = unapply(Number.prototype.toString);\r\nconst booleanToString = unapply(Boolean.prototype.toString);\r\nconst bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\r\nconst symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\r\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\r\nconst objectToString = unapply(Object.prototype.toString);\r\nconst regExpTest = unapply(RegExp.prototype.test);\r\nconst typeErrorCreate = unconstruct(TypeError);\r\n/**\r\n * Creates a new function that calls the given function with a specified thisArg and arguments.\r\n *\r\n * @param func - The function to be wrapped and called.\r\n * @returns A new function that calls the given function with a specified thisArg and arguments.\r\n */\r\nfunction unapply(func) {\r\n  return function (thisArg) {\r\n    if (thisArg instanceof RegExp) {\r\n      thisArg.lastIndex = 0;\r\n    }\r\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\r\n      args[_key3 - 1] = arguments[_key3];\r\n    }\r\n    return apply(func, thisArg, args);\r\n  };\r\n}\r\n/**\r\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\r\n *\r\n * @param func - The constructor function to be wrapped and called.\r\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\r\n */\r\nfunction unconstruct(Func) {\r\n  return function () {\r\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\r\n      args[_key4] = arguments[_key4];\r\n    }\r\n    return construct(Func, args);\r\n  };\r\n}\r\n/**\r\n * Add properties to a lookup table\r\n *\r\n * @param set - The set to which elements will be added.\r\n * @param array - The array containing elements to be added to the set.\r\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\r\n * @returns The modified set with added elements.\r\n */\r\nfunction addToSet(set, array) {\r\n  let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\r\n  if (setPrototypeOf) {\r\n    // Make 'in' and truthy checks like Boolean(set.constructor)\r\n    // independent of any properties defined on Object.prototype.\r\n    // Prevent prototype setters from intercepting set as a this value.\r\n    setPrototypeOf(set, null);\r\n  }\r\n  if (!arrayIsArray(array)) {\r\n    return set;\r\n  }\r\n  let l = array.length;\r\n  while (l--) {\r\n    let element = array[l];\r\n    if (typeof element === 'string') {\r\n      const lcElement = transformCaseFunc(element);\r\n      if (lcElement !== element) {\r\n        // Config presets (e.g. tags.js, attrs.js) are immutable.\r\n        if (!isFrozen(array)) {\r\n          array[l] = lcElement;\r\n        }\r\n        element = lcElement;\r\n      }\r\n    }\r\n    set[element] = true;\r\n  }\r\n  return set;\r\n}\r\n/**\r\n * Clean up an array to harden against CSPP\r\n *\r\n * @param array - The array to be cleaned.\r\n * @returns The cleaned version of the array\r\n */\r\nfunction cleanArray(array) {\r\n  for (let index = 0; index < array.length; index++) {\r\n    const isPropertyExist = objectHasOwnProperty(array, index);\r\n    if (!isPropertyExist) {\r\n      array[index] = null;\r\n    }\r\n  }\r\n  return array;\r\n}\r\n/**\r\n * Shallow clone an object\r\n *\r\n * @param object - The object to be cloned.\r\n * @returns A new object that copies the original.\r\n */\r\nfunction clone(object) {\r\n  const newObject = create(null);\r\n  for (const _ref2 of entries(object)) {\r\n    var _ref3 = _slicedToArray(_ref2, 2);\r\n    const property = _ref3[0];\r\n    const value = _ref3[1];\r\n    const isPropertyExist = objectHasOwnProperty(object, property);\r\n    if (isPropertyExist) {\r\n      if (arrayIsArray(value)) {\r\n        newObject[property] = cleanArray(value);\r\n      } else if (value && typeof value === 'object' && value.constructor === Object) {\r\n        newObject[property] = clone(value);\r\n      } else {\r\n        newObject[property] = value;\r\n      }\r\n    }\r\n  }\r\n  return newObject;\r\n}\r\n/**\r\n * Convert non-node values into strings without depending on direct property access.\r\n *\r\n * @param value - The value to stringify.\r\n * @returns A string representation of the provided value.\r\n */\r\nfunction stringifyValue(value) {\r\n  switch (typeof value) {\r\n    case 'string':\r\n      {\r\n        return value;\r\n      }\r\n    case 'number':\r\n      {\r\n        return numberToString(value);\r\n      }\r\n    case 'boolean':\r\n      {\r\n        return booleanToString(value);\r\n      }\r\n    case 'bigint':\r\n      {\r\n        return bigintToString ? bigintToString(value) : '0';\r\n      }\r\n    case 'symbol':\r\n      {\r\n        return symbolToString ? symbolToString(value) : 'Symbol()';\r\n      }\r\n    case 'undefined':\r\n      {\r\n        return objectToString(value);\r\n      }\r\n    case 'function':\r\n    case 'object':\r\n      {\r\n        if (value === null) {\r\n          return objectToString(value);\r\n        }\r\n        const valueAsRecord = value;\r\n        const valueToString = lookupGetter(valueAsRecord, 'toString');\r\n        if (typeof valueToString === 'function') {\r\n          const stringified = valueToString(valueAsRecord);\r\n          return typeof stringified === 'string' ? stringified : objectToString(stringified);\r\n        }\r\n        return objectToString(value);\r\n      }\r\n    default:\r\n      {\r\n        return objectToString(value);\r\n      }\r\n  }\r\n}\r\n/**\r\n * This method automatically checks if the prop is function or getter and behaves accordingly.\r\n *\r\n * @param object - The object to look up the getter function in its prototype chain.\r\n * @param prop - The property name for which to find the getter function.\r\n * @returns The getter function found in the prototype chain or a fallback function.\r\n */\r\nfunction lookupGetter(object, prop) {\r\n  while (object !== null) {\r\n    const desc = getOwnPropertyDescriptor(object, prop);\r\n    if (desc) {\r\n      if (desc.get) {\r\n        return unapply(desc.get);\r\n      }\r\n      if (typeof desc.value === 'function') {\r\n        return unapply(desc.value);\r\n      }\r\n    }\r\n    object = getPrototypeOf(object);\r\n  }\r\n  function fallbackValue() {\r\n    return null;\r\n  }\r\n  return fallbackValue;\r\n}\r\nfunction isRegex(value) {\r\n  try {\r\n    regExpTest(value, '');\r\n    return true;\r\n  } catch (_unused) {\r\n    return false;\r\n  }\r\n}\r\n\r\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\r\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\r\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\r\n// List of SVG elements that are disallowed by default.\r\n// We still need to know them so that we can do namespace\r\n// checks properly in case one wants to add them to\r\n// allow-list.\r\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\r\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\r\n// Similarly to SVG, we want to know all MathML elements,\r\n// even those that we disallow by default.\r\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\r\nconst text = freeze(['#text']);\r\n\r\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'command', 'commandfor', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);\r\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dominant-baseline', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-orientation', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\r\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\r\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\r\n\r\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\r\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\r\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\r\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\r\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\r\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\r\n);\r\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\r\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\r\n);\r\nconst DOCTYPE_NAME = seal(/^html$/i);\r\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\r\n// Markup-significant character probes used by _sanitizeElements.\r\n// Shared module-level instances are safe despite the sticky /g flags:\r\n// unapply() resets lastIndex for RegExp receivers before every call.\r\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\r\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\r\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\r\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\r\nconst NODE_TYPE = {\r\n  element: 1,\r\n  attribute: 2,\r\n  text: 3,\r\n  cdataSection: 4,\r\n  entityReference: 5,\r\n  // Deprecated\r\n  entityNode: 6,\r\n  // Deprecated\r\n  processingInstruction: 7,\r\n  comment: 8,\r\n  document: 9,\r\n  documentType: 10,\r\n  documentFragment: 11,\r\n  notation: 12 // Deprecated\r\n};\r\nconst getGlobal = function getGlobal() {\r\n  return typeof window === 'undefined' ? null : window;\r\n};\r\n/**\r\n * Creates a no-op policy for internal use only.\r\n * Don't export this function outside this module!\r\n * @param trustedTypes The policy factory.\r\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\r\n * @return The policy created (or null, if Trusted Types\r\n * are not supported or creating the policy failed).\r\n */\r\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\r\n  if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\r\n    return null;\r\n  }\r\n  // Allow the callers to control the unique policy name\r\n  // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\r\n  // Policy creation with duplicate names throws in Trusted Types.\r\n  let suffix = null;\r\n  const ATTR_NAME = 'data-tt-policy-suffix';\r\n  if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\r\n    suffix = purifyHostElement.getAttribute(ATTR_NAME);\r\n  }\r\n  const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\r\n  try {\r\n    return trustedTypes.createPolicy(policyName, {\r\n      createHTML(html) {\r\n        return html;\r\n      },\r\n      createScriptURL(scriptUrl) {\r\n        return scriptUrl;\r\n      }\r\n    });\r\n  } catch (_) {\r\n    // Policy creation failed (most likely another DOMPurify script has\r\n    // already run). Skip creating the policy, as this will only cause errors\r\n    // if TT are enforced.\r\n    console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\r\n    return null;\r\n  }\r\n};\r\nconst _createHooksMap = function _createHooksMap() {\r\n  return {\r\n    afterSanitizeAttributes: [],\r\n    afterSanitizeElements: [],\r\n    afterSanitizeShadowDOM: [],\r\n    beforeSanitizeAttributes: [],\r\n    beforeSanitizeElements: [],\r\n    beforeSanitizeShadowDOM: [],\r\n    uponSanitizeAttribute: [],\r\n    uponSanitizeElement: [],\r\n    uponSanitizeShadowNode: []\r\n  };\r\n};\r\n/**\r\n * Resolve a set-valued configuration option: a fresh set built from\r\n * cfg[key] when it is an own array property (seeded with a clone of\r\n * options.base when given, case-normalized via options.transform),\r\n * the fallback set otherwise.\r\n *\r\n * @param cfg the cloned, prototype-free configuration object\r\n * @param key the configuration property to read\r\n * @param fallback the set to use when the option is absent or not an array\r\n * @param options transform and optional base set to merge into\r\n * @returns the resolved set\r\n */\r\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\r\n  return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\r\n};\r\nfunction createDOMPurify() {\r\n  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\r\n  const DOMPurify = root => createDOMPurify(root);\r\n  DOMPurify.version = '3.4.13';\r\n  DOMPurify.removed = [];\r\n  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\r\n    // Not running in a browser, provide a factory function\r\n    // so that you can pass your own Window\r\n    DOMPurify.isSupported = false;\r\n    return DOMPurify;\r\n  }\r\n  let document = window.document;\r\n  const originalDocument = document;\r\n  const currentScript = originalDocument.currentScript;\r\n  window.DocumentFragment;\r\n    const HTMLTemplateElement = window.HTMLTemplateElement,\r\n    Node = window.Node,\r\n    Element = window.Element,\r\n    NodeFilter = window.NodeFilter,\r\n    _window$NamedNodeMap = window.NamedNodeMap;\r\n    _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap;\r\n    window.HTMLFormElement;\r\n    const DOMParser = window.DOMParser,\r\n    trustedTypes = window.trustedTypes;\r\n  const ElementPrototype = Element.prototype;\r\n  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\r\n  const remove = lookupGetter(ElementPrototype, 'remove');\r\n  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\r\n  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\r\n  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\r\n  const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\r\n  const getAttributes = lookupGetter(ElementPrototype, 'attributes');\r\n  const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\r\n  const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\r\n  const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, 'ownerDocument') : null;\r\n  // As per issue #47, the web-components registry is inherited by a\r\n  // new document created via createHTMLDocument. As per the spec\r\n  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\r\n  // a new empty registry is used when creating a template contents owner\r\n  // document, so we use that as our parent document to ensure nothing\r\n  // is inherited.\r\n  if (typeof HTMLTemplateElement === 'function') {\r\n    const template = document.createElement('template');\r\n    if (template.content && template.content.ownerDocument) {\r\n      document = template.content.ownerDocument;\r\n    }\r\n  }\r\n  let trustedTypesPolicy;\r\n  let emptyHTML = '';\r\n  // The instance's own internal Trusted Types policy. Unlike a caller-supplied\r\n  // `TRUSTED_TYPES_POLICY`, this is created at most once — Trusted Types throws\r\n  // on duplicate policy names — and is the only policy allowed to persist\r\n  // across configurations and survive `clearConfig()`.\r\n  let defaultTrustedTypesPolicy;\r\n  let defaultTrustedTypesPolicyResolved = false;\r\n  // Tracks whether we are already inside a call to the configured Trusted Types\r\n  // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\r\n  // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\r\n  // re-enter the policy and recurse until the stack overflows. We detect that\r\n  // re-entry and throw a clear, actionable error instead. The guard is shared\r\n  // across both callbacks, because either one re-entering `sanitize` triggers\r\n  // the same unbounded recursion.\r\n  let IN_TRUSTED_TYPES_POLICY = 0;\r\n  const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\r\n    if (IN_TRUSTED_TYPES_POLICY > 0) {\r\n      throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' + 'Types\" section of the README.');\r\n    }\r\n  };\r\n  const _createTrustedHTML = function _createTrustedHTML(html) {\r\n    _assertNotInTrustedTypesPolicy();\r\n    IN_TRUSTED_TYPES_POLICY++;\r\n    try {\r\n      return trustedTypesPolicy.createHTML(html);\r\n    } finally {\r\n      IN_TRUSTED_TYPES_POLICY--;\r\n    }\r\n  };\r\n  const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\r\n    _assertNotInTrustedTypesPolicy();\r\n    IN_TRUSTED_TYPES_POLICY++;\r\n    try {\r\n      return trustedTypesPolicy.createScriptURL(scriptUrl);\r\n    } finally {\r\n      IN_TRUSTED_TYPES_POLICY--;\r\n    }\r\n  };\r\n  // Lazily resolve (and cache) the instance's internal default policy.\r\n  // Resolution is attempted at most once: a successful `createPolicy` cannot be\r\n  // repeated (Trusted Types throws on duplicate names), and a failed or\r\n  // unsupported attempt must not be retried on every parse.\r\n  const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\r\n    if (!defaultTrustedTypesPolicyResolved) {\r\n      defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\r\n      defaultTrustedTypesPolicyResolved = true;\r\n    }\r\n    return defaultTrustedTypesPolicy;\r\n  };\r\n  const _document = document,\r\n    implementation = _document.implementation,\r\n    createNodeIterator = _document.createNodeIterator,\r\n    createDocumentFragment = _document.createDocumentFragment,\r\n    getElementsByTagName = _document.getElementsByTagName;\r\n  const importNode = originalDocument.importNode;\r\n  let hooks = _createHooksMap();\r\n  /**\r\n   * Expose whether this browser supports running the full DOMPurify.\r\n   */\r\n  DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\r\n  const MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\r\n    ERB_EXPR$1 = ERB_EXPR,\r\n    TMPLIT_EXPR$1 = TMPLIT_EXPR,\r\n    DATA_ATTR$1 = DATA_ATTR,\r\n    ARIA_ATTR$1 = ARIA_ATTR,\r\n    IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\r\n    ATTR_WHITESPACE$1 = ATTR_WHITESPACE,\r\n    CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\r\n  let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\r\n  /**\r\n   * We consider the elements and attributes below to be safe. Ideally\r\n   * don't add any new ones but feel free to remove unwanted ones.\r\n   */\r\n  /* allowed element names */\r\n  let ALLOWED_TAGS = null;\r\n  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\r\n  /* Allowed attribute names */\r\n  let ALLOWED_ATTR = null;\r\n  const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\r\n  /*\r\n   * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\r\n   * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\r\n   * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\r\n   * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\r\n   */\r\n  let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\r\n    tagNameCheck: {\r\n      writable: true,\r\n      configurable: false,\r\n      enumerable: true,\r\n      value: null\r\n    },\r\n    attributeNameCheck: {\r\n      writable: true,\r\n      configurable: false,\r\n      enumerable: true,\r\n      value: null\r\n    },\r\n    allowCustomizedBuiltInElements: {\r\n      writable: true,\r\n      configurable: false,\r\n      enumerable: true,\r\n      value: false\r\n    }\r\n  }));\r\n  /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\r\n  let FORBID_TAGS = null;\r\n  /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\r\n  let FORBID_ATTR = null;\r\n  /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\r\n  const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\r\n    tagCheck: {\r\n      writable: true,\r\n      configurable: false,\r\n      enumerable: true,\r\n      value: null\r\n    },\r\n    attributeCheck: {\r\n      writable: true,\r\n      configurable: false,\r\n      enumerable: true,\r\n      value: null\r\n    }\r\n  }));\r\n  /* Decide if ARIA attributes are okay */\r\n  let ALLOW_ARIA_ATTR = true;\r\n  /* Decide if custom data attributes are okay */\r\n  let ALLOW_DATA_ATTR = true;\r\n  /* Decide if unknown protocols are okay */\r\n  let ALLOW_UNKNOWN_PROTOCOLS = false;\r\n  /* Decide if self-closing tags in attributes are allowed.\r\n   * Usually removed due to a mXSS issue in jQuery 3.0 */\r\n  let ALLOW_SELF_CLOSE_IN_ATTR = true;\r\n  /* Output should be safe for common template engines.\r\n   * This means, DOMPurify removes data attributes, mustaches and ERB\r\n   */\r\n  let SAFE_FOR_TEMPLATES = false;\r\n  /* Output should be safe even for XML used within HTML and alike.\r\n   * This means, DOMPurify removes comments when containing risky content.\r\n   */\r\n  let SAFE_FOR_XML = true;\r\n  /* Decide if document with <html>... should be returned */\r\n  let WHOLE_DOCUMENT = false;\r\n  /* Track whether config is already set on this instance of DOMPurify. */\r\n  let SET_CONFIG = false;\r\n  /* Pristine allowlist bindings captured at setConfig() time. On the\r\n   * persistent-config path sanitize() restores the sets from these before\r\n   * the per-walk hook clone-guard, so a hook's in-call widening cannot\r\n   * carry across calls. Null until setConfig() is called; reset by\r\n   * clearConfig(). */\r\n  let SET_CONFIG_ALLOWED_TAGS = null;\r\n  let SET_CONFIG_ALLOWED_ATTR = null;\r\n  /* Decide if all elements (e.g. style, script) must be children of\r\n   * document.body. By default, browsers might move them to document.head */\r\n  let FORCE_BODY = false;\r\n  /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\r\n   * string (or a TrustedHTML object if Trusted Types are supported).\r\n   * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\r\n   */\r\n  let RETURN_DOM = false;\r\n  /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\r\n   * string  (or a TrustedHTML object if Trusted Types are supported) */\r\n  let RETURN_DOM_FRAGMENT = false;\r\n  /* Try to return a Trusted Type object instead of a string, return a string in\r\n   * case Trusted Types are not supported  */\r\n  let RETURN_TRUSTED_TYPE = false;\r\n  /* Output should be free from DOM clobbering attacks?\r\n   * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\r\n   */\r\n  let SANITIZE_DOM = true;\r\n  /* Achieve full DOM Clobbering protection by isolating the namespace of named\r\n   * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\r\n   *\r\n   * HTML/DOM spec rules that enable DOM Clobbering:\r\n   *   - Named Access on Window (§7.3.3)\r\n   *   - DOM Tree Accessors (§3.1.5)\r\n   *   - Form Element Parent-Child Relations (§4.10.3)\r\n   *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)\r\n   *   - HTMLCollection (§4.2.10.2)\r\n   *\r\n   * Namespace isolation is implemented by prefixing `id` and `name` attributes\r\n   * with a constant string, i.e., `user-content-`\r\n   */\r\n  let SANITIZE_NAMED_PROPS = false;\r\n  const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\r\n  /* Keep element content when removing element? */\r\n  let KEEP_CONTENT = true;\r\n  /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\r\n   * of importing it into a new Document and returning a sanitized copy */\r\n  let IN_PLACE = false;\r\n  /* Allow usage of profiles like html, svg and mathMl */\r\n  let USE_PROFILES = {};\r\n  /* Tags to ignore content of when KEEP_CONTENT is true */\r\n  let FORBID_CONTENTS = null;\r\n  const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',\r\n  // <selectedcontent> mirrors the selected <option>'s subtree, cloned by\r\n  // the UA (customizable <select>) — including any on* handlers — and the\r\n  // engine re-mirrors synchronously whenever a removal changes which\r\n  // option/selectedcontent is current, even inside DOMPurify's inert\r\n  // DOMParser document. Hoisting its children on removal re-inserts a fresh\r\n  // mirror target ahead of the walk, which the engine refills, looping\r\n  // forever (DoS) and amplifying output. Dropping its content on removal\r\n  // (rather than hoisting) breaks that cascade; the content is a duplicate\r\n  // of the option, which is sanitized on its own. See campaign-3 F1/F6.\r\n  'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\r\n  /* Tags that are safe for data: URIs */\r\n  let DATA_URI_TAGS = null;\r\n  const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\r\n  /* Attributes safe for values like \"javascript:\" */\r\n  let URI_SAFE_ATTRIBUTES = null;\r\n  const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\r\n  const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\r\n  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\r\n  const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\r\n  /* Document namespace */\r\n  let NAMESPACE = HTML_NAMESPACE;\r\n  let IS_EMPTY_INPUT = false;\r\n  /* Allowed XHTML+XML namespaces */\r\n  let ALLOWED_NAMESPACES = null;\r\n  const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\r\n  const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);\r\n  let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\r\n  const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);\r\n  let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\r\n  // Certain elements are allowed in both SVG and HTML\r\n  // namespace. We need to specify them explicitly\r\n  // so that they don't get erroneously deleted from\r\n  // HTML namespace.\r\n  const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\r\n  /* Parsing of strict XHTML documents */\r\n  let PARSER_MEDIA_TYPE = null;\r\n  const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\r\n  const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\r\n  let transformCaseFunc = null;\r\n  /* Keep a reference to config to pass to hooks */\r\n  let CONFIG = null;\r\n  /* Ideally, do not touch anything below this line */\r\n  /* ______________________________________________ */\r\n  const formElement = document.createElement('form');\r\n  const isRegexOrFunction = function isRegexOrFunction(testValue) {\r\n    return testValue instanceof RegExp || testValue instanceof Function;\r\n  };\r\n  /**\r\n   * _parseConfig\r\n   *\r\n   * @param cfg optional config literal\r\n   */\r\n  // eslint-disable-next-line complexity\r\n  const _parseConfig = function _parseConfig() {\r\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\r\n    if (CONFIG && CONFIG === cfg) {\r\n      return;\r\n    }\r\n    /* Shield configuration object from tampering */\r\n    if (!cfg || typeof cfg !== 'object') {\r\n      cfg = {};\r\n    }\r\n    /* Shield configuration object from prototype pollution */\r\n    cfg = clone(cfg);\r\n    PARSER_MEDIA_TYPE =\r\n    // eslint-disable-next-line unicorn/prefer-includes\r\n    SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\r\n    // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\r\n    transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\r\n    /* Set configuration parameters */\r\n    ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {\r\n      transform: transformCaseFunc\r\n    });\r\n    ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {\r\n      transform: transformCaseFunc\r\n    });\r\n    ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {\r\n      transform: stringToString\r\n    });\r\n    URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {\r\n      transform: transformCaseFunc,\r\n      base: DEFAULT_URI_SAFE_ATTRIBUTES\r\n    });\r\n    DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {\r\n      transform: transformCaseFunc,\r\n      base: DEFAULT_DATA_URI_TAGS\r\n    });\r\n    FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {\r\n      transform: transformCaseFunc\r\n    });\r\n    FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {\r\n      transform: transformCaseFunc\r\n    });\r\n    FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {\r\n      transform: transformCaseFunc\r\n    });\r\n    USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\r\n    ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\r\n    ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\r\n    ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\r\n    ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\r\n    SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\r\n    SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\r\n    WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\r\n    RETURN_DOM = cfg.RETURN_DOM || false; // Default false\r\n    RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\r\n    RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\r\n    FORCE_BODY = cfg.FORCE_BODY || false; // Default false\r\n    SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\r\n    SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\r\n    KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\r\n    IN_PLACE = cfg.IN_PLACE || false; // Default false\r\n    IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp\r\n    NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace\r\n    MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS); // Default built-in map\r\n    HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS); // Default built-in map\r\n    const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);\r\n    CUSTOM_ELEMENT_HANDLING = create(null);\r\n    if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {\r\n      CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined\r\n    }\r\n    if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {\r\n      CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined\r\n    }\r\n    if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {\r\n      CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined\r\n    }\r\n    seal(CUSTOM_ELEMENT_HANDLING);\r\n    if (SAFE_FOR_TEMPLATES) {\r\n      ALLOW_DATA_ATTR = false;\r\n    }\r\n    if (RETURN_DOM_FRAGMENT) {\r\n      RETURN_DOM = true;\r\n    }\r\n    /* Parse profile info */\r\n    if (USE_PROFILES) {\r\n      ALLOWED_TAGS = addToSet({}, text);\r\n      ALLOWED_ATTR = create(null);\r\n      if (USE_PROFILES.html === true) {\r\n        addToSet(ALLOWED_TAGS, html$1);\r\n        addToSet(ALLOWED_ATTR, html);\r\n      }\r\n      if (USE_PROFILES.svg === true) {\r\n        addToSet(ALLOWED_TAGS, svg$1);\r\n        addToSet(ALLOWED_ATTR, svg);\r\n        addToSet(ALLOWED_ATTR, xml);\r\n      }\r\n      if (USE_PROFILES.svgFilters === true) {\r\n        addToSet(ALLOWED_TAGS, svgFilters);\r\n        addToSet(ALLOWED_ATTR, svg);\r\n        addToSet(ALLOWED_ATTR, xml);\r\n      }\r\n      if (USE_PROFILES.mathMl === true) {\r\n        addToSet(ALLOWED_TAGS, mathMl$1);\r\n        addToSet(ALLOWED_ATTR, mathMl);\r\n        addToSet(ALLOWED_ATTR, xml);\r\n      }\r\n    }\r\n    /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent\r\n     * leaking across calls when switching from function to array config */\r\n    EXTRA_ELEMENT_HANDLING.tagCheck = null;\r\n    EXTRA_ELEMENT_HANDLING.attributeCheck = null;\r\n    /* Merge configuration parameters */\r\n    if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {\r\n      if (typeof cfg.ADD_TAGS === 'function') {\r\n        EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\r\n      } else if (arrayIsArray(cfg.ADD_TAGS)) {\r\n        if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\r\n          ALLOWED_TAGS = clone(ALLOWED_TAGS);\r\n        }\r\n        addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\r\n      }\r\n    }\r\n    if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {\r\n      if (typeof cfg.ADD_ATTR === 'function') {\r\n        EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\r\n      } else if (arrayIsArray(cfg.ADD_ATTR)) {\r\n        if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\r\n          ALLOWED_ATTR = clone(ALLOWED_ATTR);\r\n        }\r\n        addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\r\n      }\r\n    }\r\n    if (objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {\r\n      addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\r\n    }\r\n    if (objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS)) {\r\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\r\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\r\n      }\r\n      addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\r\n    }\r\n    if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\r\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\r\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\r\n      }\r\n      addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\r\n    }\r\n    /* Add #text in case KEEP_CONTENT is set to true */\r\n    if (KEEP_CONTENT) {\r\n      ALLOWED_TAGS['#text'] = true;\r\n    }\r\n    /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\r\n    if (WHOLE_DOCUMENT) {\r\n      addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\r\n    }\r\n    /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\r\n    if (ALLOWED_TAGS.table) {\r\n      addToSet(ALLOWED_TAGS, ['tbody']);\r\n      delete FORBID_TAGS.tbody;\r\n    }\r\n    // Re-derive the active Trusted Types policy from this configuration on\r\n    // every parse. The active policy must never be sticky closure state that\r\n    // outlives the config that set it: a caller-supplied policy left in place\r\n    // after `clearConfig()` — or after a later call that supplied none, or\r\n    // `TRUSTED_TYPES_POLICY: null` — could sign a subsequent \"default\"\r\n    // `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.\r\n    // See GHSA-vxr8-fq34-vvx9.\r\n    if (cfg.TRUSTED_TYPES_POLICY) {\r\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\r\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\r\n      }\r\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\r\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\r\n      }\r\n      // A caller-supplied policy applies to this configuration only.\r\n      const previousTrustedTypesPolicy = trustedTypesPolicy;\r\n      trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\r\n      // Sign local variables required by `sanitize`. If the supplied policy's\r\n      // `createHTML` is circular (i.e. it calls `DOMPurify.sanitize`), this\r\n      // throws via the re-entrancy guard. Restore the previous policy first so\r\n      // the instance is not left in a poisoned state. See #1422.\r\n      try {\r\n        emptyHTML = _createTrustedHTML('');\r\n      } catch (error) {\r\n        trustedTypesPolicy = previousTrustedTypesPolicy;\r\n        throw error;\r\n      }\r\n    } else if (cfg.TRUSTED_TYPES_POLICY === null) {\r\n      // Explicit opt-out for this call: perform no Trusted Types signing and\r\n      // create nothing (so a strict `trusted-types` CSP that disallows a\r\n      // `dompurify` policy can still call `sanitize` from inside its own\r\n      // policy — see #1422). Resetting to `undefined` rather than a sticky\r\n      // `null` also drops any previously retained caller policy, so it cannot\r\n      // resurface on a later call, while still allowing the next config-less\r\n      // call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.\r\n      trustedTypesPolicy = undefined;\r\n      emptyHTML = '';\r\n    } else {\r\n      // No policy supplied: keep the currently active policy if one is set — a\r\n      // previously supplied policy is intentionally sticky across config-less\r\n      // calls — otherwise fall back to the instance's own internal policy,\r\n      // created at most once. (A policy supplied for a *single* call still\r\n      // lingers by design; what must not linger is a policy whose configuration\r\n      // has been torn down via `clearConfig()`, which restores the default.)\r\n      if (trustedTypesPolicy === undefined) {\r\n        trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\r\n      }\r\n      // Sign internal variables only when a policy is active. A falsy policy\r\n      // (Trusted Types unsupported, creation failed, or an explicit opt-out)\r\n      // leaves `emptyHTML` as a plain string, so we never call `.createHTML` on\r\n      // a non-policy and throw. See #1422.\r\n      if (trustedTypesPolicy && typeof emptyHTML === 'string') {\r\n        emptyHTML = _createTrustedHTML('');\r\n      }\r\n    }\r\n    // Prevent further manipulation of configuration.\r\n    // Not available in IE8, Safari 5, etc.\r\n    if (freeze) {\r\n      freeze(cfg);\r\n    }\r\n    CONFIG = cfg;\r\n  };\r\n  /* Keep track of all possible SVG and MathML tags\r\n   * so that we can perform the namespace checks\r\n   * correctly. */\r\n  const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\r\n  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\r\n  /**\r\n   * Namespace rules for an element in the SVG namespace.\r\n   *\r\n   * @param tagName the element's lowercase tag name\r\n   * @param parent the (possibly simulated) parent node\r\n   * @param parentTagName the parent's lowercase tag name\r\n   * @returns true if a spec-compliant parser could produce this element\r\n   */\r\n  const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\r\n    // The only way to switch from HTML namespace to SVG\r\n    // is via <svg>. If it happens via any other tag, then\r\n    // it should be killed.\r\n    if (parent.namespaceURI === HTML_NAMESPACE) {\r\n      return tagName === 'svg';\r\n    }\r\n    // The only way to switch from MathML to SVG is via <svg>\r\n    // if the parent is either <annotation-xml> or a MathML\r\n    // text integration point.\r\n    if (parent.namespaceURI === MATHML_NAMESPACE) {\r\n      return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\r\n    }\r\n    // We only allow elements that are defined in SVG\r\n    // spec. All others are disallowed in SVG namespace.\r\n    return Boolean(ALL_SVG_TAGS[tagName]);\r\n  };\r\n  /**\r\n   * Namespace rules for an element in the MathML namespace.\r\n   *\r\n   * @param tagName the element's lowercase tag name\r\n   * @param parent the (possibly simulated) parent node\r\n   * @param parentTagName the parent's lowercase tag name\r\n   * @returns true if a spec-compliant parser could produce this element\r\n   */\r\n  const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\r\n    // The only way to switch from HTML namespace to MathML\r\n    // is via <math>. If it happens via any other tag, then\r\n    // it should be killed.\r\n    if (parent.namespaceURI === HTML_NAMESPACE) {\r\n      return tagName === 'math';\r\n    }\r\n    // The only way to switch from SVG to MathML is via\r\n    // <math> and HTML integration points\r\n    if (parent.namespaceURI === SVG_NAMESPACE) {\r\n      return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\r\n    }\r\n    // We only allow elements that are defined in MathML\r\n    // spec. All others are disallowed in MathML namespace.\r\n    return Boolean(ALL_MATHML_TAGS[tagName]);\r\n  };\r\n  /**\r\n   * Namespace rules for an element in the HTML namespace.\r\n   *\r\n   * @param tagName the element's lowercase tag name\r\n   * @param parent the (possibly simulated) parent node\r\n   * @param parentTagName the parent's lowercase tag name\r\n   * @returns true if a spec-compliant parser could produce this element\r\n   */\r\n  const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\r\n    // The only way to switch from SVG to HTML is via\r\n    // HTML integration points, and from MathML to HTML\r\n    // is via MathML text integration points\r\n    if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\r\n      return false;\r\n    }\r\n    if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\r\n      return false;\r\n    }\r\n    // We disallow tags that are specific for MathML\r\n    // or SVG and should never appear in HTML namespace\r\n    return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\r\n  };\r\n  /**\r\n   * @param element a DOM element whose namespace is being checked\r\n   * @returns Return false if the element has a\r\n   *  namespace that a spec-compliant parser would never\r\n   *  return. Return true otherwise.\r\n   */\r\n  const _checkValidNamespace = function _checkValidNamespace(element) {\r\n    let parent = getParentNode(element);\r\n    // In JSDOM, if we're inside shadow DOM, then parentNode\r\n    // can be null. We just simulate parent in this case.\r\n    if (!parent || !parent.tagName) {\r\n      parent = {\r\n        namespaceURI: NAMESPACE,\r\n        tagName: 'template'\r\n      };\r\n    }\r\n    const tagName = stringToLowerCase(element.tagName);\r\n    const parentTagName = stringToLowerCase(parent.tagName);\r\n    if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\r\n      return false;\r\n    }\r\n    if (element.namespaceURI === SVG_NAMESPACE) {\r\n      return _checkSvgNamespace(tagName, parent, parentTagName);\r\n    }\r\n    if (element.namespaceURI === MATHML_NAMESPACE) {\r\n      return _checkMathMlNamespace(tagName, parent, parentTagName);\r\n    }\r\n    if (element.namespaceURI === HTML_NAMESPACE) {\r\n      return _checkHtmlNamespace(tagName, parent, parentTagName);\r\n    }\r\n    // For XHTML and XML documents that support custom namespaces\r\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\r\n      return true;\r\n    }\r\n    // The code should never reach this place (this means\r\n    // that the element somehow got namespace that is not\r\n    // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\r\n    // Return false just in case.\r\n    return false;\r\n  };\r\n  /**\r\n   * _forceRemove\r\n   *\r\n   * @param node a DOM node\r\n   */\r\n  const _forceRemove = function _forceRemove(node) {\r\n    arrayPush(DOMPurify.removed, {\r\n      element: node\r\n    });\r\n    try {\r\n      // eslint-disable-next-line unicorn/prefer-dom-node-remove\r\n      getParentNode(node).removeChild(node);\r\n    } catch (_) {\r\n      /* The normal detach failed — this is reached for a parentless node\r\n         (getParentNode() is null, so .removeChild throws). Element.prototype\r\n         .remove() is itself a spec no-op on a parentless node, so a recorded\r\n         \"removal\" would otherwise hand the caller back an intact,\r\n         payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or\r\n         the style-with-element-child rule decided to kill). Fail closed by\r\n         throwing — exactly as a clobbered root does at the IN_PLACE entry —\r\n         rather than trying to \"neutralize\" the node via its own methods.\r\n         Neutralizing would mean calling getAttributeNames()/removeAttribute()\r\n         on the node, both of which a <form> root can clobber via a named child\r\n         (and _isClobbered does not even probe getAttributeNames), so the\r\n         neutralize step could itself be silently defeated, leaving the payload\r\n         intact. A throw touches only the cached, clobber-safe remove() and\r\n         getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)\r\n         to every root-kill reason. REPORT-3.\r\n                This lives inside the catch, so it never fires for a normally-removed\r\n         in-tree node: those have a parent, removeChild() succeeds, and the\r\n         catch is not entered. Only a kept (parentless) root reaches here. */\r\n      remove(node);\r\n      if (!getParentNode(node)) {\r\n        throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');\r\n      }\r\n    }\r\n  };\r\n  /**\r\n   * _neutralizeRoot\r\n   *\r\n   * Fail-closed teardown of an in-place root after the sanitize walk aborts\r\n   * (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered\r\n   * custom element's reaction detaches a node so `_forceRemove`'s deliberate\r\n   * parentless guard throws, or any other re-entrant engine mutation — would\r\n   * otherwise leave the caller's *live* tree half-sanitized, with everything\r\n   * after the abort point still carrying its handlers. There is no safe way\r\n   * to resume the walk (the tree mutated under us), so we strip the root bare:\r\n   * remove every child and every attribute, then let the caller's catch see\r\n   * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\r\n   * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\r\n   *\r\n   * @param root the in-place root to empty\r\n   */\r\n  const _neutralizeRoot = function _neutralizeRoot(root) {\r\n    /* Strip every disallowed attribute (on* handlers included) off the whole\r\n       subtree BEFORE detaching anything. Detaching first would hand back\r\n       handler-bearing originals (e.g. an already-loading `<img onerror>`)\r\n       whose queued resource event still fires in page scope after we throw.\r\n       Clobber-safe reads; a doomed clobbered node's own attributes are\r\n       irrelevant while its non-clobbered descendants are reached and scrubbed. */\r\n    _neutralizeSubtree(root);\r\n    const childNodes = getChildNodes(root);\r\n    if (childNodes) {\r\n      const snapshot = [];\r\n      arrayForEach(childNodes, child => {\r\n        arrayPush(snapshot, child);\r\n      });\r\n      arrayForEach(snapshot, child => {\r\n        try {\r\n          remove(child);\r\n        } catch (_) {\r\n          /* Best-effort teardown; a still-attached child is handled below */\r\n        }\r\n      });\r\n    }\r\n    const attributes = getAttributes(root);\r\n    if (attributes) {\r\n      for (let i = attributes.length - 1; i >= 0; --i) {\r\n        const attribute = attributes[i];\r\n        const name = attribute && attribute.name;\r\n        if (typeof name === 'string') {\r\n          try {\r\n            root.removeAttribute(name);\r\n          } catch (_) {\r\n            /* Clobbered removeAttribute — ignore (fail-closed best effort) */\r\n          }\r\n        }\r\n      }\r\n    }\r\n  };\r\n  /**\r\n   * _removeAttribute\r\n   *\r\n   * @param name an Attribute name\r\n   * @param element a DOM node\r\n   */\r\n  const _removeAttribute = function _removeAttribute(name, element) {\r\n    try {\r\n      arrayPush(DOMPurify.removed, {\r\n        attribute: element.getAttributeNode(name),\r\n        from: element\r\n      });\r\n    } catch (_) {\r\n      arrayPush(DOMPurify.removed, {\r\n        attribute: null,\r\n        from: element\r\n      });\r\n    }\r\n    element.removeAttribute(name);\r\n    // We void attribute values for unremovable \"is\" attributes\r\n    if (name === 'is') {\r\n      if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\r\n        try {\r\n          _forceRemove(element);\r\n        } catch (_) {}\r\n      } else {\r\n        try {\r\n          element.setAttribute(name, '');\r\n        } catch (_) {}\r\n      }\r\n    }\r\n  };\r\n  /**\r\n   * _stripDisallowedAttributes\r\n   *\r\n   * Removes every attribute the active configuration does not allow from a\r\n   * single element, using the same allowlist as the main attribute pass (so\r\n   * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\r\n   * neutralise nodes that are being discarded from an in-place tree.\r\n   *\r\n   * @param element the element to strip\r\n   */\r\n  const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\r\n    const attributes = getAttributes(element);\r\n    if (!attributes) {\r\n      return;\r\n    }\r\n    for (let i = attributes.length - 1; i >= 0; --i) {\r\n      const attribute = attributes[i];\r\n      const name = attribute && attribute.name;\r\n      if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {\r\n        continue;\r\n      }\r\n      try {\r\n        element.removeAttribute(name);\r\n      } catch (_) {\r\n        /* Clobbered removeAttribute on a doomed node — ignore */\r\n      }\r\n    }\r\n  };\r\n  /**\r\n   * _neutralizeSubtree\r\n   *\r\n   * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\r\n   * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\r\n   * namespace, comment, processing-instruction and KEEP_CONTENT:false removals\r\n   * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\r\n   * those dropped nodes are detached from the caller's LIVE tree but a\r\n   * handler-bearing original among them (an `<img onerror>`/`<video>` that was\r\n   * loading) keeps its queued resource event, which fires in page scope after\r\n   * sanitize returns. This walks a removed subtree and strips every attribute\r\n   * the active configuration does not allow — so `on*` handlers are cancelled\r\n   * through the SAME allowlist that governs kept nodes, not a separate `/^on/`\r\n   * blocklist. Run synchronously before sanitize returns, i.e. before any\r\n   * queued event can fire. Hook-free by design: these nodes leave the output,\r\n   * so firing attribute hooks for them would be surprising. Clobber-safe reads;\r\n   * a doomed clobbered node may shadow `removeAttribute` (its own attributes are\r\n   * irrelevant — it is discarded — while its non-clobbered descendants, e.g.\r\n   * the `<img>`, are reached and scrubbed).\r\n   *\r\n   * @param root the root of a removed subtree to neutralise\r\n   */\r\n  const _neutralizeSubtree = function _neutralizeSubtree(root) {\r\n    const stack = [root];\r\n    while (stack.length > 0) {\r\n      const node = stack.pop();\r\n      const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\r\n      if (nodeType === NODE_TYPE.element) {\r\n        _stripDisallowedAttributes(node);\r\n      }\r\n      const childNodes = getChildNodes(node);\r\n      if (childNodes) {\r\n        for (let i = childNodes.length - 1; i >= 0; --i) {\r\n          stack.push(childNodes[i]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n  /**\r\n   * _neutralizePatchLinkage\r\n   *\r\n   * IN_PLACE entry pre-pass (declarative-partial-updates / streaming\r\n   * hardening, https://github.com/WICG/declarative-partial-updates).\r\n   *\r\n   * The main walk strips patch linkage (`for`/`patchsrc`) and removes range\r\n   * markers (PIs / markup comments) node-by-node, in document order, AS it\r\n   * reaches each node. On a live in-place root that leaves a window: from the\r\n   * moment the root is connected until the walk arrives at a given node, that\r\n   * node's linkage is live. A patch applied on connection/stream can fire as\r\n   * a microtask during the walk and inject or teleport an unsanitized DOM\r\n   * range into a region the iterator has already passed and will not revisit,\r\n   * so the post-return \"tree is sanitized\" contract is violated. Sweep the\r\n   * whole tree once up front and sever every linkage before the walk begins,\r\n   * closing that window.\r\n   *\r\n   * This CANNOT undo a patch that already fired before sanitize ran — that is\r\n   * the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat —\r\n   * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\r\n   * to group with the rest of the declarative-partial-updates handling and\r\n   * stay overridable, consistent with the codebase.\r\n   *\r\n   * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\r\n   * clobbered root cannot defeat the sweep of its non-clobbered descendants.\r\n   *\r\n   * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\r\n   * .html Q1): this mirrors the existing policy of keeping `for` on\r\n   * <label>/<output>. If the shipping feature can drive a patch through a\r\n   * surviving `for`-on-label/output + `id` pair, this pre-pass and the\r\n   * attribute check at _isBasicCustomElement's caller must additionally drop\r\n   * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\r\n   *\r\n   * @param root the in-place root to sweep\r\n   */\r\n  const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\r\n    if (!SAFE_FOR_XML) {\r\n      return;\r\n    }\r\n    const stack = [root];\r\n    while (stack.length > 0) {\r\n      const node = stack.pop();\r\n      const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\r\n      /* Remove range markers (the target side of a patch linkage): every\r\n         processing instruction, and any markup-bearing comment. */\r\n      if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\r\n        try {\r\n          remove(node);\r\n        } catch (_) {\r\n          /* Best-effort */\r\n        }\r\n        continue;\r\n      }\r\n      /* Strip patch-source attributes (the source side) off elements. */\r\n      if (nodeType === NODE_TYPE.element) {\r\n        const element = node;\r\n        const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);\r\n        try {\r\n          if (element.hasAttribute && element.hasAttribute('patchsrc')) {\r\n            element.removeAttribute('patchsrc');\r\n          }\r\n          if (element.hasAttribute && element.hasAttribute('for') && lcTag !== 'label' && lcTag !== 'output') {\r\n            element.removeAttribute('for');\r\n          }\r\n        } catch (_) {\r\n          /* Clobbered removeAttribute/hasAttribute on a doomed node — ignore */\r\n        }\r\n      }\r\n      const childNodes = getChildNodes(node);\r\n      if (childNodes) {\r\n        for (let i = childNodes.length - 1; i >= 0; --i) {\r\n          stack.push(childNodes[i]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n  /**\r\n   * _initDocument\r\n   *\r\n   * @param dirty - a string of dirty markup\r\n   * @return a DOM, filled with the dirty markup\r\n   */\r\n  const _initDocument = function _initDocument(dirty) {\r\n    /* Create a HTML document */\r\n    let doc = null;\r\n    let leadingWhitespace = null;\r\n    if (FORCE_BODY) {\r\n      dirty = '<remove></remove>' + dirty;\r\n    } else {\r\n      /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\r\n      const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\r\n      leadingWhitespace = matches && matches[0];\r\n    }\r\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\r\n      // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\r\n      dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\r\n    }\r\n    const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\r\n    /*\r\n     * Use the DOMParser API by default, fallback later if needs be\r\n     * DOMParser not work for svg when has multiple root element.\r\n     */\r\n    if (NAMESPACE === HTML_NAMESPACE) {\r\n      try {\r\n        doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\r\n      } catch (_) {}\r\n    }\r\n    /* Use createHTMLDocument in case DOMParser is not available */\r\n    if (!doc || !doc.documentElement) {\r\n      doc = implementation.createDocument(NAMESPACE, 'template', null);\r\n      try {\r\n        doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\r\n      } catch (_) {\r\n        // Syntax error if dirtyPayload is invalid xml\r\n      }\r\n    }\r\n    const body = doc.body || doc.documentElement;\r\n    if (dirty && leadingWhitespace) {\r\n      body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\r\n    }\r\n    /* Work on whole document or just its body */\r\n    if (NAMESPACE === HTML_NAMESPACE) {\r\n      return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\r\n    }\r\n    return WHOLE_DOCUMENT ? doc.documentElement : body;\r\n  };\r\n  /**\r\n   * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\r\n   *\r\n   * @param root The root element or node to start traversing on.\r\n   * @return The created NodeIterator\r\n   */\r\n  const _createNodeIterator = function _createNodeIterator(root) {\r\n    /* Read ownerDocument through the cached Node.prototype getter, never the\r\n       direct property. HTMLFormElement has [LegacyOverrideBuiltIns], so a\r\n       clobbering child (<input name=\"ownerDocument\"> or a form-associated\r\n       external input) shadows the prototype getter and makes a direct read\r\n       return that <input>. createNodeIterator.call(<input>, ...) then throws\r\n       \"Illegal invocation\", and on the IN_PLACE path that throw lands before\r\n       the walk's fail-closed barrier - leaving the caller's live tree, with\r\n       any already-armed handler in it, un-neutralized. The cached getter\r\n       returns the real Document regardless of the clobber. */\r\n    const doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\r\n    return createNodeIterator.call(doc || root, root,\r\n    // eslint-disable-next-line no-bitwise\r\n    NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\r\n  };\r\n  /**\r\n   * Replace template expression syntax (mustache, ERB, template\r\n   * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\r\n   * sites. Order matters: mustache, then ERB, then template literal.\r\n   *\r\n   * @param value the string to scrub\r\n   * @returns the scrubbed string\r\n   */\r\n  const _stripTemplateExpressions = function _stripTemplateExpressions(value) {\r\n    value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\r\n    value = stringReplace(value, ERB_EXPR$1, ' ');\r\n    value = stringReplace(value, TMPLIT_EXPR$1, ' ');\r\n    return value;\r\n  };\r\n  /**\r\n   * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\r\n   * character data of an element subtree. Used as the final safety net for\r\n   * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\r\n   * which only form after text-node normalization (e.g. fragments split across\r\n   * stripped elements) cannot survive into a template-evaluating framework.\r\n   *\r\n   * Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\r\n   * in place rather than round-tripping through innerHTML. This preserves\r\n   * descendant node references (important for IN_PLACE callers), avoids a\r\n   * serialize/reparse cycle, and reads literal character data — which means\r\n   * `<%...%>` in text content matches the ERB regex against its real bytes\r\n   * instead of the HTML-entity-escaped form innerHTML would produce.\r\n   *\r\n   * Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\r\n   * attributes is performed during the per-node `_sanitizeAttributes` pass.\r\n   *\r\n   * @param node The root element whose character data should be scrubbed.\r\n   */\r\n  const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\r\n    var _node$querySelectorAl;\r\n    node.normalize();\r\n    /* Clobber-safe ownerDocument read, same reasoning as _createNodeIterator:\r\n       under SAFE_FOR_TEMPLATES this runs on the live IN_PLACE root, which may\r\n       carry a form-named-getter override of ownerDocument. */\r\n    const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\r\n    const walker = createNodeIterator.call(doc || node, node,\r\n    // eslint-disable-next-line no-bitwise\r\n    NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\r\n    let currentNode = walker.nextNode();\r\n    while (currentNode) {\r\n      currentNode.data = _stripTemplateExpressions(currentNode.data);\r\n      currentNode = walker.nextNode();\r\n    }\r\n    // NodeIterator does not descend into <template>.content per the DOM spec,\r\n    // so we must explicitly recurse into each template's content fragment,\r\n    // mirroring the approach used by _sanitizeShadowDOM.\r\n    const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');\r\n    if (templates) {\r\n      arrayForEach(templates, tmpl => {\r\n        if (_isDocumentFragment(tmpl.content)) {\r\n          _scrubTemplateExpressions2(tmpl.content);\r\n        }\r\n      });\r\n    }\r\n  };\r\n  /**\r\n   * _isClobbered\r\n   *\r\n   * Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\r\n   * interface with [LegacyOverrideBuiltIns]; a descendant element with a\r\n   * `name` attribute matching a prototype property shadows that property\r\n   * on direct reads. We use this check at the IN_PLACE entry-point and\r\n   * during attribute sanitization to refuse clobbered forms.\r\n   *\r\n   * @param element element to check for clobbering attacks\r\n   * @return true if clobbered, false if safe\r\n   */\r\n  const _isClobbered = function _isClobbered(element) {\r\n    // Realm-independent tag-name probe. If we can't determine the tag\r\n    // name at all, we can't reason about clobbering — return false\r\n    // (the caller's other defences still apply).\r\n    const realTagName = getNodeName ? getNodeName(element) : null;\r\n    if (typeof realTagName !== 'string') {\r\n      return false;\r\n    }\r\n    if (transformCaseFunc(realTagName) !== 'form') {\r\n      return false;\r\n    }\r\n    return typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' ||\r\n    // Realm-safe NamedNodeMap detection: equality against the cached\r\n    // prototype getter. Clobbered .attributes (e.g. <input name=\"attributes\">)\r\n    // makes the direct read diverge from the cached read; a clean form\r\n    // (same-realm OR foreign-realm) has both reads pointing at the same\r\n    // canonical NamedNodeMap.\r\n    element.attributes !== getAttributes(element) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function' ||\r\n    // NodeType clobbering probe. Cached Node.prototype.nodeType getter\r\n    // returns the integer 1 for any Element regardless of realm; direct\r\n    // read on a clobbered form (e.g. <input name=\"nodeType\">) returns\r\n    // the named child element. Cheap addition — nodeType is read from\r\n    // an internal slot, no serialization cost — and removes a residual\r\n    // clobbering surface used by several mXSS / PI / comment branches\r\n    // in _sanitizeElements that compare currentNode.nodeType directly.\r\n    element.nodeType !== getNodeType(element) ||\r\n    // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named\r\n    // \"childNodes\" shadows the prototype getter. Direct reads of\r\n    // form.childNodes from a clobbered form return the named child\r\n    // instead of the real NodeList, so any walk that reads it directly\r\n    // skips the form's real children. Compare the direct read to the\r\n    // cached Node.prototype getter — when the form's named-property\r\n    // getter intercepts the read, the two values differ and we flag\r\n    // the form. This catches every clobbering child type (input,\r\n    // select, etc.) regardless of whether the named child happens to\r\n    // carry a numeric .length, which a typeof-based probe would miss\r\n    // (e.g. HTMLSelectElement.length is a defined unsigned-long).\r\n    element.childNodes !== getChildNodes(element);\r\n  };\r\n  /**\r\n   * Checks whether the given value is a DocumentFragment from any realm.\r\n   *\r\n   * The realm-independent replacement reads `nodeType` through the cached\r\n   * Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\r\n   * constant (11). nodeType is a numeric value resolved from the node's\r\n   * internal slot, identical across realms for the same kind of node.\r\n   *\r\n   * @param value object to check\r\n   * @return true if value is a DocumentFragment-shaped node from any realm\r\n   */\r\n  const _isDocumentFragment = function _isDocumentFragment(value) {\r\n    if (!getNodeType || typeof value !== 'object' || value === null) {\r\n      return false;\r\n    }\r\n    try {\r\n      return getNodeType(value) === NODE_TYPE.documentFragment;\r\n    } catch (_) {\r\n      return false;\r\n    }\r\n  };\r\n  /**\r\n   * Checks whether the given object is a DOM node, including nodes that\r\n   * originate from a different window/realm (e.g. an iframe's\r\n   * contentDocument). The previous `value instanceof Node` check was\r\n   * realm-bound: nodes from a different window failed it, causing\r\n   * sanitize() to silently stringify them and reset IN_PLACE to false,\r\n   * returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\r\n   *\r\n   * @param value object to check whether it's a DOM node\r\n   * @return true if value is a DOM node from any realm\r\n   */\r\n  const _isNode = function _isNode(value) {\r\n    if (!getNodeType || typeof value !== 'object' || value === null) {\r\n      return false;\r\n    }\r\n    try {\r\n      return typeof getNodeType(value) === 'number';\r\n    } catch (_) {\r\n      return false;\r\n    }\r\n  };\r\n  function _executeHooks(hooks, currentNode, data) {\r\n    if (hooks.length === 0) {\r\n      return;\r\n    }\r\n    arrayForEach(hooks, hook => {\r\n      hook.call(DOMPurify, currentNode, data, CONFIG);\r\n    });\r\n  }\r\n  /**\r\n   * Structural-threat checks that condemn a node regardless of the\r\n   * allowlists: mXSS via namespace confusion, risky CSS construction,\r\n   * processing instructions, markup-bearing comments. Pure predicate;\r\n   * the caller removes. Check order is load-bearing.\r\n   *\r\n   * @param currentNode the node to inspect\r\n   * @param tagName the node's transformCaseFunc'd tag name\r\n   * @return true if the node must be removed\r\n   */\r\n  const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\r\n    /* Detect mXSS attempts abusing namespace confusion */\r\n    if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {\r\n      return true;\r\n    }\r\n    /* Remove risky CSS construction leading to mXSS */\r\n    if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {\r\n      return true;\r\n    }\r\n    /* Remove any occurrence of processing instructions */\r\n    if (currentNode.nodeType === NODE_TYPE.processingInstruction) {\r\n      return true;\r\n    }\r\n    /* Remove any kind of possibly harmful comments */\r\n    if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {\r\n      return true;\r\n    }\r\n    return false;\r\n  };\r\n  /**\r\n   * Handle a node whose tag is forbidden or not allowlisted: keep\r\n   * allowed custom elements (false return exits _sanitizeElements\r\n   * early - the namespace and fallback-tag removal checks are\r\n   * intentionally skipped for kept custom elements), else hoist\r\n   * content per KEEP_CONTENT and remove.\r\n   *\r\n   * A kept custom element is the ONLY case in which this function\r\n   * returns false, so the caller uses that return value to run the\r\n   * afterSanitizeElements hook on the kept element and keep the\r\n   * element-hook lifecycle consistent with normal allowlisted\r\n   * elements (GHSA-c2j3-45gr-mqc4).\r\n   *\r\n   * @param currentNode the disallowed node\r\n   * @param tagName the node's transformCaseFunc'd tag name\r\n   * @return true if the node was removed, false if kept\r\n   */\r\n  const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\r\n    /* Check if we have a custom element to handle */\r\n    if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\r\n      if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\r\n        return false;\r\n      }\r\n      if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\r\n        return false;\r\n      }\r\n    }\r\n    /* Keep content except for bad-listed elements.\r\n         Use the cached prototype getters exclusively — the previous code\r\n         had `|| currentNode.parentNode` / `|| currentNode.childNodes`\r\n         fallbacks, but the cached getters always return the canonical\r\n         value (or null for a real parent-less node), so the fallback\r\n         path was dead in safe cases and a clobbering surface in unsafe\r\n         ones. Falsy cached results stay falsy; the `if (childNodes &&\r\n         parentNode)` check already gates correctly. */\r\n    if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\r\n      const parentNode = getParentNode(currentNode);\r\n      const childNodes = getChildNodes(currentNode);\r\n      if (childNodes && parentNode) {\r\n        const childCount = childNodes.length;\r\n        /* Hoist by moving each child up one level rather than deep-cloning\r\n             it. Moving transfers every descendant exactly once, so a chain of\r\n             nested disallowed elements costs O(n) instead of the O(n^2) that\r\n             re-cloning the shrinking subtree at each level produced; it also\r\n             empties the removed original, so `DOMPurify.removed` no longer\r\n             pins whole subtrees. Moving preserves the in-place guarantee too:\r\n             an original carrying already-queued resource events (`<img\r\n             onerror>`, `<video>`/`<audio>` error, lazy/`onload`, …) is\r\n             relocated and sanitised rather than left detached but still armed.\r\n                      The sole case that must clone is removing the walk root itself.\r\n             The result is serialised from the root's subtree, so a restrictive\r\n             ALLOWED_TAGS that strips the root (`body` on the string path) must\r\n             leave the content inside it, which only cloning does. In IN_PLACE\r\n             the root is pre-validated as an allowed tag and so is never removed\r\n             here, so that path always takes the move branch.\r\n                      `childNodes` is live; a tail-to-head walk keeps `childNodes[i]`\r\n             valid whether we move (drops the trailing entry) or clone (leaves\r\n             the list intact). */\r\n        for (let i = childCount - 1; i >= 0; --i) {\r\n          const hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\r\n          parentNode.insertBefore(hoisted, getNextSibling(currentNode));\r\n        }\r\n      }\r\n    }\r\n    _forceRemove(currentNode);\r\n    return true;\r\n  };\r\n  /**\r\n   * Fork a hook-mutable allowlist off its shared binding the first time a\r\n   * (possibly lazily-installed) uponSanitize* hook is about to see it, so the\r\n   * hook cannot widen the per-instance default or the setConfig binding by\r\n   * reference and leak past the call. Returns the set unchanged once it is\r\n   * already call-local, so repeated calls across elements are idempotent.\r\n   *\r\n   * @param hookList the uponSanitize* hook array for this event\r\n   * @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\r\n   * @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\r\n   * @param setConfigSet the captured setConfig() binding, or null\r\n   * @return a call-local clone if a hook is present and set is still shared,\r\n   *   else set unchanged\r\n   */\r\n  const _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\r\n    if (hookList.length === 0) {\r\n      return set;\r\n    }\r\n    return set === defaultSet || set === setConfigSet ? clone(set) : set;\r\n  };\r\n  /**\r\n   * _sanitizeElements\r\n   *\r\n   * @protect nodeName\r\n   * @protect textContent\r\n   * @protect removeChild\r\n   * @param currentNode to check for permission to exist\r\n   * @return true if node was killed, false if left alive\r\n   */\r\n  // eslint-disable-next-line complexity\r\n  const _sanitizeElements = function _sanitizeElements(currentNode, root) {\r\n    /* Execute a hook if present */\r\n    _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\r\n    /* A hook may have detached the node - treat it as removed (see the\r\n       detached-node comment after the uponSanitizeElement hook below). On\r\n       the IN_PLACE path, neutralize the detached subtree first so a queued\r\n       resource handler on it cannot fire in page scope after we return. */\r\n    if (currentNode !== root && getParentNode(currentNode) === null) {\r\n      if (IN_PLACE) {\r\n        _neutralizeSubtree(currentNode);\r\n      }\r\n      return true;\r\n    }\r\n    /* Check if element is clobbered or can clobber */\r\n    if (_isClobbered(currentNode)) {\r\n      _forceRemove(currentNode);\r\n      return true;\r\n    }\r\n    /* Now let's check the element's type and name */\r\n    const tagName = transformCaseFunc(getNodeName ? getNodeName(currentNode) : currentNode.nodeName);\r\n    /* Close the pre-walk clone-guard's timing gap: an uponSanitizeElement\r\n       hook may have been installed after that guard sampled the hook arrays\r\n       (e.g. lazily from beforeSanitizeElements), leaving ALLOWED_TAGS still\r\n       aliasing a shared binding that a widening hook would mutate by\r\n       reference. Fork it before exposing it to the hook. */\r\n    ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\r\n    /* Execute a hook if present */\r\n    _executeHooks(hooks.uponSanitizeElement, currentNode, {\r\n      tagName,\r\n      allowedTags: ALLOWED_TAGS\r\n    });\r\n    /* A hook may have detached the node from the tree — a long-standing\r\n       user pattern (issue #469; draw.io-style foreignObject filtering).\r\n       Per the cached, unclobberable parentNode getter the node is\r\n       genuinely out of the tree, so it can reach neither the serialized\r\n       output nor an IN_PLACE live tree; treat it as removed and stop\r\n       processing it. Without this guard, the unsafe-node / namespace\r\n       checks below would call _forceRemove on a parentless node and hit\r\n       the REPORT-3 fail-closed throw — which exists for nodes DOMPurify\r\n       wants gone but *cannot* detach (clobbered / parentless roots), the\r\n       opposite of a node that is already safely gone. The walk root is\r\n       exempt: a detached IN_PLACE root is legitimate input and must still\r\n       be fully sanitized, and a kill-decision on it must keep hitting the\r\n       REPORT-3 throw. Nodes detached by hooks stay the hook's\r\n       responsibility for placement: they are not recorded in\r\n       DOMPurify.removed, so the post-walk IN_PLACE pass (which iterates\r\n       DOMPurify.removed) does not reach them. But a hook-detached subtree\r\n       can still hold a queued resource-event handler - e.g. an <img onload>\r\n       that began loading when the caller built the live tree - which fires\r\n       in page scope after sanitize returns even though the handler never\r\n       reached the returned tree. That is the audit-5 F1 hazard, and the\r\n       documented node.remove() hook pattern walks straight into it. So on\r\n       the IN_PLACE path we neutralize the detached subtree inline here,\r\n       stripping its non-allow-listed attributes before returning, exactly\r\n       as the post-walk pass does for _forceRemove'd subtrees. */\r\n    if (currentNode !== root && getParentNode(currentNode) === null) {\r\n      if (IN_PLACE) {\r\n        _neutralizeSubtree(currentNode);\r\n      }\r\n      return true;\r\n    }\r\n    /* Remove mXSS vectors, processing instructions and risky comments */\r\n    if (_isUnsafeNode(currentNode, tagName)) {\r\n      _forceRemove(currentNode);\r\n      return true;\r\n    }\r\n    /* Remove element if anything forbids its presence */\r\n    if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\r\n      const removed = _sanitizeDisallowedNode(currentNode, tagName, root);\r\n      /* A false return means the node is a custom element kept via\r\n         CUSTOM_ELEMENT_HANDLING - the only keep path through\r\n         _sanitizeDisallowedNode. Run afterSanitizeElements on it so the\r\n         element-hook lifecycle matches normal allowlisted elements: a\r\n         security policy applied in this hook (e.g. stripping an attribute\r\n         from every surviving element) must not silently skip kept custom\r\n         elements (GHSA-c2j3-45gr-mqc4). This mirrors the normal-element\r\n         tail below - the hook runs, then the walker's subsequent\r\n         _sanitizeAttributes pass sanitizes the element's attributes. The\r\n         deliberately skipped namespace and fallback-tag removal checks stay\r\n         skipped; they are removal decisions, not the hook contract. */\r\n      if (removed === false) {\r\n        _executeHooks(hooks.afterSanitizeElements, currentNode, null);\r\n      }\r\n      return removed;\r\n    }\r\n    /* Check whether element has a valid namespace.\r\n       Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype\r\n       nodeType getter rather than `instanceof Element`, which is realm-\r\n       bound and short-circuits to false for any node minted in a different\r\n       realm — letting a foreign-realm element with a forbidden namespace\r\n       slip past the namespace check entirely. */\r\n    const nt = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;\r\n    if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\r\n      _forceRemove(currentNode);\r\n      return true;\r\n    }\r\n    /* Make sure that older browsers don't get fallback-tag mXSS */\r\n    if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\r\n      _forceRemove(currentNode);\r\n      return true;\r\n    }\r\n    /* Sanitize element content to be template-safe */\r\n    if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\r\n      /* Get the element's text content */\r\n      const content = _stripTemplateExpressions(currentNode.textContent);\r\n      if (currentNode.textContent !== content) {\r\n        arrayPush(DOMPurify.removed, {\r\n          element: currentNode.cloneNode()\r\n        });\r\n        currentNode.textContent = content;\r\n      }\r\n    }\r\n    /* Execute a hook if present */\r\n    _executeHooks(hooks.afterSanitizeElements, currentNode, null);\r\n    return false;\r\n  };\r\n  /**\r\n   * _isValidAttribute\r\n   *\r\n   * @param lcTag Lowercase tag name of containing element.\r\n   * @param lcName Lowercase attribute name.\r\n   * @param value Attribute value.\r\n   * @return Returns true if `value` is valid, otherwise false.\r\n   */\r\n  // eslint-disable-next-line complexity\r\n  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\r\n    /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */\r\n    if (FORBID_ATTR[lcName]) {\r\n      return false;\r\n    }\r\n    /* Reject declarative-partial-updates patch-linkage attributes\r\n       (https://github.com/WICG/declarative-partial-updates).\r\n            Empirical note (Chrome 150, verified — see\r\n       test/declarative-patch-probe-v3.html): expansion is NOT applied after\r\n       sanitization. For the string path it fires during sanitize()'s own\r\n       parse, so the walk sees and sanitizes the fully materialized expanded\r\n       tree — teleports into MathML/SVG integration points included; a\r\n       weaponized `<template for>`->`<img onerror>` comes back with the handler\r\n       stripped. For the IN_PLACE path it fires on connection, before the walk.\r\n       Either way DOMPurify is NOT blind to the patch.\r\n            This removal is therefore defense-in-depth rather than the sole barrier:\r\n       it prevents live linkage from surviving into the OUTPUT and re-expanding\r\n       in the caller's context, and keeps behaviour deterministic if a future\r\n       engine defers expansion. `for` is legitimate only on <label>/<output>;\r\n       anywhere else (notably <template for>) it links the element to a patch\r\n       target and teleports or removes an arbitrary DOM range by id/marker name.\r\n       `patchsrc` fetches remote markup and is treated as a script-loading\r\n       mechanism (CSP). Gated on SAFE_FOR_XML so the removal groups with the\r\n       other structural-threat checks and stays overridable, consistent with\r\n       the rest of the codebase. PI range markers are already removed by\r\n       _isUnsafeNode. */\r\n    if (SAFE_FOR_XML && lcName === 'patchsrc') {\r\n      return false;\r\n    }\r\n    if (SAFE_FOR_XML && lcName === 'for' && lcTag !== 'label' && lcTag !== 'output') {\r\n      return false;\r\n    }\r\n    /* Make sure attribute cannot clobber */\r\n    if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\r\n      return false;\r\n    }\r\n    const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\r\n    /* Allow valid data-* attributes: At least one character after \"-\"\r\n        (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\r\n        XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\r\n        We don't need to check the value; it's always URI safe. */\r\n    if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!nameIsPermitted) {\r\n      if (\r\n      // First condition does a very basic check if a) it's basically a valid custom element tagname AND\r\n      // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\r\n      // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\r\n      _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||\r\n      // Alternative, second condition checks if it's an `is`-attribute, AND\r\n      // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\r\n      lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\r\n        return false;\r\n      }\r\n      /* Check value is safe. First, is attr inert? If so, is safe */\r\n    } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (value) {\r\n      return false;\r\n    } else ;\r\n    return true;\r\n  };\r\n  /* Names the HTML spec reserves from valid-custom-element-name; these must\r\n   * never be treated as basic custom elements even when a permissive\r\n   * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */\r\n  const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);\r\n  /**\r\n   * _isBasicCustomElement\r\n   * checks if at least one dash is included in tagName, and it's not the first char\r\n   * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\r\n   *\r\n   * @param tagName name of the tag of the node to sanitize\r\n   * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\r\n   */\r\n  const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\r\n    return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\r\n  };\r\n  /**\r\n   * Wrap an attribute value in the matching Trusted Types object when\r\n   * the active policy requires it. Namespaced attributes pass through\r\n   * unchanged (no TT support yet, see\r\n   * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\r\n   *\r\n   * @param lcTag lowercase tag name of the containing element\r\n   * @param lcName lowercase attribute name\r\n   * @param namespaceURI the attribute's namespace, if any\r\n   * @param value the attribute value to wrap\r\n   * @return the value, wrapped when Trusted Types demand it\r\n   */\r\n  const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\r\n    if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {\r\n      switch (trustedTypes.getAttributeType(lcTag, lcName)) {\r\n        case 'TrustedHTML':\r\n          {\r\n            return _createTrustedHTML(value);\r\n          }\r\n        case 'TrustedScriptURL':\r\n          {\r\n            return _createTrustedScriptURL(value);\r\n          }\r\n      }\r\n    }\r\n    return value;\r\n  };\r\n  /**\r\n   * Write a modified attribute value back onto the element. On\r\n   * success, re-probe for clobbering introduced by the new value and\r\n   * remove the element when found; otherwise pop the removal entry\r\n   * recorded by the earlier _removeAttribute (long-standing pairing\r\n   * with the SANITIZE_NAMED_PROPS path - do not \"fix\" casually). On\r\n   * failure, remove the attribute instead.\r\n   *\r\n   * @param currentNode the element carrying the attribute\r\n   * @param name the attribute name as present on the element\r\n   * @param namespaceURI the attribute's namespace, if any\r\n   * @param value the new attribute value\r\n   */\r\n  const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\r\n    try {\r\n      if (namespaceURI) {\r\n        currentNode.setAttributeNS(namespaceURI, name, value);\r\n      } else {\r\n        /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\r\n        currentNode.setAttribute(name, value);\r\n      }\r\n      if (_isClobbered(currentNode)) {\r\n        _forceRemove(currentNode);\r\n      } else {\r\n        arrayPop(DOMPurify.removed);\r\n      }\r\n    } catch (_) {\r\n      _removeAttribute(name, currentNode);\r\n    }\r\n  };\r\n  /**\r\n   * _sanitizeAttributes\r\n   *\r\n   * @protect attributes\r\n   * @protect nodeName\r\n   * @protect removeAttribute\r\n   * @protect setAttribute\r\n   *\r\n   * @param currentNode to sanitize\r\n   */\r\n  const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\r\n    /* Execute a hook if present */\r\n    _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\r\n    const attributes = currentNode.attributes;\r\n    /* Check if we have attributes; if not we might have a text node */\r\n    if (!attributes || _isClobbered(currentNode)) {\r\n      return;\r\n    }\r\n    /* Same lazy-install guard as uponSanitizeElement (see there): fork the\r\n       attribute allowlist off its shared binding before a hook can see it. */\r\n    ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\r\n    const hookEvent = {\r\n      attrName: '',\r\n      attrValue: '',\r\n      keepAttr: true,\r\n      allowedAttributes: ALLOWED_ATTR,\r\n      forceKeepAttr: undefined\r\n    };\r\n    let l = attributes.length;\r\n    const lcTag = transformCaseFunc(currentNode.nodeName);\r\n    /* Go backwards over all attributes; safely remove bad ones */\r\n    while (l--) {\r\n      const attr = attributes[l];\r\n      const name = attr.name,\r\n        namespaceURI = attr.namespaceURI,\r\n        attrValue = attr.value;\r\n      const lcName = transformCaseFunc(name);\r\n      const initValue = attrValue;\r\n      let value = name === 'value' ? initValue : stringTrim(initValue);\r\n      /* Execute a hook if present */\r\n      hookEvent.attrName = lcName;\r\n      hookEvent.attrValue = value;\r\n      hookEvent.keepAttr = true;\r\n      hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\r\n      _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\r\n      value = hookEvent.attrValue;\r\n      /* Full DOM Clobbering protection via namespace isolation,\r\n       * Prefix id and name attributes with `user-content-`\r\n       */\r\n      if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\r\n        // Remove the attribute with this value\r\n        _removeAttribute(name, currentNode);\r\n        // Prefix the value and later re-create the attribute with the sanitized value\r\n        value = SANITIZE_NAMED_PROPS_PREFIX + value;\r\n      }\r\n      // Else: already prefixed, leave the attribute alone — the prefix is\r\n      // itself the clobbering protection, and re-applying it is incorrect.\r\n      /* Work around a security issue with comments inside attributes */\r\n      if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\r\n        _removeAttribute(name, currentNode);\r\n        continue;\r\n      }\r\n      /* Make sure we cannot easily use animated hrefs, even if animations are allowed */\r\n      if (lcName === 'attributename' && stringMatch(value, 'href')) {\r\n        _removeAttribute(name, currentNode);\r\n        continue;\r\n      }\r\n      /* Did the hooks force-keep the attribute? */\r\n      if (hookEvent.forceKeepAttr) {\r\n        continue;\r\n      }\r\n      /* Did the hooks approve of the attribute? */\r\n      if (!hookEvent.keepAttr) {\r\n        _removeAttribute(name, currentNode);\r\n        continue;\r\n      }\r\n      /* Work around a security issue in jQuery 3.0 */\r\n      if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\r\n        _removeAttribute(name, currentNode);\r\n        continue;\r\n      }\r\n      /* Sanitize attribute content to be template-safe */\r\n      if (SAFE_FOR_TEMPLATES) {\r\n        value = _stripTemplateExpressions(value);\r\n      }\r\n      /* Is `value` valid for this attribute? */\r\n      if (!_isValidAttribute(lcTag, lcName, value)) {\r\n        _removeAttribute(name, currentNode);\r\n        continue;\r\n      }\r\n      /* Handle attributes that require Trusted Types */\r\n      value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\r\n      /* Handle invalid data-* attribute set by try-catching it */\r\n      if (value !== initValue) {\r\n        _setAttributeValue(currentNode, name, namespaceURI, value);\r\n      }\r\n    }\r\n    /* Execute a hook if present */\r\n    _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\r\n  };\r\n  /**\r\n   * _sanitizeShadowDOM\r\n   *\r\n   * @param fragment to iterate over recursively\r\n   */\r\n  const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\r\n    let shadowNode = null;\r\n    const shadowIterator = _createNodeIterator(fragment);\r\n    /* Execute a hook if present */\r\n    _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\r\n    while (shadowNode = shadowIterator.nextNode()) {\r\n      /* Execute a hook if present */\r\n      _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\r\n      /* Sanitize tags and elements */\r\n      _sanitizeElements(shadowNode, fragment);\r\n      /* Check attributes next */\r\n      _sanitizeAttributes(shadowNode);\r\n      /* Deep shadow DOM detected.\r\n         Realm-safe check (GHSA-hpcv-96wg-7vj8): use nodeType against the\r\n         DOCUMENT_FRAGMENT_NODE constant rather than instanceof, so we\r\n         recurse into <template>.content from foreign realms too. */\r\n      if (_isDocumentFragment(shadowNode.content)) {\r\n        _sanitizeShadowDOM2(shadowNode.content);\r\n      }\r\n      /* An element iterated here may itself host an attached\r\n         shadow root. The default NodeIterator does not enter shadow\r\n         trees, so a shadow root nested inside template.content was\r\n         previously reached by no walk at all (the pre-pass at\r\n         _sanitizeAttachedShadowRoots descends via childNodes, which\r\n         doesn't enter template.content; the template-content recursion\r\n         above iterates the content but never inspected shadowRoot).\r\n         Walk it explicitly. The nodeType guard avoids reading\r\n         shadowRoot off text / comment / CDATA / PI nodes that the\r\n         iterator also surfaces. */\r\n      const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;\r\n      if (shadowNodeType === NODE_TYPE.element) {\r\n        const innerSr = getShadowRoot(shadowNode);\r\n        if (_isDocumentFragment(innerSr)) {\r\n          _sanitizeAttachedShadowRoots(innerSr);\r\n          _sanitizeShadowDOM2(innerSr);\r\n        }\r\n      }\r\n    }\r\n    /* Execute a hook if present */\r\n    _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\r\n  };\r\n  /**\r\n   * _sanitizeAttachedShadowRoots\r\n   *\r\n   * Walks `root` and feeds every attached shadow root we encounter into\r\n   * the existing _sanitizeShadowDOM pipeline. The default node iterator\r\n   * does not descend into shadow trees, so nodes inside an attached\r\n   * shadow root would otherwise be skipped entirely.\r\n   *\r\n   * Two real input paths put attached shadow roots in front of us:\r\n   *   1. IN_PLACE on a DOM node that already has shadow roots attached.\r\n   *   2. DOM-node input where importNode(dirty, true) deep-clones the\r\n   *      shadow root because it was created with `clonable: true`.\r\n   *\r\n   * This pass runs once, up front, so the main iteration loop (and the\r\n   * existing _sanitizeShadowDOM template-content recursion) stay\r\n   * untouched — string-input paths are not affected.\r\n   *\r\n   * @param root the subtree root to walk for attached shadow roots\r\n   */\r\n  const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\r\n    /* Iterative (explicit stack) rather than per-child recursion. DOM APIs\r\n       impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data\r\n       built straight into the DOM — the IN_PLACE surface) deeper than the JS\r\n       call-stack budget would otherwise overflow native recursion here and\r\n       throw at the IN_PLACE entry pre-pass, before a single node is\r\n       sanitized, leaving the caller's live tree untouched (fail-open). See\r\n       campaign-3 F4. A heap stack keeps depth off the call stack.\r\n            Each work item is either a node to descend into, or a deferred\r\n       `_sanitizeShadowDOM` for an already-walked shadow root. The deferred\r\n       form preserves the original post-order discipline: a shadow root's\r\n       nested shadow roots are discovered before the outer shadow is\r\n       sanitized (which may remove hosts). Pushes are in reverse of the\r\n       desired processing order (LIFO): template content, then children, then\r\n       the shadow-sanitize, then the shadow walk — so the order matches the\r\n       previous recursion exactly. */\r\n    const stack = [{\r\n      node: root,\r\n      shadow: null\r\n    }];\r\n    while (stack.length > 0) {\r\n      const item = stack.pop();\r\n      /* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */\r\n      if (item.shadow) {\r\n        _sanitizeShadowDOM2(item.shadow);\r\n        continue;\r\n      }\r\n      const node = item.node;\r\n      const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\r\n      const isElement = nodeType === NODE_TYPE.element;\r\n      /* (pushed last → processed first) Children, snapshotted in reverse so\r\n         the first child is processed first. Snapshotting matters because a\r\n         hook may detach siblings mid-walk. */\r\n      const childNodes = getChildNodes(node);\r\n      if (childNodes) {\r\n        for (let i = childNodes.length - 1; i >= 0; --i) {\r\n          stack.push({\r\n            node: childNodes[i],\r\n            shadow: null\r\n          });\r\n        }\r\n      }\r\n      /* (pushed before children → processed after them, matching the old\r\n         \"template content last\" order) When the node is a <template>,\r\n         descend into its content. */\r\n      if (isElement) {\r\n        const rootName = getNodeName ? getNodeName(node) : null;\r\n        if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {\r\n          const content = node.content;\r\n          if (_isDocumentFragment(content)) {\r\n            stack.push({\r\n              node: content,\r\n              shadow: null\r\n            });\r\n          }\r\n        }\r\n      }\r\n      /* Shadow root (processed first): walk its subtree, then sanitise it.\r\n         Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\r\n         rather than `instanceof DocumentFragment`, which is realm-bound and\r\n         silently skipped foreign-realm shadow roots (e.g.\r\n         iframe.contentDocument attachShadow). */\r\n      if (isElement) {\r\n        const sr = getShadowRoot(node);\r\n        if (_isDocumentFragment(sr)) {\r\n          /* Push the deferred sanitise first so it pops after the shadow\r\n             walk we push next, i.e. nested shadow roots are discovered\r\n             before this one is sanitised. */\r\n          stack.push({\r\n            node: null,\r\n            shadow: sr\r\n          }, {\r\n            node: sr,\r\n            shadow: null\r\n          });\r\n        }\r\n      }\r\n    }\r\n  };\r\n  // eslint-disable-next-line complexity\r\n  DOMPurify.sanitize = function (dirty) {\r\n    let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n    let body = null;\r\n    let importedNode = null;\r\n    let currentNode = null;\r\n    let returnNode = null;\r\n    /* Make sure we have a string to sanitize.\r\n      DO NOT return early, as this will return the wrong type if\r\n      the user has requested a DOM object rather than a string */\r\n    IS_EMPTY_INPUT = !dirty;\r\n    if (IS_EMPTY_INPUT) {\r\n      dirty = '<!-->';\r\n    }\r\n    /* Stringify, in case dirty is an object */\r\n    if (typeof dirty !== 'string' && !_isNode(dirty)) {\r\n      dirty = stringifyValue(dirty);\r\n      if (typeof dirty !== 'string') {\r\n        throw typeErrorCreate('dirty is not a string, aborting');\r\n      }\r\n    }\r\n    /* Return dirty HTML if DOMPurify cannot run */\r\n    if (!DOMPurify.isSupported) {\r\n      return dirty;\r\n    }\r\n    /* Assign config vars */\r\n    if (SET_CONFIG) {\r\n      /* Persistent setConfig() path: _parseConfig is skipped, so the sets are\r\n       * not re-derived per call. Restore them from the pristine bindings\r\n       * captured at setConfig() time so a previous call's hook clone (mutated\r\n       * below) does not carry over. */\r\n      ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\r\n      ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\r\n    } else {\r\n      _parseConfig(cfg);\r\n    }\r\n    /* Clone the hook-mutable allowlists before the walk whenever an\r\n     * uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS\r\n     * and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so\r\n     * a hook that widens them would otherwise mutate the shared set\r\n     * permanently: across later calls and across every element. Cloning per\r\n     * walk keeps documented in-call widening working while scoping it to the\r\n     * call. A single guard for both config paths - the per-call path rebinds\r\n     * the sets in _parseConfig each call, the persistent path restores them\r\n     * from the captured bindings just above - so the two cannot diverge. */\r\n    if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {\r\n      ALLOWED_TAGS = clone(ALLOWED_TAGS);\r\n    }\r\n    if (hooks.uponSanitizeAttribute.length > 0) {\r\n      ALLOWED_ATTR = clone(ALLOWED_ATTR);\r\n    }\r\n    /* Clean up removed elements */\r\n    DOMPurify.removed = [];\r\n    /* Resolve IN_PLACE for this call without mutating persistent config.\r\n       Writing the IN_PLACE closure variable here leaks under setConfig(),\r\n       where _parseConfig is skipped on later calls: a single string call would\r\n       disable in-place mode for every subsequent node call, returning a\r\n       sanitized copy while leaving the caller's node — which in-place callers\r\n       keep using and whose return value they ignore — unsanitized. REPORT-2. */\r\n    const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);\r\n    if (inPlace) {\r\n      /* Declarative-partial-updates / streaming pre-pass: sever every patch\r\n         linkage across the live tree BEFORE the walk, so no patch can fire\r\n         mid-walk and inject into an already-processed region. Runs first, so\r\n         it also covers the forbidden/clobbered roots that throw below. */\r\n      _neutralizePatchLinkage(dirty);\r\n      /* Do some early pre-sanitization to avoid unsafe root nodes.\r\n         Read nodeName through the cached prototype getter — a clobbering\r\n         child named \"nodeName\" on the form root would otherwise shadow\r\n         the property and let this check skip the root-allowlist\r\n         validation entirely. */\r\n      const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;\r\n      if (typeof nn === 'string') {\r\n        const tagName = transformCaseFunc(nn);\r\n        if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\r\n          /* Fail closed on a live root: neutralize handlers/children before\r\n             throwing, exactly as the mid-walk abort path does. */\r\n          _neutralizeRoot(dirty);\r\n          throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\r\n        }\r\n      }\r\n      /* Pre-flight the root through _isClobbered. The iterator-driven\r\n         removal path can not detach a parent-less root: _forceRemove\r\n         falls through to Element.prototype.remove(), which per spec\r\n         is a no-op on a node with no parent. A clobbered root would\r\n         then survive the main loop with its attributes uninspected,\r\n         because _sanitizeAttributes early-returns on _isClobbered. The\r\n         result would be an attacker-controlled form, complete with any\r\n         event-handler attributes the caller passed in, handed back to\r\n         the application unsanitized. Refuse to sanitize such a root\r\n         the same way we refuse a forbidden tag. GHSA-r47g-fvhr-h676. */\r\n      if (_isClobbered(dirty)) {\r\n        /* Fail closed on a live clobbered root before throwing.\r\n           _neutralizeRoot's reads are clobber-safe (cached getters); the\r\n           form's non-clobbered descendants, e.g. an armed <img>, are scrubbed. */\r\n        _neutralizeRoot(dirty);\r\n        throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');\r\n      }\r\n      /* Sanitize attached shadow roots before the main iterator runs.\r\n         The iterator does not descend into shadow trees. Same fail-closed\r\n         barrier as the main walk (campaign-3 F2): a custom-element reaction\r\n         inside a shadow root could abort this pre-pass before the walk runs,\r\n         which would otherwise leave the entire live tree unsanitized. */\r\n      try {\r\n        _sanitizeAttachedShadowRoots(dirty);\r\n      } catch (error) {\r\n        _neutralizeRoot(dirty);\r\n        throw error;\r\n      }\r\n    } else if (_isNode(dirty)) {\r\n      /* If dirty is a DOM element, append to an empty document to avoid\r\n         elements being stripped by the parser */\r\n      body = _initDocument('<!---->');\r\n      importedNode = body.ownerDocument.importNode(dirty, true);\r\n      if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\r\n        /* Node is already a body, use as is */\r\n        body = importedNode;\r\n      } else if (importedNode.nodeName === 'HTML') {\r\n        body = importedNode;\r\n      } else {\r\n        // eslint-disable-next-line unicorn/prefer-dom-node-append\r\n        body.appendChild(importedNode);\r\n      }\r\n      /* Clonable shadow roots are deep-cloned by importNode(); sanitize\r\n         them before the main iterator runs, since the iterator does not\r\n         descend into shadow trees. The walk routes every read through a\r\n         cached prototype getter so clobbering descendants on a form root\r\n         cannot hide a shadow host from this pass. */\r\n      _sanitizeAttachedShadowRoots(importedNode);\r\n    } else {\r\n      /* Exit directly if we have nothing to do */\r\n      if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\r\n      // eslint-disable-next-line unicorn/prefer-includes\r\n      dirty.indexOf('<') === -1) {\r\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\r\n      }\r\n      /* Initialize the document to work on */\r\n      body = _initDocument(dirty);\r\n      /* Check we have a DOM node from the data */\r\n      if (!body) {\r\n        return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\r\n      }\r\n    }\r\n    /* Remove first element node (ours) if FORCE_BODY is set */\r\n    if (body && FORCE_BODY) {\r\n      _forceRemove(body.firstChild);\r\n    }\r\n    /* Get node iterator */\r\n    const walkRoot = inPlace ? dirty : body;\r\n    /* Now start iterating over the created document.\r\n       The walk runs inside an exception barrier (campaign-3 F2): a re-entrant\r\n       engine/custom-element mutation can detach a node mid-walk so\r\n       `_forceRemove`'s parentless guard throws, aborting the loop. Without the\r\n       barrier the caller's in-place tree would be left half-sanitized with the\r\n       unvisited tail still armed. _createNodeIterator itself is inside the\r\n       barrier too: constructing the iterator dereferences the root's document,\r\n       and any failure there (e.g. an exotic/clobbered root) must still fail\r\n       closed rather than skip the neutralize. On any throw we fail closed -\r\n       strip the in-place root bare - then rethrow so the existing throw\r\n       contract is preserved. (String/DOM-copy paths never return the partial\r\n       body, so the propagating throw is already fail-closed there.) */\r\n    try {\r\n      const nodeIterator = _createNodeIterator(walkRoot);\r\n      while (currentNode = nodeIterator.nextNode()) {\r\n        /* Sanitize tags and elements */\r\n        _sanitizeElements(currentNode, walkRoot);\r\n        /* Check attributes next */\r\n        _sanitizeAttributes(currentNode);\r\n        /* Shadow DOM detected, sanitize it.\r\n           Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\r\n           instead of instanceof, so foreign-realm <template>.content is\r\n           walked correctly. */\r\n        if (_isDocumentFragment(currentNode.content)) {\r\n          _sanitizeShadowDOM2(currentNode.content);\r\n        }\r\n      }\r\n    } catch (error) {\r\n      if (inPlace) {\r\n        _neutralizeRoot(dirty);\r\n        /* Nodes _forceRemove'd earlier in the aborted walk are already\r\n           detached from the root, so _neutralizeRoot's subtree pass does not\r\n           reach them. Defuse them too, mirroring the success-path loop below. */\r\n        arrayForEach(DOMPurify.removed, entry => {\r\n          if (entry.element) {\r\n            _neutralizeSubtree(entry.element);\r\n          }\r\n        });\r\n      }\r\n      throw error;\r\n    }\r\n    /* If we sanitized `dirty` in-place, return it. */\r\n    if (inPlace) {\r\n      /* Fail-closed completion of the audit-5 F1 fix: every node removed from\r\n         the caller's live tree is detached but may still hold a queued\r\n         resource-event handler that fires in page scope after we return. The\r\n         move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the\r\n         non-allow-listed attributes off every other removed subtree (clobber,\r\n         mXSS, namespace, comments, KEEP_CONTENT:false, …) so those handlers are\r\n         cancelled before any event can fire. Runs synchronously, pre-return. */\r\n      arrayForEach(DOMPurify.removed, entry => {\r\n        if (entry.element) {\r\n          _neutralizeSubtree(entry.element);\r\n        }\r\n      });\r\n      if (SAFE_FOR_TEMPLATES) {\r\n        _scrubTemplateExpressions2(dirty);\r\n      }\r\n      return dirty;\r\n    }\r\n    /* Return sanitized string or DOM */\r\n    if (RETURN_DOM) {\r\n      if (SAFE_FOR_TEMPLATES) {\r\n        _scrubTemplateExpressions2(body);\r\n      }\r\n      if (RETURN_DOM_FRAGMENT) {\r\n        returnNode = createDocumentFragment.call(body.ownerDocument);\r\n        while (body.firstChild) {\r\n          // eslint-disable-next-line unicorn/prefer-dom-node-append\r\n          returnNode.appendChild(body.firstChild);\r\n        }\r\n      } else {\r\n        returnNode = body;\r\n      }\r\n      if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\r\n        /*\r\n          AdoptNode() is not used because internal state is not reset\r\n          (e.g. the past names map of a HTMLFormElement), this is safe\r\n          in theory but we would rather not risk another attack vector.\r\n          The state that is cloned by importNode() is explicitly defined\r\n          by the specs.\r\n        */\r\n        returnNode = importNode.call(originalDocument, returnNode, true);\r\n      }\r\n      return returnNode;\r\n    }\r\n    let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\r\n    /* Serialize doctype if allowed */\r\n    if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\r\n      serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\r\n    }\r\n    /* Sanitize final string template-safe */\r\n    if (SAFE_FOR_TEMPLATES) {\r\n      serializedHTML = _stripTemplateExpressions(serializedHTML);\r\n    }\r\n    return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\r\n  };\r\n  DOMPurify.setConfig = function () {\r\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\r\n    _parseConfig(cfg);\r\n    SET_CONFIG = true;\r\n    SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\r\n    SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\r\n  };\r\n  DOMPurify.clearConfig = function () {\r\n    CONFIG = null;\r\n    SET_CONFIG = false;\r\n    SET_CONFIG_ALLOWED_TAGS = null;\r\n    SET_CONFIG_ALLOWED_ATTR = null;\r\n    // Drop any caller-supplied Trusted Types policy so it cannot poison later\r\n    // `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and\r\n    // never recreated — Trusted Types throws on duplicate names) is restored by\r\n    // the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.\r\n    trustedTypesPolicy = defaultTrustedTypesPolicy;\r\n    emptyHTML = '';\r\n  };\r\n  DOMPurify.isValidAttribute = function (tag, attr, value) {\r\n    /* Initialize shared config vars if necessary. */\r\n    if (!CONFIG) {\r\n      _parseConfig({});\r\n    }\r\n    const lcTag = transformCaseFunc(tag);\r\n    const lcName = transformCaseFunc(attr);\r\n    return _isValidAttribute(lcTag, lcName, value);\r\n  };\r\n  DOMPurify.addHook = function (entryPoint, hookFunction) {\r\n    if (typeof hookFunction !== 'function') {\r\n      return;\r\n    }\r\n    /* Reject unknown entry points. Without this, a non-hook key (e.g.\r\n     * '__proto__') indexes off the prototype chain rather than a real\r\n     * hook array, and arrayPush then writes to Object.prototype. Guard\r\n     * with an own-property check against the known hook names. */\r\n    if (!objectHasOwnProperty(hooks, entryPoint)) {\r\n      return;\r\n    }\r\n    arrayPush(hooks[entryPoint], hookFunction);\r\n  };\r\n  DOMPurify.removeHook = function (entryPoint, hookFunction) {\r\n    if (!objectHasOwnProperty(hooks, entryPoint)) {\r\n      return undefined;\r\n    }\r\n    if (hookFunction !== undefined) {\r\n      const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\r\n      return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\r\n    }\r\n    return arrayPop(hooks[entryPoint]);\r\n  };\r\n  DOMPurify.removeHooks = function (entryPoint) {\r\n    if (!objectHasOwnProperty(hooks, entryPoint)) {\r\n      return;\r\n    }\r\n    hooks[entryPoint] = [];\r\n  };\r\n  DOMPurify.removeAllHooks = function () {\r\n    hooks = _createHooksMap();\r\n  };\r\n  return DOMPurify;\r\n}\r\nvar purify = createDOMPurify();\r\n\r\nmodule.exports = purify;\r\n//# sourceMappingURL=purify.cjs.js.map\r\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/dompurify/dist/purify.cjs.js?\n}");

/***/ }),

/***/ "./node_modules/luxon/build/node/luxon.js":
/*!************************************************!*\
  !*** ./node_modules/luxon/build/node/luxon.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n\n// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nclass InvalidDateTimeError extends LuxonError {\n  constructor(reason) {\n    super(`Invalid DateTime: ${reason.toMessage()}`);\n  }\n}\n\n/**\n * @private\n */\nclass InvalidIntervalError extends LuxonError {\n  constructor(reason) {\n    super(`Invalid Interval: ${reason.toMessage()}`);\n  }\n}\n\n/**\n * @private\n */\nclass InvalidDurationError extends LuxonError {\n  constructor(reason) {\n    super(`Invalid Duration: ${reason.toMessage()}`);\n  }\n}\n\n/**\n * @private\n */\nclass ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nclass InvalidUnitError extends LuxonError {\n  constructor(unit) {\n    super(`Invalid unit ${unit}`);\n  }\n}\n\n/**\n * @private\n */\nclass InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nclass ZoneIsAbstractError extends LuxonError {\n  constructor() {\n    super(\"Zone is an abstract class\");\n  }\n}\n\n/**\n * @private\n */\n\nconst n = \"numeric\",\n  s = \"short\",\n  l = \"long\";\nconst DATE_SHORT = {\n  year: n,\n  month: n,\n  day: n\n};\nconst DATE_MED = {\n  year: n,\n  month: s,\n  day: n\n};\nconst DATE_MED_WITH_WEEKDAY = {\n  year: n,\n  month: s,\n  day: n,\n  weekday: s\n};\nconst DATE_FULL = {\n  year: n,\n  month: l,\n  day: n\n};\nconst DATE_HUGE = {\n  year: n,\n  month: l,\n  day: n,\n  weekday: l\n};\nconst TIME_SIMPLE = {\n  hour: n,\n  minute: n\n};\nconst TIME_WITH_SECONDS = {\n  hour: n,\n  minute: n,\n  second: n\n};\nconst TIME_WITH_SHORT_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: s\n};\nconst TIME_WITH_LONG_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: l\n};\nconst TIME_24_SIMPLE = {\n  hour: n,\n  minute: n,\n  hourCycle: \"h23\"\n};\nconst TIME_24_WITH_SECONDS = {\n  hour: n,\n  minute: n,\n  second: n,\n  hourCycle: \"h23\"\n};\nconst TIME_24_WITH_SHORT_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  hourCycle: \"h23\",\n  timeZoneName: s\n};\nconst TIME_24_WITH_LONG_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  hourCycle: \"h23\",\n  timeZoneName: l\n};\nconst DATETIME_SHORT = {\n  year: n,\n  month: n,\n  day: n,\n  hour: n,\n  minute: n\n};\nconst DATETIME_SHORT_WITH_SECONDS = {\n  year: n,\n  month: n,\n  day: n,\n  hour: n,\n  minute: n,\n  second: n\n};\nconst DATETIME_MED = {\n  year: n,\n  month: s,\n  day: n,\n  hour: n,\n  minute: n\n};\nconst DATETIME_MED_WITH_SECONDS = {\n  year: n,\n  month: s,\n  day: n,\n  hour: n,\n  minute: n,\n  second: n\n};\nconst DATETIME_MED_WITH_WEEKDAY = {\n  year: n,\n  month: s,\n  day: n,\n  weekday: s,\n  hour: n,\n  minute: n\n};\nconst DATETIME_FULL = {\n  year: n,\n  month: l,\n  day: n,\n  hour: n,\n  minute: n,\n  timeZoneName: s\n};\nconst DATETIME_FULL_WITH_SECONDS = {\n  year: n,\n  month: l,\n  day: n,\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: s\n};\nconst DATETIME_HUGE = {\n  year: n,\n  month: l,\n  day: n,\n  weekday: l,\n  hour: n,\n  minute: n,\n  timeZoneName: l\n};\nconst DATETIME_HUGE_WITH_SECONDS = {\n  year: n,\n  month: l,\n  day: n,\n  weekday: l,\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: l\n};\n\n/**\n * @interface\n */\nclass Zone {\n  /**\n   * The type of zone\n   * @abstract\n   * @type {string}\n   */\n  get type() {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * The name of this zone.\n   * @abstract\n   * @type {string}\n   */\n  get name() {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * The IANA name of this zone.\n   * Defaults to `name` if not overwritten by a subclass.\n   * @abstract\n   * @type {string}\n   */\n  get ianaName() {\n    return this.name;\n  }\n\n  /**\n   * Returns whether the offset is known to be fixed for the whole year.\n   * @abstract\n   * @type {boolean}\n   */\n  get isUniversal() {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Returns the offset's common name (such as EST) at the specified timestamp\n   * @abstract\n   * @param {number} ts - Epoch milliseconds for which to get the name\n   * @param {Object} opts - Options to affect the format\n   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n   * @param {string} opts.locale - What locale to return the offset name in.\n   * @return {string}\n   */\n  offsetName(ts, opts) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Returns the offset's value as a string\n   * @abstract\n   * @param {number} ts - Epoch milliseconds for which to get the offset\n   * @param {string} format - What style of offset to return.\n   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n   * @return {string}\n   */\n  formatOffset(ts, format) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Return the offset in minutes for this zone at the specified timestamp.\n   * @abstract\n   * @param {number} ts - Epoch milliseconds for which to compute the offset\n   * @return {number}\n   */\n  offset(ts) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Return whether this Zone is equal to another zone\n   * @abstract\n   * @param {Zone} otherZone - the zone to compare\n   * @return {boolean}\n   */\n  equals(otherZone) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Return whether this Zone is valid.\n   * @abstract\n   * @type {boolean}\n   */\n  get isValid() {\n    throw new ZoneIsAbstractError();\n  }\n}\n\nlet singleton$1 = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nclass SystemZone extends Zone {\n  /**\n   * Get a singleton instance of the local zone\n   * @return {SystemZone}\n   */\n  static get instance() {\n    if (singleton$1 === null) {\n      singleton$1 = new SystemZone();\n    }\n    return singleton$1;\n  }\n\n  /** @override **/\n  get type() {\n    return \"system\";\n  }\n\n  /** @override **/\n  get name() {\n    return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n  }\n\n  /** @override **/\n  get isUniversal() {\n    return false;\n  }\n\n  /** @override **/\n  offsetName(ts, {\n    format,\n    locale\n  }) {\n    return parseZoneInfo(ts, format, locale);\n  }\n\n  /** @override **/\n  formatOffset(ts, format) {\n    return formatOffset(this.offset(ts), format);\n  }\n\n  /** @override **/\n  offset(ts) {\n    return -new Date(ts).getTimezoneOffset();\n  }\n\n  /** @override **/\n  equals(otherZone) {\n    return otherZone.type === \"system\";\n  }\n\n  /** @override **/\n  get isValid() {\n    return true;\n  }\n}\n\nconst dtfCache = new Map();\nfunction makeDTF(zoneName) {\n  let dtf = dtfCache.get(zoneName);\n  if (dtf === undefined) {\n    dtf = new Intl.DateTimeFormat(\"en-US\", {\n      hour12: false,\n      timeZone: zoneName,\n      year: \"numeric\",\n      month: \"2-digit\",\n      day: \"2-digit\",\n      hour: \"2-digit\",\n      minute: \"2-digit\",\n      second: \"2-digit\",\n      era: \"short\"\n    });\n    dtfCache.set(zoneName, dtf);\n  }\n  return dtf;\n}\nconst typeToPos = {\n  year: 0,\n  month: 1,\n  day: 2,\n  era: 3,\n  hour: 4,\n  minute: 5,\n  second: 6\n};\nfunction hackyOffset(dtf, date) {\n  const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n    parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n    [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n  return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\nfunction partsOffset(dtf, date) {\n  const formatted = dtf.formatToParts(date);\n  const filled = [];\n  for (let i = 0; i < formatted.length; i++) {\n    const {\n      type,\n      value\n    } = formatted[i];\n    const pos = typeToPos[type];\n    if (type === \"era\") {\n      filled[pos] = value;\n    } else if (!isUndefined(pos)) {\n      filled[pos] = parseInt(value, 10);\n    }\n  }\n  return filled;\n}\nconst ianaZoneCache = new Map();\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nclass IANAZone extends Zone {\n  /**\n   * @param {string} name - Zone name\n   * @return {IANAZone}\n   */\n  static create(name) {\n    let zone = ianaZoneCache.get(name);\n    if (zone === undefined) {\n      ianaZoneCache.set(name, zone = new IANAZone(name));\n    }\n    return zone;\n  }\n\n  /**\n   * Reset local caches. Should only be necessary in testing scenarios.\n   * @return {void}\n   */\n  static resetCache() {\n    ianaZoneCache.clear();\n    dtfCache.clear();\n  }\n\n  /**\n   * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n   * @param {string} s - The string to check validity on\n   * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n   * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n   * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.\n   * @return {boolean}\n   */\n  static isValidSpecifier(s) {\n    return this.isValidZone(s);\n  }\n\n  /**\n   * Returns whether the provided string identifies a real zone\n   * @param {string} zone - The string to check\n   * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n   * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n   * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n   * @return {boolean}\n   */\n  static isValidZone(zone) {\n    if (!zone) {\n      return false;\n    }\n    try {\n      new Intl.DateTimeFormat(\"en-US\", {\n        timeZone: zone\n      }).format();\n      return true;\n    } catch (e) {\n      return false;\n    }\n  }\n  constructor(name) {\n    super();\n    /** @private **/\n    this.zoneName = name;\n    /** @private **/\n    this.valid = IANAZone.isValidZone(name);\n  }\n\n  /**\n   * The type of zone. `iana` for all instances of `IANAZone`.\n   * @override\n   * @type {string}\n   */\n  get type() {\n    return \"iana\";\n  }\n\n  /**\n   * The name of this zone (i.e. the IANA zone name).\n   * @override\n   * @type {string}\n   */\n  get name() {\n    return this.zoneName;\n  }\n\n  /**\n   * Returns whether the offset is known to be fixed for the whole year:\n   * Always returns false for all IANA zones.\n   * @override\n   * @type {boolean}\n   */\n  get isUniversal() {\n    return false;\n  }\n\n  /**\n   * Returns the offset's common name (such as EST) at the specified timestamp\n   * @override\n   * @param {number} ts - Epoch milliseconds for which to get the name\n   * @param {Object} opts - Options to affect the format\n   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n   * @param {string} opts.locale - What locale to return the offset name in.\n   * @return {string}\n   */\n  offsetName(ts, {\n    format,\n    locale\n  }) {\n    return parseZoneInfo(ts, format, locale, this.name);\n  }\n\n  /**\n   * Returns the offset's value as a string\n   * @override\n   * @param {number} ts - Epoch milliseconds for which to get the offset\n   * @param {string} format - What style of offset to return.\n   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n   * @return {string}\n   */\n  formatOffset(ts, format) {\n    return formatOffset(this.offset(ts), format);\n  }\n\n  /**\n   * Return the offset in minutes for this zone at the specified timestamp.\n   * @override\n   * @param {number} ts - Epoch milliseconds for which to compute the offset\n   * @return {number}\n   */\n  offset(ts) {\n    if (!this.valid) return NaN;\n    const date = new Date(ts);\n    if (isNaN(date)) return NaN;\n    const dtf = makeDTF(this.name);\n    let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);\n    if (adOrBc === \"BC\") {\n      year = -Math.abs(year) + 1;\n    }\n\n    // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n    const adjustedHour = hour === 24 ? 0 : hour;\n    const asUTC = objToLocalTS({\n      year,\n      month,\n      day,\n      hour: adjustedHour,\n      minute,\n      second,\n      millisecond: 0\n    });\n    let asTS = +date;\n    const over = asTS % 1000;\n    asTS -= over >= 0 ? over : 1000 + over;\n    return (asUTC - asTS) / (60 * 1000);\n  }\n\n  /**\n   * Return whether this Zone is equal to another zone\n   * @override\n   * @param {Zone} otherZone - the zone to compare\n   * @return {boolean}\n   */\n  equals(otherZone) {\n    return otherZone.type === \"iana\" && otherZone.name === this.name;\n  }\n\n  /**\n   * Return whether this Zone is valid.\n   * @override\n   * @type {boolean}\n   */\n  get isValid() {\n    return this.valid;\n  }\n}\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n  const key = JSON.stringify([locString, opts]);\n  let dtf = intlLFCache[key];\n  if (!dtf) {\n    dtf = new Intl.ListFormat(locString, opts);\n    intlLFCache[key] = dtf;\n  }\n  return dtf;\n}\nconst intlDTCache = new Map();\nfunction getCachedDTF(locString, opts = {}) {\n  const key = JSON.stringify([locString, opts]);\n  let dtf = intlDTCache.get(key);\n  if (dtf === undefined) {\n    dtf = new Intl.DateTimeFormat(locString, opts);\n    intlDTCache.set(key, dtf);\n  }\n  return dtf;\n}\nconst intlNumCache = new Map();\nfunction getCachedINF(locString, opts = {}) {\n  const key = JSON.stringify([locString, opts]);\n  let inf = intlNumCache.get(key);\n  if (inf === undefined) {\n    inf = new Intl.NumberFormat(locString, opts);\n    intlNumCache.set(key, inf);\n  }\n  return inf;\n}\nconst intlRelCache = new Map();\nfunction getCachedRTF(locString, opts = {}) {\n  const {\n    base,\n    ...cacheKeyOpts\n  } = opts; // exclude `base` from the options\n  const key = JSON.stringify([locString, cacheKeyOpts]);\n  let inf = intlRelCache.get(key);\n  if (inf === undefined) {\n    inf = new Intl.RelativeTimeFormat(locString, opts);\n    intlRelCache.set(key, inf);\n  }\n  return inf;\n}\nlet sysLocaleCache = null;\nfunction systemLocale() {\n  if (sysLocaleCache) {\n    return sysLocaleCache;\n  } else {\n    sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n    return sysLocaleCache;\n  }\n}\nconst intlResolvedOptionsCache = new Map();\nfunction getCachedIntResolvedOptions(locString) {\n  let opts = intlResolvedOptionsCache.get(locString);\n  if (opts === undefined) {\n    opts = new Intl.DateTimeFormat(locString).resolvedOptions();\n    intlResolvedOptionsCache.set(locString, opts);\n  }\n  return opts;\n}\nconst weekInfoCache = new Map();\nfunction getCachedWeekInfo(locString) {\n  let data = weekInfoCache.get(locString);\n  if (!data) {\n    const locale = new Intl.Locale(locString);\n    // browsers currently implement this as a property, but spec says it should be a getter function\n    data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n    // minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86\n    if (!(\"minimalDays\" in data)) {\n      data = {\n        ...fallbackWeekSettings,\n        ...data\n      };\n    }\n    weekInfoCache.set(locString, data);\n  }\n  return data;\n}\nfunction parseLocaleString(localeStr) {\n  // I really want to avoid writing a BCP 47 parser\n  // see, e.g. https://github.com/wooorm/bcp-47\n  // Instead, we'll do this:\n\n  // a) if the string has no -u extensions, just leave it alone\n  // b) if it does, use Intl to resolve everything\n  // c) if Intl fails, try again without the -u\n\n  // private subtags and unicode subtags have ordering requirements,\n  // and we're not properly parsing this, so just strip out the\n  // private ones if they exist.\n  const xIndex = localeStr.indexOf(\"-x-\");\n  if (xIndex !== -1) {\n    localeStr = localeStr.substring(0, xIndex);\n  }\n  const uIndex = localeStr.indexOf(\"-u-\");\n  if (uIndex === -1) {\n    return [localeStr];\n  } else {\n    let options;\n    let selectedStr;\n    try {\n      options = getCachedDTF(localeStr).resolvedOptions();\n      selectedStr = localeStr;\n    } catch (e) {\n      const smaller = localeStr.substring(0, uIndex);\n      options = getCachedDTF(smaller).resolvedOptions();\n      selectedStr = smaller;\n    }\n    const {\n      numberingSystem,\n      calendar\n    } = options;\n    return [selectedStr, numberingSystem, calendar];\n  }\n}\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n  if (outputCalendar || numberingSystem) {\n    if (!localeStr.includes(\"-u-\")) {\n      localeStr += \"-u\";\n    }\n    if (outputCalendar) {\n      localeStr += `-ca-${outputCalendar}`;\n    }\n    if (numberingSystem) {\n      localeStr += `-nu-${numberingSystem}`;\n    }\n    return localeStr;\n  } else {\n    return localeStr;\n  }\n}\nfunction mapMonths(f) {\n  const ms = [];\n  for (let i = 1; i <= 12; i++) {\n    const dt = DateTime.utc(2009, i, 1);\n    ms.push(f(dt));\n  }\n  return ms;\n}\nfunction mapWeekdays(f) {\n  const ms = [];\n  for (let i = 1; i <= 7; i++) {\n    const dt = DateTime.utc(2016, 11, 13 + i);\n    ms.push(f(dt));\n  }\n  return ms;\n}\nfunction listStuff(loc, length, englishFn, intlFn) {\n  const mode = loc.listingMode();\n  if (mode === \"error\") {\n    return null;\n  } else if (mode === \"en\") {\n    return englishFn(length);\n  } else {\n    return intlFn(length);\n  }\n}\nfunction supportsFastNumbers(loc) {\n  if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n    return false;\n  } else {\n    return loc.numberingSystem === \"latn\" || !loc.locale || loc.locale.startsWith(\"en\") || getCachedIntResolvedOptions(loc.locale).numberingSystem === \"latn\";\n  }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n  constructor(intl, forceSimple, opts) {\n    this.padTo = opts.padTo || 0;\n    this.floor = opts.floor || false;\n    const {\n      padTo,\n      floor,\n      ...otherOpts\n    } = opts;\n    if (!forceSimple || Object.keys(otherOpts).length > 0) {\n      const intlOpts = {\n        useGrouping: false,\n        ...opts\n      };\n      if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n      this.inf = getCachedINF(intl, intlOpts);\n    }\n  }\n  format(i) {\n    if (this.inf) {\n      const fixed = this.floor ? Math.floor(i) : i;\n      return this.inf.format(fixed);\n    } else {\n      // to match the browser's numberformatter defaults\n      const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n      return padStart(fixed, this.padTo);\n    }\n  }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n  constructor(dt, intl, opts) {\n    this.opts = opts;\n    this.originalZone = undefined;\n    let z = undefined;\n    if (this.opts.timeZone) {\n      // Don't apply any workarounds if a timeZone is explicitly provided in opts\n      this.dt = dt;\n    } else if (dt.zone.type === \"fixed\") {\n      // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n      // That is why fixed-offset TZ is set to that unless it is:\n      // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n      // 2. Unsupported by the browser:\n      //    - some do not support Etc/\n      //    - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n      const gmtOffset = -1 * (dt.offset / 60);\n      const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n      if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n        z = offsetZ;\n        this.dt = dt;\n      } else {\n        // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n        // we manually apply the offset and substitute the zone as needed.\n        z = \"UTC\";\n        this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({\n          minutes: dt.offset\n        });\n        this.originalZone = dt.zone;\n      }\n    } else if (dt.zone.type === \"system\") {\n      this.dt = dt;\n    } else if (dt.zone.type === \"iana\") {\n      this.dt = dt;\n      z = dt.zone.name;\n    } else {\n      // Custom zones can have any offset / offsetName so we just manually\n      // apply the offset and substitute the zone as needed.\n      z = \"UTC\";\n      this.dt = dt.setZone(\"UTC\").plus({\n        minutes: dt.offset\n      });\n      this.originalZone = dt.zone;\n    }\n    const intlOpts = {\n      ...this.opts\n    };\n    intlOpts.timeZone = intlOpts.timeZone || z;\n    this.dtf = getCachedDTF(intl, intlOpts);\n  }\n  format() {\n    if (this.originalZone) {\n      // If we have to substitute in the actual zone name, we have to use\n      // formatToParts so that the timezone can be replaced.\n      return this.formatToParts().map(({\n        value\n      }) => value).join(\"\");\n    }\n    return this.dtf.format(this.dt.toJSDate());\n  }\n  formatToParts() {\n    const parts = this.dtf.formatToParts(this.dt.toJSDate());\n    if (this.originalZone) {\n      return parts.map(part => {\n        if (part.type === \"timeZoneName\") {\n          const offsetName = this.originalZone.offsetName(this.dt.ts, {\n            locale: this.dt.locale,\n            format: this.opts.timeZoneName\n          });\n          return {\n            ...part,\n            value: offsetName\n          };\n        } else {\n          return part;\n        }\n      });\n    }\n    return parts;\n  }\n  resolvedOptions() {\n    return this.dtf.resolvedOptions();\n  }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n  constructor(intl, isEnglish, opts) {\n    this.opts = {\n      style: \"long\",\n      ...opts\n    };\n    if (!isEnglish && hasRelative()) {\n      this.rtf = getCachedRTF(intl, opts);\n    }\n  }\n  format(count, unit) {\n    if (this.rtf) {\n      return this.rtf.format(count, unit);\n    } else {\n      return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n    }\n  }\n  formatToParts(count, unit) {\n    if (this.rtf) {\n      return this.rtf.formatToParts(count, unit);\n    } else {\n      return [];\n    }\n  }\n}\nconst fallbackWeekSettings = {\n  firstDay: 1,\n  minimalDays: 4,\n  weekend: [6, 7]\n};\n\n/**\n * @private\n */\nclass Locale {\n  static fromOpts(opts) {\n    return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.weekSettings, opts.defaultToEN);\n  }\n  static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {\n    const specifiedLocale = locale || Settings.defaultLocale;\n    // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats\n    const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n    const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n    const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n    const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n    return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n  }\n  static resetCache() {\n    sysLocaleCache = null;\n    intlDTCache.clear();\n    intlNumCache.clear();\n    intlRelCache.clear();\n    intlResolvedOptionsCache.clear();\n    weekInfoCache.clear();\n  }\n  static fromObject({\n    locale,\n    numberingSystem,\n    outputCalendar,\n    weekSettings\n  } = {}) {\n    return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n  }\n  constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n    const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n    this.locale = parsedLocale;\n    this.numberingSystem = numbering || parsedNumberingSystem || null;\n    this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n    this.weekSettings = weekSettings;\n    this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n    this.weekdaysCache = {\n      format: {},\n      standalone: {}\n    };\n    this.monthsCache = {\n      format: {},\n      standalone: {}\n    };\n    this.meridiemCache = null;\n    this.eraCache = {};\n    this.specifiedLocale = specifiedLocale;\n    this.fastNumbersCached = null;\n  }\n  get fastNumbers() {\n    if (this.fastNumbersCached == null) {\n      this.fastNumbersCached = supportsFastNumbers(this);\n    }\n    return this.fastNumbersCached;\n  }\n  listingMode() {\n    const isActuallyEn = this.isEnglish();\n    const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === \"latn\") && (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n    return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n  }\n  clone(alts) {\n    if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n      return this;\n    } else {\n      return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, validateWeekSettings(alts.weekSettings) || this.weekSettings, alts.defaultToEN || false);\n    }\n  }\n  redefaultToEN(alts = {}) {\n    return this.clone({\n      ...alts,\n      defaultToEN: true\n    });\n  }\n  redefaultToSystem(alts = {}) {\n    return this.clone({\n      ...alts,\n      defaultToEN: false\n    });\n  }\n  months(length, format = false) {\n    return listStuff(this, length, months, () => {\n      // Workaround for \"ja\" locale: formatToParts does not label all parts of the month\n      // as \"month\" and for this locale there is no difference between \"format\" and \"non-format\".\n      // As such, just use format() instead of formatToParts() and take the whole string\n      const monthSpecialCase = this.intl === \"ja\" || this.intl.startsWith(\"ja-\");\n      format &= !monthSpecialCase;\n      const intl = format ? {\n          month: length,\n          day: \"numeric\"\n        } : {\n          month: length\n        },\n        formatStr = format ? \"format\" : \"standalone\";\n      if (!this.monthsCache[formatStr][length]) {\n        const mapper = !monthSpecialCase ? dt => this.extract(dt, intl, \"month\") : dt => this.dtFormatter(dt, intl).format();\n        this.monthsCache[formatStr][length] = mapMonths(mapper);\n      }\n      return this.monthsCache[formatStr][length];\n    });\n  }\n  weekdays(length, format = false) {\n    return listStuff(this, length, weekdays, () => {\n      const intl = format ? {\n          weekday: length,\n          year: \"numeric\",\n          month: \"long\",\n          day: \"numeric\"\n        } : {\n          weekday: length\n        },\n        formatStr = format ? \"format\" : \"standalone\";\n      if (!this.weekdaysCache[formatStr][length]) {\n        this.weekdaysCache[formatStr][length] = mapWeekdays(dt => this.extract(dt, intl, \"weekday\"));\n      }\n      return this.weekdaysCache[formatStr][length];\n    });\n  }\n  meridiems() {\n    return listStuff(this, undefined, () => meridiems, () => {\n      // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n      // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n      if (!this.meridiemCache) {\n        const intl = {\n          hour: \"numeric\",\n          hourCycle: \"h12\"\n        };\n        this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(dt => this.extract(dt, intl, \"dayperiod\"));\n      }\n      return this.meridiemCache;\n    });\n  }\n  eras(length) {\n    return listStuff(this, length, eras, () => {\n      const intl = {\n        era: length\n      };\n\n      // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n      // to definitely enumerate them.\n      if (!this.eraCache[length]) {\n        this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt => this.extract(dt, intl, \"era\"));\n      }\n      return this.eraCache[length];\n    });\n  }\n  extract(dt, intlOpts, field) {\n    const df = this.dtFormatter(dt, intlOpts),\n      results = df.formatToParts(),\n      matching = results.find(m => m.type.toLowerCase() === field);\n    return matching ? matching.value : null;\n  }\n  numberFormatter(opts = {}) {\n    // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n    // (in contrast, the rest of the condition is used heavily)\n    return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n  }\n  dtFormatter(dt, intlOpts = {}) {\n    return new PolyDateFormatter(dt, this.intl, intlOpts);\n  }\n  relFormatter(opts = {}) {\n    return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n  }\n  listFormatter(opts = {}) {\n    return getCachedLF(this.intl, opts);\n  }\n  isEnglish() {\n    return this.locale === \"en\" || this.locale.toLowerCase() === \"en-us\" || getCachedIntResolvedOptions(this.intl).locale.startsWith(\"en-us\");\n  }\n  getWeekSettings() {\n    if (this.weekSettings) {\n      return this.weekSettings;\n    } else if (!hasLocaleWeekInfo()) {\n      return fallbackWeekSettings;\n    } else {\n      return getCachedWeekInfo(this.locale);\n    }\n  }\n  getStartOfWeek() {\n    return this.getWeekSettings().firstDay;\n  }\n  getMinDaysInFirstWeek() {\n    return this.getWeekSettings().minimalDays;\n  }\n  getWeekendDays() {\n    return this.getWeekSettings().weekend;\n  }\n  equals(other) {\n    return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;\n  }\n  toString() {\n    return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;\n  }\n}\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nclass FixedOffsetZone extends Zone {\n  /**\n   * Get a singleton instance of UTC\n   * @return {FixedOffsetZone}\n   */\n  static get utcInstance() {\n    if (singleton === null) {\n      singleton = new FixedOffsetZone(0);\n    }\n    return singleton;\n  }\n\n  /**\n   * Get an instance with a specified offset\n   * @param {number} offset - The offset in minutes\n   * @return {FixedOffsetZone}\n   */\n  static instance(offset) {\n    return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n  }\n\n  /**\n   * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n   * @param {string} s - The offset string to parse\n   * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n   * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n   * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n   * @return {FixedOffsetZone}\n   */\n  static parseSpecifier(s) {\n    if (s) {\n      const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n      if (r) {\n        return new FixedOffsetZone(signedOffset(r[1], r[2]));\n      }\n    }\n    return null;\n  }\n  constructor(offset) {\n    super();\n    /** @private **/\n    this.fixed = offset;\n  }\n\n  /**\n   * The type of zone. `fixed` for all instances of `FixedOffsetZone`.\n   * @override\n   * @type {string}\n   */\n  get type() {\n    return \"fixed\";\n  }\n\n  /**\n   * The name of this zone.\n   * All fixed zones' names always start with \"UTC\" (plus optional offset)\n   * @override\n   * @type {string}\n   */\n  get name() {\n    return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n  }\n\n  /**\n   * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`\n   *\n   * @override\n   * @type {string}\n   */\n  get ianaName() {\n    if (this.fixed === 0) {\n      return \"Etc/UTC\";\n    } else {\n      return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n    }\n  }\n\n  /**\n   * Returns the offset's common name at the specified timestamp.\n   *\n   * For fixed offset zones this equals to the zone name.\n   * @override\n   */\n  offsetName() {\n    return this.name;\n  }\n\n  /**\n   * Returns the offset's value as a string\n   * @override\n   * @param {number} ts - Epoch milliseconds for which to get the offset\n   * @param {string} format - What style of offset to return.\n   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n   * @return {string}\n   */\n  formatOffset(ts, format) {\n    return formatOffset(this.fixed, format);\n  }\n\n  /**\n   * Returns whether the offset is known to be fixed for the whole year:\n   * Always returns true for all fixed offset zones.\n   * @override\n   * @type {boolean}\n   */\n  get isUniversal() {\n    return true;\n  }\n\n  /**\n   * Return the offset in minutes for this zone at the specified timestamp.\n   *\n   * For fixed offset zones, this is constant and does not depend on a timestamp.\n   * @override\n   * @return {number}\n   */\n  offset() {\n    return this.fixed;\n  }\n\n  /**\n   * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)\n   * @override\n   * @param {Zone} otherZone - the zone to compare\n   * @return {boolean}\n   */\n  equals(otherZone) {\n    return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n  }\n\n  /**\n   * Return whether this Zone is valid:\n   * All fixed offset zones are valid.\n   * @override\n   * @type {boolean}\n   */\n  get isValid() {\n    return true;\n  }\n}\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nclass InvalidZone extends Zone {\n  constructor(zoneName) {\n    super();\n    /**  @private */\n    this.zoneName = zoneName;\n  }\n\n  /** @override **/\n  get type() {\n    return \"invalid\";\n  }\n\n  /** @override **/\n  get name() {\n    return this.zoneName;\n  }\n\n  /** @override **/\n  get isUniversal() {\n    return false;\n  }\n\n  /** @override **/\n  offsetName() {\n    return null;\n  }\n\n  /** @override **/\n  formatOffset() {\n    return \"\";\n  }\n\n  /** @override **/\n  offset() {\n    return NaN;\n  }\n\n  /** @override **/\n  equals() {\n    return false;\n  }\n\n  /** @override **/\n  get isValid() {\n    return false;\n  }\n}\n\n/**\n * @private\n */\nfunction normalizeZone(input, defaultZone) {\n  if (isUndefined(input) || input === null) {\n    return defaultZone;\n  } else if (input instanceof Zone) {\n    return input;\n  } else if (isString(input)) {\n    const lowered = input.toLowerCase();\n    if (lowered === \"default\") return defaultZone;else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n  } else if (isNumber(input)) {\n    return FixedOffsetZone.instance(input);\n  } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n    // This is dumb, but the instanceof check above doesn't seem to really work\n    // so we're duck checking it\n    return input;\n  } else {\n    return new InvalidZone(input);\n  }\n}\n\nconst numberingSystems = {\n  arab: \"[\\u0660-\\u0669]\",\n  arabext: \"[\\u06F0-\\u06F9]\",\n  bali: \"[\\u1B50-\\u1B59]\",\n  beng: \"[\\u09E6-\\u09EF]\",\n  deva: \"[\\u0966-\\u096F]\",\n  fullwide: \"[\\uFF10-\\uFF19]\",\n  gujr: \"[\\u0AE6-\\u0AEF]\",\n  hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n  khmr: \"[\\u17E0-\\u17E9]\",\n  knda: \"[\\u0CE6-\\u0CEF]\",\n  laoo: \"[\\u0ED0-\\u0ED9]\",\n  limb: \"[\\u1946-\\u194F]\",\n  mlym: \"[\\u0D66-\\u0D6F]\",\n  mong: \"[\\u1810-\\u1819]\",\n  mymr: \"[\\u1040-\\u1049]\",\n  orya: \"[\\u0B66-\\u0B6F]\",\n  tamldec: \"[\\u0BE6-\\u0BEF]\",\n  telu: \"[\\u0C66-\\u0C6F]\",\n  thai: \"[\\u0E50-\\u0E59]\",\n  tibt: \"[\\u0F20-\\u0F29]\",\n  latn: \"\\\\d\"\n};\nconst numberingSystemsUTF16 = {\n  arab: [1632, 1641],\n  arabext: [1776, 1785],\n  bali: [6992, 7001],\n  beng: [2534, 2543],\n  deva: [2406, 2415],\n  fullwide: [65296, 65303],\n  gujr: [2790, 2799],\n  khmr: [6112, 6121],\n  knda: [3302, 3311],\n  laoo: [3792, 3801],\n  limb: [6470, 6479],\n  mlym: [3430, 3439],\n  mong: [6160, 6169],\n  mymr: [4160, 4169],\n  orya: [2918, 2927],\n  tamldec: [3046, 3055],\n  telu: [3174, 3183],\n  thai: [3664, 3673],\n  tibt: [3872, 3881]\n};\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\nfunction parseDigits(str) {\n  let value = parseInt(str, 10);\n  if (isNaN(value)) {\n    value = \"\";\n    for (let i = 0; i < str.length; i++) {\n      const code = str.charCodeAt(i);\n      if (str[i].search(numberingSystems.hanidec) !== -1) {\n        value += hanidecChars.indexOf(str[i]);\n      } else {\n        for (const key in numberingSystemsUTF16) {\n          const [min, max] = numberingSystemsUTF16[key];\n          if (code >= min && code <= max) {\n            value += code - min;\n          }\n        }\n      }\n    }\n    return parseInt(value, 10);\n  } else {\n    return value;\n  }\n}\n\n// cache of {numberingSystem: {append: regex}}\nconst digitRegexCache = new Map();\nfunction resetDigitRegexCache() {\n  digitRegexCache.clear();\n}\nfunction digitRegex({\n  numberingSystem\n}, append = \"\") {\n  const ns = numberingSystem || \"latn\";\n  let appendCache = digitRegexCache.get(ns);\n  if (appendCache === undefined) {\n    appendCache = new Map();\n    digitRegexCache.set(ns, appendCache);\n  }\n  let regex = appendCache.get(append);\n  if (regex === undefined) {\n    regex = new RegExp(`${numberingSystems[ns]}${append}`);\n    appendCache.set(append, regex);\n  }\n  return regex;\n}\n\nlet now = () => Date.now(),\n  defaultZone = \"system\",\n  defaultLocale = null,\n  defaultNumberingSystem = null,\n  defaultOutputCalendar = null,\n  twoDigitCutoffYear = 60,\n  throwOnInvalid,\n  defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nclass Settings {\n  /**\n   * Get the callback for returning the current timestamp.\n   * @type {function}\n   */\n  static get now() {\n    return now;\n  }\n\n  /**\n   * Set the callback for returning the current timestamp.\n   * The function should return a number, which will be interpreted as an Epoch millisecond count\n   * @type {function}\n   * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n   * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n   */\n  static set now(n) {\n    now = n;\n  }\n\n  /**\n   * Set the default time zone to create DateTimes in. Does not affect existing instances.\n   * Use the value \"system\" to reset this value to the system's time zone.\n   * @type {string}\n   */\n  static set defaultZone(zone) {\n    defaultZone = zone;\n  }\n\n  /**\n   * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n   * The default value is the system's time zone (the one set on the machine that runs this code).\n   * @type {Zone}\n   */\n  static get defaultZone() {\n    return normalizeZone(defaultZone, SystemZone.instance);\n  }\n\n  /**\n   * Get the default locale to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static get defaultLocale() {\n    return defaultLocale;\n  }\n\n  /**\n   * Set the default locale to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static set defaultLocale(locale) {\n    defaultLocale = locale;\n  }\n\n  /**\n   * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static get defaultNumberingSystem() {\n    return defaultNumberingSystem;\n  }\n\n  /**\n   * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static set defaultNumberingSystem(numberingSystem) {\n    defaultNumberingSystem = numberingSystem;\n  }\n\n  /**\n   * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static get defaultOutputCalendar() {\n    return defaultOutputCalendar;\n  }\n\n  /**\n   * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static set defaultOutputCalendar(outputCalendar) {\n    defaultOutputCalendar = outputCalendar;\n  }\n\n  /**\n   * @typedef {Object} WeekSettings\n   * @property {number} firstDay\n   * @property {number} minimalDays\n   * @property {number[]} weekend\n   */\n\n  /**\n   * @return {WeekSettings|null}\n   */\n  static get defaultWeekSettings() {\n    return defaultWeekSettings;\n  }\n\n  /**\n   * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n   * how many days are required in the first week of a year.\n   * Does not affect existing instances.\n   *\n   * @param {WeekSettings|null} weekSettings\n   */\n  static set defaultWeekSettings(weekSettings) {\n    defaultWeekSettings = validateWeekSettings(weekSettings);\n  }\n\n  /**\n   * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n   * @type {number}\n   */\n  static get twoDigitCutoffYear() {\n    return twoDigitCutoffYear;\n  }\n\n  /**\n   * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n   * @type {number}\n   * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century\n   * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century\n   * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950\n   * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n   * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n   */\n  static set twoDigitCutoffYear(cutoffYear) {\n    twoDigitCutoffYear = cutoffYear % 100;\n  }\n\n  /**\n   * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n   * @type {boolean}\n   */\n  static get throwOnInvalid() {\n    return throwOnInvalid;\n  }\n\n  /**\n   * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n   * @type {boolean}\n   */\n  static set throwOnInvalid(t) {\n    throwOnInvalid = t;\n  }\n\n  /**\n   * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n   * @return {void}\n   */\n  static resetCaches() {\n    Locale.resetCache();\n    IANAZone.resetCache();\n    DateTime.resetCache();\n    resetDigitRegexCache();\n  }\n}\n\nclass Invalid {\n  constructor(reason, explanation) {\n    this.reason = reason;\n    this.explanation = explanation;\n  }\n  toMessage() {\n    if (this.explanation) {\n      return `${this.reason}: ${this.explanation}`;\n    } else {\n      return this.reason;\n    }\n  }\n}\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n  leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\nfunction unitOutOfRange(unit, value) {\n  return new Invalid(\"unit out of range\", `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`);\n}\nfunction dayOfWeek(year, month, day) {\n  const d = new Date(Date.UTC(year, month - 1, day));\n  if (year < 100 && year >= 0) {\n    d.setUTCFullYear(d.getUTCFullYear() - 1900);\n  }\n  const js = d.getUTCDay();\n  return js === 0 ? 7 : js;\n}\nfunction computeOrdinal(year, month, day) {\n  return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\nfunction uncomputeOrdinal(year, ordinal) {\n  const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n    month0 = table.findIndex(i => i < ordinal),\n    day = ordinal - table[month0];\n  return {\n    month: month0 + 1,\n    day\n  };\n}\nfunction isoWeekdayToLocal(isoWeekday, startOfWeek) {\n  return (isoWeekday - startOfWeek + 7) % 7 + 1;\n}\n\n/**\n * @private\n */\n\nfunction gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n  const {\n      year,\n      month,\n      day\n    } = gregObj,\n    ordinal = computeOrdinal(year, month, day),\n    weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n  let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n    weekYear;\n  if (weekNumber < 1) {\n    weekYear = year - 1;\n    weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n  } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n    weekYear = year + 1;\n    weekNumber = 1;\n  } else {\n    weekYear = year;\n  }\n  return {\n    weekYear,\n    weekNumber,\n    weekday,\n    ...timeObject(gregObj)\n  };\n}\nfunction weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {\n  const {\n      weekYear,\n      weekNumber,\n      weekday\n    } = weekData,\n    weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n    yearInDays = daysInYear(weekYear);\n  let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n    year;\n  if (ordinal < 1) {\n    year = weekYear - 1;\n    ordinal += daysInYear(year);\n  } else if (ordinal > yearInDays) {\n    year = weekYear + 1;\n    ordinal -= daysInYear(weekYear);\n  } else {\n    year = weekYear;\n  }\n  const {\n    month,\n    day\n  } = uncomputeOrdinal(year, ordinal);\n  return {\n    year,\n    month,\n    day,\n    ...timeObject(weekData)\n  };\n}\nfunction gregorianToOrdinal(gregData) {\n  const {\n    year,\n    month,\n    day\n  } = gregData;\n  const ordinal = computeOrdinal(year, month, day);\n  return {\n    year,\n    ordinal,\n    ...timeObject(gregData)\n  };\n}\nfunction ordinalToGregorian(ordinalData) {\n  const {\n    year,\n    ordinal\n  } = ordinalData;\n  const {\n    month,\n    day\n  } = uncomputeOrdinal(year, ordinal);\n  return {\n    year,\n    month,\n    day,\n    ...timeObject(ordinalData)\n  };\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nfunction usesLocalWeekValues(obj, loc) {\n  const hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear);\n  if (hasLocaleWeekData) {\n    const hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n    if (hasIsoWeekData) {\n      throw new ConflictingSpecificationError(\"Cannot mix locale-based week fields with ISO-based week fields\");\n    }\n    if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n    if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n    if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n    delete obj.localWeekday;\n    delete obj.localWeekNumber;\n    delete obj.localWeekYear;\n    return {\n      minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n      startOfWeek: loc.getStartOfWeek()\n    };\n  } else {\n    return {\n      minDaysInFirstWeek: 4,\n      startOfWeek: 1\n    };\n  }\n}\nfunction hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n  const validYear = isInteger(obj.weekYear),\n    validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)),\n    validWeekday = integerBetween(obj.weekday, 1, 7);\n  if (!validYear) {\n    return unitOutOfRange(\"weekYear\", obj.weekYear);\n  } else if (!validWeek) {\n    return unitOutOfRange(\"week\", obj.weekNumber);\n  } else if (!validWeekday) {\n    return unitOutOfRange(\"weekday\", obj.weekday);\n  } else return false;\n}\nfunction hasInvalidOrdinalData(obj) {\n  const validYear = isInteger(obj.year),\n    validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n  if (!validYear) {\n    return unitOutOfRange(\"year\", obj.year);\n  } else if (!validOrdinal) {\n    return unitOutOfRange(\"ordinal\", obj.ordinal);\n  } else return false;\n}\nfunction hasInvalidGregorianData(obj) {\n  const validYear = isInteger(obj.year),\n    validMonth = integerBetween(obj.month, 1, 12),\n    validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n  if (!validYear) {\n    return unitOutOfRange(\"year\", obj.year);\n  } else if (!validMonth) {\n    return unitOutOfRange(\"month\", obj.month);\n  } else if (!validDay) {\n    return unitOutOfRange(\"day\", obj.day);\n  } else return false;\n}\nfunction hasInvalidTimeData(obj) {\n  const {\n    hour,\n    minute,\n    second,\n    millisecond\n  } = obj;\n  const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0,\n    validMinute = integerBetween(minute, 0, 59),\n    validSecond = integerBetween(second, 0, 59),\n    validMillisecond = integerBetween(millisecond, 0, 999);\n  if (!validHour) {\n    return unitOutOfRange(\"hour\", hour);\n  } else if (!validMinute) {\n    return unitOutOfRange(\"minute\", minute);\n  } else if (!validSecond) {\n    return unitOutOfRange(\"second\", second);\n  } else if (!validMillisecond) {\n    return unitOutOfRange(\"millisecond\", millisecond);\n  } else return false;\n}\n\n/*\n  This is just a junk drawer, containing anything used across multiple classes.\n  Because Luxon is small(ish), this should stay small and we won't worry about splitting\n  it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\n/**\n * @private\n */\n\n// TYPES\n\nfunction isUndefined(o) {\n  return typeof o === \"undefined\";\n}\nfunction isNumber(o) {\n  return typeof o === \"number\";\n}\nfunction isInteger(o) {\n  return typeof o === \"number\" && o % 1 === 0;\n}\nfunction isString(o) {\n  return typeof o === \"string\";\n}\nfunction isDate(o) {\n  return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nfunction hasRelative() {\n  try {\n    return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n  } catch (e) {\n    return false;\n  }\n}\nfunction hasLocaleWeekInfo() {\n  try {\n    return typeof Intl !== \"undefined\" && !!Intl.Locale && (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype);\n  } catch (e) {\n    return false;\n  }\n}\n\n// OBJECTS AND ARRAYS\n\nfunction maybeArray(thing) {\n  return Array.isArray(thing) ? thing : [thing];\n}\nfunction bestBy(arr, by, compare) {\n  if (arr.length === 0) {\n    return undefined;\n  }\n  return arr.reduce((best, next) => {\n    const pair = [by(next), next];\n    if (!best) {\n      return pair;\n    } else if (compare(best[0], pair[0]) === best[0]) {\n      return best;\n    } else {\n      return pair;\n    }\n  }, null)[1];\n}\nfunction pick(obj, keys) {\n  return keys.reduce((a, k) => {\n    a[k] = obj[k];\n    return a;\n  }, {});\n}\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction validateWeekSettings(settings) {\n  if (settings == null) {\n    return null;\n  } else if (typeof settings !== \"object\") {\n    throw new InvalidArgumentError(\"Week settings must be an object\");\n  } else {\n    if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some(v => !integerBetween(v, 1, 7))) {\n      throw new InvalidArgumentError(\"Invalid week settings\");\n    }\n    return {\n      firstDay: settings.firstDay,\n      minimalDays: settings.minimalDays,\n      weekend: Array.from(settings.weekend)\n    };\n  }\n}\n\n// NUMBERS AND STRINGS\n\nfunction integerBetween(thing, bottom, top) {\n  return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nfunction floorMod(x, n) {\n  return x - n * Math.floor(x / n);\n}\nfunction padStart(input, n = 2) {\n  const isNeg = input < 0;\n  let padded;\n  if (isNeg) {\n    padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n  } else {\n    padded = (\"\" + input).padStart(n, \"0\");\n  }\n  return padded;\n}\nfunction parseInteger(string) {\n  if (isUndefined(string) || string === null || string === \"\") {\n    return undefined;\n  } else {\n    return parseInt(string, 10);\n  }\n}\nfunction parseFloating(string) {\n  if (isUndefined(string) || string === null || string === \"\") {\n    return undefined;\n  } else {\n    return parseFloat(string);\n  }\n}\nfunction parseMillis(fraction) {\n  // Return undefined (instead of 0) in these cases, where fraction is not set\n  if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n    return undefined;\n  } else {\n    const f = parseFloat(\"0.\" + fraction) * 1000;\n    return Math.floor(f);\n  }\n}\nfunction roundTo(number, digits, rounding = \"round\") {\n  const factor = 10 ** digits;\n  switch (rounding) {\n    case \"expand\":\n      return number > 0 ? Math.ceil(number * factor) / factor : Math.floor(number * factor) / factor;\n    case \"trunc\":\n      return Math.trunc(number * factor) / factor;\n    case \"round\":\n      return Math.round(number * factor) / factor;\n    case \"floor\":\n      return Math.floor(number * factor) / factor;\n    case \"ceil\":\n      return Math.ceil(number * factor) / factor;\n    default:\n      throw new RangeError(`Value rounding ${rounding} is out of range`);\n  }\n}\n\n// DATE BASICS\n\nfunction isLeapYear(year) {\n  return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nfunction daysInYear(year) {\n  return isLeapYear(year) ? 366 : 365;\n}\nfunction daysInMonth(year, month) {\n  const modMonth = floorMod(month - 1, 12) + 1,\n    modYear = year + (month - modMonth) / 12;\n  if (modMonth === 2) {\n    return isLeapYear(modYear) ? 29 : 28;\n  } else {\n    return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n  }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nfunction objToLocalTS(obj) {\n  let d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond);\n\n  // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n  if (obj.year < 100 && obj.year >= 0) {\n    d = new Date(d);\n    // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n    // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n    // the calculations done by Date.UTC are using year 2000 - which is incorrect\n    d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n  }\n  return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n  const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n  return -fwdlw + minDaysInFirstWeek - 1;\n}\nfunction weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {\n  const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n  const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n  return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\nfunction untruncateYear(year) {\n  if (year > 99) {\n    return year;\n  } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nfunction parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n  const date = new Date(ts),\n    intlOpts = {\n      hourCycle: \"h23\",\n      year: \"numeric\",\n      month: \"2-digit\",\n      day: \"2-digit\",\n      hour: \"2-digit\",\n      minute: \"2-digit\"\n    };\n  if (timeZone) {\n    intlOpts.timeZone = timeZone;\n  }\n  const modified = {\n    timeZoneName: offsetFormat,\n    ...intlOpts\n  };\n  const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(m => m.type.toLowerCase() === \"timezonename\");\n  return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nfunction signedOffset(offHourStr, offMinuteStr) {\n  let offHour = parseInt(offHourStr, 10);\n\n  // don't || this because we want to preserve -0\n  if (Number.isNaN(offHour)) {\n    offHour = 0;\n  }\n  const offMin = parseInt(offMinuteStr, 10) || 0,\n    offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n  return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nfunction asNumber(value) {\n  const numericValue = Number(value);\n  if (typeof value === \"boolean\" || value === \"\" || !Number.isFinite(numericValue)) throw new InvalidArgumentError(`Invalid unit value ${value}`);\n  return numericValue;\n}\nfunction normalizeObject(obj, normalizer) {\n  const normalized = {};\n  for (const u in obj) {\n    if (hasOwnProperty(obj, u)) {\n      const v = obj[u];\n      if (v === undefined || v === null) continue;\n      normalized[normalizer(u)] = asNumber(v);\n    }\n  }\n  return normalized;\n}\n\n/**\n * Returns the offset's value as a string\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\nfunction formatOffset(offset, format) {\n  const hours = Math.trunc(Math.abs(offset / 60)),\n    minutes = Math.trunc(Math.abs(offset % 60)),\n    sign = offset >= 0 ? \"+\" : \"-\";\n  switch (format) {\n    case \"short\":\n      return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n    case \"narrow\":\n      return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n    case \"techie\":\n      return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n    default:\n      throw new RangeError(`Value format ${format} is out of range for property format`);\n  }\n}\nfunction timeObject(obj) {\n  return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\n/**\n * @private\n */\n\nconst monthsLong = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nconst monthsShort = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nconst monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\nfunction months(length) {\n  switch (length) {\n    case \"narrow\":\n      return [...monthsNarrow];\n    case \"short\":\n      return [...monthsShort];\n    case \"long\":\n      return [...monthsLong];\n    case \"numeric\":\n      return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n    case \"2-digit\":\n      return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n    default:\n      return null;\n  }\n}\nconst weekdaysLong = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"];\nconst weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\nconst weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\nfunction weekdays(length) {\n  switch (length) {\n    case \"narrow\":\n      return [...weekdaysNarrow];\n    case \"short\":\n      return [...weekdaysShort];\n    case \"long\":\n      return [...weekdaysLong];\n    case \"numeric\":\n      return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n    default:\n      return null;\n  }\n}\nconst meridiems = [\"AM\", \"PM\"];\nconst erasLong = [\"Before Christ\", \"Anno Domini\"];\nconst erasShort = [\"BC\", \"AD\"];\nconst erasNarrow = [\"B\", \"A\"];\nfunction eras(length) {\n  switch (length) {\n    case \"narrow\":\n      return [...erasNarrow];\n    case \"short\":\n      return [...erasShort];\n    case \"long\":\n      return [...erasLong];\n    default:\n      return null;\n  }\n}\nfunction meridiemForDateTime(dt) {\n  return meridiems[dt.hour < 12 ? 0 : 1];\n}\nfunction weekdayForDateTime(dt, length) {\n  return weekdays(length)[dt.weekday - 1];\n}\nfunction monthForDateTime(dt, length) {\n  return months(length)[dt.month - 1];\n}\nfunction eraForDateTime(dt, length) {\n  return eras(length)[dt.year < 0 ? 0 : 1];\n}\nfunction formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n  const units = {\n    years: [\"year\", \"yr.\"],\n    quarters: [\"quarter\", \"qtr.\"],\n    months: [\"month\", \"mo.\"],\n    weeks: [\"week\", \"wk.\"],\n    days: [\"day\", \"day\", \"days\"],\n    hours: [\"hour\", \"hr.\"],\n    minutes: [\"minute\", \"min.\"],\n    seconds: [\"second\", \"sec.\"]\n  };\n  const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n  if (numeric === \"auto\" && lastable) {\n    const isDay = unit === \"days\";\n    switch (count) {\n      case 1:\n        return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n      case -1:\n        return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n      case 0:\n        return isDay ? \"today\" : `this ${units[unit][0]}`;\n    }\n  }\n\n  const isInPast = Object.is(count, -0) || count < 0,\n    fmtValue = Math.abs(count),\n    singular = fmtValue === 1,\n    lilUnits = units[unit],\n    fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit;\n  return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nfunction stringifyTokens(splits, tokenToString) {\n  let s = \"\";\n  for (const token of splits) {\n    if (token.literal) {\n      s += token.val;\n    } else {\n      s += tokenToString(token.val);\n    }\n  }\n  return s;\n}\nconst macroTokenToFormatOpts = {\n  D: DATE_SHORT,\n  DD: DATE_MED,\n  DDD: DATE_FULL,\n  DDDD: DATE_HUGE,\n  t: TIME_SIMPLE,\n  tt: TIME_WITH_SECONDS,\n  ttt: TIME_WITH_SHORT_OFFSET,\n  tttt: TIME_WITH_LONG_OFFSET,\n  T: TIME_24_SIMPLE,\n  TT: TIME_24_WITH_SECONDS,\n  TTT: TIME_24_WITH_SHORT_OFFSET,\n  TTTT: TIME_24_WITH_LONG_OFFSET,\n  f: DATETIME_SHORT,\n  ff: DATETIME_MED,\n  fff: DATETIME_FULL,\n  ffff: DATETIME_HUGE,\n  F: DATETIME_SHORT_WITH_SECONDS,\n  FF: DATETIME_MED_WITH_SECONDS,\n  FFF: DATETIME_FULL_WITH_SECONDS,\n  FFFF: DATETIME_HUGE_WITH_SECONDS\n};\n\n/**\n * @private\n */\n\nclass Formatter {\n  static create(locale, opts = {}) {\n    return new Formatter(locale, opts);\n  }\n  static parseFormat(fmt) {\n    // white-space is always considered a literal in user-provided formats\n    // the \" \" token has a special meaning (see unitForToken)\n\n    let current = null,\n      currentFull = \"\",\n      bracketed = false;\n    const splits = [];\n    for (let i = 0; i < fmt.length; i++) {\n      const c = fmt.charAt(i);\n      if (c === \"'\") {\n        // turn '' into a literal signal quote instead of just skipping the empty literal\n        if (currentFull.length > 0 || bracketed) {\n          splits.push({\n            literal: bracketed || /^\\s+$/.test(currentFull),\n            val: currentFull === \"\" ? \"'\" : currentFull\n          });\n        }\n        current = null;\n        currentFull = \"\";\n        bracketed = !bracketed;\n      } else if (bracketed) {\n        currentFull += c;\n      } else if (c === current) {\n        currentFull += c;\n      } else {\n        if (currentFull.length > 0) {\n          splits.push({\n            literal: /^\\s+$/.test(currentFull),\n            val: currentFull\n          });\n        }\n        currentFull = c;\n        current = c;\n      }\n    }\n    if (currentFull.length > 0) {\n      splits.push({\n        literal: bracketed || /^\\s+$/.test(currentFull),\n        val: currentFull\n      });\n    }\n    return splits;\n  }\n  static macroTokenToFormatOpts(token) {\n    return macroTokenToFormatOpts[token];\n  }\n  constructor(locale, formatOpts) {\n    this.opts = formatOpts;\n    this.loc = locale;\n    this.systemLoc = null;\n  }\n  formatWithSystemDefault(dt, opts) {\n    if (this.systemLoc === null) {\n      this.systemLoc = this.loc.redefaultToSystem();\n    }\n    const df = this.systemLoc.dtFormatter(dt, {\n      ...this.opts,\n      ...opts\n    });\n    return df.format();\n  }\n  dtFormatter(dt, opts = {}) {\n    return this.loc.dtFormatter(dt, {\n      ...this.opts,\n      ...opts\n    });\n  }\n  formatDateTime(dt, opts) {\n    return this.dtFormatter(dt, opts).format();\n  }\n  formatDateTimeParts(dt, opts) {\n    return this.dtFormatter(dt, opts).formatToParts();\n  }\n  formatInterval(interval, opts) {\n    const df = this.dtFormatter(interval.start, opts);\n    return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n  }\n  resolvedOptions(dt, opts) {\n    return this.dtFormatter(dt, opts).resolvedOptions();\n  }\n  num(n, p = 0, signDisplay = undefined) {\n    // we get some perf out of doing this here, annoyingly\n    if (this.opts.forceSimple) {\n      return padStart(n, p);\n    }\n    const opts = {\n      ...this.opts\n    };\n    if (p > 0) {\n      opts.padTo = p;\n    }\n    if (signDisplay) {\n      opts.signDisplay = signDisplay;\n    }\n    return this.loc.numberFormatter(opts).format(n);\n  }\n  formatDateTimeFromString(dt, fmt) {\n    const knownEnglish = this.loc.listingMode() === \"en\",\n      useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n      string = (opts, extract) => this.loc.extract(dt, opts, extract),\n      formatOffset = opts => {\n        if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n          return \"Z\";\n        }\n        return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n      },\n      meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({\n        hour: \"numeric\",\n        hourCycle: \"h12\"\n      }, \"dayperiod\"),\n      month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? {\n        month: length\n      } : {\n        month: length,\n        day: \"numeric\"\n      }, \"month\"),\n      weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? {\n        weekday: length\n      } : {\n        weekday: length,\n        month: \"long\",\n        day: \"numeric\"\n      }, \"weekday\"),\n      maybeMacro = token => {\n        const formatOpts = Formatter.macroTokenToFormatOpts(token);\n        if (formatOpts) {\n          return this.formatWithSystemDefault(dt, formatOpts);\n        } else {\n          return token;\n        }\n      },\n      era = length => knownEnglish ? eraForDateTime(dt, length) : string({\n        era: length\n      }, \"era\"),\n      tokenToString = token => {\n        // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n        switch (token) {\n          // ms\n          case \"S\":\n            return this.num(dt.millisecond);\n          case \"u\":\n          // falls through\n          case \"SSS\":\n            return this.num(dt.millisecond, 3);\n          // seconds\n          case \"s\":\n            return this.num(dt.second);\n          case \"ss\":\n            return this.num(dt.second, 2);\n          // fractional seconds\n          case \"uu\":\n            return this.num(Math.floor(dt.millisecond / 10), 2);\n          case \"uuu\":\n            return this.num(Math.floor(dt.millisecond / 100));\n          // minutes\n          case \"m\":\n            return this.num(dt.minute);\n          case \"mm\":\n            return this.num(dt.minute, 2);\n          // hours\n          case \"h\":\n            return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n          case \"hh\":\n            return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n          case \"H\":\n            return this.num(dt.hour);\n          case \"HH\":\n            return this.num(dt.hour, 2);\n          // offset\n          case \"Z\":\n            // like +6\n            return formatOffset({\n              format: \"narrow\",\n              allowZ: this.opts.allowZ\n            });\n          case \"ZZ\":\n            // like +06:00\n            return formatOffset({\n              format: \"short\",\n              allowZ: this.opts.allowZ\n            });\n          case \"ZZZ\":\n            // like +0600\n            return formatOffset({\n              format: \"techie\",\n              allowZ: this.opts.allowZ\n            });\n          case \"ZZZZ\":\n            // like EST\n            return dt.zone.offsetName(dt.ts, {\n              format: \"short\",\n              locale: this.loc.locale\n            });\n          case \"ZZZZZ\":\n            // like Eastern Standard Time\n            return dt.zone.offsetName(dt.ts, {\n              format: \"long\",\n              locale: this.loc.locale\n            });\n          // zone\n          case \"z\":\n            // like America/New_York\n            return dt.zoneName;\n          // meridiems\n          case \"a\":\n            return meridiem();\n          // dates\n          case \"d\":\n            return useDateTimeFormatter ? string({\n              day: \"numeric\"\n            }, \"day\") : this.num(dt.day);\n          case \"dd\":\n            return useDateTimeFormatter ? string({\n              day: \"2-digit\"\n            }, \"day\") : this.num(dt.day, 2);\n          // weekdays - standalone\n          case \"c\":\n            // like 1\n            return this.num(dt.weekday);\n          case \"ccc\":\n            // like 'Tues'\n            return weekday(\"short\", true);\n          case \"cccc\":\n            // like 'Tuesday'\n            return weekday(\"long\", true);\n          case \"ccccc\":\n            // like 'T'\n            return weekday(\"narrow\", true);\n          // weekdays - format\n          case \"E\":\n            // like 1\n            return this.num(dt.weekday);\n          case \"EEE\":\n            // like 'Tues'\n            return weekday(\"short\", false);\n          case \"EEEE\":\n            // like 'Tuesday'\n            return weekday(\"long\", false);\n          case \"EEEEE\":\n            // like 'T'\n            return weekday(\"narrow\", false);\n          // months - standalone\n          case \"L\":\n            // like 1\n            return useDateTimeFormatter ? string({\n              month: \"numeric\",\n              day: \"numeric\"\n            }, \"month\") : this.num(dt.month);\n          case \"LL\":\n            // like 01, doesn't seem to work\n            return useDateTimeFormatter ? string({\n              month: \"2-digit\",\n              day: \"numeric\"\n            }, \"month\") : this.num(dt.month, 2);\n          case \"LLL\":\n            // like Jan\n            return month(\"short\", true);\n          case \"LLLL\":\n            // like January\n            return month(\"long\", true);\n          case \"LLLLL\":\n            // like J\n            return month(\"narrow\", true);\n          // months - format\n          case \"M\":\n            // like 1\n            return useDateTimeFormatter ? string({\n              month: \"numeric\"\n            }, \"month\") : this.num(dt.month);\n          case \"MM\":\n            // like 01\n            return useDateTimeFormatter ? string({\n              month: \"2-digit\"\n            }, \"month\") : this.num(dt.month, 2);\n          case \"MMM\":\n            // like Jan\n            return month(\"short\", false);\n          case \"MMMM\":\n            // like January\n            return month(\"long\", false);\n          case \"MMMMM\":\n            // like J\n            return month(\"narrow\", false);\n          // years\n          case \"y\":\n            // like 2014\n            return useDateTimeFormatter ? string({\n              year: \"numeric\"\n            }, \"year\") : this.num(dt.year);\n          case \"yy\":\n            // like 14\n            return useDateTimeFormatter ? string({\n              year: \"2-digit\"\n            }, \"year\") : this.num(dt.year.toString().slice(-2), 2);\n          case \"yyyy\":\n            // like 0012\n            return useDateTimeFormatter ? string({\n              year: \"numeric\"\n            }, \"year\") : this.num(dt.year, 4);\n          case \"yyyyyy\":\n            // like 000012\n            return useDateTimeFormatter ? string({\n              year: \"numeric\"\n            }, \"year\") : this.num(dt.year, 6);\n          // eras\n          case \"G\":\n            // like AD\n            return era(\"short\");\n          case \"GG\":\n            // like Anno Domini\n            return era(\"long\");\n          case \"GGGGG\":\n            return era(\"narrow\");\n          case \"kk\":\n            return this.num(dt.weekYear.toString().slice(-2), 2);\n          case \"kkkk\":\n            return this.num(dt.weekYear, 4);\n          case \"W\":\n            return this.num(dt.weekNumber);\n          case \"WW\":\n            return this.num(dt.weekNumber, 2);\n          case \"n\":\n            return this.num(dt.localWeekNumber);\n          case \"nn\":\n            return this.num(dt.localWeekNumber, 2);\n          case \"ii\":\n            return this.num(dt.localWeekYear.toString().slice(-2), 2);\n          case \"iiii\":\n            return this.num(dt.localWeekYear, 4);\n          case \"o\":\n            return this.num(dt.ordinal);\n          case \"ooo\":\n            return this.num(dt.ordinal, 3);\n          case \"q\":\n            // like 1\n            return this.num(dt.quarter);\n          case \"qq\":\n            // like 01\n            return this.num(dt.quarter, 2);\n          case \"X\":\n            return this.num(Math.floor(dt.ts / 1000));\n          case \"x\":\n            return this.num(dt.ts);\n          default:\n            return maybeMacro(token);\n        }\n      };\n    return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n  }\n  formatDurationFromString(dur, fmt) {\n    const invertLargest = this.opts.signMode === \"negativeLargestOnly\" ? -1 : 1;\n    const tokenToField = token => {\n        switch (token[0]) {\n          case \"S\":\n            return \"milliseconds\";\n          case \"s\":\n            return \"seconds\";\n          case \"m\":\n            return \"minutes\";\n          case \"h\":\n            return \"hours\";\n          case \"d\":\n            return \"days\";\n          case \"w\":\n            return \"weeks\";\n          case \"M\":\n            return \"months\";\n          case \"y\":\n            return \"years\";\n          default:\n            return null;\n        }\n      },\n      tokenToString = (lildur, info) => token => {\n        const mapped = tokenToField(token);\n        if (mapped) {\n          const inversionFactor = info.isNegativeDuration && mapped !== info.largestUnit ? invertLargest : 1;\n          let signDisplay;\n          if (this.opts.signMode === \"negativeLargestOnly\" && mapped !== info.largestUnit) {\n            signDisplay = \"never\";\n          } else if (this.opts.signMode === \"all\") {\n            signDisplay = \"always\";\n          } else {\n            // \"auto\" and \"negative\" are the same, but \"auto\" has better support\n            signDisplay = \"auto\";\n          }\n          return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay);\n        } else {\n          return token;\n        }\n      },\n      tokens = Formatter.parseFormat(fmt),\n      realTokens = tokens.reduce((found, {\n        literal,\n        val\n      }) => literal ? found : found.concat(val), []),\n      collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t)),\n      durationInfo = {\n        isNegativeDuration: collapsed < 0,\n        // this relies on \"collapsed\" being based on \"shiftTo\", which builds up the object\n        // in order\n        largestUnit: Object.keys(collapsed.values)[0]\n      };\n    return stringifyTokens(tokens, tokenToString(collapsed, durationInfo));\n  }\n}\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nconst ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\nfunction combineRegexes(...regexes) {\n  const full = regexes.reduce((f, r) => f + r.source, \"\");\n  return RegExp(`^${full}$`);\n}\nfunction combineExtractors(...extractors) {\n  return m => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => {\n    const [val, zone, next] = ex(m, cursor);\n    return [{\n      ...mergedVals,\n      ...val\n    }, zone || mergedZone, next];\n  }, [{}, null, 1]).slice(0, 2);\n}\nfunction parse(s, ...patterns) {\n  if (s == null) {\n    return [null, null];\n  }\n  for (const [regex, extractor] of patterns) {\n    const m = regex.exec(s);\n    if (m) {\n      return extractor(m);\n    }\n  }\n  return [null, null];\n}\nfunction simpleParse(...keys) {\n  return (match, cursor) => {\n    const ret = {};\n    let i;\n    for (i = 0; i < keys.length; i++) {\n      ret[keys[i]] = parseInteger(match[cursor + i]);\n    }\n    return [ret, null, cursor + i];\n  };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:([Zz])|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\nfunction int(match, pos, fallback) {\n  const m = match[pos];\n  return isUndefined(m) ? fallback : parseInteger(m);\n}\nfunction extractISOYmd(match, cursor) {\n  const item = {\n    year: int(match, cursor),\n    month: int(match, cursor + 1, 1),\n    day: int(match, cursor + 2, 1)\n  };\n  return [item, null, cursor + 3];\n}\nfunction extractISOTime(match, cursor) {\n  const item = {\n    hours: int(match, cursor, 0),\n    minutes: int(match, cursor + 1, 0),\n    seconds: int(match, cursor + 2, 0),\n    milliseconds: parseMillis(match[cursor + 3])\n  };\n  return [item, null, cursor + 4];\n}\nfunction extractISOOffset(match, cursor) {\n  const local = !match[cursor] && !match[cursor + 1],\n    fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n    zone = local ? null : FixedOffsetZone.instance(fullOffset);\n  return [{}, zone, cursor + 3];\n}\nfunction extractIANAZone(match, cursor) {\n  const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n  return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration = /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\nfunction extractISODuration(match) {\n  const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match;\n  const hasNegativePrefix = s[0] === \"-\";\n  const negativeSeconds = secondStr && secondStr[0] === \"-\";\n  const maybeNegate = (num, force = false) => num !== undefined && (force || num && hasNegativePrefix) ? -num : num;\n  return [{\n    years: maybeNegate(parseFloating(yearStr)),\n    months: maybeNegate(parseFloating(monthStr)),\n    weeks: maybeNegate(parseFloating(weekStr)),\n    days: maybeNegate(parseFloating(dayStr)),\n    hours: maybeNegate(parseFloating(hourStr)),\n    minutes: maybeNegate(parseFloating(minuteStr)),\n    seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n    milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)\n  }];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n  GMT: 0,\n  EDT: -4 * 60,\n  EST: -5 * 60,\n  CDT: -5 * 60,\n  CST: -6 * 60,\n  MDT: -6 * 60,\n  MST: -7 * 60,\n  PDT: -7 * 60,\n  PST: -8 * 60\n};\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n  const result = {\n    year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n    month: monthsShort.indexOf(monthStr) + 1,\n    day: parseInteger(dayStr),\n    hour: parseInteger(hourStr),\n    minute: parseInteger(minuteStr)\n  };\n  if (secondStr) result.second = parseInteger(secondStr);\n  if (weekdayStr) {\n    result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1;\n  }\n  return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\nfunction extractRFC2822(match) {\n  const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr, obsOffset, milOffset, offHourStr, offMinuteStr] = match,\n    result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n  let offset;\n  if (obsOffset) {\n    offset = obsOffsets[obsOffset];\n  } else if (milOffset) {\n    offset = 0;\n  } else {\n    offset = signedOffset(offHourStr, offMinuteStr);\n  }\n  return [result, new FixedOffsetZone(offset)];\n}\nfunction preprocessRFC2822(s) {\n  // Remove comments and folding whitespace and replace multiple-spaces with a single space\n  return s.replace(/\\([^()]*\\)|[\\n\\t]/g, \" \").replace(/(\\s\\s+)/g, \" \").trim();\n}\n\n// http date\n\nconst rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n  rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n  ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\nfunction extractRFC1123Or850(match) {\n  const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n    result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n  return [result, FixedOffsetZone.utcInstance];\n}\nfunction extractASCII(match) {\n  const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n    result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n  return [result, FixedOffsetZone.utcInstance];\n}\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\nconst extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone);\nconst extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone);\nconst extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone);\nconst extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);\n\n/*\n * @private\n */\n\nfunction parseISODate(s) {\n  return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]);\n}\nfunction parseRFC2822Date(s) {\n  return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\nfunction parseHTTPDate(s) {\n  return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]);\n}\nfunction parseISODuration(s) {\n  return parse(s, [isoDuration, extractISODuration]);\n}\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\nfunction parseISOTimeOnly(s) {\n  return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);\nfunction parseSQL(s) {\n  return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]);\n}\n\nconst INVALID$2 = \"Invalid Duration\";\n\n// unit conversion constants\nconst lowOrderMatrix = {\n    weeks: {\n      days: 7,\n      hours: 7 * 24,\n      minutes: 7 * 24 * 60,\n      seconds: 7 * 24 * 60 * 60,\n      milliseconds: 7 * 24 * 60 * 60 * 1000\n    },\n    days: {\n      hours: 24,\n      minutes: 24 * 60,\n      seconds: 24 * 60 * 60,\n      milliseconds: 24 * 60 * 60 * 1000\n    },\n    hours: {\n      minutes: 60,\n      seconds: 60 * 60,\n      milliseconds: 60 * 60 * 1000\n    },\n    minutes: {\n      seconds: 60,\n      milliseconds: 60 * 1000\n    },\n    seconds: {\n      milliseconds: 1000\n    }\n  },\n  casualMatrix = {\n    years: {\n      quarters: 4,\n      months: 12,\n      weeks: 52,\n      days: 365,\n      hours: 365 * 24,\n      minutes: 365 * 24 * 60,\n      seconds: 365 * 24 * 60 * 60,\n      milliseconds: 365 * 24 * 60 * 60 * 1000\n    },\n    quarters: {\n      months: 3,\n      weeks: 13,\n      days: 91,\n      hours: 91 * 24,\n      minutes: 91 * 24 * 60,\n      seconds: 91 * 24 * 60 * 60,\n      milliseconds: 91 * 24 * 60 * 60 * 1000\n    },\n    months: {\n      weeks: 4,\n      days: 30,\n      hours: 30 * 24,\n      minutes: 30 * 24 * 60,\n      seconds: 30 * 24 * 60 * 60,\n      milliseconds: 30 * 24 * 60 * 60 * 1000\n    },\n    ...lowOrderMatrix\n  },\n  daysInYearAccurate = 146097.0 / 400,\n  daysInMonthAccurate = 146097.0 / 4800,\n  accurateMatrix = {\n    years: {\n      quarters: 4,\n      months: 12,\n      weeks: daysInYearAccurate / 7,\n      days: daysInYearAccurate,\n      hours: daysInYearAccurate * 24,\n      minutes: daysInYearAccurate * 24 * 60,\n      seconds: daysInYearAccurate * 24 * 60 * 60,\n      milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000\n    },\n    quarters: {\n      months: 3,\n      weeks: daysInYearAccurate / 28,\n      days: daysInYearAccurate / 4,\n      hours: daysInYearAccurate * 24 / 4,\n      minutes: daysInYearAccurate * 24 * 60 / 4,\n      seconds: daysInYearAccurate * 24 * 60 * 60 / 4,\n      milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4\n    },\n    months: {\n      weeks: daysInMonthAccurate / 7,\n      days: daysInMonthAccurate,\n      hours: daysInMonthAccurate * 24,\n      minutes: daysInMonthAccurate * 24 * 60,\n      seconds: daysInMonthAccurate * 24 * 60 * 60,\n      milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000\n    },\n    ...lowOrderMatrix\n  };\n\n// units ordered by size\nconst orderedUnits$1 = [\"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\"];\nconst reverseUnits = orderedUnits$1.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone$1(dur, alts, clear = false) {\n  // deep merge for vals\n  const conf = {\n    values: clear ? alts.values : {\n      ...dur.values,\n      ...(alts.values || {})\n    },\n    loc: dur.loc.clone(alts.loc),\n    conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n    matrix: alts.matrix || dur.matrix\n  };\n  return new Duration(conf);\n}\nfunction durationToMillis(matrix, vals) {\n  var _vals$milliseconds;\n  let sum = (_vals$milliseconds = vals.milliseconds) != null ? _vals$milliseconds : 0;\n  for (const unit of reverseUnits.slice(1)) {\n    if (vals[unit]) {\n      sum += vals[unit] * matrix[unit][\"milliseconds\"];\n    }\n  }\n  return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n  // the logic below assumes the overall value of the duration is positive\n  // if this is not the case, factor is used to make it so\n  const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n  orderedUnits$1.reduceRight((previous, current) => {\n    if (!isUndefined(vals[current])) {\n      if (previous) {\n        const previousVal = vals[previous] * factor;\n        const conv = matrix[current][previous];\n\n        // if (previousVal < 0):\n        // lower order unit is negative (e.g. { years: 2, days: -2 })\n        // normalize this by reducing the higher order unit by the appropriate amount\n        // and increasing the lower order unit\n        // this can never make the higher order unit negative, because this function only operates\n        // on positive durations, so the amount of time represented by the lower order unit cannot\n        // be larger than the higher order unit\n        // else:\n        // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n        // in this case we attempt to convert as much as possible from the lower order unit into\n        // the higher order one\n        //\n        // Math.floor takes care of both of these cases, rounding away from 0\n        // if previousVal < 0 it makes the absolute value larger\n        // if previousVal >= it makes the absolute value smaller\n        const rollUp = Math.floor(previousVal / conv);\n        vals[current] += rollUp * factor;\n        vals[previous] -= rollUp * conv * factor;\n      }\n      return current;\n    } else {\n      return previous;\n    }\n  }, null);\n\n  // try to convert any decimals into smaller units if possible\n  // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n  orderedUnits$1.reduce((previous, current) => {\n    if (!isUndefined(vals[current])) {\n      if (previous) {\n        const fraction = vals[previous] % 1;\n        vals[previous] -= fraction;\n        vals[current] += fraction * matrix[previous][current];\n      }\n      return current;\n    } else {\n      return previous;\n    }\n  }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n  const newVals = {};\n  for (const [key, value] of Object.entries(vals)) {\n    if (value !== 0) {\n      newVals[key] = value;\n    }\n  }\n  return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See  {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nclass Duration {\n  /**\n   * @private\n   */\n  constructor(config) {\n    const accurate = config.conversionAccuracy === \"longterm\" || false;\n    let matrix = accurate ? accurateMatrix : casualMatrix;\n    if (config.matrix) {\n      matrix = config.matrix;\n    }\n\n    /**\n     * @access private\n     */\n    this.values = config.values;\n    /**\n     * @access private\n     */\n    this.loc = config.loc || Locale.create();\n    /**\n     * @access private\n     */\n    this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n    /**\n     * @access private\n     */\n    this.invalid = config.invalid || null;\n    /**\n     * @access private\n     */\n    this.matrix = matrix;\n    /**\n     * @access private\n     */\n    this.isLuxonDuration = true;\n  }\n\n  /**\n   * Create Duration from a number of milliseconds.\n   * @param {number} count of milliseconds\n   * @param {Object} opts - options for parsing\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @return {Duration}\n   */\n  static fromMillis(count, opts) {\n    return Duration.fromObject({\n      milliseconds: count\n    }, opts);\n  }\n\n  /**\n   * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n   * If this object is empty then a zero milliseconds duration is returned.\n   * @param {Object} obj - the object to create the DateTime from\n   * @param {number} obj.years\n   * @param {number} obj.quarters\n   * @param {number} obj.months\n   * @param {number} obj.weeks\n   * @param {number} obj.days\n   * @param {number} obj.hours\n   * @param {number} obj.minutes\n   * @param {number} obj.seconds\n   * @param {number} obj.milliseconds\n   * @param {Object} [opts=[]] - options for creating this Duration\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n   * @param {string} [opts.matrix=Object] - the custom conversion system to use\n   * @return {Duration}\n   */\n  static fromObject(obj, opts = {}) {\n    if (obj == null || typeof obj !== \"object\") {\n      throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${obj === null ? \"null\" : typeof obj}`);\n    }\n    return new Duration({\n      values: normalizeObject(obj, Duration.normalizeUnit),\n      loc: Locale.fromObject(opts),\n      conversionAccuracy: opts.conversionAccuracy,\n      matrix: opts.matrix\n    });\n  }\n\n  /**\n   * Create a Duration from DurationLike.\n   *\n   * @param {Object | number | Duration} durationLike\n   * One of:\n   * - object with keys like 'years' and 'hours'.\n   * - number representing milliseconds\n   * - Duration instance\n   * @return {Duration}\n   */\n  static fromDurationLike(durationLike) {\n    if (isNumber(durationLike)) {\n      return Duration.fromMillis(durationLike);\n    } else if (Duration.isDuration(durationLike)) {\n      return durationLike;\n    } else if (typeof durationLike === \"object\") {\n      return Duration.fromObject(durationLike);\n    } else {\n      throw new InvalidArgumentError(`Unknown duration argument ${durationLike} of type ${typeof durationLike}`);\n    }\n  }\n\n  /**\n   * Create a Duration from an ISO 8601 duration string.\n   * @param {string} text - text to parse\n   * @param {Object} opts - options for parsing\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n   * @param {string} [opts.matrix=Object] - the preset conversion system to use\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n   * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n   * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n   * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n   * @return {Duration}\n   */\n  static fromISO(text, opts) {\n    const [parsed] = parseISODuration(text);\n    if (parsed) {\n      return Duration.fromObject(parsed, opts);\n    } else {\n      return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n    }\n  }\n\n  /**\n   * Create a Duration from an ISO 8601 time string.\n   * @param {string} text - text to parse\n   * @param {Object} opts - options for parsing\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n   * @param {string} [opts.matrix=Object] - the conversion system to use\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n   * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n   * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @return {Duration}\n   */\n  static fromISOTime(text, opts) {\n    const [parsed] = parseISOTimeOnly(text);\n    if (parsed) {\n      return Duration.fromObject(parsed, opts);\n    } else {\n      return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n    }\n  }\n\n  /**\n   * Create an invalid Duration.\n   * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n   * @return {Duration}\n   */\n  static invalid(reason, explanation = null) {\n    if (!reason) {\n      throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n    }\n    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n    if (Settings.throwOnInvalid) {\n      throw new InvalidDurationError(invalid);\n    } else {\n      return new Duration({\n        invalid\n      });\n    }\n  }\n\n  /**\n   * @private\n   */\n  static normalizeUnit(unit) {\n    const normalized = {\n      year: \"years\",\n      years: \"years\",\n      quarter: \"quarters\",\n      quarters: \"quarters\",\n      month: \"months\",\n      months: \"months\",\n      week: \"weeks\",\n      weeks: \"weeks\",\n      day: \"days\",\n      days: \"days\",\n      hour: \"hours\",\n      hours: \"hours\",\n      minute: \"minutes\",\n      minutes: \"minutes\",\n      second: \"seconds\",\n      seconds: \"seconds\",\n      millisecond: \"milliseconds\",\n      milliseconds: \"milliseconds\"\n    }[unit ? unit.toLowerCase() : unit];\n    if (!normalized) throw new InvalidUnitError(unit);\n    return normalized;\n  }\n\n  /**\n   * Check if an object is a Duration. Works across context boundaries\n   * @param {object} o\n   * @return {boolean}\n   */\n  static isDuration(o) {\n    return o && o.isLuxonDuration || false;\n  }\n\n  /**\n   * Get  the locale of a Duration, such 'en-GB'\n   * @type {string}\n   */\n  get locale() {\n    return this.isValid ? this.loc.locale : null;\n  }\n\n  /**\n   * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n   *\n   * @type {string}\n   */\n  get numberingSystem() {\n    return this.isValid ? this.loc.numberingSystem : null;\n  }\n\n  /**\n   * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n   * * `S` for milliseconds\n   * * `s` for seconds\n   * * `m` for minutes\n   * * `h` for hours\n   * * `d` for days\n   * * `w` for weeks\n   * * `M` for months\n   * * `y` for years\n   * Notes:\n   * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n   * * Tokens can be escaped by wrapping with single quotes.\n   * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n   * @param {string} fmt - the format string\n   * @param {Object} opts - options\n   * @param {boolean} [opts.floor=true] - floor numerical values\n   * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n   * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"+6 +2\"\n   * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"-6 -2\"\n   * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"negativeLargestOnly\" }) //=> \"-6 2\"\n   * @return {string}\n   */\n  toFormat(fmt, opts = {}) {\n    // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n    const fmtOpts = {\n      ...opts,\n      floor: opts.round !== false && opts.floor !== false\n    };\n    return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;\n  }\n\n  /**\n   * Returns a string representation of a Duration with all units included.\n   * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n   * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n   * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n   * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero\n   * @example\n   * ```js\n   * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 })\n   * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes'\n   * dur.toHuman({ listStyle: \"long\" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes'\n   * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 mth, 0 wks, 5 hr, 6 min'\n   * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes'\n   * ```\n   */\n  toHuman(opts = {}) {\n    if (!this.isValid) return INVALID$2;\n    const showZeros = opts.showZeros !== false;\n    const l = orderedUnits$1.map(unit => {\n      const val = this.values[unit];\n      if (isUndefined(val) || val === 0 && !showZeros) {\n        return null;\n      }\n      return this.loc.numberFormatter({\n        style: \"unit\",\n        unitDisplay: \"long\",\n        ...opts,\n        unit: unit.slice(0, -1)\n      }).format(val);\n    }).filter(n => n);\n    return this.loc.listFormatter({\n      type: \"conjunction\",\n      style: opts.listStyle || \"narrow\",\n      ...opts\n    }).format(l);\n  }\n\n  /**\n   * Returns a JavaScript object with this Duration's values.\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n   * @return {Object}\n   */\n  toObject() {\n    if (!this.isValid) return {};\n    return {\n      ...this.values\n    };\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this Duration.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n   * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n   * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n   * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n   * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n   * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n   * @return {string}\n   */\n  toISO() {\n    // we could use the formatter, but this is an easier way to get the minimum string\n    if (!this.isValid) return null;\n    let s = \"P\";\n    if (this.years !== 0) s += this.years + \"Y\";\n    if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n    if (this.weeks !== 0) s += this.weeks + \"W\";\n    if (this.days !== 0) s += this.days + \"D\";\n    if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += \"T\";\n    if (this.hours !== 0) s += this.hours + \"H\";\n    if (this.minutes !== 0) s += this.minutes + \"M\";\n    if (this.seconds !== 0 || this.milliseconds !== 0)\n      // this will handle \"floating point madness\" by removing extra decimal places\n      // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n      s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n    if (s === \"P\") s += \"T0S\";\n    return s;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n   * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n   * @param {Object} opts - options\n   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n   * @return {string}\n   */\n  toISOTime(opts = {}) {\n    if (!this.isValid) return null;\n    const millis = this.toMillis();\n    if (millis < 0 || millis >= 86400000) return null;\n    opts = {\n      suppressMilliseconds: false,\n      suppressSeconds: false,\n      includePrefix: false,\n      format: \"extended\",\n      ...opts,\n      includeOffset: false\n    };\n    const dateTime = DateTime.fromMillis(millis, {\n      zone: \"UTC\"\n    });\n    return dateTime.toISOTime(opts);\n  }\n\n  /**\n   * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n   * @return {string}\n   */\n  toJSON() {\n    return this.toISO();\n  }\n\n  /**\n   * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n   * @return {string}\n   */\n  toString() {\n    return this.toISO();\n  }\n\n  /**\n   * Returns a string representation of this Duration appropriate for the REPL.\n   * @return {string}\n   */\n  [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n    if (this.isValid) {\n      return `Duration { values: ${JSON.stringify(this.values)} }`;\n    } else {\n      return `Duration { Invalid, reason: ${this.invalidReason} }`;\n    }\n  }\n\n  /**\n   * Returns an milliseconds value of this Duration.\n   * @return {number}\n   */\n  toMillis() {\n    if (!this.isValid) return NaN;\n    return durationToMillis(this.matrix, this.values);\n  }\n\n  /**\n   * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n   * @return {number}\n   */\n  valueOf() {\n    return this.toMillis();\n  }\n\n  /**\n   * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   * @return {Duration}\n   */\n  plus(duration) {\n    if (!this.isValid) return this;\n    const dur = Duration.fromDurationLike(duration),\n      result = {};\n    for (const k of orderedUnits$1) {\n      if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n        result[k] = dur.get(k) + this.get(k);\n      }\n    }\n    return clone$1(this, {\n      values: result\n    }, true);\n  }\n\n  /**\n   * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   * @return {Duration}\n   */\n  minus(duration) {\n    if (!this.isValid) return this;\n    const dur = Duration.fromDurationLike(duration);\n    return this.plus(dur.negate());\n  }\n\n  /**\n   * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n   * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n   * @return {Duration}\n   */\n  mapUnits(fn) {\n    if (!this.isValid) return this;\n    const result = {};\n    for (const k of Object.keys(this.values)) {\n      result[k] = asNumber(fn(this.values[k], k));\n    }\n    return clone$1(this, {\n      values: result\n    }, true);\n  }\n\n  /**\n   * Get the value of unit.\n   * @param {string} unit - a unit such as 'minute' or 'day'\n   * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n   * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n   * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n   * @return {number}\n   */\n  get(unit) {\n    return this[Duration.normalizeUnit(unit)];\n  }\n\n  /**\n   * \"Set\" the values of specified units. Return a newly-constructed Duration.\n   * @param {Object} values - a mapping of units to numbers\n   * @example dur.set({ years: 2017 })\n   * @example dur.set({ hours: 8, minutes: 30 })\n   * @return {Duration}\n   */\n  set(values) {\n    if (!this.isValid) return this;\n    const mixed = {\n      ...this.values,\n      ...normalizeObject(values, Duration.normalizeUnit)\n    };\n    return clone$1(this, {\n      values: mixed\n    });\n  }\n\n  /**\n   * \"Set\" the locale and/or numberingSystem.  Returns a newly-constructed Duration.\n   * @example dur.reconfigure({ locale: 'en-GB' })\n   * @return {Duration}\n   */\n  reconfigure({\n    locale,\n    numberingSystem,\n    conversionAccuracy,\n    matrix\n  } = {}) {\n    const loc = this.loc.clone({\n      locale,\n      numberingSystem\n    });\n    const opts = {\n      loc,\n      matrix,\n      conversionAccuracy\n    };\n    return clone$1(this, opts);\n  }\n\n  /**\n   * Return the length of the duration in the specified unit.\n   * @param {string} unit - a unit such as 'minutes' or 'days'\n   * @example Duration.fromObject({years: 1}).as('days') //=> 365\n   * @example Duration.fromObject({years: 1}).as('months') //=> 12\n   * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n   * @return {number}\n   */\n  as(unit) {\n    return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n  }\n\n  /**\n   * Reduce this Duration to its canonical representation in its current units.\n   * Assuming the overall value of the Duration is positive, this means:\n   * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n   * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n   *   the overall value would be negative, see third example)\n   * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n   *\n   * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n   * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n   * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n   * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n   * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n   * @return {Duration}\n   */\n  normalize() {\n    if (!this.isValid) return this;\n    const vals = this.toObject();\n    normalizeValues(this.matrix, vals);\n    return clone$1(this, {\n      values: vals\n    }, true);\n  }\n\n  /**\n   * Rescale units to its largest representation\n   * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n   * @return {Duration}\n   */\n  rescale() {\n    if (!this.isValid) return this;\n    const vals = removeZeroes(this.normalize().shiftToAll().toObject());\n    return clone$1(this, {\n      values: vals\n    }, true);\n  }\n\n  /**\n   * Convert this Duration into its representation in a different set of units.\n   * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n   * @return {Duration}\n   */\n  shiftTo(...units) {\n    if (!this.isValid) return this;\n    if (units.length === 0) {\n      return this;\n    }\n    units = units.map(u => Duration.normalizeUnit(u));\n    const built = {},\n      accumulated = {},\n      vals = this.toObject();\n    let lastUnit;\n    for (const k of orderedUnits$1) {\n      if (units.indexOf(k) >= 0) {\n        lastUnit = k;\n        let own = 0;\n\n        // anything we haven't boiled down yet should get boiled to this unit\n        for (const ak in accumulated) {\n          own += this.matrix[ak][k] * accumulated[ak];\n          accumulated[ak] = 0;\n        }\n\n        // plus anything that's already in this unit\n        if (isNumber(vals[k])) {\n          own += vals[k];\n        }\n\n        // only keep the integer part for now in the hopes of putting any decimal part\n        // into a smaller unit later\n        const i = Math.trunc(own);\n        built[k] = i;\n        accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n        // otherwise, keep it in the wings to boil it later\n      } else if (isNumber(vals[k])) {\n        accumulated[k] = vals[k];\n      }\n    }\n\n    // anything leftover becomes the decimal for the last unit\n    // lastUnit must be defined since units is not empty\n    for (const key in accumulated) {\n      if (accumulated[key] !== 0) {\n        built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n      }\n    }\n    normalizeValues(this.matrix, built);\n    return clone$1(this, {\n      values: built\n    }, true);\n  }\n\n  /**\n   * Shift this Duration to all available units.\n   * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n   * @return {Duration}\n   */\n  shiftToAll() {\n    if (!this.isValid) return this;\n    return this.shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\");\n  }\n\n  /**\n   * Return the negative of this Duration.\n   * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n   * @return {Duration}\n   */\n  negate() {\n    if (!this.isValid) return this;\n    const negated = {};\n    for (const k of Object.keys(this.values)) {\n      negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n    }\n    return clone$1(this, {\n      values: negated\n    }, true);\n  }\n\n  /**\n   * Removes all units with values equal to 0 from this Duration.\n   * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 }\n   * @return {Duration}\n   */\n  removeZeros() {\n    if (!this.isValid) return this;\n    const vals = removeZeroes(this.values);\n    return clone$1(this, {\n      values: vals\n    }, true);\n  }\n\n  /**\n   * Get the years.\n   * @type {number}\n   */\n  get years() {\n    return this.isValid ? this.values.years || 0 : NaN;\n  }\n\n  /**\n   * Get the quarters.\n   * @type {number}\n   */\n  get quarters() {\n    return this.isValid ? this.values.quarters || 0 : NaN;\n  }\n\n  /**\n   * Get the months.\n   * @type {number}\n   */\n  get months() {\n    return this.isValid ? this.values.months || 0 : NaN;\n  }\n\n  /**\n   * Get the weeks\n   * @type {number}\n   */\n  get weeks() {\n    return this.isValid ? this.values.weeks || 0 : NaN;\n  }\n\n  /**\n   * Get the days.\n   * @type {number}\n   */\n  get days() {\n    return this.isValid ? this.values.days || 0 : NaN;\n  }\n\n  /**\n   * Get the hours.\n   * @type {number}\n   */\n  get hours() {\n    return this.isValid ? this.values.hours || 0 : NaN;\n  }\n\n  /**\n   * Get the minutes.\n   * @type {number}\n   */\n  get minutes() {\n    return this.isValid ? this.values.minutes || 0 : NaN;\n  }\n\n  /**\n   * Get the seconds.\n   * @return {number}\n   */\n  get seconds() {\n    return this.isValid ? this.values.seconds || 0 : NaN;\n  }\n\n  /**\n   * Get the milliseconds.\n   * @return {number}\n   */\n  get milliseconds() {\n    return this.isValid ? this.values.milliseconds || 0 : NaN;\n  }\n\n  /**\n   * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n   * on invalid DateTimes or Intervals.\n   * @return {boolean}\n   */\n  get isValid() {\n    return this.invalid === null;\n  }\n\n  /**\n   * Returns an error code if this Duration became invalid, or null if the Duration is valid\n   * @return {string}\n   */\n  get invalidReason() {\n    return this.invalid ? this.invalid.reason : null;\n  }\n\n  /**\n   * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n   * @type {string}\n   */\n  get invalidExplanation() {\n    return this.invalid ? this.invalid.explanation : null;\n  }\n\n  /**\n   * Equality check\n   * Two Durations are equal iff they have the same units and the same values for each unit.\n   * @param {Duration} other\n   * @return {boolean}\n   */\n  equals(other) {\n    if (!this.isValid || !other.isValid) {\n      return false;\n    }\n    if (!this.loc.equals(other.loc)) {\n      return false;\n    }\n    function eq(v1, v2) {\n      // Consider 0 and undefined as equal\n      if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n      return v1 === v2;\n    }\n    for (const u of orderedUnits$1) {\n      if (!eq(this.values[u], other.values[u])) {\n        return false;\n      }\n    }\n    return true;\n  }\n}\n\nconst INVALID$1 = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n  if (!start || !start.isValid) {\n    return Interval.invalid(\"missing or invalid start\");\n  } else if (!end || !end.isValid) {\n    return Interval.invalid(\"missing or invalid end\");\n  } else if (end < start) {\n    return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n  } else {\n    return null;\n  }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nclass Interval {\n  /**\n   * @private\n   */\n  constructor(config) {\n    /**\n     * @access private\n     */\n    this.s = config.start;\n    /**\n     * @access private\n     */\n    this.e = config.end;\n    /**\n     * @access private\n     */\n    this.invalid = config.invalid || null;\n    /**\n     * @access private\n     */\n    this.isLuxonInterval = true;\n  }\n\n  /**\n   * Create an invalid Interval.\n   * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n   * @return {Interval}\n   */\n  static invalid(reason, explanation = null) {\n    if (!reason) {\n      throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n    }\n    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n    if (Settings.throwOnInvalid) {\n      throw new InvalidIntervalError(invalid);\n    } else {\n      return new Interval({\n        invalid\n      });\n    }\n  }\n\n  /**\n   * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n   * @param {DateTime|Date|Object} start\n   * @param {DateTime|Date|Object} end\n   * @return {Interval}\n   */\n  static fromDateTimes(start, end) {\n    const builtStart = friendlyDateTime(start),\n      builtEnd = friendlyDateTime(end);\n    const validateError = validateStartEnd(builtStart, builtEnd);\n    if (validateError == null) {\n      return new Interval({\n        start: builtStart,\n        end: builtEnd\n      });\n    } else {\n      return validateError;\n    }\n  }\n\n  /**\n   * Create an Interval from a start DateTime and a Duration to extend to.\n   * @param {DateTime|Date|Object} start\n   * @param {Duration|Object|number} duration - the length of the Interval.\n   * @return {Interval}\n   */\n  static after(start, duration) {\n    const dur = Duration.fromDurationLike(duration),\n      dt = friendlyDateTime(start);\n    return Interval.fromDateTimes(dt, dt.plus(dur));\n  }\n\n  /**\n   * Create an Interval from an end DateTime and a Duration to extend backwards to.\n   * @param {DateTime|Date|Object} end\n   * @param {Duration|Object|number} duration - the length of the Interval.\n   * @return {Interval}\n   */\n  static before(end, duration) {\n    const dur = Duration.fromDurationLike(duration),\n      dt = friendlyDateTime(end);\n    return Interval.fromDateTimes(dt.minus(dur), dt);\n  }\n\n  /**\n   * Create an Interval from an ISO 8601 string.\n   * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.\n   * @param {string} text - the ISO string to parse\n   * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @return {Interval}\n   */\n  static fromISO(text, opts) {\n    const [s, e] = (text || \"\").split(\"/\", 2);\n    if (s && e) {\n      let start, startIsValid;\n      try {\n        start = DateTime.fromISO(s, opts);\n        startIsValid = start.isValid;\n      } catch (e) {\n        startIsValid = false;\n      }\n      let end, endIsValid;\n      try {\n        end = DateTime.fromISO(e, opts);\n        endIsValid = end.isValid;\n      } catch (e) {\n        endIsValid = false;\n      }\n      if (startIsValid && endIsValid) {\n        return Interval.fromDateTimes(start, end);\n      }\n      if (startIsValid) {\n        const dur = Duration.fromISO(e, opts);\n        if (dur.isValid) {\n          return Interval.after(start, dur);\n        }\n      } else if (endIsValid) {\n        const dur = Duration.fromISO(s, opts);\n        if (dur.isValid) {\n          return Interval.before(end, dur);\n        }\n      }\n    }\n    return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n  }\n\n  /**\n   * Check if an object is an Interval. Works across context boundaries\n   * @param {object} o\n   * @return {boolean}\n   */\n  static isInterval(o) {\n    return o && o.isLuxonInterval || false;\n  }\n\n  /**\n   * Returns the start of the Interval\n   * @type {DateTime}\n   */\n  get start() {\n    return this.isValid ? this.s : null;\n  }\n\n  /**\n   * Returns the end of the Interval. This is the first instant which is not part of the interval\n   * (Interval is half-open).\n   * @type {DateTime}\n   */\n  get end() {\n    return this.isValid ? this.e : null;\n  }\n\n  /**\n   * Returns the last DateTime included in the interval (since end is not part of the interval)\n   * @type {DateTime}\n   */\n  get lastDateTime() {\n    return this.isValid ? this.e ? this.e.minus(1) : null : null;\n  }\n\n  /**\n   * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n   * @type {boolean}\n   */\n  get isValid() {\n    return this.invalidReason === null;\n  }\n\n  /**\n   * Returns an error code if this Interval is invalid, or null if the Interval is valid\n   * @type {string}\n   */\n  get invalidReason() {\n    return this.invalid ? this.invalid.reason : null;\n  }\n\n  /**\n   * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n   * @type {string}\n   */\n  get invalidExplanation() {\n    return this.invalid ? this.invalid.explanation : null;\n  }\n\n  /**\n   * Returns the length of the Interval in the specified unit.\n   * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n   * @return {number}\n   */\n  length(unit = \"milliseconds\") {\n    return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n  }\n\n  /**\n   * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n   * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n   * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n   * @param {string} [unit='milliseconds'] - the unit of time to count.\n   * @param {Object} opts - options\n   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n   * @return {number}\n   */\n  count(unit = \"milliseconds\", opts) {\n    if (!this.isValid) return NaN;\n    const start = this.start.startOf(unit, opts);\n    let end;\n    if (opts != null && opts.useLocaleWeeks) {\n      end = this.end.reconfigure({\n        locale: start.locale\n      });\n    } else {\n      end = this.end;\n    }\n    end = end.startOf(unit, opts);\n    return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n  }\n\n  /**\n   * Returns whether this Interval's start and end are both in the same unit of time\n   * @param {string} unit - the unit of time to check sameness on\n   * @return {boolean}\n   */\n  hasSame(unit) {\n    return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n  }\n\n  /**\n   * Return whether this Interval has the same start and end DateTimes.\n   * @return {boolean}\n   */\n  isEmpty() {\n    return this.s.valueOf() === this.e.valueOf();\n  }\n\n  /**\n   * Return whether this Interval's start is after the specified DateTime.\n   * @param {DateTime} dateTime\n   * @return {boolean}\n   */\n  isAfter(dateTime) {\n    if (!this.isValid) return false;\n    return this.s > dateTime;\n  }\n\n  /**\n   * Return whether this Interval's end is before the specified DateTime.\n   * @param {DateTime} dateTime\n   * @return {boolean}\n   */\n  isBefore(dateTime) {\n    if (!this.isValid) return false;\n    return this.e <= dateTime;\n  }\n\n  /**\n   * Return whether this Interval contains the specified DateTime.\n   * @param {DateTime} dateTime\n   * @return {boolean}\n   */\n  contains(dateTime) {\n    if (!this.isValid) return false;\n    return this.s <= dateTime && this.e > dateTime;\n  }\n\n  /**\n   * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n   * @param {Object} values - the values to set\n   * @param {DateTime} values.start - the starting DateTime\n   * @param {DateTime} values.end - the ending DateTime\n   * @return {Interval}\n   */\n  set({\n    start,\n    end\n  } = {}) {\n    if (!this.isValid) return this;\n    return Interval.fromDateTimes(start || this.s, end || this.e);\n  }\n\n  /**\n   * Split this Interval at each of the specified DateTimes\n   * @param {...DateTime} dateTimes - the unit of time to count.\n   * @return {Array}\n   */\n  splitAt(...dateTimes) {\n    if (!this.isValid) return [];\n    const sorted = dateTimes.map(friendlyDateTime).filter(d => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()),\n      results = [];\n    let {\n        s\n      } = this,\n      i = 0;\n    while (s < this.e) {\n      const added = sorted[i] || this.e,\n        next = +added > +this.e ? this.e : added;\n      results.push(Interval.fromDateTimes(s, next));\n      s = next;\n      i += 1;\n    }\n    return results;\n  }\n\n  /**\n   * Split this Interval into smaller Intervals, each of the specified length.\n   * Left over time is grouped into a smaller interval\n   * @param {Duration|Object|number} duration - The length of each resulting interval.\n   * @return {Array}\n   */\n  splitBy(duration) {\n    const dur = Duration.fromDurationLike(duration);\n    if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n      return [];\n    }\n    let {\n        s\n      } = this,\n      idx = 1,\n      next;\n    const results = [];\n    while (s < this.e) {\n      const added = this.start.plus(dur.mapUnits(x => x * idx));\n      next = +added > +this.e ? this.e : added;\n      results.push(Interval.fromDateTimes(s, next));\n      s = next;\n      idx += 1;\n    }\n    return results;\n  }\n\n  /**\n   * Split this Interval into the specified number of smaller intervals.\n   * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n   * @return {Array}\n   */\n  divideEqually(numberOfParts) {\n    if (!this.isValid) return [];\n    return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n  }\n\n  /**\n   * Return whether this Interval overlaps with the specified Interval\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  overlaps(other) {\n    return this.e > other.s && this.s < other.e;\n  }\n\n  /**\n   * Return whether this Interval's end is adjacent to the specified Interval's start.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  abutsStart(other) {\n    if (!this.isValid) return false;\n    return +this.e === +other.s;\n  }\n\n  /**\n   * Return whether this Interval's start is adjacent to the specified Interval's end.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  abutsEnd(other) {\n    if (!this.isValid) return false;\n    return +other.e === +this.s;\n  }\n\n  /**\n   * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  engulfs(other) {\n    if (!this.isValid) return false;\n    return this.s <= other.s && this.e >= other.e;\n  }\n\n  /**\n   * Return whether this Interval has the same start and end as the specified Interval.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  equals(other) {\n    if (!this.isValid || !other.isValid) {\n      return false;\n    }\n    return this.s.equals(other.s) && this.e.equals(other.e);\n  }\n\n  /**\n   * Return an Interval representing the intersection of this Interval and the specified Interval.\n   * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n   * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n   * @param {Interval} other\n   * @return {Interval}\n   */\n  intersection(other) {\n    if (!this.isValid) return this;\n    const s = this.s > other.s ? this.s : other.s,\n      e = this.e < other.e ? this.e : other.e;\n    if (s >= e) {\n      return null;\n    } else {\n      return Interval.fromDateTimes(s, e);\n    }\n  }\n\n  /**\n   * Return an Interval representing the union of this Interval and the specified Interval.\n   * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n   * @param {Interval} other\n   * @return {Interval}\n   */\n  union(other) {\n    if (!this.isValid) return this;\n    const s = this.s < other.s ? this.s : other.s,\n      e = this.e > other.e ? this.e : other.e;\n    return Interval.fromDateTimes(s, e);\n  }\n\n  /**\n   * Merge an array of Intervals into an equivalent minimal set of Intervals.\n   * Combines overlapping and adjacent Intervals.\n   * The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval\n   * and ending with the latest.\n   *\n   * @param {Array} intervals\n   * @return {Array}\n   */\n  static merge(intervals) {\n    const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(([sofar, current], item) => {\n      if (!current) {\n        return [sofar, item];\n      } else if (current.overlaps(item) || current.abutsStart(item)) {\n        return [sofar, current.union(item)];\n      } else {\n        return [sofar.concat([current]), item];\n      }\n    }, [[], null]);\n    if (final) {\n      found.push(final);\n    }\n    return found;\n  }\n\n  /**\n   * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n   * @param {Array} intervals\n   * @return {Array}\n   */\n  static xor(intervals) {\n    let start = null,\n      currentCount = 0;\n    const results = [],\n      ends = intervals.map(i => [{\n        time: i.s,\n        type: \"s\"\n      }, {\n        time: i.e,\n        type: \"e\"\n      }]),\n      flattened = Array.prototype.concat(...ends),\n      arr = flattened.sort((a, b) => a.time - b.time);\n    for (const i of arr) {\n      currentCount += i.type === \"s\" ? 1 : -1;\n      if (currentCount === 1) {\n        start = i.time;\n      } else {\n        if (start && +start !== +i.time) {\n          results.push(Interval.fromDateTimes(start, i.time));\n        }\n        start = null;\n      }\n    }\n    return Interval.merge(results);\n  }\n\n  /**\n   * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n   * @param {...Interval} intervals\n   * @return {Array}\n   */\n  difference(...intervals) {\n    return Interval.xor([this].concat(intervals)).map(i => this.intersection(i)).filter(i => i && !i.isEmpty());\n  }\n\n  /**\n   * Returns a string representation of this Interval appropriate for debugging.\n   * @return {string}\n   */\n  toString() {\n    if (!this.isValid) return INVALID$1;\n    return `[${this.s.toISO()} – ${this.e.toISO()})`;\n  }\n\n  /**\n   * Returns a string representation of this Interval appropriate for the REPL.\n   * @return {string}\n   */\n  [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n    if (this.isValid) {\n      return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;\n    } else {\n      return `Interval { Invalid, reason: ${this.invalidReason} }`;\n    }\n  }\n\n  /**\n   * Returns a localized string representing this Interval. Accepts the same options as the\n   * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n   * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n   * is browser-specific, but in general it will return an appropriate representation of the\n   * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n   * specified.\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n   * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n   * Intl.DateTimeFormat constructor options.\n   * @param {Object} opts - Options to override the configuration of the start DateTime.\n   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n   * @return {string}\n   */\n  toLocaleString(formatOpts = DATE_SHORT, opts = {}) {\n    return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this Interval.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @param {Object} opts - The same options as {@link DateTime#toISO}\n   * @return {string}\n   */\n  toISO(opts) {\n    if (!this.isValid) return INVALID$1;\n    return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of date of this Interval.\n   * The time components are ignored.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @return {string}\n   */\n  toISODate() {\n    if (!this.isValid) return INVALID$1;\n    return `${this.s.toISODate()}/${this.e.toISODate()}`;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of time of this Interval.\n   * The date components are ignored.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @param {Object} opts - The same options as {@link DateTime#toISO}\n   * @return {string}\n   */\n  toISOTime(opts) {\n    if (!this.isValid) return INVALID$1;\n    return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n  }\n\n  /**\n   * Returns a string representation of this Interval formatted according to the specified format\n   * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n   * formatting tool.\n   * @param {string} dateFormat - The format string. This string formats the start and end time.\n   * See {@link DateTime#toFormat} for details.\n   * @param {Object} opts - Options.\n   * @param {string} [opts.separator =  ' – '] - A separator to place between the start and end\n   * representations.\n   * @return {string}\n   */\n  toFormat(dateFormat, {\n    separator = \" – \"\n  } = {}) {\n    if (!this.isValid) return INVALID$1;\n    return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n  }\n\n  /**\n   * Return a Duration representing the time spanned by this interval.\n   * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n   * @param {Object} opts - options that affect the creation of the Duration\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n   * @return {Duration}\n   */\n  toDuration(unit, opts) {\n    if (!this.isValid) {\n      return Duration.invalid(this.invalidReason);\n    }\n    return this.e.diff(this.s, unit, opts);\n  }\n\n  /**\n   * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n   * @param {function} mapFn\n   * @return {Interval}\n   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n   */\n  mapEndpoints(mapFn) {\n    return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n  }\n}\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nclass Info {\n  /**\n   * Return whether the specified zone contains a DST.\n   * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n   * @return {boolean}\n   */\n  static hasDST(zone = Settings.defaultZone) {\n    const proto = DateTime.now().setZone(zone).set({\n      month: 12\n    });\n    return !zone.isUniversal && proto.offset !== proto.set({\n      month: 6\n    }).offset;\n  }\n\n  /**\n   * Return whether the specified zone is a valid IANA specifier.\n   * @param {string} zone - Zone to check\n   * @return {boolean}\n   */\n  static isValidIANAZone(zone) {\n    return IANAZone.isValidZone(zone);\n  }\n\n  /**\n   * Converts the input into a {@link Zone} instance.\n   *\n   * * If `input` is already a Zone instance, it is returned unchanged.\n   * * If `input` is a string containing a valid time zone name, a Zone instance\n   *   with that name is returned.\n   * * If `input` is a string that doesn't refer to a known time zone, a Zone\n   *   instance with {@link Zone#isValid} == false is returned.\n   * * If `input is a number, a Zone instance with the specified fixed offset\n   *   in minutes is returned.\n   * * If `input` is `null` or `undefined`, the default zone is returned.\n   * @param {string|Zone|number} [input] - the value to be converted\n   * @return {Zone}\n   */\n  static normalizeZone(input) {\n    return normalizeZone(input, Settings.defaultZone);\n  }\n\n  /**\n   * Get the weekday on which the week starts according to the given locale.\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n   */\n  static getStartOfWeek({\n    locale = null,\n    locObj = null\n  } = {}) {\n    return (locObj || Locale.create(locale)).getStartOfWeek();\n  }\n\n  /**\n   * Get the minimum number of days necessary in a week before it is considered part of the next year according\n   * to the given locale.\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @returns {number}\n   */\n  static getMinimumDaysInFirstWeek({\n    locale = null,\n    locObj = null\n  } = {}) {\n    return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n  }\n\n  /**\n   * Get the weekdays, which are considered the weekend according to the given locale\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n   */\n  static getWeekendWeekdays({\n    locale = null,\n    locObj = null\n  } = {}) {\n    // copy the array, because we cache it internally\n    return (locObj || Locale.create(locale)).getWeekendDays().slice();\n  }\n\n  /**\n   * Return an array of standalone month names.\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n   * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @param {string} [opts.outputCalendar='gregory'] - the calendar\n   * @example Info.months()[0] //=> 'January'\n   * @example Info.months('short')[0] //=> 'Jan'\n   * @example Info.months('numeric')[0] //=> '1'\n   * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n   * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n   * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n   * @return {Array}\n   */\n  static months(length = \"long\", {\n    locale = null,\n    numberingSystem = null,\n    locObj = null,\n    outputCalendar = \"gregory\"\n  } = {}) {\n    return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n  }\n\n  /**\n   * Return an array of format month names.\n   * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n   * changes the string.\n   * See {@link Info#months}\n   * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @param {string} [opts.outputCalendar='gregory'] - the calendar\n   * @return {Array}\n   */\n  static monthsFormat(length = \"long\", {\n    locale = null,\n    numberingSystem = null,\n    locObj = null,\n    outputCalendar = \"gregory\"\n  } = {}) {\n    return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n  }\n\n  /**\n   * Return an array of standalone week names.\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n   * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @example Info.weekdays()[0] //=> 'Monday'\n   * @example Info.weekdays('short')[0] //=> 'Mon'\n   * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n   * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n   * @return {Array}\n   */\n  static weekdays(length = \"long\", {\n    locale = null,\n    numberingSystem = null,\n    locObj = null\n  } = {}) {\n    return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n  }\n\n  /**\n   * Return an array of format week names.\n   * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n   * changes the string.\n   * See {@link Info#weekdays}\n   * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n   * @param {Object} opts - options\n   * @param {string} [opts.locale=null] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @return {Array}\n   */\n  static weekdaysFormat(length = \"long\", {\n    locale = null,\n    numberingSystem = null,\n    locObj = null\n  } = {}) {\n    return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n  }\n\n  /**\n   * Return an array of meridiems.\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n   * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n   * @return {Array}\n   */\n  static meridiems({\n    locale = null\n  } = {}) {\n    return Locale.create(locale).meridiems();\n  }\n\n  /**\n   * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n   * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @example Info.eras() //=> [ 'BC', 'AD' ]\n   * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n   * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n   * @return {Array}\n   */\n  static eras(length = \"short\", {\n    locale = null\n  } = {}) {\n    return Locale.create(locale, null, \"gregory\").eras(length);\n  }\n\n  /**\n   * Return the set of available features in this environment.\n   * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n   * Keys:\n   * * `relative`: whether this environment supports relative time formatting\n   * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n   * @example Info.features() //=> { relative: false, localeWeek: true }\n   * @return {Object}\n   */\n  static features() {\n    return {\n      relative: hasRelative(),\n      localeWeek: hasLocaleWeekInfo()\n    };\n  }\n}\n\nfunction dayDiff(earlier, later) {\n  const utcDayStart = dt => dt.toUTC(0, {\n      keepLocalTime: true\n    }).startOf(\"day\").valueOf(),\n    ms = utcDayStart(later) - utcDayStart(earlier);\n  return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\nfunction highOrderDiffs(cursor, later, units) {\n  const differs = [[\"years\", (a, b) => b.year - a.year], [\"quarters\", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4], [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12], [\"weeks\", (a, b) => {\n    const days = dayDiff(a, b);\n    return (days - days % 7) / 7;\n  }], [\"days\", dayDiff]];\n  const results = {};\n  const earlier = cursor;\n  let lowestOrder, highWater;\n\n  /* This loop tries to diff using larger units first.\n     If we overshoot, we backtrack and try the next smaller unit.\n     \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n     as we use smaller and smaller units.\n     highWater keeps track of where we would be if we added one more of the smallest unit,\n     this is used later to potentially convert any difference smaller than the smallest higher order unit\n     into a fraction of that smallest higher order unit\n  */\n  for (const [unit, differ] of differs) {\n    if (units.indexOf(unit) >= 0) {\n      lowestOrder = unit;\n      results[unit] = differ(cursor, later);\n      highWater = earlier.plus(results);\n      if (highWater > later) {\n        // we overshot the end point, backtrack cursor by 1\n        results[unit]--;\n        cursor = earlier.plus(results);\n\n        // if we are still overshooting now, we need to backtrack again\n        // this happens in certain situations when diffing times in different zones,\n        // because this calculation ignores time zones\n        if (cursor > later) {\n          // keep the \"overshot by 1\" around as highWater\n          highWater = cursor;\n          // backtrack cursor by 1\n          results[unit]--;\n          cursor = earlier.plus(results);\n        }\n      } else {\n        cursor = highWater;\n      }\n    }\n  }\n  return [cursor, results, highWater, lowestOrder];\n}\nfunction diff (earlier, later, units, opts) {\n  let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n  const remainingMillis = later - cursor;\n  const lowerOrderUnits = units.filter(u => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0);\n  if (lowerOrderUnits.length === 0) {\n    if (highWater < later) {\n      highWater = cursor.plus({\n        [lowestOrder]: 1\n      });\n    }\n    if (highWater !== cursor) {\n      results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n    }\n  }\n  const duration = Duration.fromObject(results, opts);\n  if (lowerOrderUnits.length > 0) {\n    return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration);\n  } else {\n    return duration;\n  }\n}\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\nfunction intUnit(regex, post = i => i) {\n  return {\n    regex,\n    deser: ([s]) => post(parseDigits(s))\n  };\n}\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\nfunction fixListRegex(s) {\n  // make dots optional and also make them literal\n  // make space and non breakable space characters interchangeable\n  return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\nfunction stripInsensitivities(s) {\n  return s.replace(/\\./g, \"\") // ignore dots that were made optional\n  .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n  .toLowerCase();\n}\nfunction oneOf(strings, startIndex) {\n  if (strings === null) {\n    return null;\n  } else {\n    return {\n      regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n      deser: ([s]) => strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex\n    };\n  }\n}\nfunction offset(regex, groups) {\n  return {\n    regex,\n    deser: ([, h, m]) => signedOffset(h, m),\n    groups\n  };\n}\nfunction simple(regex) {\n  return {\n    regex,\n    deser: ([s]) => s\n  };\n}\nfunction escapeToken(value) {\n  return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n  const one = digitRegex(loc),\n    two = digitRegex(loc, \"{2}\"),\n    three = digitRegex(loc, \"{3}\"),\n    four = digitRegex(loc, \"{4}\"),\n    six = digitRegex(loc, \"{6}\"),\n    oneOrTwo = digitRegex(loc, \"{1,2}\"),\n    oneToThree = digitRegex(loc, \"{1,3}\"),\n    oneToSix = digitRegex(loc, \"{1,6}\"),\n    oneToNine = digitRegex(loc, \"{1,9}\"),\n    twoToFour = digitRegex(loc, \"{2,4}\"),\n    fourToSix = digitRegex(loc, \"{4,6}\"),\n    literal = t => ({\n      regex: RegExp(escapeToken(t.val)),\n      deser: ([s]) => s,\n      literal: true\n    }),\n    unitate = t => {\n      if (token.literal) {\n        return literal(t);\n      }\n      switch (t.val) {\n        // era\n        case \"G\":\n          return oneOf(loc.eras(\"short\"), 0);\n        case \"GG\":\n          return oneOf(loc.eras(\"long\"), 0);\n        // years\n        case \"y\":\n          return intUnit(oneToSix);\n        case \"yy\":\n          return intUnit(twoToFour, untruncateYear);\n        case \"yyyy\":\n          return intUnit(four);\n        case \"yyyyy\":\n          return intUnit(fourToSix);\n        case \"yyyyyy\":\n          return intUnit(six);\n        // months\n        case \"M\":\n          return intUnit(oneOrTwo);\n        case \"MM\":\n          return intUnit(two);\n        case \"MMM\":\n          return oneOf(loc.months(\"short\", true), 1);\n        case \"MMMM\":\n          return oneOf(loc.months(\"long\", true), 1);\n        case \"L\":\n          return intUnit(oneOrTwo);\n        case \"LL\":\n          return intUnit(two);\n        case \"LLL\":\n          return oneOf(loc.months(\"short\", false), 1);\n        case \"LLLL\":\n          return oneOf(loc.months(\"long\", false), 1);\n        // dates\n        case \"d\":\n          return intUnit(oneOrTwo);\n        case \"dd\":\n          return intUnit(two);\n        // ordinals\n        case \"o\":\n          return intUnit(oneToThree);\n        case \"ooo\":\n          return intUnit(three);\n        // time\n        case \"HH\":\n          return intUnit(two);\n        case \"H\":\n          return intUnit(oneOrTwo);\n        case \"hh\":\n          return intUnit(two);\n        case \"h\":\n          return intUnit(oneOrTwo);\n        case \"mm\":\n          return intUnit(two);\n        case \"m\":\n          return intUnit(oneOrTwo);\n        case \"q\":\n          return intUnit(oneOrTwo);\n        case \"qq\":\n          return intUnit(two);\n        case \"s\":\n          return intUnit(oneOrTwo);\n        case \"ss\":\n          return intUnit(two);\n        case \"S\":\n          return intUnit(oneToThree);\n        case \"SSS\":\n          return intUnit(three);\n        case \"u\":\n          return simple(oneToNine);\n        case \"uu\":\n          return simple(oneOrTwo);\n        case \"uuu\":\n          return intUnit(one);\n        // meridiem\n        case \"a\":\n          return oneOf(loc.meridiems(), 0);\n        // weekYear (k)\n        case \"kkkk\":\n          return intUnit(four);\n        case \"kk\":\n          return intUnit(twoToFour, untruncateYear);\n        // weekNumber (W)\n        case \"W\":\n          return intUnit(oneOrTwo);\n        case \"WW\":\n          return intUnit(two);\n        // weekdays\n        case \"E\":\n        case \"c\":\n          return intUnit(one);\n        case \"EEE\":\n          return oneOf(loc.weekdays(\"short\", false), 1);\n        case \"EEEE\":\n          return oneOf(loc.weekdays(\"long\", false), 1);\n        case \"ccc\":\n          return oneOf(loc.weekdays(\"short\", true), 1);\n        case \"cccc\":\n          return oneOf(loc.weekdays(\"long\", true), 1);\n        // offset/zone\n        case \"Z\":\n        case \"ZZ\":\n          return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n        case \"ZZZ\":\n          return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n        // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n        // because we don't have any way to figure out what they are\n        case \"z\":\n          return simple(/[a-z_+-/]{1,256}?/i);\n        // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n        // in this case we accept any non-newline white-space\n        case \" \":\n          return simple(/[^\\S\\n\\r]/);\n        default:\n          return literal(t);\n      }\n    };\n  const unit = unitate(token) || {\n    invalidReason: MISSING_FTP\n  };\n  unit.token = token;\n  return unit;\n}\nconst partTypeStyleToTokenVal = {\n  year: {\n    \"2-digit\": \"yy\",\n    numeric: \"yyyyy\"\n  },\n  month: {\n    numeric: \"M\",\n    \"2-digit\": \"MM\",\n    short: \"MMM\",\n    long: \"MMMM\"\n  },\n  day: {\n    numeric: \"d\",\n    \"2-digit\": \"dd\"\n  },\n  weekday: {\n    short: \"EEE\",\n    long: \"EEEE\"\n  },\n  dayperiod: \"a\",\n  dayPeriod: \"a\",\n  hour12: {\n    numeric: \"h\",\n    \"2-digit\": \"hh\"\n  },\n  hour24: {\n    numeric: \"H\",\n    \"2-digit\": \"HH\"\n  },\n  minute: {\n    numeric: \"m\",\n    \"2-digit\": \"mm\"\n  },\n  second: {\n    numeric: \"s\",\n    \"2-digit\": \"ss\"\n  },\n  timeZoneName: {\n    long: \"ZZZZZ\",\n    short: \"ZZZ\"\n  }\n};\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n  const {\n    type,\n    value\n  } = part;\n  if (type === \"literal\") {\n    const isSpace = /^\\s+$/.test(value);\n    return {\n      literal: !isSpace,\n      val: isSpace ? \" \" : value\n    };\n  }\n  const style = formatOpts[type];\n\n  // The user might have explicitly specified hour12 or hourCycle\n  // if so, respect their decision\n  // if not, refer back to the resolvedOpts, which are based on the locale\n  let actualType = type;\n  if (type === \"hour\") {\n    if (formatOpts.hour12 != null) {\n      actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n    } else if (formatOpts.hourCycle != null) {\n      if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n        actualType = \"hour12\";\n      } else {\n        actualType = \"hour24\";\n      }\n    } else {\n      // tokens only differentiate between 24 hours or not,\n      // so we do not need to check hourCycle here, which is less supported anyways\n      actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n    }\n  }\n  let val = partTypeStyleToTokenVal[actualType];\n  if (typeof val === \"object\") {\n    val = val[style];\n  }\n  if (val) {\n    return {\n      literal: false,\n      val\n    };\n  }\n  return undefined;\n}\nfunction buildRegex(units) {\n  const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n  return [`^${re}$`, units];\n}\nfunction match(input, regex, handlers) {\n  const matches = input.match(regex);\n  if (matches) {\n    const all = {};\n    let matchIndex = 1;\n    for (const i in handlers) {\n      if (hasOwnProperty(handlers, i)) {\n        const h = handlers[i],\n          groups = h.groups ? h.groups + 1 : 1;\n        if (!h.literal && h.token) {\n          all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n        }\n        matchIndex += groups;\n      }\n    }\n    return [matches, all];\n  } else {\n    return [matches, {}];\n  }\n}\nfunction dateTimeFromMatches(matches) {\n  const toField = token => {\n    switch (token) {\n      case \"S\":\n        return \"millisecond\";\n      case \"s\":\n        return \"second\";\n      case \"m\":\n        return \"minute\";\n      case \"h\":\n      case \"H\":\n        return \"hour\";\n      case \"d\":\n        return \"day\";\n      case \"o\":\n        return \"ordinal\";\n      case \"L\":\n      case \"M\":\n        return \"month\";\n      case \"y\":\n        return \"year\";\n      case \"E\":\n      case \"c\":\n        return \"weekday\";\n      case \"W\":\n        return \"weekNumber\";\n      case \"k\":\n        return \"weekYear\";\n      case \"q\":\n        return \"quarter\";\n      default:\n        return null;\n    }\n  };\n  let zone = null;\n  let specificOffset;\n  if (!isUndefined(matches.z)) {\n    zone = IANAZone.create(matches.z);\n  }\n  if (!isUndefined(matches.Z)) {\n    if (!zone) {\n      zone = new FixedOffsetZone(matches.Z);\n    }\n    specificOffset = matches.Z;\n  }\n  if (!isUndefined(matches.q)) {\n    matches.M = (matches.q - 1) * 3 + 1;\n  }\n  if (!isUndefined(matches.h)) {\n    if (matches.h < 12 && matches.a === 1) {\n      matches.h += 12;\n    } else if (matches.h === 12 && matches.a === 0) {\n      matches.h = 0;\n    }\n  }\n  if (matches.G === 0 && matches.y) {\n    matches.y = -matches.y;\n  }\n  if (!isUndefined(matches.u)) {\n    matches.S = parseMillis(matches.u);\n  }\n  const vals = Object.keys(matches).reduce((r, k) => {\n    const f = toField(k);\n    if (f) {\n      r[f] = matches[k];\n    }\n    return r;\n  }, {});\n  return [vals, zone, specificOffset];\n}\nlet dummyDateTimeCache = null;\nfunction getDummyDateTime() {\n  if (!dummyDateTimeCache) {\n    dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n  }\n  return dummyDateTimeCache;\n}\nfunction maybeExpandMacroToken(token, locale) {\n  if (token.literal) {\n    return token;\n  }\n  const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n  const tokens = formatOptsToTokens(formatOpts, locale);\n  if (tokens == null || tokens.includes(undefined)) {\n    return token;\n  }\n  return tokens;\n}\nfunction expandMacroTokens(tokens, locale) {\n  return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nclass TokenParser {\n  constructor(locale, format) {\n    this.locale = locale;\n    this.format = format;\n    this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);\n    this.units = this.tokens.map(t => unitForToken(t, locale));\n    this.disqualifyingUnit = this.units.find(t => t.invalidReason);\n    if (!this.disqualifyingUnit) {\n      const [regexString, handlers] = buildRegex(this.units);\n      this.regex = RegExp(regexString, \"i\");\n      this.handlers = handlers;\n    }\n  }\n  explainFromTokens(input) {\n    if (!this.isValid) {\n      return {\n        input,\n        tokens: this.tokens,\n        invalidReason: this.invalidReason\n      };\n    } else {\n      const [rawMatches, matches] = match(input, this.regex, this.handlers),\n        [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, undefined];\n      if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n        throw new ConflictingSpecificationError(\"Can't include meridiem when specifying 24-hour format\");\n      }\n      return {\n        input,\n        tokens: this.tokens,\n        regex: this.regex,\n        rawMatches,\n        matches,\n        result,\n        zone,\n        specificOffset\n      };\n    }\n  }\n  get isValid() {\n    return !this.disqualifyingUnit;\n  }\n  get invalidReason() {\n    return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;\n  }\n}\nfunction explainFromTokens(locale, input, format) {\n  const parser = new TokenParser(locale, format);\n  return parser.explainFromTokens(input);\n}\nfunction parseFromTokens(locale, input, format) {\n  const {\n    result,\n    zone,\n    specificOffset,\n    invalidReason\n  } = explainFromTokens(locale, input, format);\n  return [result, zone, specificOffset, invalidReason];\n}\nfunction formatOptsToTokens(formatOpts, locale) {\n  if (!formatOpts) {\n    return null;\n  }\n  const formatter = Formatter.create(locale, formatOpts);\n  const df = formatter.dtFormatter(getDummyDateTime());\n  const parts = df.formatToParts();\n  const resolvedOpts = df.resolvedOptions();\n  return parts.map(p => tokenForPart(p, formatOpts, resolvedOpts));\n}\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\nfunction unsupportedZone(zone) {\n  return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n  if (dt.weekData === null) {\n    dt.weekData = gregorianToWeek(dt.c);\n  }\n  return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n  if (dt.localWeekData === null) {\n    dt.localWeekData = gregorianToWeek(dt.c, dt.loc.getMinDaysInFirstWeek(), dt.loc.getStartOfWeek());\n  }\n  return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n  const current = {\n    ts: inst.ts,\n    zone: inst.zone,\n    c: inst.c,\n    o: inst.o,\n    loc: inst.loc,\n    invalid: inst.invalid\n  };\n  return new DateTime({\n    ...current,\n    ...alts,\n    old: current\n  });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n  // Our UTC time is just a guess because our offset is just a guess\n  let utcGuess = localTS - o * 60 * 1000;\n\n  // Test whether the zone matches the offset for this ts\n  const o2 = tz.offset(utcGuess);\n\n  // If so, offset didn't change and we're done\n  if (o === o2) {\n    return [utcGuess, o];\n  }\n\n  // If not, change the ts by the difference in the offset\n  utcGuess -= (o2 - o) * 60 * 1000;\n\n  // If that gives us the local time we want, we're done\n  const o3 = tz.offset(utcGuess);\n  if (o2 === o3) {\n    return [utcGuess, o2];\n  }\n\n  // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n  return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n  ts += offset * 60 * 1000;\n  const d = new Date(ts);\n  return {\n    year: d.getUTCFullYear(),\n    month: d.getUTCMonth() + 1,\n    day: d.getUTCDate(),\n    hour: d.getUTCHours(),\n    minute: d.getUTCMinutes(),\n    second: d.getUTCSeconds(),\n    millisecond: d.getUTCMilliseconds()\n  };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n  return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n  const oPre = inst.o,\n    year = inst.c.year + Math.trunc(dur.years),\n    month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n    c = {\n      ...inst.c,\n      year,\n      month,\n      day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7\n    },\n    millisToAdd = Duration.fromObject({\n      years: dur.years - Math.trunc(dur.years),\n      quarters: dur.quarters - Math.trunc(dur.quarters),\n      months: dur.months - Math.trunc(dur.months),\n      weeks: dur.weeks - Math.trunc(dur.weeks),\n      days: dur.days - Math.trunc(dur.days),\n      hours: dur.hours,\n      minutes: dur.minutes,\n      seconds: dur.seconds,\n      milliseconds: dur.milliseconds\n    }).as(\"milliseconds\"),\n    localTS = objToLocalTS(c);\n  let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n  if (millisToAdd !== 0) {\n    ts += millisToAdd;\n    // that could have changed the offset by going over a DST, but we want to keep the ts the same\n    o = inst.zone.offset(ts);\n  }\n  return {\n    ts,\n    o\n  };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n  const {\n    setZone,\n    zone\n  } = opts;\n  if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {\n    const interpretationZone = parsedZone || zone,\n      inst = DateTime.fromObject(parsed, {\n        ...opts,\n        zone: interpretationZone,\n        specificOffset\n      });\n    return setZone ? inst : inst.setZone(zone);\n  } else {\n    return DateTime.invalid(new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`));\n  }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n  return dt.isValid ? Formatter.create(Locale.create(\"en-US\"), {\n    allowZ,\n    forceSimple: true\n  }).formatDateTimeFromString(dt, format) : null;\n}\nfunction toISODate(o, extended, precision) {\n  const longFormat = o.c.year > 9999 || o.c.year < 0;\n  let c = \"\";\n  if (longFormat && o.c.year >= 0) c += \"+\";\n  c += padStart(o.c.year, longFormat ? 6 : 4);\n  if (precision === \"year\") return c;\n  if (extended) {\n    c += \"-\";\n    c += padStart(o.c.month);\n    if (precision === \"month\") return c;\n    c += \"-\";\n  } else {\n    c += padStart(o.c.month);\n    if (precision === \"month\") return c;\n  }\n  c += padStart(o.c.day);\n  return c;\n}\nfunction toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision) {\n  let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0,\n    c = \"\";\n  switch (precision) {\n    case \"day\":\n    case \"month\":\n    case \"year\":\n      break;\n    default:\n      c += padStart(o.c.hour);\n      if (precision === \"hour\") break;\n      if (extended) {\n        c += \":\";\n        c += padStart(o.c.minute);\n        if (precision === \"minute\") break;\n        if (showSeconds) {\n          c += \":\";\n          c += padStart(o.c.second);\n        }\n      } else {\n        c += padStart(o.c.minute);\n        if (precision === \"minute\") break;\n        if (showSeconds) {\n          c += padStart(o.c.second);\n        }\n      }\n      if (precision === \"second\") break;\n      if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) {\n        c += \".\";\n        c += padStart(o.c.millisecond, 3);\n      }\n  }\n  if (includeOffset) {\n    if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n      c += \"Z\";\n    } else if (o.o < 0) {\n      c += \"-\";\n      c += padStart(Math.trunc(-o.o / 60));\n      c += \":\";\n      c += padStart(Math.trunc(-o.o % 60));\n    } else {\n      c += \"+\";\n      c += padStart(Math.trunc(o.o / 60));\n      c += \":\";\n      c += padStart(Math.trunc(o.o % 60));\n    }\n  }\n  if (extendedZone) {\n    c += \"[\" + o.zone.ianaName + \"]\";\n  }\n  return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n    month: 1,\n    day: 1,\n    hour: 0,\n    minute: 0,\n    second: 0,\n    millisecond: 0\n  },\n  defaultWeekUnitValues = {\n    weekNumber: 1,\n    weekday: 1,\n    hour: 0,\n    minute: 0,\n    second: 0,\n    millisecond: 0\n  },\n  defaultOrdinalUnitValues = {\n    ordinal: 1,\n    hour: 0,\n    minute: 0,\n    second: 0,\n    millisecond: 0\n  };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n  orderedWeekUnits = [\"weekYear\", \"weekNumber\", \"weekday\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n  orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n  const normalized = {\n    year: \"year\",\n    years: \"year\",\n    month: \"month\",\n    months: \"month\",\n    day: \"day\",\n    days: \"day\",\n    hour: \"hour\",\n    hours: \"hour\",\n    minute: \"minute\",\n    minutes: \"minute\",\n    quarter: \"quarter\",\n    quarters: \"quarter\",\n    second: \"second\",\n    seconds: \"second\",\n    millisecond: \"millisecond\",\n    milliseconds: \"millisecond\",\n    weekday: \"weekday\",\n    weekdays: \"weekday\",\n    weeknumber: \"weekNumber\",\n    weeksnumber: \"weekNumber\",\n    weeknumbers: \"weekNumber\",\n    weekyear: \"weekYear\",\n    weekyears: \"weekYear\",\n    ordinal: \"ordinal\"\n  }[unit.toLowerCase()];\n  if (!normalized) throw new InvalidUnitError(unit);\n  return normalized;\n}\nfunction normalizeUnitWithLocalWeeks(unit) {\n  switch (unit.toLowerCase()) {\n    case \"localweekday\":\n    case \"localweekdays\":\n      return \"localWeekday\";\n    case \"localweeknumber\":\n    case \"localweeknumbers\":\n      return \"localWeekNumber\";\n    case \"localweekyear\":\n    case \"localweekyears\":\n      return \"localWeekYear\";\n    default:\n      return normalizeUnit(unit);\n  }\n}\n\n// cache offsets for zones based on the current timestamp when this function is\n// first called. When we are handling a datetime from components like (year,\n// month, day, hour) in a time zone, we need a guess about what the timezone\n// offset is so that we can convert into a UTC timestamp. One way is to find the\n// offset of now in the zone. The actual date may have a different offset (for\n// example, if we handle a date in June while we're in December in a zone that\n// observes DST), but we can check and adjust that.\n//\n// When handling many dates, calculating the offset for now every time is\n// expensive. It's just a guess, so we can cache the offset to use even if we\n// are right on a time change boundary (we'll just correct in the other\n// direction). Using a timestamp from first read is a slight optimization for\n// handling dates close to the current date, since those dates will usually be\n// in the same offset (we could set the timestamp statically, instead). We use a\n// single timestamp for all zones to make things a bit more predictable.\n//\n// This is safe for quickDT (used by local() and utc()) because we don't fill in\n// higher-order units from tsNow (as we do in fromObject, this requires that\n// offset is calculated from tsNow).\n/**\n * @param {Zone} zone\n * @return {number}\n */\nfunction guessOffsetForZone(zone) {\n  if (zoneOffsetTs === undefined) {\n    zoneOffsetTs = Settings.now();\n  }\n\n  // Do not cache anything but IANA zones, because it is not safe to do so.\n  // Guessing an offset which is not present in the zone can cause wrong results from fixOffset\n  if (zone.type !== \"iana\") {\n    return zone.offset(zoneOffsetTs);\n  }\n  const zoneName = zone.name;\n  let offsetGuess = zoneOffsetGuessCache.get(zoneName);\n  if (offsetGuess === undefined) {\n    offsetGuess = zone.offset(zoneOffsetTs);\n    zoneOffsetGuessCache.set(zoneName, offsetGuess);\n  }\n  return offsetGuess;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n  const zone = normalizeZone(opts.zone, Settings.defaultZone);\n  if (!zone.isValid) {\n    return DateTime.invalid(unsupportedZone(zone));\n  }\n  const loc = Locale.fromObject(opts);\n  let ts, o;\n\n  // assume we have the higher-order units\n  if (!isUndefined(obj.year)) {\n    for (const u of orderedUnits) {\n      if (isUndefined(obj[u])) {\n        obj[u] = defaultUnitValues[u];\n      }\n    }\n    const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n    if (invalid) {\n      return DateTime.invalid(invalid);\n    }\n    const offsetProvis = guessOffsetForZone(zone);\n    [ts, o] = objToTS(obj, offsetProvis, zone);\n  } else {\n    ts = Settings.now();\n  }\n  return new DateTime({\n    ts,\n    zone,\n    loc,\n    o\n  });\n}\nfunction diffRelative(start, end, opts) {\n  const round = isUndefined(opts.round) ? true : opts.round,\n    rounding = isUndefined(opts.rounding) ? \"trunc\" : opts.rounding,\n    format = (c, unit) => {\n      c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? \"round\" : rounding);\n      const formatter = end.loc.clone(opts).relFormatter(opts);\n      return formatter.format(c, unit);\n    },\n    differ = unit => {\n      if (opts.calendary) {\n        if (!end.hasSame(start, unit)) {\n          return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n        } else return 0;\n      } else {\n        return end.diff(start, unit).get(unit);\n      }\n    };\n  if (opts.unit) {\n    return format(differ(opts.unit), opts.unit);\n  }\n  for (const unit of opts.units) {\n    const count = differ(unit);\n    if (Math.abs(count) >= 1) {\n      return format(count, unit);\n    }\n  }\n  return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\nfunction lastOpts(argList) {\n  let opts = {},\n    args;\n  if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n    opts = argList[argList.length - 1];\n    args = Array.from(argList).slice(0, argList.length - 1);\n  } else {\n    args = Array.from(argList);\n  }\n  return [opts, args];\n}\n\n/**\n * Timestamp to use for cached zone offset guesses (exposed for test)\n */\nlet zoneOffsetTs;\n/**\n * Cache for zone offset guesses (exposed for test).\n *\n * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of\n * zone.offset().\n */\nconst zoneOffsetGuessCache = new Map();\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nclass DateTime {\n  /**\n   * @access private\n   */\n  constructor(config) {\n    const zone = config.zone || Settings.defaultZone;\n    let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) || (!zone.isValid ? unsupportedZone(zone) : null);\n    /**\n     * @access private\n     */\n    this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n    let c = null,\n      o = null;\n    if (!invalid) {\n      const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n      if (unchanged) {\n        [c, o] = [config.old.c, config.old.o];\n      } else {\n        // If an offset has been passed and we have not been called from\n        // clone(), we can trust it and avoid the offset calculation.\n        const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);\n        c = tsToObj(this.ts, ot);\n        invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n        c = invalid ? null : c;\n        o = invalid ? null : ot;\n      }\n    }\n\n    /**\n     * @access private\n     */\n    this._zone = zone;\n    /**\n     * @access private\n     */\n    this.loc = config.loc || Locale.create();\n    /**\n     * @access private\n     */\n    this.invalid = invalid;\n    /**\n     * @access private\n     */\n    this.weekData = null;\n    /**\n     * @access private\n     */\n    this.localWeekData = null;\n    /**\n     * @access private\n     */\n    this.c = c;\n    /**\n     * @access private\n     */\n    this.o = o;\n    /**\n     * @access private\n     */\n    this.isLuxonDateTime = true;\n  }\n\n  // CONSTRUCT\n\n  /**\n   * Create a DateTime for the current instant, in the system's time zone.\n   *\n   * Use Settings to override these default values if needed.\n   * @example DateTime.now().toISO() //~> now in the ISO format\n   * @return {DateTime}\n   */\n  static now() {\n    return new DateTime({});\n  }\n\n  /**\n   * Create a local DateTime\n   * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n   * @param {number} [month=1] - The month, 1-indexed\n   * @param {number} [day=1] - The day of the month, 1-indexed\n   * @param {number} [hour=0] - The hour of the day, in 24-hour time\n   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n   * @example DateTime.local()                                  //~> now\n   * @example DateTime.local({ zone: \"America/New_York\" })      //~> now, in US east coast time\n   * @example DateTime.local(2017)                              //~> 2017-01-01T00:00:00\n   * @example DateTime.local(2017, 3)                           //~> 2017-03-01T00:00:00\n   * @example DateTime.local(2017, 3, 12, { locale: \"fr\" })     //~> 2017-03-12T00:00:00, with a French locale\n   * @example DateTime.local(2017, 3, 12, 5)                    //~> 2017-03-12T05:00:00\n   * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" })   //~> 2017-03-12T05:00:00, in UTC\n   * @example DateTime.local(2017, 3, 12, 5, 45)                //~> 2017-03-12T05:45:00\n   * @example DateTime.local(2017, 3, 12, 5, 45, 10)            //~> 2017-03-12T05:45:10\n   * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765)       //~> 2017-03-12T05:45:10.765\n   * @return {DateTime}\n   */\n  static local() {\n    const [opts, args] = lastOpts(arguments),\n      [year, month, day, hour, minute, second, millisecond] = args;\n    return quickDT({\n      year,\n      month,\n      day,\n      hour,\n      minute,\n      second,\n      millisecond\n    }, opts);\n  }\n\n  /**\n   * Create a DateTime in UTC\n   * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n   * @param {number} [month=1] - The month, 1-indexed\n   * @param {number} [day=1] - The day of the month\n   * @param {number} [hour=0] - The hour of the day, in 24-hour time\n   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n   * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n   * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n   * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance\n   * @example DateTime.utc()                                              //~> now\n   * @example DateTime.utc(2017)                                          //~> 2017-01-01T00:00:00Z\n   * @example DateTime.utc(2017, 3)                                       //~> 2017-03-01T00:00:00Z\n   * @example DateTime.utc(2017, 3, 12)                                   //~> 2017-03-12T00:00:00Z\n   * @example DateTime.utc(2017, 3, 12, 5)                                //~> 2017-03-12T05:00:00Z\n   * @example DateTime.utc(2017, 3, 12, 5, 45)                            //~> 2017-03-12T05:45:00Z\n   * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" })          //~> 2017-03-12T05:45:00Z with a French locale\n   * @example DateTime.utc(2017, 3, 12, 5, 45, 10)                        //~> 2017-03-12T05:45:10Z\n   * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n   * @return {DateTime}\n   */\n  static utc() {\n    const [opts, args] = lastOpts(arguments),\n      [year, month, day, hour, minute, second, millisecond] = args;\n    opts.zone = FixedOffsetZone.utcInstance;\n    return quickDT({\n      year,\n      month,\n      day,\n      hour,\n      minute,\n      second,\n      millisecond\n    }, opts);\n  }\n\n  /**\n   * Create a DateTime from a JavaScript Date object. Uses the default zone.\n   * @param {Date} date - a JavaScript Date object\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n   * @return {DateTime}\n   */\n  static fromJSDate(date, options = {}) {\n    const ts = isDate(date) ? date.valueOf() : NaN;\n    if (Number.isNaN(ts)) {\n      return DateTime.invalid(\"invalid input\");\n    }\n    const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n    if (!zoneToUse.isValid) {\n      return DateTime.invalid(unsupportedZone(zoneToUse));\n    }\n    return new DateTime({\n      ts: ts,\n      zone: zoneToUse,\n      loc: Locale.fromObject(options)\n    });\n  }\n\n  /**\n   * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n   * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n   * @return {DateTime}\n   */\n  static fromMillis(milliseconds, options = {}) {\n    if (!isNumber(milliseconds)) {\n      throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`);\n    } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n      // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start\n      return DateTime.invalid(\"Timestamp out of range\");\n    } else {\n      return new DateTime({\n        ts: milliseconds,\n        zone: normalizeZone(options.zone, Settings.defaultZone),\n        loc: Locale.fromObject(options)\n      });\n    }\n  }\n\n  /**\n   * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n   * @param {number} seconds - a number of seconds since 1970 UTC\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n   * @return {DateTime}\n   */\n  static fromSeconds(seconds, options = {}) {\n    if (!isNumber(seconds)) {\n      throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n    } else {\n      return new DateTime({\n        ts: seconds * 1000,\n        zone: normalizeZone(options.zone, Settings.defaultZone),\n        loc: Locale.fromObject(options)\n      });\n    }\n  }\n\n  /**\n   * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n   * @param {Object} obj - the object to create the DateTime from\n   * @param {number} obj.year - a year, such as 1987\n   * @param {number} obj.month - a month, 1-12\n   * @param {number} obj.day - a day of the month, 1-31, depending on the month\n   * @param {number} obj.ordinal - day of the year, 1-365 or 366\n   * @param {number} obj.weekYear - an ISO week year\n   * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n   * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n   * @param {number} obj.localWeekYear - a week year, according to the locale\n   * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n   * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n   * @param {number} obj.hour - hour of the day, 0-23\n   * @param {number} obj.minute - minute of the hour, 0-59\n   * @param {number} obj.second - second of the minute, 0-59\n   * @param {number} obj.millisecond - millisecond of the second, 0-999\n   * @param {Object} opts - options for creating this DateTime\n   * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n   * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n   * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n   * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n   * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n   * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n   * @return {DateTime}\n   */\n  static fromObject(obj, opts = {}) {\n    obj = obj || {};\n    const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n    if (!zoneToUse.isValid) {\n      return DateTime.invalid(unsupportedZone(zoneToUse));\n    }\n    const loc = Locale.fromObject(opts);\n    const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n    const {\n      minDaysInFirstWeek,\n      startOfWeek\n    } = usesLocalWeekValues(normalized, loc);\n    const tsNow = Settings.now(),\n      offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow),\n      containsOrdinal = !isUndefined(normalized.ordinal),\n      containsGregorYear = !isUndefined(normalized.year),\n      containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n      containsGregor = containsGregorYear || containsGregorMD,\n      definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n    // cases:\n    // just a weekday -> this week's instance of that weekday, no worries\n    // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n    // (gregorian month or day) + ordinal -> error\n    // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n    if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n      throw new ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n    }\n    if (containsGregorMD && containsOrdinal) {\n      throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n    }\n    const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;\n\n    // configure ourselves to deal with gregorian dates or week stuff\n    let units,\n      defaultValues,\n      objNow = tsToObj(tsNow, offsetProvis);\n    if (useWeekData) {\n      units = orderedWeekUnits;\n      defaultValues = defaultWeekUnitValues;\n      objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n    } else if (containsOrdinal) {\n      units = orderedOrdinalUnits;\n      defaultValues = defaultOrdinalUnitValues;\n      objNow = gregorianToOrdinal(objNow);\n    } else {\n      units = orderedUnits;\n      defaultValues = defaultUnitValues;\n    }\n\n    // set default values for missing stuff\n    let foundFirst = false;\n    for (const u of units) {\n      const v = normalized[u];\n      if (!isUndefined(v)) {\n        foundFirst = true;\n      } else if (foundFirst) {\n        normalized[u] = defaultValues[u];\n      } else {\n        normalized[u] = objNow[u];\n      }\n    }\n\n    // make sure the values we have are in range\n    const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized),\n      invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n    if (invalid) {\n      return DateTime.invalid(invalid);\n    }\n\n    // compute the actual time\n    const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized,\n      [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n      inst = new DateTime({\n        ts: tsFinal,\n        zone: zoneToUse,\n        o: offsetFinal,\n        loc\n      });\n\n    // gregorian data + weekday serves only to validate\n    if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n      return DateTime.invalid(\"mismatched weekday\", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`);\n    }\n    if (!inst.isValid) {\n      return DateTime.invalid(inst.invalid);\n    }\n    return inst;\n  }\n\n  /**\n   * Create a DateTime from an ISO 8601 string\n   * @param {string} text - the ISO string\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n   * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n   * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n   * @example DateTime.fromISO('2016-W05-4')\n   * @return {DateTime}\n   */\n  static fromISO(text, opts = {}) {\n    const [vals, parsedZone] = parseISODate(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n  }\n\n  /**\n   * Create a DateTime from an RFC 2822 string\n   * @param {string} text - the RFC 2822 string\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n   * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n   * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n   * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n   * @return {DateTime}\n   */\n  static fromRFC2822(text, opts = {}) {\n    const [vals, parsedZone] = parseRFC2822Date(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n  }\n\n  /**\n   * Create a DateTime from an HTTP header date\n   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n   * @param {string} text - the HTTP header date\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n   * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n   * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n   * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n   * @example DateTime.fromHTTP('Sun Nov  6 08:49:37 1994')\n   * @return {DateTime}\n   */\n  static fromHTTP(text, opts = {}) {\n    const [vals, parsedZone] = parseHTTPDate(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n  }\n\n  /**\n   * Create a DateTime from an input string and format string.\n   * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n   * @param {string} text - the string to parse\n   * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @return {DateTime}\n   */\n  static fromFormat(text, fmt, opts = {}) {\n    if (isUndefined(text) || isUndefined(fmt)) {\n      throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n    }\n    const {\n        locale = null,\n        numberingSystem = null\n      } = opts,\n      localeToUse = Locale.fromOpts({\n        locale,\n        numberingSystem,\n        defaultToEN: true\n      }),\n      [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n    if (invalid) {\n      return DateTime.invalid(invalid);\n    } else {\n      return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n    }\n  }\n\n  /**\n   * @deprecated use fromFormat instead\n   */\n  static fromString(text, fmt, opts = {}) {\n    return DateTime.fromFormat(text, fmt, opts);\n  }\n\n  /**\n   * Create a DateTime from a SQL date, time, or datetime\n   * Defaults to en-US if no locale has been specified, regardless of the system's locale\n   * @param {string} text - the string to parse\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @example DateTime.fromSQL('2017-05-15')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n   * @example DateTime.fromSQL('09:12:34.342')\n   * @return {DateTime}\n   */\n  static fromSQL(text, opts = {}) {\n    const [vals, parsedZone] = parseSQL(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n  }\n\n  /**\n   * Create an invalid DateTime.\n   * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n   * @return {DateTime}\n   */\n  static invalid(reason, explanation = null) {\n    if (!reason) {\n      throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n    }\n    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n    if (Settings.throwOnInvalid) {\n      throw new InvalidDateTimeError(invalid);\n    } else {\n      return new DateTime({\n        invalid\n      });\n    }\n  }\n\n  /**\n   * Check if an object is an instance of DateTime. Works across context boundaries\n   * @param {object} o\n   * @return {boolean}\n   */\n  static isDateTime(o) {\n    return o && o.isLuxonDateTime || false;\n  }\n\n  /**\n   * Produce the format string for a set of options\n   * @param formatOpts\n   * @param localeOpts\n   * @returns {string}\n   */\n  static parseFormatForOpts(formatOpts, localeOpts = {}) {\n    const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n    return !tokenList ? null : tokenList.map(t => t ? t.val : null).join(\"\");\n  }\n\n  /**\n   * Produce the the fully expanded format token for the locale\n   * Does NOT quote characters, so quoted tokens will not round trip correctly\n   * @param fmt\n   * @param localeOpts\n   * @returns {string}\n   */\n  static expandFormat(fmt, localeOpts = {}) {\n    const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n    return expanded.map(t => t.val).join(\"\");\n  }\n  static resetCache() {\n    zoneOffsetTs = undefined;\n    zoneOffsetGuessCache.clear();\n  }\n\n  // INFO\n\n  /**\n   * Get the value of unit.\n   * @param {string} unit - a unit such as 'minute' or 'day'\n   * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n   * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n   * @return {number}\n   */\n  get(unit) {\n    return this[unit];\n  }\n\n  /**\n   * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n   * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n   * * The DateTime was created by an operation on another invalid date\n   * @type {boolean}\n   */\n  get isValid() {\n    return this.invalid === null;\n  }\n\n  /**\n   * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n   * @type {string}\n   */\n  get invalidReason() {\n    return this.invalid ? this.invalid.reason : null;\n  }\n\n  /**\n   * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n   * @type {string}\n   */\n  get invalidExplanation() {\n    return this.invalid ? this.invalid.explanation : null;\n  }\n\n  /**\n   * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n   *\n   * @type {string}\n   */\n  get locale() {\n    return this.isValid ? this.loc.locale : null;\n  }\n\n  /**\n   * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n   *\n   * @type {string}\n   */\n  get numberingSystem() {\n    return this.isValid ? this.loc.numberingSystem : null;\n  }\n\n  /**\n   * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n   *\n   * @type {string}\n   */\n  get outputCalendar() {\n    return this.isValid ? this.loc.outputCalendar : null;\n  }\n\n  /**\n   * Get the time zone associated with this DateTime.\n   * @type {Zone}\n   */\n  get zone() {\n    return this._zone;\n  }\n\n  /**\n   * Get the name of the time zone.\n   * @type {string}\n   */\n  get zoneName() {\n    return this.isValid ? this.zone.name : null;\n  }\n\n  /**\n   * Get the year\n   * @example DateTime.local(2017, 5, 25).year //=> 2017\n   * @type {number}\n   */\n  get year() {\n    return this.isValid ? this.c.year : NaN;\n  }\n\n  /**\n   * Get the quarter\n   * @example DateTime.local(2017, 5, 25).quarter //=> 2\n   * @type {number}\n   */\n  get quarter() {\n    return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n  }\n\n  /**\n   * Get the month (1-12).\n   * @example DateTime.local(2017, 5, 25).month //=> 5\n   * @type {number}\n   */\n  get month() {\n    return this.isValid ? this.c.month : NaN;\n  }\n\n  /**\n   * Get the day of the month (1-30ish).\n   * @example DateTime.local(2017, 5, 25).day //=> 25\n   * @type {number}\n   */\n  get day() {\n    return this.isValid ? this.c.day : NaN;\n  }\n\n  /**\n   * Get the hour of the day (0-23).\n   * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n   * @type {number}\n   */\n  get hour() {\n    return this.isValid ? this.c.hour : NaN;\n  }\n\n  /**\n   * Get the minute of the hour (0-59).\n   * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n   * @type {number}\n   */\n  get minute() {\n    return this.isValid ? this.c.minute : NaN;\n  }\n\n  /**\n   * Get the second of the minute (0-59).\n   * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n   * @type {number}\n   */\n  get second() {\n    return this.isValid ? this.c.second : NaN;\n  }\n\n  /**\n   * Get the millisecond of the second (0-999).\n   * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n   * @type {number}\n   */\n  get millisecond() {\n    return this.isValid ? this.c.millisecond : NaN;\n  }\n\n  /**\n   * Get the week year\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n   * @type {number}\n   */\n  get weekYear() {\n    return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n  }\n\n  /**\n   * Get the week number of the week year (1-52ish).\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n   * @type {number}\n   */\n  get weekNumber() {\n    return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n  }\n\n  /**\n   * Get the day of the week.\n   * 1 is Monday and 7 is Sunday\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2014, 11, 31).weekday //=> 4\n   * @type {number}\n   */\n  get weekday() {\n    return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n  }\n\n  /**\n   * Returns true if this date is on a weekend according to the locale, false otherwise\n   * @returns {boolean}\n   */\n  get isWeekend() {\n    return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n  }\n\n  /**\n   * Get the day of the week according to the locale.\n   * 1 is the first day of the week and 7 is the last day of the week.\n   * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n   * @returns {number}\n   */\n  get localWeekday() {\n    return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n  }\n\n  /**\n   * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n   * because the week can start on different days of the week (see localWeekday) and because a different number of days\n   * is required for a week to count as the first week of a year.\n   * @returns {number}\n   */\n  get localWeekNumber() {\n    return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n  }\n\n  /**\n   * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n   * differently, see localWeekNumber.\n   * @returns {number}\n   */\n  get localWeekYear() {\n    return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n  }\n\n  /**\n   * Get the ordinal (meaning the day of the year)\n   * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n   * @type {number|DateTime}\n   */\n  get ordinal() {\n    return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n  }\n\n  /**\n   * Get the human readable short month name, such as 'Oct'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n   * @type {string}\n   */\n  get monthShort() {\n    return this.isValid ? Info.months(\"short\", {\n      locObj: this.loc\n    })[this.month - 1] : null;\n  }\n\n  /**\n   * Get the human readable long month name, such as 'October'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).monthLong //=> October\n   * @type {string}\n   */\n  get monthLong() {\n    return this.isValid ? Info.months(\"long\", {\n      locObj: this.loc\n    })[this.month - 1] : null;\n  }\n\n  /**\n   * Get the human readable short weekday, such as 'Mon'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n   * @type {string}\n   */\n  get weekdayShort() {\n    return this.isValid ? Info.weekdays(\"short\", {\n      locObj: this.loc\n    })[this.weekday - 1] : null;\n  }\n\n  /**\n   * Get the human readable long weekday, such as 'Monday'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n   * @type {string}\n   */\n  get weekdayLong() {\n    return this.isValid ? Info.weekdays(\"long\", {\n      locObj: this.loc\n    })[this.weekday - 1] : null;\n  }\n\n  /**\n   * Get the UTC offset of this DateTime in minutes\n   * @example DateTime.now().offset //=> -240\n   * @example DateTime.utc().offset //=> 0\n   * @type {number}\n   */\n  get offset() {\n    return this.isValid ? +this.o : NaN;\n  }\n\n  /**\n   * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n   * Defaults to the system's locale if no locale has been specified\n   * @type {string}\n   */\n  get offsetNameShort() {\n    if (this.isValid) {\n      return this.zone.offsetName(this.ts, {\n        format: \"short\",\n        locale: this.locale\n      });\n    } else {\n      return null;\n    }\n  }\n\n  /**\n   * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n   * Defaults to the system's locale if no locale has been specified\n   * @type {string}\n   */\n  get offsetNameLong() {\n    if (this.isValid) {\n      return this.zone.offsetName(this.ts, {\n        format: \"long\",\n        locale: this.locale\n      });\n    } else {\n      return null;\n    }\n  }\n\n  /**\n   * Get whether this zone's offset ever changes, as in a DST.\n   * @type {boolean}\n   */\n  get isOffsetFixed() {\n    return this.isValid ? this.zone.isUniversal : null;\n  }\n\n  /**\n   * Get whether the DateTime is in a DST.\n   * @type {boolean}\n   */\n  get isInDST() {\n    if (this.isOffsetFixed) {\n      return false;\n    } else {\n      return this.offset > this.set({\n        month: 1,\n        day: 1\n      }).offset || this.offset > this.set({\n        month: 5\n      }).offset;\n    }\n  }\n\n  /**\n   * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n   * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n   * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n   * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n   * @returns {DateTime[]}\n   */\n  getPossibleOffsets() {\n    if (!this.isValid || this.isOffsetFixed) {\n      return [this];\n    }\n    const dayMs = 86400000;\n    const minuteMs = 60000;\n    const localTS = objToLocalTS(this.c);\n    const oEarlier = this.zone.offset(localTS - dayMs);\n    const oLater = this.zone.offset(localTS + dayMs);\n    const o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n    const o2 = this.zone.offset(localTS - oLater * minuteMs);\n    if (o1 === o2) {\n      return [this];\n    }\n    const ts1 = localTS - o1 * minuteMs;\n    const ts2 = localTS - o2 * minuteMs;\n    const c1 = tsToObj(ts1, o1);\n    const c2 = tsToObj(ts2, o2);\n    if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) {\n      return [clone(this, {\n        ts: ts1\n      }), clone(this, {\n        ts: ts2\n      })];\n    }\n    return [this];\n  }\n\n  /**\n   * Returns true if this DateTime is in a leap year, false otherwise\n   * @example DateTime.local(2016).isInLeapYear //=> true\n   * @example DateTime.local(2013).isInLeapYear //=> false\n   * @type {boolean}\n   */\n  get isInLeapYear() {\n    return isLeapYear(this.year);\n  }\n\n  /**\n   * Returns the number of days in this DateTime's month\n   * @example DateTime.local(2016, 2).daysInMonth //=> 29\n   * @example DateTime.local(2016, 3).daysInMonth //=> 31\n   * @type {number}\n   */\n  get daysInMonth() {\n    return daysInMonth(this.year, this.month);\n  }\n\n  /**\n   * Returns the number of days in this DateTime's year\n   * @example DateTime.local(2016).daysInYear //=> 366\n   * @example DateTime.local(2013).daysInYear //=> 365\n   * @type {number}\n   */\n  get daysInYear() {\n    return this.isValid ? daysInYear(this.year) : NaN;\n  }\n\n  /**\n   * Returns the number of weeks in this DateTime's year\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2004).weeksInWeekYear //=> 53\n   * @example DateTime.local(2013).weeksInWeekYear //=> 52\n   * @type {number}\n   */\n  get weeksInWeekYear() {\n    return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n  }\n\n  /**\n   * Returns the number of weeks in this DateTime's local week year\n   * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n   * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n   * @type {number}\n   */\n  get weeksInLocalWeekYear() {\n    return this.isValid ? weeksInWeekYear(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN;\n  }\n\n  /**\n   * Returns the resolved Intl options for this DateTime.\n   * This is useful in understanding the behavior of formatting methods\n   * @param {Object} opts - the same options as toLocaleString\n   * @return {Object}\n   */\n  resolvedLocaleOptions(opts = {}) {\n    const {\n      locale,\n      numberingSystem,\n      calendar\n    } = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this);\n    return {\n      locale,\n      numberingSystem,\n      outputCalendar: calendar\n    };\n  }\n\n  // TRANSFORM\n\n  /**\n   * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n   *\n   * Equivalent to {@link DateTime#setZone}('utc')\n   * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n   * @param {Object} [opts={}] - options to pass to `setZone()`\n   * @return {DateTime}\n   */\n  toUTC(offset = 0, opts = {}) {\n    return this.setZone(FixedOffsetZone.instance(offset), opts);\n  }\n\n  /**\n   * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n   *\n   * Equivalent to `setZone('local')`\n   * @return {DateTime}\n   */\n  toLocal() {\n    return this.setZone(Settings.defaultZone);\n  }\n\n  /**\n   * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n   *\n   * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n   * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n   * @param {Object} opts - options\n   * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n   * @return {DateTime}\n   */\n  setZone(zone, {\n    keepLocalTime = false,\n    keepCalendarTime = false\n  } = {}) {\n    zone = normalizeZone(zone, Settings.defaultZone);\n    if (zone.equals(this.zone)) {\n      return this;\n    } else if (!zone.isValid) {\n      return DateTime.invalid(unsupportedZone(zone));\n    } else {\n      let newTS = this.ts;\n      if (keepLocalTime || keepCalendarTime) {\n        const offsetGuess = zone.offset(this.ts);\n        const asObj = this.toObject();\n        [newTS] = objToTS(asObj, offsetGuess, zone);\n      }\n      return clone(this, {\n        ts: newTS,\n        zone\n      });\n    }\n  }\n\n  /**\n   * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n   * @param {Object} properties - the properties to set\n   * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n   * @return {DateTime}\n   */\n  reconfigure({\n    locale,\n    numberingSystem,\n    outputCalendar\n  } = {}) {\n    const loc = this.loc.clone({\n      locale,\n      numberingSystem,\n      outputCalendar\n    });\n    return clone(this, {\n      loc\n    });\n  }\n\n  /**\n   * \"Set\" the locale. Returns a newly-constructed DateTime.\n   * Just a convenient alias for reconfigure({ locale })\n   * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n   * @return {DateTime}\n   */\n  setLocale(locale) {\n    return this.reconfigure({\n      locale\n    });\n  }\n\n  /**\n   * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n   * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n   *\n   * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n   * They cannot be mixed with ISO-week units like `weekday`.\n   * @param {Object} values - a mapping of units to numbers\n   * @example dt.set({ year: 2017 })\n   * @example dt.set({ hour: 8, minute: 30 })\n   * @example dt.set({ weekday: 5 })\n   * @example dt.set({ year: 2005, ordinal: 234 })\n   * @return {DateTime}\n   */\n  set(values) {\n    if (!this.isValid) return this;\n    const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n    const {\n      minDaysInFirstWeek,\n      startOfWeek\n    } = usesLocalWeekValues(normalized, this.loc);\n    const settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday),\n      containsOrdinal = !isUndefined(normalized.ordinal),\n      containsGregorYear = !isUndefined(normalized.year),\n      containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n      containsGregor = containsGregorYear || containsGregorMD,\n      definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n    if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n      throw new ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n    }\n    if (containsGregorMD && containsOrdinal) {\n      throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n    }\n    let mixed;\n    if (settingWeekStuff) {\n      mixed = weekToGregorian({\n        ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek),\n        ...normalized\n      }, minDaysInFirstWeek, startOfWeek);\n    } else if (!isUndefined(normalized.ordinal)) {\n      mixed = ordinalToGregorian({\n        ...gregorianToOrdinal(this.c),\n        ...normalized\n      });\n    } else {\n      mixed = {\n        ...this.toObject(),\n        ...normalized\n      };\n\n      // if we didn't set the day but we ended up on an overflow date,\n      // use the last day of the right month\n      if (isUndefined(normalized.day)) {\n        mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n      }\n    }\n    const [ts, o] = objToTS(mixed, this.o, this.zone);\n    return clone(this, {\n      ts,\n      o\n    });\n  }\n\n  /**\n   * Add a period of time to this DateTime and return the resulting DateTime\n   *\n   * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   * @example DateTime.now().plus(123) //~> in 123 milliseconds\n   * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n   * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n   * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n   * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n   * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n   * @return {DateTime}\n   */\n  plus(duration) {\n    if (!this.isValid) return this;\n    const dur = Duration.fromDurationLike(duration);\n    return clone(this, adjustTime(this, dur));\n  }\n\n  /**\n   * Subtract a period of time to this DateTime and return the resulting DateTime\n   * See {@link DateTime#plus}\n   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   @return {DateTime}\n   */\n  minus(duration) {\n    if (!this.isValid) return this;\n    const dur = Duration.fromDurationLike(duration).negate();\n    return clone(this, adjustTime(this, dur));\n  }\n\n  /**\n   * \"Set\" this DateTime to the beginning of a unit of time.\n   * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n   * @param {Object} opts - options\n   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n   * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n   * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n   * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n   * @return {DateTime}\n   */\n  startOf(unit, {\n    useLocaleWeeks = false\n  } = {}) {\n    if (!this.isValid) return this;\n    const o = {},\n      normalizedUnit = Duration.normalizeUnit(unit);\n    switch (normalizedUnit) {\n      case \"years\":\n        o.month = 1;\n      // falls through\n      case \"quarters\":\n      case \"months\":\n        o.day = 1;\n      // falls through\n      case \"weeks\":\n      case \"days\":\n        o.hour = 0;\n      // falls through\n      case \"hours\":\n        o.minute = 0;\n      // falls through\n      case \"minutes\":\n        o.second = 0;\n      // falls through\n      case \"seconds\":\n        o.millisecond = 0;\n        break;\n      // no default, invalid units throw in normalizeUnit()\n    }\n\n    if (normalizedUnit === \"weeks\") {\n      if (useLocaleWeeks) {\n        const startOfWeek = this.loc.getStartOfWeek();\n        const {\n          weekday\n        } = this;\n        if (weekday < startOfWeek) {\n          o.weekNumber = this.weekNumber - 1;\n        }\n        o.weekday = startOfWeek;\n      } else {\n        o.weekday = 1;\n      }\n    }\n    if (normalizedUnit === \"quarters\") {\n      const q = Math.ceil(this.month / 3);\n      o.month = (q - 1) * 3 + 1;\n    }\n    return this.set(o);\n  }\n\n  /**\n   * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n   * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n   * @param {Object} opts - options\n   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n   * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n   * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n   * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n   * @return {DateTime}\n   */\n  endOf(unit, opts) {\n    return this.isValid ? this.plus({\n      [unit]: 1\n    }).startOf(unit, opts).minus(1) : this;\n  }\n\n  // OUTPUT\n\n  /**\n   * Returns a string representation of this DateTime formatted according to the specified format string.\n   * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n   * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n   * @param {string} fmt - the format string\n   * @param {Object} opts - opts to override the configuration options on this DateTime\n   * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n   * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n   * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n   * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n   * @return {string}\n   */\n  toFormat(fmt, opts = {}) {\n    return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID;\n  }\n\n  /**\n   * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n   * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n   * of the DateTime in the assigned locale.\n   * Defaults to the system's locale if no locale has been specified\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n   * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n   * @param {Object} opts - opts to override the configuration options on this DateTime\n   * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n   * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n   * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n   * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n   * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n   * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n   * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n   * @return {string}\n   */\n  toLocaleString(formatOpts = DATE_SHORT, opts = {}) {\n    return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID;\n  }\n\n  /**\n   * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n   * Defaults to the system's locale if no locale has been specified\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n   * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n   * @example DateTime.now().toLocaleParts(); //=> [\n   *                                   //=>   { type: 'day', value: '25' },\n   *                                   //=>   { type: 'literal', value: '/' },\n   *                                   //=>   { type: 'month', value: '05' },\n   *                                   //=>   { type: 'literal', value: '/' },\n   *                                   //=>   { type: 'year', value: '1982' }\n   *                                   //=> ]\n   */\n  toLocaleParts(opts = {}) {\n    return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime\n   * @param {Object} opts - options\n   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n   * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n   * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n   * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n   * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n   * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z'\n   * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z'\n   * @return {string|null}\n   */\n  toISO({\n    format = \"extended\",\n    suppressSeconds = false,\n    suppressMilliseconds = false,\n    includeOffset = true,\n    extendedZone = false,\n    precision = \"milliseconds\"\n  } = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n    precision = normalizeUnit(precision);\n    const ext = format === \"extended\";\n    let c = toISODate(this, ext, precision);\n    if (orderedUnits.indexOf(precision) >= 3) c += \"T\";\n    c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision);\n    return c;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime's date component\n   * @param {Object} opts - options\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'.\n   * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n   * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n   * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05'\n   * @return {string|null}\n   */\n  toISODate({\n    format = \"extended\",\n    precision = \"day\"\n  } = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n    return toISODate(this, format === \"extended\", normalizeUnit(precision));\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime's week date\n   * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n   * @return {string}\n   */\n  toISOWeekDate() {\n    return toTechFormat(this, \"kkkk-'W'WW-c\");\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime's time component\n   * @param {Object} opts - options\n   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n   * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n   * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z'\n   * @return {string}\n   */\n  toISOTime({\n    suppressMilliseconds = false,\n    suppressSeconds = false,\n    includeOffset = true,\n    includePrefix = false,\n    extendedZone = false,\n    format = \"extended\",\n    precision = \"milliseconds\"\n  } = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n    precision = normalizeUnit(precision);\n    let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? \"T\" : \"\";\n    return c + toISOTime(this, format === \"extended\", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision);\n  }\n\n  /**\n   * Returns an RFC 2822-compatible string representation of this DateTime\n   * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n   * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n   * @return {string}\n   */\n  toRFC2822() {\n    return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n   * Specifically, the string conforms to RFC 1123.\n   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n   * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n   * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n   * @return {string}\n   */\n  toHTTP() {\n    return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in SQL Date\n   * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n   * @return {string|null}\n   */\n  toSQLDate() {\n    if (!this.isValid) {\n      return null;\n    }\n    return toISODate(this, true);\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in SQL Time\n   * @param {Object} opts - options\n   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n   * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n   * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n   * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n   * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n   * @return {string}\n   */\n  toSQLTime({\n    includeOffset = true,\n    includeZone = false,\n    includeOffsetSpace = true\n  } = {}) {\n    let fmt = \"HH:mm:ss.SSS\";\n    if (includeZone || includeOffset) {\n      if (includeOffsetSpace) {\n        fmt += \" \";\n      }\n      if (includeZone) {\n        fmt += \"z\";\n      } else if (includeOffset) {\n        fmt += \"ZZ\";\n      }\n    }\n    return toTechFormat(this, fmt, true);\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n   * @param {Object} opts - options\n   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n   * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n   * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n   * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n   * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n   * @return {string}\n   */\n  toSQL(opts = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n    return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for debugging\n   * @return {string}\n   */\n  toString() {\n    return this.isValid ? this.toISO() : INVALID;\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for the REPL.\n   * @return {string}\n   */\n  [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n    if (this.isValid) {\n      return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;\n    } else {\n      return `DateTime { Invalid, reason: ${this.invalidReason} }`;\n    }\n  }\n\n  /**\n   * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n   * @return {number}\n   */\n  valueOf() {\n    return this.toMillis();\n  }\n\n  /**\n   * Returns the epoch milliseconds of this DateTime.\n   * @return {number}\n   */\n  toMillis() {\n    return this.isValid ? this.ts : NaN;\n  }\n\n  /**\n   * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime.\n   * @return {number}\n   */\n  toSeconds() {\n    return this.isValid ? this.ts / 1000 : NaN;\n  }\n\n  /**\n   * Returns the epoch seconds (as a whole number) of this DateTime.\n   * @return {number}\n   */\n  toUnixInteger() {\n    return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n  }\n\n  /**\n   * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n   * @return {string}\n   */\n  toJSON() {\n    return this.toISO();\n  }\n\n  /**\n   * Returns a BSON serializable equivalent to this DateTime.\n   * @return {Date}\n   */\n  toBSON() {\n    return this.toJSDate();\n  }\n\n  /**\n   * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n   * @param opts - options for generating the object\n   * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n   * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n   * @return {Object}\n   */\n  toObject(opts = {}) {\n    if (!this.isValid) return {};\n    const base = {\n      ...this.c\n    };\n    if (opts.includeConfig) {\n      base.outputCalendar = this.outputCalendar;\n      base.numberingSystem = this.loc.numberingSystem;\n      base.locale = this.loc.locale;\n    }\n    return base;\n  }\n\n  /**\n   * Returns a JavaScript Date equivalent to this DateTime.\n   * @return {Date}\n   */\n  toJSDate() {\n    return new Date(this.isValid ? this.ts : NaN);\n  }\n\n  // COMPARE\n\n  /**\n   * Return the difference between two DateTimes as a Duration.\n   * @param {DateTime} otherDateTime - the DateTime to compare this one to\n   * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n   * @param {Object} opts - options that affect the creation of the Duration\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @example\n   * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n   *     i2 = DateTime.fromISO('1983-10-14T10:30');\n   * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n   * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n   * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n   * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n   * @return {Duration}\n   */\n  diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n    if (!this.isValid || !otherDateTime.isValid) {\n      return Duration.invalid(\"created by diffing an invalid DateTime\");\n    }\n    const durOpts = {\n      locale: this.locale,\n      numberingSystem: this.numberingSystem,\n      ...opts\n    };\n    const units = maybeArray(unit).map(Duration.normalizeUnit),\n      otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n      earlier = otherIsLater ? this : otherDateTime,\n      later = otherIsLater ? otherDateTime : this,\n      diffed = diff(earlier, later, units, durOpts);\n    return otherIsLater ? diffed.negate() : diffed;\n  }\n\n  /**\n   * Return the difference between this DateTime and right now.\n   * See {@link DateTime#diff}\n   * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n   * @param {Object} opts - options that affect the creation of the Duration\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @return {Duration}\n   */\n  diffNow(unit = \"milliseconds\", opts = {}) {\n    return this.diff(DateTime.now(), unit, opts);\n  }\n\n  /**\n   * Return an Interval spanning between this DateTime and another DateTime\n   * @param {DateTime} otherDateTime - the other end point of the Interval\n   * @return {Interval|DateTime}\n   */\n  until(otherDateTime) {\n    return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n  }\n\n  /**\n   * Return whether this DateTime is in the same unit of time as another DateTime.\n   * Higher-order units must also be identical for this function to return `true`.\n   * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n   * @param {DateTime} otherDateTime - the other DateTime\n   * @param {string} unit - the unit of time to check sameness on\n   * @param {Object} opts - options\n   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n   * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n   * @return {boolean}\n   */\n  hasSame(otherDateTime, unit, opts) {\n    if (!this.isValid) return false;\n    const inputMs = otherDateTime.valueOf();\n    const adjustedToZone = this.setZone(otherDateTime.zone, {\n      keepLocalTime: true\n    });\n    return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts);\n  }\n\n  /**\n   * Equality check\n   * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n   * To compare just the millisecond values, use `+dt1 === +dt2`.\n   * @param {DateTime} other - the other DateTime\n   * @return {boolean}\n   */\n  equals(other) {\n    return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);\n  }\n\n  /**\n   * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n   * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default.\n   * @param {Object} options - options that affect the output\n   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n   * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n   * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n   * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n   * @param {string} [options.rounding=\"trunc\"] - rounding method to use when rounding the numbers in the output. Can be \"trunc\" (toward zero), \"expand\" (away from zero), \"round\", \"floor\", or \"ceil\".\n   * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n   * @param {string} options.locale - override the locale of this DateTime\n   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n   * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n   * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n   * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n   * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n   * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n   * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n   */\n  toRelative(options = {}) {\n    if (!this.isValid) return null;\n    const base = options.base || DateTime.fromObject({}, {\n        zone: this.zone\n      }),\n      padding = options.padding ? this < base ? -options.padding : options.padding : 0;\n    let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n    let unit = options.unit;\n    if (Array.isArray(options.unit)) {\n      units = options.unit;\n      unit = undefined;\n    }\n    return diffRelative(base, this.plus(padding), {\n      ...options,\n      numeric: \"always\",\n      units,\n      unit\n    });\n  }\n\n  /**\n   * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n   * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n   * @param {Object} options - options that affect the output\n   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n   * @param {string} options.locale - override the locale of this DateTime\n   * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n   * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n   * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n   */\n  toRelativeCalendar(options = {}) {\n    if (!this.isValid) return null;\n    return diffRelative(options.base || DateTime.fromObject({}, {\n      zone: this.zone\n    }), this, {\n      ...options,\n      numeric: \"auto\",\n      units: [\"years\", \"months\", \"days\"],\n      calendary: true\n    });\n  }\n\n  /**\n   * Return the min of several date times\n   * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n   * @return {DateTime} the min DateTime, or undefined if called with no argument\n   */\n  static min(...dateTimes) {\n    if (!dateTimes.every(DateTime.isDateTime)) {\n      throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n    }\n    return bestBy(dateTimes, i => i.valueOf(), Math.min);\n  }\n\n  /**\n   * Return the max of several date times\n   * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n   * @return {DateTime} the max DateTime, or undefined if called with no argument\n   */\n  static max(...dateTimes) {\n    if (!dateTimes.every(DateTime.isDateTime)) {\n      throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n    }\n    return bestBy(dateTimes, i => i.valueOf(), Math.max);\n  }\n\n  // MISC\n\n  /**\n   * Explain how a string would be parsed by fromFormat()\n   * @param {string} text - the string to parse\n   * @param {string} fmt - the format the string is expected to be in (see description)\n   * @param {Object} options - options taken by fromFormat()\n   * @return {Object}\n   */\n  static fromFormatExplain(text, fmt, options = {}) {\n    const {\n        locale = null,\n        numberingSystem = null\n      } = options,\n      localeToUse = Locale.fromOpts({\n        locale,\n        numberingSystem,\n        defaultToEN: true\n      });\n    return explainFromTokens(localeToUse, text, fmt);\n  }\n\n  /**\n   * @deprecated use fromFormatExplain instead\n   */\n  static fromStringExplain(text, fmt, options = {}) {\n    return DateTime.fromFormatExplain(text, fmt, options);\n  }\n\n  /**\n   * Build a parser for `fmt` using the given locale. This parser can be passed\n   * to {@link DateTime.fromFormatParser} to a parse a date in this format. This\n   * can be used to optimize cases where many dates need to be parsed in a\n   * specific format.\n   *\n   * @param {String} fmt - the format the string is expected to be in (see\n   * description)\n   * @param {Object} options - options used to set locale and numberingSystem\n   * for parser\n   * @returns {TokenParser} - opaque object to be used\n   */\n  static buildFormatParser(fmt, options = {}) {\n    const {\n        locale = null,\n        numberingSystem = null\n      } = options,\n      localeToUse = Locale.fromOpts({\n        locale,\n        numberingSystem,\n        defaultToEN: true\n      });\n    return new TokenParser(localeToUse, fmt);\n  }\n\n  /**\n   * Create a DateTime from an input string and format parser.\n   *\n   * The format parser must have been created with the same locale as this call.\n   *\n   * @param {String} text - the string to parse\n   * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}\n   * @param {Object} opts - options taken by fromFormat()\n   * @returns {DateTime}\n   */\n  static fromFormatParser(text, formatParser, opts = {}) {\n    if (isUndefined(text) || isUndefined(formatParser)) {\n      throw new InvalidArgumentError(\"fromFormatParser requires an input string and a format parser\");\n    }\n    const {\n        locale = null,\n        numberingSystem = null\n      } = opts,\n      localeToUse = Locale.fromOpts({\n        locale,\n        numberingSystem,\n        defaultToEN: true\n      });\n    if (!localeToUse.equals(formatParser.locale)) {\n      throw new InvalidArgumentError(`fromFormatParser called with a locale of ${localeToUse}, ` + `but the format parser was created for ${formatParser.locale}`);\n    }\n    const {\n      result,\n      zone,\n      specificOffset,\n      invalidReason\n    } = formatParser.explainFromTokens(text);\n    if (invalidReason) {\n      return DateTime.invalid(invalidReason);\n    } else {\n      return parseDataToDateTime(result, zone, opts, `format ${formatParser.format}`, text, specificOffset);\n    }\n  }\n\n  // FORMAT PRESETS\n\n  /**\n   * {@link DateTime#toLocaleString} format like 10/14/1983\n   * @type {Object}\n   */\n  static get DATE_SHORT() {\n    return DATE_SHORT;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_MED() {\n    return DATE_MED;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_MED_WITH_WEEKDAY() {\n    return DATE_MED_WITH_WEEKDAY;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_FULL() {\n    return DATE_FULL;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_HUGE() {\n    return DATE_HUGE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_SIMPLE() {\n    return TIME_SIMPLE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_WITH_SECONDS() {\n    return TIME_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_WITH_SHORT_OFFSET() {\n    return TIME_WITH_SHORT_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_WITH_LONG_OFFSET() {\n    return TIME_WITH_LONG_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_SIMPLE() {\n    return TIME_24_SIMPLE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_WITH_SECONDS() {\n    return TIME_24_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_WITH_SHORT_OFFSET() {\n    return TIME_24_WITH_SHORT_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_WITH_LONG_OFFSET() {\n    return TIME_24_WITH_LONG_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_SHORT() {\n    return DATETIME_SHORT;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_SHORT_WITH_SECONDS() {\n    return DATETIME_SHORT_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_MED() {\n    return DATETIME_MED;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_MED_WITH_SECONDS() {\n    return DATETIME_MED_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_MED_WITH_WEEKDAY() {\n    return DATETIME_MED_WITH_WEEKDAY;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_FULL() {\n    return DATETIME_FULL;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_FULL_WITH_SECONDS() {\n    return DATETIME_FULL_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_HUGE() {\n    return DATETIME_HUGE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_HUGE_WITH_SECONDS() {\n    return DATETIME_HUGE_WITH_SECONDS;\n  }\n}\n\n/**\n * @private\n */\nfunction friendlyDateTime(dateTimeish) {\n  if (DateTime.isDateTime(dateTimeish)) {\n    return dateTimeish;\n  } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n    return DateTime.fromJSDate(dateTimeish);\n  } else if (dateTimeish && typeof dateTimeish === \"object\") {\n    return DateTime.fromObject(dateTimeish);\n  } else {\n    throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`);\n  }\n}\n\nconst VERSION = \"3.7.2\";\n\nexports.DateTime = DateTime;\nexports.Duration = Duration;\nexports.FixedOffsetZone = FixedOffsetZone;\nexports.IANAZone = IANAZone;\nexports.Info = Info;\nexports.Interval = Interval;\nexports.InvalidZone = InvalidZone;\nexports.Settings = Settings;\nexports.SystemZone = SystemZone;\nexports.VERSION = VERSION;\nexports.Zone = Zone;\n//# sourceMappingURL=luxon.js.map\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/luxon/build/node/luxon.js?\n}");

/***/ }),

/***/ "./node_modules/marked/lib/marked.cjs":
/*!********************************************!*\
  !*** ./node_modules/marked/lib/marked.cjs ***!
  \********************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";
eval("{/**\n * marked v11.2.0 - a markdown parser\n * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n\n\n/**\n * Gets the original marked default options.\n */\nfunction _getDefaults() {\n    return {\n        async: false,\n        breaks: false,\n        extensions: null,\n        gfm: true,\n        hooks: null,\n        pedantic: false,\n        renderer: null,\n        silent: false,\n        tokenizer: null,\n        walkTokens: null\n    };\n}\nexports.defaults = _getDefaults();\nfunction changeDefaults(newDefaults) {\n    exports.defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nfunction escape$1(html, encode) {\n    if (encode) {\n        if (escapeTest.test(html)) {\n            return html.replace(escapeReplace, getEscapeReplacement);\n        }\n    }\n    else {\n        if (escapeTestNoEncode.test(html)) {\n            return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n        }\n    }\n    return html;\n}\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\nfunction unescape(html) {\n    // explicitly match decimal, hex, and named HTML entities\n    return html.replace(unescapeTest, (_, n) => {\n        n = n.toLowerCase();\n        if (n === 'colon')\n            return ':';\n        if (n.charAt(0) === '#') {\n            return n.charAt(1) === 'x'\n                ? String.fromCharCode(parseInt(n.substring(2), 16))\n                : String.fromCharCode(+n.substring(1));\n        }\n        return '';\n    });\n}\nconst caret = /(^|[^\\[])\\^/g;\nfunction edit(regex, opt) {\n    let source = typeof regex === 'string' ? regex : regex.source;\n    opt = opt || '';\n    const obj = {\n        replace: (name, val) => {\n            let valSource = typeof val === 'string' ? val : val.source;\n            valSource = valSource.replace(caret, '$1');\n            source = source.replace(name, valSource);\n            return obj;\n        },\n        getRegex: () => {\n            return new RegExp(source, opt);\n        }\n    };\n    return obj;\n}\nfunction cleanUrl(href) {\n    try {\n        href = encodeURI(href).replace(/%25/g, '%');\n    }\n    catch (e) {\n        return null;\n    }\n    return href;\n}\nconst noopTest = { exec: () => null };\nfunction splitCells(tableRow, count) {\n    // ensure that every cell-delimiting pipe has a space\n    // before it to distinguish it from an escaped pipe\n    const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n        let escaped = false;\n        let curr = offset;\n        while (--curr >= 0 && str[curr] === '\\\\')\n            escaped = !escaped;\n        if (escaped) {\n            // odd number of slashes means | is escaped\n            // so we leave it alone\n            return '|';\n        }\n        else {\n            // add space before unescaped |\n            return ' |';\n        }\n    }), cells = row.split(/ \\|/);\n    let i = 0;\n    // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n    if (!cells[0].trim()) {\n        cells.shift();\n    }\n    if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n        cells.pop();\n    }\n    if (count) {\n        if (cells.length > count) {\n            cells.splice(count);\n        }\n        else {\n            while (cells.length < count)\n                cells.push('');\n        }\n    }\n    for (; i < cells.length; i++) {\n        // leading or trailing whitespace is ignored per the gfm spec\n        cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n    }\n    return cells;\n}\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param str\n * @param c\n * @param invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n    const l = str.length;\n    if (l === 0) {\n        return '';\n    }\n    // Length of suffix matching the invert condition.\n    let suffLen = 0;\n    // Step left until we fail to match the invert condition.\n    while (suffLen < l) {\n        const currChar = str.charAt(l - suffLen - 1);\n        if (currChar === c && !invert) {\n            suffLen++;\n        }\n        else if (currChar !== c && invert) {\n            suffLen++;\n        }\n        else {\n            break;\n        }\n    }\n    return str.slice(0, l - suffLen);\n}\nfunction findClosingBracket(str, b) {\n    if (str.indexOf(b[1]) === -1) {\n        return -1;\n    }\n    let level = 0;\n    for (let i = 0; i < str.length; i++) {\n        if (str[i] === '\\\\') {\n            i++;\n        }\n        else if (str[i] === b[0]) {\n            level++;\n        }\n        else if (str[i] === b[1]) {\n            level--;\n            if (level < 0) {\n                return i;\n            }\n        }\n    }\n    return -1;\n}\n\nfunction outputLink(cap, link, raw, lexer) {\n    const href = link.href;\n    const title = link.title ? escape$1(link.title) : null;\n    const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n    if (cap[0].charAt(0) !== '!') {\n        lexer.state.inLink = true;\n        const token = {\n            type: 'link',\n            raw,\n            href,\n            title,\n            text,\n            tokens: lexer.inlineTokens(text)\n        };\n        lexer.state.inLink = false;\n        return token;\n    }\n    return {\n        type: 'image',\n        raw,\n        href,\n        title,\n        text: escape$1(text)\n    };\n}\nfunction indentCodeCompensation(raw, text) {\n    const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n    if (matchIndentToCode === null) {\n        return text;\n    }\n    const indentToCode = matchIndentToCode[1];\n    return text\n        .split('\\n')\n        .map(node => {\n        const matchIndentInNode = node.match(/^\\s+/);\n        if (matchIndentInNode === null) {\n            return node;\n        }\n        const [indentInNode] = matchIndentInNode;\n        if (indentInNode.length >= indentToCode.length) {\n            return node.slice(indentToCode.length);\n        }\n        return node;\n    })\n        .join('\\n');\n}\n/**\n * Tokenizer\n */\nclass _Tokenizer {\n    options;\n    rules; // set by the lexer\n    lexer; // set by the lexer\n    constructor(options) {\n        this.options = options || exports.defaults;\n    }\n    space(src) {\n        const cap = this.rules.block.newline.exec(src);\n        if (cap && cap[0].length > 0) {\n            return {\n                type: 'space',\n                raw: cap[0]\n            };\n        }\n    }\n    code(src) {\n        const cap = this.rules.block.code.exec(src);\n        if (cap) {\n            const text = cap[0].replace(/^ {1,4}/gm, '');\n            return {\n                type: 'code',\n                raw: cap[0],\n                codeBlockStyle: 'indented',\n                text: !this.options.pedantic\n                    ? rtrim(text, '\\n')\n                    : text\n            };\n        }\n    }\n    fences(src) {\n        const cap = this.rules.block.fences.exec(src);\n        if (cap) {\n            const raw = cap[0];\n            const text = indentCodeCompensation(raw, cap[3] || '');\n            return {\n                type: 'code',\n                raw,\n                lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, '$1') : cap[2],\n                text\n            };\n        }\n    }\n    heading(src) {\n        const cap = this.rules.block.heading.exec(src);\n        if (cap) {\n            let text = cap[2].trim();\n            // remove trailing #s\n            if (/#$/.test(text)) {\n                const trimmed = rtrim(text, '#');\n                if (this.options.pedantic) {\n                    text = trimmed.trim();\n                }\n                else if (!trimmed || / $/.test(trimmed)) {\n                    // CommonMark requires space before trailing #s\n                    text = trimmed.trim();\n                }\n            }\n            return {\n                type: 'heading',\n                raw: cap[0],\n                depth: cap[1].length,\n                text,\n                tokens: this.lexer.inline(text)\n            };\n        }\n    }\n    hr(src) {\n        const cap = this.rules.block.hr.exec(src);\n        if (cap) {\n            return {\n                type: 'hr',\n                raw: cap[0]\n            };\n        }\n    }\n    blockquote(src) {\n        const cap = this.rules.block.blockquote.exec(src);\n        if (cap) {\n            const text = rtrim(cap[0].replace(/^ *>[ \\t]?/gm, ''), '\\n');\n            const top = this.lexer.state.top;\n            this.lexer.state.top = true;\n            const tokens = this.lexer.blockTokens(text);\n            this.lexer.state.top = top;\n            return {\n                type: 'blockquote',\n                raw: cap[0],\n                tokens,\n                text\n            };\n        }\n    }\n    list(src) {\n        let cap = this.rules.block.list.exec(src);\n        if (cap) {\n            let bull = cap[1].trim();\n            const isordered = bull.length > 1;\n            const list = {\n                type: 'list',\n                raw: '',\n                ordered: isordered,\n                start: isordered ? +bull.slice(0, -1) : '',\n                loose: false,\n                items: []\n            };\n            bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n            if (this.options.pedantic) {\n                bull = isordered ? bull : '[*+-]';\n            }\n            // Get next list item\n            const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n            let raw = '';\n            let itemContents = '';\n            let endsWithBlankLine = false;\n            // Check if current bullet point can start a new List Item\n            while (src) {\n                let endEarly = false;\n                if (!(cap = itemRegex.exec(src))) {\n                    break;\n                }\n                if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n                    break;\n                }\n                raw = cap[0];\n                src = src.substring(raw.length);\n                let line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, (t) => ' '.repeat(3 * t.length));\n                let nextLine = src.split('\\n', 1)[0];\n                let indent = 0;\n                if (this.options.pedantic) {\n                    indent = 2;\n                    itemContents = line.trimStart();\n                }\n                else {\n                    indent = cap[2].search(/[^ ]/); // Find first non-space char\n                    indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n                    itemContents = line.slice(indent);\n                    indent += cap[1].length;\n                }\n                let blankLine = false;\n                if (!line && /^ *$/.test(nextLine)) { // Items begin with at most one blank line\n                    raw += nextLine + '\\n';\n                    src = src.substring(nextLine.length + 1);\n                    endEarly = true;\n                }\n                if (!endEarly) {\n                    const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n                    const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n                    const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n                    const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n                    // Check if following lines should be included in List Item\n                    while (src) {\n                        const rawLine = src.split('\\n', 1)[0];\n                        nextLine = rawLine;\n                        // Re-align to follow commonmark nesting rules\n                        if (this.options.pedantic) {\n                            nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, '  ');\n                        }\n                        // End list item if found code fences\n                        if (fencesBeginRegex.test(nextLine)) {\n                            break;\n                        }\n                        // End list item if found start of new heading\n                        if (headingBeginRegex.test(nextLine)) {\n                            break;\n                        }\n                        // End list item if found start of new bullet\n                        if (nextBulletRegex.test(nextLine)) {\n                            break;\n                        }\n                        // Horizontal rule found\n                        if (hrRegex.test(src)) {\n                            break;\n                        }\n                        if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) { // Dedent if possible\n                            itemContents += '\\n' + nextLine.slice(indent);\n                        }\n                        else {\n                            // not enough indentation\n                            if (blankLine) {\n                                break;\n                            }\n                            // paragraph continuation unless last line was a different block level element\n                            if (line.search(/[^ ]/) >= 4) { // indented code block\n                                break;\n                            }\n                            if (fencesBeginRegex.test(line)) {\n                                break;\n                            }\n                            if (headingBeginRegex.test(line)) {\n                                break;\n                            }\n                            if (hrRegex.test(line)) {\n                                break;\n                            }\n                            itemContents += '\\n' + nextLine;\n                        }\n                        if (!blankLine && !nextLine.trim()) { // Check if current line is blank\n                            blankLine = true;\n                        }\n                        raw += rawLine + '\\n';\n                        src = src.substring(rawLine.length + 1);\n                        line = nextLine.slice(indent);\n                    }\n                }\n                if (!list.loose) {\n                    // If the previous item ended with a blank line, the list is loose\n                    if (endsWithBlankLine) {\n                        list.loose = true;\n                    }\n                    else if (/\\n *\\n *$/.test(raw)) {\n                        endsWithBlankLine = true;\n                    }\n                }\n                let istask = null;\n                let ischecked;\n                // Check for task list items\n                if (this.options.gfm) {\n                    istask = /^\\[[ xX]\\] /.exec(itemContents);\n                    if (istask) {\n                        ischecked = istask[0] !== '[ ] ';\n                        itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n                    }\n                }\n                list.items.push({\n                    type: 'list_item',\n                    raw,\n                    task: !!istask,\n                    checked: ischecked,\n                    loose: false,\n                    text: itemContents,\n                    tokens: []\n                });\n                list.raw += raw;\n            }\n            // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n            list.items[list.items.length - 1].raw = raw.trimEnd();\n            (list.items[list.items.length - 1]).text = itemContents.trimEnd();\n            list.raw = list.raw.trimEnd();\n            // Item child tokens handled here at end because we needed to have the final item to trim it first\n            for (let i = 0; i < list.items.length; i++) {\n                this.lexer.state.top = false;\n                list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n                if (!list.loose) {\n                    // Check if list should be loose\n                    const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n                    const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n                    list.loose = hasMultipleLineBreaks;\n                }\n            }\n            // Set all items to loose if list is loose\n            if (list.loose) {\n                for (let i = 0; i < list.items.length; i++) {\n                    list.items[i].loose = true;\n                }\n            }\n            return list;\n        }\n    }\n    html(src) {\n        const cap = this.rules.block.html.exec(src);\n        if (cap) {\n            const token = {\n                type: 'html',\n                block: true,\n                raw: cap[0],\n                pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\n                text: cap[0]\n            };\n            return token;\n        }\n    }\n    def(src) {\n        const cap = this.rules.block.def.exec(src);\n        if (cap) {\n            const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n            const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline.anyPunctuation, '$1') : '';\n            const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, '$1') : cap[3];\n            return {\n                type: 'def',\n                tag,\n                raw: cap[0],\n                href,\n                title\n            };\n        }\n    }\n    table(src) {\n        const cap = this.rules.block.table.exec(src);\n        if (!cap) {\n            return;\n        }\n        if (!/[:|]/.test(cap[2])) {\n            // delimiter row must have a pipe (|) or colon (:) otherwise it is a setext heading\n            return;\n        }\n        const headers = splitCells(cap[1]);\n        const aligns = cap[2].replace(/^\\||\\| *$/g, '').split('|');\n        const rows = cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : [];\n        const item = {\n            type: 'table',\n            raw: cap[0],\n            header: [],\n            align: [],\n            rows: []\n        };\n        if (headers.length !== aligns.length) {\n            // header and align columns must be equal, rows can be different.\n            return;\n        }\n        for (const align of aligns) {\n            if (/^ *-+: *$/.test(align)) {\n                item.align.push('right');\n            }\n            else if (/^ *:-+: *$/.test(align)) {\n                item.align.push('center');\n            }\n            else if (/^ *:-+ *$/.test(align)) {\n                item.align.push('left');\n            }\n            else {\n                item.align.push(null);\n            }\n        }\n        for (const header of headers) {\n            item.header.push({\n                text: header,\n                tokens: this.lexer.inline(header)\n            });\n        }\n        for (const row of rows) {\n            item.rows.push(splitCells(row, item.header.length).map(cell => {\n                return {\n                    text: cell,\n                    tokens: this.lexer.inline(cell)\n                };\n            }));\n        }\n        return item;\n    }\n    lheading(src) {\n        const cap = this.rules.block.lheading.exec(src);\n        if (cap) {\n            return {\n                type: 'heading',\n                raw: cap[0],\n                depth: cap[2].charAt(0) === '=' ? 1 : 2,\n                text: cap[1],\n                tokens: this.lexer.inline(cap[1])\n            };\n        }\n    }\n    paragraph(src) {\n        const cap = this.rules.block.paragraph.exec(src);\n        if (cap) {\n            const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n                ? cap[1].slice(0, -1)\n                : cap[1];\n            return {\n                type: 'paragraph',\n                raw: cap[0],\n                text,\n                tokens: this.lexer.inline(text)\n            };\n        }\n    }\n    text(src) {\n        const cap = this.rules.block.text.exec(src);\n        if (cap) {\n            return {\n                type: 'text',\n                raw: cap[0],\n                text: cap[0],\n                tokens: this.lexer.inline(cap[0])\n            };\n        }\n    }\n    escape(src) {\n        const cap = this.rules.inline.escape.exec(src);\n        if (cap) {\n            return {\n                type: 'escape',\n                raw: cap[0],\n                text: escape$1(cap[1])\n            };\n        }\n    }\n    tag(src) {\n        const cap = this.rules.inline.tag.exec(src);\n        if (cap) {\n            if (!this.lexer.state.inLink && /^<a /i.test(cap[0])) {\n                this.lexer.state.inLink = true;\n            }\n            else if (this.lexer.state.inLink && /^<\\/a>/i.test(cap[0])) {\n                this.lexer.state.inLink = false;\n            }\n            if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n                this.lexer.state.inRawBlock = true;\n            }\n            else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n                this.lexer.state.inRawBlock = false;\n            }\n            return {\n                type: 'html',\n                raw: cap[0],\n                inLink: this.lexer.state.inLink,\n                inRawBlock: this.lexer.state.inRawBlock,\n                block: false,\n                text: cap[0]\n            };\n        }\n    }\n    link(src) {\n        const cap = this.rules.inline.link.exec(src);\n        if (cap) {\n            const trimmedUrl = cap[2].trim();\n            if (!this.options.pedantic && /^</.test(trimmedUrl)) {\n                // commonmark requires matching angle brackets\n                if (!(/>$/.test(trimmedUrl))) {\n                    return;\n                }\n                // ending angle bracket cannot be escaped\n                const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n                if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n                    return;\n                }\n            }\n            else {\n                // find closing parenthesis\n                const lastParenIndex = findClosingBracket(cap[2], '()');\n                if (lastParenIndex > -1) {\n                    const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n                    const linkLen = start + cap[1].length + lastParenIndex;\n                    cap[2] = cap[2].substring(0, lastParenIndex);\n                    cap[0] = cap[0].substring(0, linkLen).trim();\n                    cap[3] = '';\n                }\n            }\n            let href = cap[2];\n            let title = '';\n            if (this.options.pedantic) {\n                // split pedantic href and title\n                const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n                if (link) {\n                    href = link[1];\n                    title = link[3];\n                }\n            }\n            else {\n                title = cap[3] ? cap[3].slice(1, -1) : '';\n            }\n            href = href.trim();\n            if (/^</.test(href)) {\n                if (this.options.pedantic && !(/>$/.test(trimmedUrl))) {\n                    // pedantic allows starting angle bracket without ending angle bracket\n                    href = href.slice(1);\n                }\n                else {\n                    href = href.slice(1, -1);\n                }\n            }\n            return outputLink(cap, {\n                href: href ? href.replace(this.rules.inline.anyPunctuation, '$1') : href,\n                title: title ? title.replace(this.rules.inline.anyPunctuation, '$1') : title\n            }, cap[0], this.lexer);\n        }\n    }\n    reflink(src, links) {\n        let cap;\n        if ((cap = this.rules.inline.reflink.exec(src))\n            || (cap = this.rules.inline.nolink.exec(src))) {\n            const linkString = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n            const link = links[linkString.toLowerCase()];\n            if (!link) {\n                const text = cap[0].charAt(0);\n                return {\n                    type: 'text',\n                    raw: text,\n                    text\n                };\n            }\n            return outputLink(cap, link, cap[0], this.lexer);\n        }\n    }\n    emStrong(src, maskedSrc, prevChar = '') {\n        let match = this.rules.inline.emStrongLDelim.exec(src);\n        if (!match)\n            return;\n        // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n        if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u))\n            return;\n        const nextChar = match[1] || match[2] || '';\n        if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n            // unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)\n            const lLength = [...match[0]].length - 1;\n            let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n            const endReg = match[0][0] === '*' ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;\n            endReg.lastIndex = 0;\n            // Clip maskedSrc to same section of string as src (move to lexer?)\n            maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n            while ((match = endReg.exec(maskedSrc)) != null) {\n                rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n                if (!rDelim)\n                    continue; // skip single * in __abc*abc__\n                rLength = [...rDelim].length;\n                if (match[3] || match[4]) { // found another Left Delim\n                    delimTotal += rLength;\n                    continue;\n                }\n                else if (match[5] || match[6]) { // either Left or Right Delim\n                    if (lLength % 3 && !((lLength + rLength) % 3)) {\n                        midDelimTotal += rLength;\n                        continue; // CommonMark Emphasis Rules 9-10\n                    }\n                }\n                delimTotal -= rLength;\n                if (delimTotal > 0)\n                    continue; // Haven't found enough closing delimiters\n                // Remove extra characters. *a*** -> *a*\n                rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n                // char length can be >1 for unicode characters;\n                const lastCharLength = [...match[0]][0].length;\n                const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n                // Create `em` if smallest delimiter has odd char count. *a***\n                if (Math.min(lLength, rLength) % 2) {\n                    const text = raw.slice(1, -1);\n                    return {\n                        type: 'em',\n                        raw,\n                        text,\n                        tokens: this.lexer.inlineTokens(text)\n                    };\n                }\n                // Create 'strong' if smallest delimiter has even char count. **a***\n                const text = raw.slice(2, -2);\n                return {\n                    type: 'strong',\n                    raw,\n                    text,\n                    tokens: this.lexer.inlineTokens(text)\n                };\n            }\n        }\n    }\n    codespan(src) {\n        const cap = this.rules.inline.code.exec(src);\n        if (cap) {\n            let text = cap[2].replace(/\\n/g, ' ');\n            const hasNonSpaceChars = /[^ ]/.test(text);\n            const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n            if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n                text = text.substring(1, text.length - 1);\n            }\n            text = escape$1(text, true);\n            return {\n                type: 'codespan',\n                raw: cap[0],\n                text\n            };\n        }\n    }\n    br(src) {\n        const cap = this.rules.inline.br.exec(src);\n        if (cap) {\n            return {\n                type: 'br',\n                raw: cap[0]\n            };\n        }\n    }\n    del(src) {\n        const cap = this.rules.inline.del.exec(src);\n        if (cap) {\n            return {\n                type: 'del',\n                raw: cap[0],\n                text: cap[2],\n                tokens: this.lexer.inlineTokens(cap[2])\n            };\n        }\n    }\n    autolink(src) {\n        const cap = this.rules.inline.autolink.exec(src);\n        if (cap) {\n            let text, href;\n            if (cap[2] === '@') {\n                text = escape$1(cap[1]);\n                href = 'mailto:' + text;\n            }\n            else {\n                text = escape$1(cap[1]);\n                href = text;\n            }\n            return {\n                type: 'link',\n                raw: cap[0],\n                text,\n                href,\n                tokens: [\n                    {\n                        type: 'text',\n                        raw: text,\n                        text\n                    }\n                ]\n            };\n        }\n    }\n    url(src) {\n        let cap;\n        if (cap = this.rules.inline.url.exec(src)) {\n            let text, href;\n            if (cap[2] === '@') {\n                text = escape$1(cap[0]);\n                href = 'mailto:' + text;\n            }\n            else {\n                // do extended autolink path validation\n                let prevCapZero;\n                do {\n                    prevCapZero = cap[0];\n                    cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? '';\n                } while (prevCapZero !== cap[0]);\n                text = escape$1(cap[0]);\n                if (cap[1] === 'www.') {\n                    href = 'http://' + cap[0];\n                }\n                else {\n                    href = cap[0];\n                }\n            }\n            return {\n                type: 'link',\n                raw: cap[0],\n                text,\n                href,\n                tokens: [\n                    {\n                        type: 'text',\n                        raw: text,\n                        text\n                    }\n                ]\n            };\n        }\n    }\n    inlineText(src) {\n        const cap = this.rules.inline.text.exec(src);\n        if (cap) {\n            let text;\n            if (this.lexer.state.inRawBlock) {\n                text = cap[0];\n            }\n            else {\n                text = escape$1(cap[0]);\n            }\n            return {\n                type: 'text',\n                raw: cap[0],\n                text\n            };\n        }\n    }\n}\n\n/**\n * Block-Level Grammar\n */\nconst newline = /^(?: *(?:\\n|$))+/;\nconst blockCode = /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/;\nconst fences = /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/;\nconst hr = /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/;\nconst heading = /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/;\nconst bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nconst lheading = edit(/^(?!bull )((?:.|\\n(?!\\s*?\\n|bull ))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/)\n    .replace(/bull/g, bullet) // lists can interrupt\n    .getRegex();\nconst _paragraph = /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/;\nconst blockText = /^[^\\n]+/;\nconst _blockLabel = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nconst def = edit(/^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/)\n    .replace('label', _blockLabel)\n    .replace('title', /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/)\n    .getRegex();\nconst list = edit(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/)\n    .replace(/bull/g, bullet)\n    .getRegex();\nconst _tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n    + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n    + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n    + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n    + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n    + '|track|ul';\nconst _comment = /<!--(?!-?>)[\\s\\S]*?(?:-->|$)/;\nconst html = edit('^ {0,3}(?:' // optional indentation\n    + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n    + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n    + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n    + '|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)' // (4)\n    + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)' // (5)\n    + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n    + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n    + '|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n    + ')', 'i')\n    .replace('comment', _comment)\n    .replace('tag', _tag)\n    .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n    .getRegex();\nconst paragraph = edit(_paragraph)\n    .replace('hr', hr)\n    .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n    .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n    .replace('|table', '')\n    .replace('blockquote', ' {0,3}>')\n    .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n    .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n    .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n    .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n    .getRegex();\nconst blockquote = edit(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/)\n    .replace('paragraph', paragraph)\n    .getRegex();\n/**\n * Normal Block Grammar\n */\nconst blockNormal = {\n    blockquote,\n    code: blockCode,\n    def,\n    fences,\n    heading,\n    hr,\n    html,\n    lheading,\n    list,\n    newline,\n    paragraph,\n    table: noopTest,\n    text: blockText\n};\n/**\n * GFM Block Grammar\n */\nconst gfmTable = edit('^ *([^\\\\n ].*)\\\\n' // Header\n    + ' {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)' // Align\n    + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)') // Cells\n    .replace('hr', hr)\n    .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n    .replace('blockquote', ' {0,3}>')\n    .replace('code', ' {4}[^\\\\n]')\n    .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n    .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n    .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n    .replace('tag', _tag) // tables can be interrupted by type (6) html blocks\n    .getRegex();\nconst blockGfm = {\n    ...blockNormal,\n    table: gfmTable,\n    paragraph: edit(_paragraph)\n        .replace('hr', hr)\n        .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n        .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n        .replace('table', gfmTable) // interrupt paragraphs with table\n        .replace('blockquote', ' {0,3}>')\n        .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n        .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n        .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n        .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n        .getRegex()\n};\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\nconst blockPedantic = {\n    ...blockNormal,\n    html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)'\n        + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n        + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n        .replace('comment', _comment)\n        .replace(/tag/g, '(?!(?:'\n        + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n        + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n        + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n        .getRegex(),\n    def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n    heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n    fences: noopTest, // fences not supported\n    lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n    paragraph: edit(_paragraph)\n        .replace('hr', hr)\n        .replace('heading', ' *#{1,6} *[^\\n]')\n        .replace('lheading', lheading)\n        .replace('|table', '')\n        .replace('blockquote', ' {0,3}>')\n        .replace('|fences', '')\n        .replace('|list', '')\n        .replace('|html', '')\n        .replace('|tag', '')\n        .getRegex()\n};\n/**\n * Inline-Level Grammar\n */\nconst escape = /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/;\nconst inlineCode = /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/;\nconst br = /^( {2,}|\\\\)\\n(?!\\s*$)/;\nconst inlineText = /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/;\n// list of unicode punctuation marks, plus any missing characters from CommonMark spec\nconst _punctuation = '\\\\p{P}$+<=>`^|~';\nconst punctuation = edit(/^((?![*_])[\\spunctuation])/, 'u')\n    .replace(/punctuation/g, _punctuation).getRegex();\n// sequences em should skip over [title](link), `code`, <html>\nconst blockSkip = /\\[[^[\\]]*?\\]\\([^\\(\\)]*?\\)|`[^`]*?`|<[^<>]*?>/g;\nconst emStrongLDelim = edit(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/, 'u')\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst emStrongRDelimAst = edit('^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n    + '|[^*]+(?=[^*])' // Consume to delim\n    + '|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n    + '|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)' // (2) a***#, a*** can only be a Right Delimiter\n    + '|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])' // (3) #***a, ***a can only be Left Delimiter\n    + '|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])' // (4) ***# can only be Left Delimiter\n    + '|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])' // (5) #***# can be either Left or Right Delimiter\n    + '|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])', 'gu') // (6) a***a can be either Left or Right Delimiter\n    .replace(/punct/g, _punctuation)\n    .getRegex();\n// (6) Not allowed for _\nconst emStrongRDelimUnd = edit('^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n    + '|[^_]+(?=[^_])' // Consume to delim\n    + '|(?!_)[punct](_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n    + '|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)' // (2) a___#, a___ can only be a Right Delimiter\n    + '|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])' // (3) #___a, ___a can only be Left Delimiter\n    + '|[\\\\s](_+)(?!_)(?=[punct])' // (4) ___# can only be Left Delimiter\n    + '|(?!_)[punct](_+)(?!_)(?=[punct])', 'gu') // (5) #___# can be either Left or Right Delimiter\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst anyPunctuation = edit(/\\\\([punct])/, 'gu')\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst autolink = edit(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/)\n    .replace('scheme', /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/)\n    .replace('email', /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/)\n    .getRegex();\nconst _inlineComment = edit(_comment).replace('(?:-->|$)', '-->').getRegex();\nconst tag = edit('^comment'\n    + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n    + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n    + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n    + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n    + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>') // CDATA section\n    .replace('comment', _inlineComment)\n    .replace('attribute', /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/)\n    .getRegex();\nconst _inlineLabel = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\nconst link = edit(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/)\n    .replace('label', _inlineLabel)\n    .replace('href', /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/)\n    .replace('title', /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/)\n    .getRegex();\nconst reflink = edit(/^!?\\[(label)\\]\\[(ref)\\]/)\n    .replace('label', _inlineLabel)\n    .replace('ref', _blockLabel)\n    .getRegex();\nconst nolink = edit(/^!?\\[(ref)\\](?:\\[\\])?/)\n    .replace('ref', _blockLabel)\n    .getRegex();\nconst reflinkSearch = edit('reflink|nolink(?!\\\\()', 'g')\n    .replace('reflink', reflink)\n    .replace('nolink', nolink)\n    .getRegex();\n/**\n * Normal Inline Grammar\n */\nconst inlineNormal = {\n    _backpedal: noopTest, // only used for GFM url\n    anyPunctuation,\n    autolink,\n    blockSkip,\n    br,\n    code: inlineCode,\n    del: noopTest,\n    emStrongLDelim,\n    emStrongRDelimAst,\n    emStrongRDelimUnd,\n    escape,\n    link,\n    nolink,\n    punctuation,\n    reflink,\n    reflinkSearch,\n    tag,\n    text: inlineText,\n    url: noopTest\n};\n/**\n * Pedantic Inline Grammar\n */\nconst inlinePedantic = {\n    ...inlineNormal,\n    link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n        .replace('label', _inlineLabel)\n        .getRegex(),\n    reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n        .replace('label', _inlineLabel)\n        .getRegex()\n};\n/**\n * GFM Inline Grammar\n */\nconst inlineGfm = {\n    ...inlineNormal,\n    escape: edit(escape).replace('])', '~|])').getRegex(),\n    url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/, 'i')\n        .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)\n        .getRegex(),\n    _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n    del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n    text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)))/\n};\n/**\n * GFM + Line Breaks Inline Grammar\n */\nconst inlineBreaks = {\n    ...inlineGfm,\n    br: edit(br).replace('{2,}', '*').getRegex(),\n    text: edit(inlineGfm.text)\n        .replace('\\\\b_', '\\\\b_| {2,}\\\\n')\n        .replace(/\\{2,\\}/g, '*')\n        .getRegex()\n};\n/**\n * exports\n */\nconst block = {\n    normal: blockNormal,\n    gfm: blockGfm,\n    pedantic: blockPedantic\n};\nconst inline = {\n    normal: inlineNormal,\n    gfm: inlineGfm,\n    breaks: inlineBreaks,\n    pedantic: inlinePedantic\n};\n\n/**\n * Block Lexer\n */\nclass _Lexer {\n    tokens;\n    options;\n    state;\n    tokenizer;\n    inlineQueue;\n    constructor(options) {\n        // TokenList cannot be created in one go\n        this.tokens = [];\n        this.tokens.links = Object.create(null);\n        this.options = options || exports.defaults;\n        this.options.tokenizer = this.options.tokenizer || new _Tokenizer();\n        this.tokenizer = this.options.tokenizer;\n        this.tokenizer.options = this.options;\n        this.tokenizer.lexer = this;\n        this.inlineQueue = [];\n        this.state = {\n            inLink: false,\n            inRawBlock: false,\n            top: true\n        };\n        const rules = {\n            block: block.normal,\n            inline: inline.normal\n        };\n        if (this.options.pedantic) {\n            rules.block = block.pedantic;\n            rules.inline = inline.pedantic;\n        }\n        else if (this.options.gfm) {\n            rules.block = block.gfm;\n            if (this.options.breaks) {\n                rules.inline = inline.breaks;\n            }\n            else {\n                rules.inline = inline.gfm;\n            }\n        }\n        this.tokenizer.rules = rules;\n    }\n    /**\n     * Expose Rules\n     */\n    static get rules() {\n        return {\n            block,\n            inline\n        };\n    }\n    /**\n     * Static Lex Method\n     */\n    static lex(src, options) {\n        const lexer = new _Lexer(options);\n        return lexer.lex(src);\n    }\n    /**\n     * Static Lex Inline Method\n     */\n    static lexInline(src, options) {\n        const lexer = new _Lexer(options);\n        return lexer.inlineTokens(src);\n    }\n    /**\n     * Preprocessing\n     */\n    lex(src) {\n        src = src\n            .replace(/\\r\\n|\\r/g, '\\n');\n        this.blockTokens(src, this.tokens);\n        for (let i = 0; i < this.inlineQueue.length; i++) {\n            const next = this.inlineQueue[i];\n            this.inlineTokens(next.src, next.tokens);\n        }\n        this.inlineQueue = [];\n        return this.tokens;\n    }\n    blockTokens(src, tokens = []) {\n        if (this.options.pedantic) {\n            src = src.replace(/\\t/g, '    ').replace(/^ +$/gm, '');\n        }\n        else {\n            src = src.replace(/^( *)(\\t+)/gm, (_, leading, tabs) => {\n                return leading + '    '.repeat(tabs.length);\n            });\n        }\n        let token;\n        let lastToken;\n        let cutSrc;\n        let lastParagraphClipped;\n        while (src) {\n            if (this.options.extensions\n                && this.options.extensions.block\n                && this.options.extensions.block.some((extTokenizer) => {\n                    if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n                        src = src.substring(token.raw.length);\n                        tokens.push(token);\n                        return true;\n                    }\n                    return false;\n                })) {\n                continue;\n            }\n            // newline\n            if (token = this.tokenizer.space(src)) {\n                src = src.substring(token.raw.length);\n                if (token.raw.length === 1 && tokens.length > 0) {\n                    // if there's a single \\n as a spacer, it's terminating the last line,\n                    // so move it there so that we don't get unnecessary paragraph tags\n                    tokens[tokens.length - 1].raw += '\\n';\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // code\n            if (token = this.tokenizer.code(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                // An indented code block cannot interrupt a paragraph.\n                if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // fences\n            if (token = this.tokenizer.fences(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // heading\n            if (token = this.tokenizer.heading(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // hr\n            if (token = this.tokenizer.hr(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // blockquote\n            if (token = this.tokenizer.blockquote(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // list\n            if (token = this.tokenizer.list(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // html\n            if (token = this.tokenizer.html(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // def\n            if (token = this.tokenizer.def(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.raw;\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else if (!this.tokens.links[token.tag]) {\n                    this.tokens.links[token.tag] = {\n                        href: token.href,\n                        title: token.title\n                    };\n                }\n                continue;\n            }\n            // table (gfm)\n            if (token = this.tokenizer.table(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // lheading\n            if (token = this.tokenizer.lheading(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // top-level paragraph\n            // prevent paragraph consuming extensions by clipping 'src' to extension start\n            cutSrc = src;\n            if (this.options.extensions && this.options.extensions.startBlock) {\n                let startIndex = Infinity;\n                const tempSrc = src.slice(1);\n                let tempStart;\n                this.options.extensions.startBlock.forEach((getStartIndex) => {\n                    tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n                    if (typeof tempStart === 'number' && tempStart >= 0) {\n                        startIndex = Math.min(startIndex, tempStart);\n                    }\n                });\n                if (startIndex < Infinity && startIndex >= 0) {\n                    cutSrc = src.substring(0, startIndex + 1);\n                }\n            }\n            if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n                lastToken = tokens[tokens.length - 1];\n                if (lastParagraphClipped && lastToken.type === 'paragraph') {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue.pop();\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                lastParagraphClipped = (cutSrc.length !== src.length);\n                src = src.substring(token.raw.length);\n                continue;\n            }\n            // text\n            if (token = this.tokenizer.text(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && lastToken.type === 'text') {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue.pop();\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            if (src) {\n                const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n                if (this.options.silent) {\n                    console.error(errMsg);\n                    break;\n                }\n                else {\n                    throw new Error(errMsg);\n                }\n            }\n        }\n        this.state.top = true;\n        return tokens;\n    }\n    inline(src, tokens = []) {\n        this.inlineQueue.push({ src, tokens });\n        return tokens;\n    }\n    /**\n     * Lexing/Compiling\n     */\n    inlineTokens(src, tokens = []) {\n        let token, lastToken, cutSrc;\n        // String with links masked to avoid interference with em and strong\n        let maskedSrc = src;\n        let match;\n        let keepPrevChar, prevChar;\n        // Mask out reflinks\n        if (this.tokens.links) {\n            const links = Object.keys(this.tokens.links);\n            if (links.length > 0) {\n                while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n                    if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n                        maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n                    }\n                }\n            }\n        }\n        // Mask out other blocks\n        while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n            maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n        }\n        // Mask out escaped characters\n        while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {\n            maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);\n        }\n        while (src) {\n            if (!keepPrevChar) {\n                prevChar = '';\n            }\n            keepPrevChar = false;\n            // extensions\n            if (this.options.extensions\n                && this.options.extensions.inline\n                && this.options.extensions.inline.some((extTokenizer) => {\n                    if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n                        src = src.substring(token.raw.length);\n                        tokens.push(token);\n                        return true;\n                    }\n                    return false;\n                })) {\n                continue;\n            }\n            // escape\n            if (token = this.tokenizer.escape(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // tag\n            if (token = this.tokenizer.tag(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // link\n            if (token = this.tokenizer.link(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // reflink, nolink\n            if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // em & strong\n            if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // code\n            if (token = this.tokenizer.codespan(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // br\n            if (token = this.tokenizer.br(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // del (gfm)\n            if (token = this.tokenizer.del(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // autolink\n            if (token = this.tokenizer.autolink(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // url (gfm)\n            if (!this.state.inLink && (token = this.tokenizer.url(src))) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // text\n            // prevent inlineText consuming extensions by clipping 'src' to extension start\n            cutSrc = src;\n            if (this.options.extensions && this.options.extensions.startInline) {\n                let startIndex = Infinity;\n                const tempSrc = src.slice(1);\n                let tempStart;\n                this.options.extensions.startInline.forEach((getStartIndex) => {\n                    tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n                    if (typeof tempStart === 'number' && tempStart >= 0) {\n                        startIndex = Math.min(startIndex, tempStart);\n                    }\n                });\n                if (startIndex < Infinity && startIndex >= 0) {\n                    cutSrc = src.substring(0, startIndex + 1);\n                }\n            }\n            if (token = this.tokenizer.inlineText(cutSrc)) {\n                src = src.substring(token.raw.length);\n                if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n                    prevChar = token.raw.slice(-1);\n                }\n                keepPrevChar = true;\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            if (src) {\n                const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n                if (this.options.silent) {\n                    console.error(errMsg);\n                    break;\n                }\n                else {\n                    throw new Error(errMsg);\n                }\n            }\n        }\n        return tokens;\n    }\n}\n\n/**\n * Renderer\n */\nclass _Renderer {\n    options;\n    constructor(options) {\n        this.options = options || exports.defaults;\n    }\n    code(code, infostring, escaped) {\n        const lang = (infostring || '').match(/^\\S*/)?.[0];\n        code = code.replace(/\\n$/, '') + '\\n';\n        if (!lang) {\n            return '<pre><code>'\n                + (escaped ? code : escape$1(code, true))\n                + '</code></pre>\\n';\n        }\n        return '<pre><code class=\"language-'\n            + escape$1(lang)\n            + '\">'\n            + (escaped ? code : escape$1(code, true))\n            + '</code></pre>\\n';\n    }\n    blockquote(quote) {\n        return `<blockquote>\\n${quote}</blockquote>\\n`;\n    }\n    html(html, block) {\n        return html;\n    }\n    heading(text, level, raw) {\n        // ignore IDs\n        return `<h${level}>${text}</h${level}>\\n`;\n    }\n    hr() {\n        return '<hr>\\n';\n    }\n    list(body, ordered, start) {\n        const type = ordered ? 'ol' : 'ul';\n        const startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n        return '<' + type + startatt + '>\\n' + body + '</' + type + '>\\n';\n    }\n    listitem(text, task, checked) {\n        return `<li>${text}</li>\\n`;\n    }\n    checkbox(checked) {\n        return '<input '\n            + (checked ? 'checked=\"\" ' : '')\n            + 'disabled=\"\" type=\"checkbox\">';\n    }\n    paragraph(text) {\n        return `<p>${text}</p>\\n`;\n    }\n    table(header, body) {\n        if (body)\n            body = `<tbody>${body}</tbody>`;\n        return '<table>\\n'\n            + '<thead>\\n'\n            + header\n            + '</thead>\\n'\n            + body\n            + '</table>\\n';\n    }\n    tablerow(content) {\n        return `<tr>\\n${content}</tr>\\n`;\n    }\n    tablecell(content, flags) {\n        const type = flags.header ? 'th' : 'td';\n        const tag = flags.align\n            ? `<${type} align=\"${flags.align}\">`\n            : `<${type}>`;\n        return tag + content + `</${type}>\\n`;\n    }\n    /**\n     * span level renderer\n     */\n    strong(text) {\n        return `<strong>${text}</strong>`;\n    }\n    em(text) {\n        return `<em>${text}</em>`;\n    }\n    codespan(text) {\n        return `<code>${text}</code>`;\n    }\n    br() {\n        return '<br>';\n    }\n    del(text) {\n        return `<del>${text}</del>`;\n    }\n    link(href, title, text) {\n        const cleanHref = cleanUrl(href);\n        if (cleanHref === null) {\n            return text;\n        }\n        href = cleanHref;\n        let out = '<a href=\"' + href + '\"';\n        if (title) {\n            out += ' title=\"' + title + '\"';\n        }\n        out += '>' + text + '</a>';\n        return out;\n    }\n    image(href, title, text) {\n        const cleanHref = cleanUrl(href);\n        if (cleanHref === null) {\n            return text;\n        }\n        href = cleanHref;\n        let out = `<img src=\"${href}\" alt=\"${text}\"`;\n        if (title) {\n            out += ` title=\"${title}\"`;\n        }\n        out += '>';\n        return out;\n    }\n    text(text) {\n        return text;\n    }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass _TextRenderer {\n    // no need for block level renderers\n    strong(text) {\n        return text;\n    }\n    em(text) {\n        return text;\n    }\n    codespan(text) {\n        return text;\n    }\n    del(text) {\n        return text;\n    }\n    html(text) {\n        return text;\n    }\n    text(text) {\n        return text;\n    }\n    link(href, title, text) {\n        return '' + text;\n    }\n    image(href, title, text) {\n        return '' + text;\n    }\n    br() {\n        return '';\n    }\n}\n\n/**\n * Parsing & Compiling\n */\nclass _Parser {\n    options;\n    renderer;\n    textRenderer;\n    constructor(options) {\n        this.options = options || exports.defaults;\n        this.options.renderer = this.options.renderer || new _Renderer();\n        this.renderer = this.options.renderer;\n        this.renderer.options = this.options;\n        this.textRenderer = new _TextRenderer();\n    }\n    /**\n     * Static Parse Method\n     */\n    static parse(tokens, options) {\n        const parser = new _Parser(options);\n        return parser.parse(tokens);\n    }\n    /**\n     * Static Parse Inline Method\n     */\n    static parseInline(tokens, options) {\n        const parser = new _Parser(options);\n        return parser.parseInline(tokens);\n    }\n    /**\n     * Parse Loop\n     */\n    parse(tokens, top = true) {\n        let out = '';\n        for (let i = 0; i < tokens.length; i++) {\n            const token = tokens[i];\n            // Run any renderer extensions\n            if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n                const genericToken = token;\n                const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);\n                if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(genericToken.type)) {\n                    out += ret || '';\n                    continue;\n                }\n            }\n            switch (token.type) {\n                case 'space': {\n                    continue;\n                }\n                case 'hr': {\n                    out += this.renderer.hr();\n                    continue;\n                }\n                case 'heading': {\n                    const headingToken = token;\n                    out += this.renderer.heading(this.parseInline(headingToken.tokens), headingToken.depth, unescape(this.parseInline(headingToken.tokens, this.textRenderer)));\n                    continue;\n                }\n                case 'code': {\n                    const codeToken = token;\n                    out += this.renderer.code(codeToken.text, codeToken.lang, !!codeToken.escaped);\n                    continue;\n                }\n                case 'table': {\n                    const tableToken = token;\n                    let header = '';\n                    // header\n                    let cell = '';\n                    for (let j = 0; j < tableToken.header.length; j++) {\n                        cell += this.renderer.tablecell(this.parseInline(tableToken.header[j].tokens), { header: true, align: tableToken.align[j] });\n                    }\n                    header += this.renderer.tablerow(cell);\n                    let body = '';\n                    for (let j = 0; j < tableToken.rows.length; j++) {\n                        const row = tableToken.rows[j];\n                        cell = '';\n                        for (let k = 0; k < row.length; k++) {\n                            cell += this.renderer.tablecell(this.parseInline(row[k].tokens), { header: false, align: tableToken.align[k] });\n                        }\n                        body += this.renderer.tablerow(cell);\n                    }\n                    out += this.renderer.table(header, body);\n                    continue;\n                }\n                case 'blockquote': {\n                    const blockquoteToken = token;\n                    const body = this.parse(blockquoteToken.tokens);\n                    out += this.renderer.blockquote(body);\n                    continue;\n                }\n                case 'list': {\n                    const listToken = token;\n                    const ordered = listToken.ordered;\n                    const start = listToken.start;\n                    const loose = listToken.loose;\n                    let body = '';\n                    for (let j = 0; j < listToken.items.length; j++) {\n                        const item = listToken.items[j];\n                        const checked = item.checked;\n                        const task = item.task;\n                        let itemBody = '';\n                        if (item.task) {\n                            const checkbox = this.renderer.checkbox(!!checked);\n                            if (loose) {\n                                if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n                                    item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n                                    if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n                                        item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n                                    }\n                                }\n                                else {\n                                    item.tokens.unshift({\n                                        type: 'text',\n                                        text: checkbox + ' '\n                                    });\n                                }\n                            }\n                            else {\n                                itemBody += checkbox + ' ';\n                            }\n                        }\n                        itemBody += this.parse(item.tokens, loose);\n                        body += this.renderer.listitem(itemBody, task, !!checked);\n                    }\n                    out += this.renderer.list(body, ordered, start);\n                    continue;\n                }\n                case 'html': {\n                    const htmlToken = token;\n                    out += this.renderer.html(htmlToken.text, htmlToken.block);\n                    continue;\n                }\n                case 'paragraph': {\n                    const paragraphToken = token;\n                    out += this.renderer.paragraph(this.parseInline(paragraphToken.tokens));\n                    continue;\n                }\n                case 'text': {\n                    let textToken = token;\n                    let body = textToken.tokens ? this.parseInline(textToken.tokens) : textToken.text;\n                    while (i + 1 < tokens.length && tokens[i + 1].type === 'text') {\n                        textToken = tokens[++i];\n                        body += '\\n' + (textToken.tokens ? this.parseInline(textToken.tokens) : textToken.text);\n                    }\n                    out += top ? this.renderer.paragraph(body) : body;\n                    continue;\n                }\n                default: {\n                    const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n                    if (this.options.silent) {\n                        console.error(errMsg);\n                        return '';\n                    }\n                    else {\n                        throw new Error(errMsg);\n                    }\n                }\n            }\n        }\n        return out;\n    }\n    /**\n     * Parse Inline Tokens\n     */\n    parseInline(tokens, renderer) {\n        renderer = renderer || this.renderer;\n        let out = '';\n        for (let i = 0; i < tokens.length; i++) {\n            const token = tokens[i];\n            // Run any renderer extensions\n            if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n                const ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n                if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n                    out += ret || '';\n                    continue;\n                }\n            }\n            switch (token.type) {\n                case 'escape': {\n                    const escapeToken = token;\n                    out += renderer.text(escapeToken.text);\n                    break;\n                }\n                case 'html': {\n                    const tagToken = token;\n                    out += renderer.html(tagToken.text);\n                    break;\n                }\n                case 'link': {\n                    const linkToken = token;\n                    out += renderer.link(linkToken.href, linkToken.title, this.parseInline(linkToken.tokens, renderer));\n                    break;\n                }\n                case 'image': {\n                    const imageToken = token;\n                    out += renderer.image(imageToken.href, imageToken.title, imageToken.text);\n                    break;\n                }\n                case 'strong': {\n                    const strongToken = token;\n                    out += renderer.strong(this.parseInline(strongToken.tokens, renderer));\n                    break;\n                }\n                case 'em': {\n                    const emToken = token;\n                    out += renderer.em(this.parseInline(emToken.tokens, renderer));\n                    break;\n                }\n                case 'codespan': {\n                    const codespanToken = token;\n                    out += renderer.codespan(codespanToken.text);\n                    break;\n                }\n                case 'br': {\n                    out += renderer.br();\n                    break;\n                }\n                case 'del': {\n                    const delToken = token;\n                    out += renderer.del(this.parseInline(delToken.tokens, renderer));\n                    break;\n                }\n                case 'text': {\n                    const textToken = token;\n                    out += renderer.text(textToken.text);\n                    break;\n                }\n                default: {\n                    const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n                    if (this.options.silent) {\n                        console.error(errMsg);\n                        return '';\n                    }\n                    else {\n                        throw new Error(errMsg);\n                    }\n                }\n            }\n        }\n        return out;\n    }\n}\n\nclass _Hooks {\n    options;\n    constructor(options) {\n        this.options = options || exports.defaults;\n    }\n    static passThroughHooks = new Set([\n        'preprocess',\n        'postprocess',\n        'processAllTokens'\n    ]);\n    /**\n     * Process markdown before marked\n     */\n    preprocess(markdown) {\n        return markdown;\n    }\n    /**\n     * Process HTML after marked is finished\n     */\n    postprocess(html) {\n        return html;\n    }\n    /**\n     * Process all tokens before walk tokens\n     */\n    processAllTokens(tokens) {\n        return tokens;\n    }\n}\n\nclass Marked {\n    defaults = _getDefaults();\n    options = this.setOptions;\n    parse = this.#parseMarkdown(_Lexer.lex, _Parser.parse);\n    parseInline = this.#parseMarkdown(_Lexer.lexInline, _Parser.parseInline);\n    Parser = _Parser;\n    Renderer = _Renderer;\n    TextRenderer = _TextRenderer;\n    Lexer = _Lexer;\n    Tokenizer = _Tokenizer;\n    Hooks = _Hooks;\n    constructor(...args) {\n        this.use(...args);\n    }\n    /**\n     * Run callback for every token\n     */\n    walkTokens(tokens, callback) {\n        let values = [];\n        for (const token of tokens) {\n            values = values.concat(callback.call(this, token));\n            switch (token.type) {\n                case 'table': {\n                    const tableToken = token;\n                    for (const cell of tableToken.header) {\n                        values = values.concat(this.walkTokens(cell.tokens, callback));\n                    }\n                    for (const row of tableToken.rows) {\n                        for (const cell of row) {\n                            values = values.concat(this.walkTokens(cell.tokens, callback));\n                        }\n                    }\n                    break;\n                }\n                case 'list': {\n                    const listToken = token;\n                    values = values.concat(this.walkTokens(listToken.items, callback));\n                    break;\n                }\n                default: {\n                    const genericToken = token;\n                    if (this.defaults.extensions?.childTokens?.[genericToken.type]) {\n                        this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {\n                            const tokens = genericToken[childTokens].flat(Infinity);\n                            values = values.concat(this.walkTokens(tokens, callback));\n                        });\n                    }\n                    else if (genericToken.tokens) {\n                        values = values.concat(this.walkTokens(genericToken.tokens, callback));\n                    }\n                }\n            }\n        }\n        return values;\n    }\n    use(...args) {\n        const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };\n        args.forEach((pack) => {\n            // copy options to new object\n            const opts = { ...pack };\n            // set async to true if it was set to true before\n            opts.async = this.defaults.async || opts.async || false;\n            // ==-- Parse \"addon\" extensions --== //\n            if (pack.extensions) {\n                pack.extensions.forEach((ext) => {\n                    if (!ext.name) {\n                        throw new Error('extension name required');\n                    }\n                    if ('renderer' in ext) { // Renderer extensions\n                        const prevRenderer = extensions.renderers[ext.name];\n                        if (prevRenderer) {\n                            // Replace extension with func to run new extension but fall back if false\n                            extensions.renderers[ext.name] = function (...args) {\n                                let ret = ext.renderer.apply(this, args);\n                                if (ret === false) {\n                                    ret = prevRenderer.apply(this, args);\n                                }\n                                return ret;\n                            };\n                        }\n                        else {\n                            extensions.renderers[ext.name] = ext.renderer;\n                        }\n                    }\n                    if ('tokenizer' in ext) { // Tokenizer Extensions\n                        if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n                            throw new Error(\"extension level must be 'block' or 'inline'\");\n                        }\n                        const extLevel = extensions[ext.level];\n                        if (extLevel) {\n                            extLevel.unshift(ext.tokenizer);\n                        }\n                        else {\n                            extensions[ext.level] = [ext.tokenizer];\n                        }\n                        if (ext.start) { // Function to check for start of token\n                            if (ext.level === 'block') {\n                                if (extensions.startBlock) {\n                                    extensions.startBlock.push(ext.start);\n                                }\n                                else {\n                                    extensions.startBlock = [ext.start];\n                                }\n                            }\n                            else if (ext.level === 'inline') {\n                                if (extensions.startInline) {\n                                    extensions.startInline.push(ext.start);\n                                }\n                                else {\n                                    extensions.startInline = [ext.start];\n                                }\n                            }\n                        }\n                    }\n                    if ('childTokens' in ext && ext.childTokens) { // Child tokens to be visited by walkTokens\n                        extensions.childTokens[ext.name] = ext.childTokens;\n                    }\n                });\n                opts.extensions = extensions;\n            }\n            // ==-- Parse \"overwrite\" extensions --== //\n            if (pack.renderer) {\n                const renderer = this.defaults.renderer || new _Renderer(this.defaults);\n                for (const prop in pack.renderer) {\n                    if (!(prop in renderer)) {\n                        throw new Error(`renderer '${prop}' does not exist`);\n                    }\n                    if (prop === 'options') {\n                        // ignore options property\n                        continue;\n                    }\n                    const rendererProp = prop;\n                    const rendererFunc = pack.renderer[rendererProp];\n                    const prevRenderer = renderer[rendererProp];\n                    // Replace renderer with func to run extension, but fall back if false\n                    renderer[rendererProp] = (...args) => {\n                        let ret = rendererFunc.apply(renderer, args);\n                        if (ret === false) {\n                            ret = prevRenderer.apply(renderer, args);\n                        }\n                        return ret || '';\n                    };\n                }\n                opts.renderer = renderer;\n            }\n            if (pack.tokenizer) {\n                const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);\n                for (const prop in pack.tokenizer) {\n                    if (!(prop in tokenizer)) {\n                        throw new Error(`tokenizer '${prop}' does not exist`);\n                    }\n                    if (['options', 'rules', 'lexer'].includes(prop)) {\n                        // ignore options, rules, and lexer properties\n                        continue;\n                    }\n                    const tokenizerProp = prop;\n                    const tokenizerFunc = pack.tokenizer[tokenizerProp];\n                    const prevTokenizer = tokenizer[tokenizerProp];\n                    // Replace tokenizer with func to run extension, but fall back if false\n                    // @ts-expect-error cannot type tokenizer function dynamically\n                    tokenizer[tokenizerProp] = (...args) => {\n                        let ret = tokenizerFunc.apply(tokenizer, args);\n                        if (ret === false) {\n                            ret = prevTokenizer.apply(tokenizer, args);\n                        }\n                        return ret;\n                    };\n                }\n                opts.tokenizer = tokenizer;\n            }\n            // ==-- Parse Hooks extensions --== //\n            if (pack.hooks) {\n                const hooks = this.defaults.hooks || new _Hooks();\n                for (const prop in pack.hooks) {\n                    if (!(prop in hooks)) {\n                        throw new Error(`hook '${prop}' does not exist`);\n                    }\n                    if (prop === 'options') {\n                        // ignore options property\n                        continue;\n                    }\n                    const hooksProp = prop;\n                    const hooksFunc = pack.hooks[hooksProp];\n                    const prevHook = hooks[hooksProp];\n                    if (_Hooks.passThroughHooks.has(prop)) {\n                        // @ts-expect-error cannot type hook function dynamically\n                        hooks[hooksProp] = (arg) => {\n                            if (this.defaults.async) {\n                                return Promise.resolve(hooksFunc.call(hooks, arg)).then(ret => {\n                                    return prevHook.call(hooks, ret);\n                                });\n                            }\n                            const ret = hooksFunc.call(hooks, arg);\n                            return prevHook.call(hooks, ret);\n                        };\n                    }\n                    else {\n                        // @ts-expect-error cannot type hook function dynamically\n                        hooks[hooksProp] = (...args) => {\n                            let ret = hooksFunc.apply(hooks, args);\n                            if (ret === false) {\n                                ret = prevHook.apply(hooks, args);\n                            }\n                            return ret;\n                        };\n                    }\n                }\n                opts.hooks = hooks;\n            }\n            // ==-- Parse WalkTokens extensions --== //\n            if (pack.walkTokens) {\n                const walkTokens = this.defaults.walkTokens;\n                const packWalktokens = pack.walkTokens;\n                opts.walkTokens = function (token) {\n                    let values = [];\n                    values.push(packWalktokens.call(this, token));\n                    if (walkTokens) {\n                        values = values.concat(walkTokens.call(this, token));\n                    }\n                    return values;\n                };\n            }\n            this.defaults = { ...this.defaults, ...opts };\n        });\n        return this;\n    }\n    setOptions(opt) {\n        this.defaults = { ...this.defaults, ...opt };\n        return this;\n    }\n    lexer(src, options) {\n        return _Lexer.lex(src, options ?? this.defaults);\n    }\n    parser(tokens, options) {\n        return _Parser.parse(tokens, options ?? this.defaults);\n    }\n    #parseMarkdown(lexer, parser) {\n        return (src, options) => {\n            const origOpt = { ...options };\n            const opt = { ...this.defaults, ...origOpt };\n            // Show warning if an extension set async to true but the parse was called with async: false\n            if (this.defaults.async === true && origOpt.async === false) {\n                if (!opt.silent) {\n                    console.warn('marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored.');\n                }\n                opt.async = true;\n            }\n            const throwError = this.#onError(!!opt.silent, !!opt.async);\n            // throw error in case of non string input\n            if (typeof src === 'undefined' || src === null) {\n                return throwError(new Error('marked(): input parameter is undefined or null'));\n            }\n            if (typeof src !== 'string') {\n                return throwError(new Error('marked(): input parameter is of type '\n                    + Object.prototype.toString.call(src) + ', string expected'));\n            }\n            if (opt.hooks) {\n                opt.hooks.options = opt;\n            }\n            if (opt.async) {\n                return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src)\n                    .then(src => lexer(src, opt))\n                    .then(tokens => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens)\n                    .then(tokens => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens)\n                    .then(tokens => parser(tokens, opt))\n                    .then(html => opt.hooks ? opt.hooks.postprocess(html) : html)\n                    .catch(throwError);\n            }\n            try {\n                if (opt.hooks) {\n                    src = opt.hooks.preprocess(src);\n                }\n                let tokens = lexer(src, opt);\n                if (opt.hooks) {\n                    tokens = opt.hooks.processAllTokens(tokens);\n                }\n                if (opt.walkTokens) {\n                    this.walkTokens(tokens, opt.walkTokens);\n                }\n                let html = parser(tokens, opt);\n                if (opt.hooks) {\n                    html = opt.hooks.postprocess(html);\n                }\n                return html;\n            }\n            catch (e) {\n                return throwError(e);\n            }\n        };\n    }\n    #onError(silent, async) {\n        return (e) => {\n            e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n            if (silent) {\n                const msg = '<p>An error occurred:</p><pre>'\n                    + escape$1(e.message + '', true)\n                    + '</pre>';\n                if (async) {\n                    return Promise.resolve(msg);\n                }\n                return msg;\n            }\n            if (async) {\n                return Promise.reject(e);\n            }\n            throw e;\n        };\n    }\n}\n\nconst markedInstance = new Marked();\nfunction marked(src, opt) {\n    return markedInstance.parse(src, opt);\n}\n/**\n * Sets the default options.\n *\n * @param options Hash of options\n */\nmarked.options =\n    marked.setOptions = function (options) {\n        markedInstance.setOptions(options);\n        marked.defaults = markedInstance.defaults;\n        changeDefaults(marked.defaults);\n        return marked;\n    };\n/**\n * Gets the original marked default options.\n */\nmarked.getDefaults = _getDefaults;\nmarked.defaults = exports.defaults;\n/**\n * Use Extension\n */\nmarked.use = function (...args) {\n    markedInstance.use(...args);\n    marked.defaults = markedInstance.defaults;\n    changeDefaults(marked.defaults);\n    return marked;\n};\n/**\n * Run callback for every token\n */\nmarked.walkTokens = function (tokens, callback) {\n    return markedInstance.walkTokens(tokens, callback);\n};\n/**\n * Compiles markdown to HTML without enclosing `p` tag.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options\n * @return String of compiled HTML\n */\nmarked.parseInline = markedInstance.parseInline;\n/**\n * Expose\n */\nmarked.Parser = _Parser;\nmarked.parser = _Parser.parse;\nmarked.Renderer = _Renderer;\nmarked.TextRenderer = _TextRenderer;\nmarked.Lexer = _Lexer;\nmarked.lexer = _Lexer.lex;\nmarked.Tokenizer = _Tokenizer;\nmarked.Hooks = _Hooks;\nmarked.parse = marked;\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = _Parser.parse;\nconst lexer = _Lexer.lex;\n\nexports.Hooks = _Hooks;\nexports.Lexer = _Lexer;\nexports.Marked = Marked;\nexports.Parser = _Parser;\nexports.Renderer = _Renderer;\nexports.TextRenderer = _TextRenderer;\nexports.Tokenizer = _Tokenizer;\nexports.getDefaults = _getDefaults;\nexports.lexer = lexer;\nexports.marked = marked;\nexports.options = options;\nexports.parse = parse;\nexports.parseInline = parseInline;\nexports.parser = parser;\nexports.setOptions = setOptions;\nexports.use = use;\nexports.walkTokens = walkTokens;\n//# sourceMappingURL=marked.cjs.map\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/marked/lib/marked.cjs?\n}");

/***/ }),

/***/ "./node_modules/sweetalert2/dist/sweetalert2.all.js":
/*!**********************************************************!*\
  !*** ./node_modules/sweetalert2/dist/sweetalert2.all.js ***!
  \**********************************************************/
/***/ (function(module) {

eval("{/*!\n* sweetalert2 v11.0.17\n* Released under the MIT License.\n*/\n(function (global, factory) {\n   true ? module.exports = factory() :\n  0;\n}(this, function () { 'use strict';\n\n  const DismissReason = Object.freeze({\n    cancel: 'cancel',\n    backdrop: 'backdrop',\n    close: 'close',\n    esc: 'esc',\n    timer: 'timer'\n  });\n\n  const consolePrefix = 'SweetAlert2:';\n  /**\n   * Filter the unique values into a new array\n   * @param arr\n   */\n\n  const uniqueArray = arr => {\n    const result = [];\n\n    for (let i = 0; i < arr.length; i++) {\n      if (result.indexOf(arr[i]) === -1) {\n        result.push(arr[i]);\n      }\n    }\n\n    return result;\n  };\n  /**\n   * Capitalize the first letter of a string\n   * @param str\n   */\n\n  const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1);\n  /**\n   * Convert NodeList to Array\n   * @param nodeList\n   */\n\n  const toArray = nodeList => Array.prototype.slice.call(nodeList);\n  /**\n   * Standardise console warnings\n   * @param message\n   */\n\n  const warn = message => {\n    console.warn(\"\".concat(consolePrefix, \" \").concat(typeof message === 'object' ? message.join(' ') : message));\n  };\n  /**\n   * Standardise console errors\n   * @param message\n   */\n\n  const error = message => {\n    console.error(\"\".concat(consolePrefix, \" \").concat(message));\n  };\n  /**\n   * Private global state for `warnOnce`\n   * @type {Array}\n   * @private\n   */\n\n  const previousWarnOnceMessages = [];\n  /**\n   * Show a console warning, but only if it hasn't already been shown\n   * @param message\n   */\n\n  const warnOnce = message => {\n    if (!previousWarnOnceMessages.includes(message)) {\n      previousWarnOnceMessages.push(message);\n      warn(message);\n    }\n  };\n  /**\n   * Show a one-time console warning about deprecated params/methods\n   */\n\n  const warnAboutDeprecation = (deprecatedParam, useInstead) => {\n    warnOnce(\"\\\"\".concat(deprecatedParam, \"\\\" is deprecated and will be removed in the next major release. Please use \\\"\").concat(useInstead, \"\\\" instead.\"));\n  };\n  /**\n   * If `arg` is a function, call it (with no arguments or context) and return the result.\n   * Otherwise, just pass the value through\n   * @param arg\n   */\n\n  const callIfFunction = arg => typeof arg === 'function' ? arg() : arg;\n  const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function';\n  const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);\n  const isPromise = arg => arg && Promise.resolve(arg) === arg;\n\n  const isJqueryElement = elem => typeof elem === 'object' && elem.jquery;\n\n  const isElement = elem => elem instanceof Element || isJqueryElement(elem);\n\n  const argsToParams = args => {\n    const params = {};\n\n    if (typeof args[0] === 'object' && !isElement(args[0])) {\n      Object.assign(params, args[0]);\n    } else {\n      ['title', 'html', 'icon'].forEach((name, index) => {\n        const arg = args[index];\n\n        if (typeof arg === 'string' || isElement(arg)) {\n          params[name] = arg;\n        } else if (arg !== undefined) {\n          error(\"Unexpected type of \".concat(name, \"! Expected \\\"string\\\" or \\\"Element\\\", got \").concat(typeof arg));\n        }\n      });\n    }\n\n    return params;\n  };\n\n  const swalPrefix = 'swal2-';\n  const prefix = items => {\n    const result = {};\n\n    for (const i in items) {\n      result[items[i]] = swalPrefix + items[i];\n    }\n\n    return result;\n  };\n  const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']);\n  const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n\n  const getContainer = () => document.body.querySelector(\".\".concat(swalClasses.container));\n  const elementBySelector = selectorString => {\n    const container = getContainer();\n    return container ? container.querySelector(selectorString) : null;\n  };\n\n  const elementByClass = className => {\n    return elementBySelector(\".\".concat(className));\n  };\n\n  const getPopup = () => elementByClass(swalClasses.popup);\n  const getIcon = () => elementByClass(swalClasses.icon);\n  const getTitle = () => elementByClass(swalClasses.title);\n  const getHtmlContainer = () => elementByClass(swalClasses['html-container']);\n  const getImage = () => elementByClass(swalClasses.image);\n  const getProgressSteps = () => elementByClass(swalClasses['progress-steps']);\n  const getValidationMessage = () => elementByClass(swalClasses['validation-message']);\n  const getConfirmButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.confirm));\n  const getDenyButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.deny));\n  const getInputLabel = () => elementByClass(swalClasses['input-label']);\n  const getLoader = () => elementBySelector(\".\".concat(swalClasses.loader));\n  const getCancelButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.cancel));\n  const getActions = () => elementByClass(swalClasses.actions);\n  const getFooter = () => elementByClass(swalClasses.footer);\n  const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']);\n  const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js\n\n  const focusable = \"\\n  a[href],\\n  area[href],\\n  input:not([disabled]),\\n  select:not([disabled]),\\n  textarea:not([disabled]),\\n  button:not([disabled]),\\n  iframe,\\n  object,\\n  embed,\\n  [tabindex=\\\"0\\\"],\\n  [contenteditable],\\n  audio[controls],\\n  video[controls],\\n  summary\\n\";\n  const getFocusableElements = () => {\n    const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n    .sort((a, b) => {\n      a = parseInt(a.getAttribute('tabindex'));\n      b = parseInt(b.getAttribute('tabindex'));\n\n      if (a > b) {\n        return 1;\n      } else if (a < b) {\n        return -1;\n      }\n\n      return 0;\n    });\n    const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1');\n    return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el));\n  };\n  const isModal = () => {\n    return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);\n  };\n  const isToast = () => {\n    return document.body.classList.contains(swalClasses['toast-shown']);\n  };\n  const isLoading = () => {\n    return getPopup().hasAttribute('data-loading');\n  };\n\n  const states = {\n    previousBodyPadding: null\n  };\n  const setInnerHtml = (elem, html) => {\n    // #1926\n    elem.textContent = '';\n\n    if (html) {\n      const parser = new DOMParser();\n      const parsed = parser.parseFromString(html, \"text/html\");\n      toArray(parsed.querySelector('head').childNodes).forEach(child => {\n        elem.appendChild(child);\n      });\n      toArray(parsed.querySelector('body').childNodes).forEach(child => {\n        elem.appendChild(child);\n      });\n    }\n  };\n  const hasClass = (elem, className) => {\n    if (!className) {\n      return false;\n    }\n\n    const classList = className.split(/\\s+/);\n\n    for (let i = 0; i < classList.length; i++) {\n      if (!elem.classList.contains(classList[i])) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  const removeCustomClasses = (elem, params) => {\n    toArray(elem.classList).forEach(className => {\n      if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) {\n        elem.classList.remove(className);\n      }\n    });\n  };\n\n  const applyCustomClass = (elem, params, className) => {\n    removeCustomClasses(elem, params);\n\n    if (params.customClass && params.customClass[className]) {\n      if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {\n        return warn(\"Invalid type of customClass.\".concat(className, \"! Expected string or iterable object, got \\\"\").concat(typeof params.customClass[className], \"\\\"\"));\n      }\n\n      addClass(elem, params.customClass[className]);\n    }\n  };\n  const getInput = (popup, inputType) => {\n    if (!inputType) {\n      return null;\n    }\n\n    switch (inputType) {\n      case 'select':\n      case 'textarea':\n      case 'file':\n        return getChildByClass(popup, swalClasses[inputType]);\n\n      case 'checkbox':\n        return popup.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n\n      case 'radio':\n        return popup.querySelector(\".\".concat(swalClasses.radio, \" input:checked\")) || popup.querySelector(\".\".concat(swalClasses.radio, \" input:first-child\"));\n\n      case 'range':\n        return popup.querySelector(\".\".concat(swalClasses.range, \" input\"));\n\n      default:\n        return getChildByClass(popup, swalClasses.input);\n    }\n  };\n  const focusInput = input => {\n    input.focus(); // place cursor at end of text in text input\n\n    if (input.type !== 'file') {\n      // http://stackoverflow.com/a/2345915\n      const val = input.value;\n      input.value = '';\n      input.value = val;\n    }\n  };\n  const toggleClass = (target, classList, condition) => {\n    if (!target || !classList) {\n      return;\n    }\n\n    if (typeof classList === 'string') {\n      classList = classList.split(/\\s+/).filter(Boolean);\n    }\n\n    classList.forEach(className => {\n      if (target.forEach) {\n        target.forEach(elem => {\n          condition ? elem.classList.add(className) : elem.classList.remove(className);\n        });\n      } else {\n        condition ? target.classList.add(className) : target.classList.remove(className);\n      }\n    });\n  };\n  const addClass = (target, classList) => {\n    toggleClass(target, classList, true);\n  };\n  const removeClass = (target, classList) => {\n    toggleClass(target, classList, false);\n  };\n  const getChildByClass = (elem, className) => {\n    for (let i = 0; i < elem.childNodes.length; i++) {\n      if (hasClass(elem.childNodes[i], className)) {\n        return elem.childNodes[i];\n      }\n    }\n  };\n  const applyNumericalStyle = (elem, property, value) => {\n    if (value === \"\".concat(parseInt(value))) {\n      value = parseInt(value);\n    }\n\n    if (value || parseInt(value) === 0) {\n      elem.style[property] = typeof value === 'number' ? \"\".concat(value, \"px\") : value;\n    } else {\n      elem.style.removeProperty(property);\n    }\n  };\n  const show = (elem, display = 'flex') => {\n    elem.style.display = display;\n  };\n  const hide = elem => {\n    elem.style.display = 'none';\n  };\n  const setStyle = (parent, selector, property, value) => {\n    const el = parent.querySelector(selector);\n\n    if (el) {\n      el.style[property] = value;\n    }\n  };\n  const toggle = (elem, condition, display) => {\n    condition ? show(elem, display) : hide(elem);\n  }; // borrowed from jquery $(elem).is(':visible') implementation\n\n  const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));\n  const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton());\n  const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119\n\n  const hasCssAnimation = elem => {\n    const style = window.getComputedStyle(elem);\n    const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');\n    const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');\n    return animDuration > 0 || transDuration > 0;\n  };\n  const animateTimerProgressBar = (timer, reset = false) => {\n    const timerProgressBar = getTimerProgressBar();\n\n    if (isVisible(timerProgressBar)) {\n      if (reset) {\n        timerProgressBar.style.transition = 'none';\n        timerProgressBar.style.width = '100%';\n      }\n\n      setTimeout(() => {\n        timerProgressBar.style.transition = \"width \".concat(timer / 1000, \"s linear\");\n        timerProgressBar.style.width = '0%';\n      }, 10);\n    }\n  };\n  const stopTimerProgressBar = () => {\n    const timerProgressBar = getTimerProgressBar();\n    const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n    timerProgressBar.style.removeProperty('transition');\n    timerProgressBar.style.width = '100%';\n    const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n    const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100);\n    timerProgressBar.style.removeProperty('transition');\n    timerProgressBar.style.width = \"\".concat(timerProgressBarPercent, \"%\");\n  };\n\n  // Detect Node env\n  const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined';\n\n  const sweetHTML = \"\\n <div aria-labelledby=\\\"\".concat(swalClasses.title, \"\\\" aria-describedby=\\\"\").concat(swalClasses['html-container'], \"\\\" class=\\\"\").concat(swalClasses.popup, \"\\\" tabindex=\\\"-1\\\">\\n   <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.close, \"\\\"></button>\\n   <ul class=\\\"\").concat(swalClasses['progress-steps'], \"\\\"></ul>\\n   <div class=\\\"\").concat(swalClasses.icon, \"\\\"></div>\\n   <img class=\\\"\").concat(swalClasses.image, \"\\\" />\\n   <h2 class=\\\"\").concat(swalClasses.title, \"\\\" id=\\\"\").concat(swalClasses.title, \"\\\"></h2>\\n   <div class=\\\"\").concat(swalClasses['html-container'], \"\\\" id=\\\"\").concat(swalClasses['html-container'], \"\\\"></div>\\n   <input class=\\\"\").concat(swalClasses.input, \"\\\" />\\n   <input type=\\\"file\\\" class=\\\"\").concat(swalClasses.file, \"\\\" />\\n   <div class=\\\"\").concat(swalClasses.range, \"\\\">\\n     <input type=\\\"range\\\" />\\n     <output></output>\\n   </div>\\n   <select class=\\\"\").concat(swalClasses.select, \"\\\"></select>\\n   <div class=\\\"\").concat(swalClasses.radio, \"\\\"></div>\\n   <label for=\\\"\").concat(swalClasses.checkbox, \"\\\" class=\\\"\").concat(swalClasses.checkbox, \"\\\">\\n     <input type=\\\"checkbox\\\" />\\n     <span class=\\\"\").concat(swalClasses.label, \"\\\"></span>\\n   </label>\\n   <textarea class=\\\"\").concat(swalClasses.textarea, \"\\\"></textarea>\\n   <div class=\\\"\").concat(swalClasses['validation-message'], \"\\\" id=\\\"\").concat(swalClasses['validation-message'], \"\\\"></div>\\n   <div class=\\\"\").concat(swalClasses.actions, \"\\\">\\n     <div class=\\\"\").concat(swalClasses.loader, \"\\\"></div>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.confirm, \"\\\"></button>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.deny, \"\\\"></button>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.cancel, \"\\\"></button>\\n   </div>\\n   <div class=\\\"\").concat(swalClasses.footer, \"\\\"></div>\\n   <div class=\\\"\").concat(swalClasses['timer-progress-bar-container'], \"\\\">\\n     <div class=\\\"\").concat(swalClasses['timer-progress-bar'], \"\\\"></div>\\n   </div>\\n </div>\\n\").replace(/(^|\\n)\\s*/g, '');\n\n  const resetOldContainer = () => {\n    const oldContainer = getContainer();\n\n    if (!oldContainer) {\n      return false;\n    }\n\n    oldContainer.remove();\n    removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n    return true;\n  };\n\n  const resetValidationMessage = () => {\n    if (Swal.isVisible()) {\n      Swal.resetValidationMessage();\n    }\n  };\n\n  const addInputChangeListeners = () => {\n    const popup = getPopup();\n    const input = getChildByClass(popup, swalClasses.input);\n    const file = getChildByClass(popup, swalClasses.file);\n    const range = popup.querySelector(\".\".concat(swalClasses.range, \" input\"));\n    const rangeOutput = popup.querySelector(\".\".concat(swalClasses.range, \" output\"));\n    const select = getChildByClass(popup, swalClasses.select);\n    const checkbox = popup.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n    const textarea = getChildByClass(popup, swalClasses.textarea);\n    input.oninput = resetValidationMessage;\n    file.onchange = resetValidationMessage;\n    select.onchange = resetValidationMessage;\n    checkbox.onchange = resetValidationMessage;\n    textarea.oninput = resetValidationMessage;\n\n    range.oninput = () => {\n      resetValidationMessage();\n      rangeOutput.value = range.value;\n    };\n\n    range.onchange = () => {\n      resetValidationMessage();\n      range.nextSibling.value = range.value;\n    };\n  };\n\n  const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target;\n\n  const setupAccessibility = params => {\n    const popup = getPopup();\n    popup.setAttribute('role', params.toast ? 'alert' : 'dialog');\n    popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');\n\n    if (!params.toast) {\n      popup.setAttribute('aria-modal', 'true');\n    }\n  };\n\n  const setupRTL = targetElement => {\n    if (window.getComputedStyle(targetElement).direction === 'rtl') {\n      addClass(getContainer(), swalClasses.rtl);\n    }\n  };\n  /*\n   * Add modal + backdrop to DOM\n   */\n\n\n  const init = params => {\n    // Clean up the old popup container if it exists\n    const oldContainerExisted = resetOldContainer();\n    /* istanbul ignore if */\n\n    if (isNodeEnv()) {\n      error('SweetAlert2 requires document to initialize');\n      return;\n    }\n\n    const container = document.createElement('div');\n    container.className = swalClasses.container;\n\n    if (oldContainerExisted) {\n      addClass(container, swalClasses['no-transition']);\n    }\n\n    setInnerHtml(container, sweetHTML);\n    const targetElement = getTarget(params.target);\n    targetElement.appendChild(container);\n    setupAccessibility(params);\n    setupRTL(targetElement);\n    addInputChangeListeners();\n  };\n\n  const parseHtmlToContainer = (param, target) => {\n    // DOM element\n    if (param instanceof HTMLElement) {\n      target.appendChild(param); // Object\n    } else if (typeof param === 'object') {\n      handleObject(param, target); // Plain string\n    } else if (param) {\n      setInnerHtml(target, param);\n    }\n  };\n\n  const handleObject = (param, target) => {\n    // JQuery element(s)\n    if (param.jquery) {\n      handleJqueryElem(target, param); // For other objects use their string representation\n    } else {\n      setInnerHtml(target, param.toString());\n    }\n  };\n\n  const handleJqueryElem = (target, elem) => {\n    target.textContent = '';\n\n    if (0 in elem) {\n      for (let i = 0; (i in elem); i++) {\n        target.appendChild(elem[i].cloneNode(true));\n      }\n    } else {\n      target.appendChild(elem.cloneNode(true));\n    }\n  };\n\n  const animationEndEvent = (() => {\n    // Prevent run in Node env\n\n    /* istanbul ignore if */\n    if (isNodeEnv()) {\n      return false;\n    }\n\n    const testEl = document.createElement('div');\n    const transEndEventNames = {\n      WebkitAnimation: 'webkitAnimationEnd',\n      OAnimation: 'oAnimationEnd oanimationend',\n      animation: 'animationend'\n    };\n\n    for (const i in transEndEventNames) {\n      if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {\n        return transEndEventNames[i];\n      }\n    }\n\n    return false;\n  })();\n\n  // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js\n\n  const measureScrollbar = () => {\n    const scrollDiv = document.createElement('div');\n    scrollDiv.className = swalClasses['scrollbar-measure'];\n    document.body.appendChild(scrollDiv);\n    const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n    document.body.removeChild(scrollDiv);\n    return scrollbarWidth;\n  };\n\n  const renderActions = (instance, params) => {\n    const actions = getActions();\n    const loader = getLoader();\n    const confirmButton = getConfirmButton();\n    const denyButton = getDenyButton();\n    const cancelButton = getCancelButton(); // Actions (buttons) wrapper\n\n    if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {\n      hide(actions);\n    } // Custom class\n\n\n    applyCustomClass(actions, params, 'actions'); // Render buttons\n\n    renderButton(confirmButton, 'confirm', params);\n    renderButton(denyButton, 'deny', params);\n    renderButton(cancelButton, 'cancel', params);\n    handleButtonsStyling(confirmButton, denyButton, cancelButton, params);\n\n    if (params.reverseButtons) {\n      actions.insertBefore(cancelButton, loader);\n      actions.insertBefore(denyButton, loader);\n      actions.insertBefore(confirmButton, loader);\n    } // Loader\n\n\n    setInnerHtml(loader, params.loaderHtml);\n    applyCustomClass(loader, params, 'loader');\n  };\n\n  function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {\n    if (!params.buttonsStyling) {\n      return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);\n    }\n\n    addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n    if (params.confirmButtonColor) {\n      confirmButton.style.backgroundColor = params.confirmButtonColor;\n      addClass(confirmButton, swalClasses['default-outline']);\n    }\n\n    if (params.denyButtonColor) {\n      denyButton.style.backgroundColor = params.denyButtonColor;\n      addClass(denyButton, swalClasses['default-outline']);\n    }\n\n    if (params.cancelButtonColor) {\n      cancelButton.style.backgroundColor = params.cancelButtonColor;\n      addClass(cancelButton, swalClasses['default-outline']);\n    }\n  }\n\n  function renderButton(button, buttonType, params) {\n    toggle(button, params[\"show\".concat(capitalizeFirstLetter(buttonType), \"Button\")], 'inline-block');\n    setInnerHtml(button, params[\"\".concat(buttonType, \"ButtonText\")]); // Set caption text\n\n    button.setAttribute('aria-label', params[\"\".concat(buttonType, \"ButtonAriaLabel\")]); // ARIA label\n    // Add buttons custom classes\n\n    button.className = swalClasses[buttonType];\n    applyCustomClass(button, params, \"\".concat(buttonType, \"Button\"));\n    addClass(button, params[\"\".concat(buttonType, \"ButtonClass\")]);\n  }\n\n  function handleBackdropParam(container, backdrop) {\n    if (typeof backdrop === 'string') {\n      container.style.background = backdrop;\n    } else if (!backdrop) {\n      addClass([document.documentElement, document.body], swalClasses['no-backdrop']);\n    }\n  }\n\n  function handlePositionParam(container, position) {\n    if (position in swalClasses) {\n      addClass(container, swalClasses[position]);\n    } else {\n      warn('The \"position\" parameter is not valid, defaulting to \"center\"');\n      addClass(container, swalClasses.center);\n    }\n  }\n\n  function handleGrowParam(container, grow) {\n    if (grow && typeof grow === 'string') {\n      const growClass = \"grow-\".concat(grow);\n\n      if (growClass in swalClasses) {\n        addClass(container, swalClasses[growClass]);\n      }\n    }\n  }\n\n  const renderContainer = (instance, params) => {\n    const container = getContainer();\n\n    if (!container) {\n      return;\n    }\n\n    handleBackdropParam(container, params.backdrop);\n    handlePositionParam(container, params.position);\n    handleGrowParam(container, params.grow); // Custom class\n\n    applyCustomClass(container, params, 'container');\n  };\n\n  /**\n   * This module containts `WeakMap`s for each effectively-\"private  property\" that a `Swal` has.\n   * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n   * This is the approach that Babel will probably take to implement private methods/fields\n   *   https://github.com/tc39/proposal-private-methods\n   *   https://github.com/babel/babel/pull/7555\n   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n   *   then we can use that language feature.\n   */\n  var privateProps = {\n    promise: new WeakMap(),\n    innerParams: new WeakMap(),\n    domCache: new WeakMap()\n  };\n\n  const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n  const renderInput = (instance, params) => {\n    const popup = getPopup();\n    const innerParams = privateProps.innerParams.get(instance);\n    const rerender = !innerParams || params.input !== innerParams.input;\n    inputTypes.forEach(inputType => {\n      const inputClass = swalClasses[inputType];\n      const inputContainer = getChildByClass(popup, inputClass); // set attributes\n\n      setAttributes(inputType, params.inputAttributes); // set class\n\n      inputContainer.className = inputClass;\n\n      if (rerender) {\n        hide(inputContainer);\n      }\n    });\n\n    if (params.input) {\n      if (rerender) {\n        showInput(params);\n      } // set custom class\n\n\n      setCustomClass(params);\n    }\n  };\n\n  const showInput = params => {\n    if (!renderInputType[params.input]) {\n      return error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(params.input, \"\\\"\"));\n    }\n\n    const inputContainer = getInputContainer(params.input);\n    const input = renderInputType[params.input](inputContainer, params);\n    show(input); // input autofocus\n\n    setTimeout(() => {\n      focusInput(input);\n    });\n  };\n\n  const removeAttributes = input => {\n    for (let i = 0; i < input.attributes.length; i++) {\n      const attrName = input.attributes[i].name;\n\n      if (!['type', 'value', 'style'].includes(attrName)) {\n        input.removeAttribute(attrName);\n      }\n    }\n  };\n\n  const setAttributes = (inputType, inputAttributes) => {\n    const input = getInput(getPopup(), inputType);\n\n    if (!input) {\n      return;\n    }\n\n    removeAttributes(input);\n\n    for (const attr in inputAttributes) {\n      input.setAttribute(attr, inputAttributes[attr]);\n    }\n  };\n\n  const setCustomClass = params => {\n    const inputContainer = getInputContainer(params.input);\n\n    if (params.customClass) {\n      addClass(inputContainer, params.customClass.input);\n    }\n  };\n\n  const setInputPlaceholder = (input, params) => {\n    if (!input.placeholder || params.inputPlaceholder) {\n      input.placeholder = params.inputPlaceholder;\n    }\n  };\n\n  const setInputLabel = (input, prependTo, params) => {\n    if (params.inputLabel) {\n      input.id = swalClasses.input;\n      const label = document.createElement('label');\n      const labelClass = swalClasses['input-label'];\n      label.setAttribute('for', input.id);\n      label.className = labelClass;\n      addClass(label, params.customClass.inputLabel);\n      label.innerText = params.inputLabel;\n      prependTo.insertAdjacentElement('beforebegin', label);\n    }\n  };\n\n  const getInputContainer = inputType => {\n    const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;\n    return getChildByClass(getPopup(), inputClass);\n  };\n\n  const renderInputType = {};\n\n  renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => {\n    if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {\n      input.value = params.inputValue;\n    } else if (!isPromise(params.inputValue)) {\n      warn(\"Unexpected type of inputValue! Expected \\\"string\\\", \\\"number\\\" or \\\"Promise\\\", got \\\"\".concat(typeof params.inputValue, \"\\\"\"));\n    }\n\n    setInputLabel(input, input, params);\n    setInputPlaceholder(input, params);\n    input.type = params.input;\n    return input;\n  };\n\n  renderInputType.file = (input, params) => {\n    setInputLabel(input, input, params);\n    setInputPlaceholder(input, params);\n    return input;\n  };\n\n  renderInputType.range = (range, params) => {\n    const rangeInput = range.querySelector('input');\n    const rangeOutput = range.querySelector('output');\n    rangeInput.value = params.inputValue;\n    rangeInput.type = params.input;\n    rangeOutput.value = params.inputValue;\n    setInputLabel(rangeInput, range, params);\n    return range;\n  };\n\n  renderInputType.select = (select, params) => {\n    select.textContent = '';\n\n    if (params.inputPlaceholder) {\n      const placeholder = document.createElement('option');\n      setInnerHtml(placeholder, params.inputPlaceholder);\n      placeholder.value = '';\n      placeholder.disabled = true;\n      placeholder.selected = true;\n      select.appendChild(placeholder);\n    }\n\n    setInputLabel(select, select, params);\n    return select;\n  };\n\n  renderInputType.radio = radio => {\n    radio.textContent = '';\n    return radio;\n  };\n\n  renderInputType.checkbox = (checkboxContainer, params) => {\n    const checkbox = getInput(getPopup(), 'checkbox');\n    checkbox.value = 1;\n    checkbox.id = swalClasses.checkbox;\n    checkbox.checked = Boolean(params.inputValue);\n    const label = checkboxContainer.querySelector('span');\n    setInnerHtml(label, params.inputPlaceholder);\n    return checkboxContainer;\n  };\n\n  renderInputType.textarea = (textarea, params) => {\n    textarea.value = params.inputValue;\n    setInputPlaceholder(textarea, params);\n    setInputLabel(textarea, textarea, params);\n\n    const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight);\n\n    if ('MutationObserver' in window) {\n      // #1699\n      const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);\n\n      const outputsize = () => {\n        const textareaWidth = textarea.offsetWidth + getMargin(textarea);\n\n        if (textareaWidth > initialPopupWidth) {\n          getPopup().style.width = \"\".concat(textareaWidth, \"px\");\n        } else {\n          getPopup().style.width = null;\n        }\n      };\n\n      new MutationObserver(outputsize).observe(textarea, {\n        attributes: true,\n        attributeFilter: ['style']\n      });\n    }\n\n    return textarea;\n  };\n\n  const renderContent = (instance, params) => {\n    const htmlContainer = getHtmlContainer();\n    applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML\n\n    if (params.html) {\n      parseHtmlToContainer(params.html, htmlContainer);\n      show(htmlContainer, 'block'); // Content as plain text\n    } else if (params.text) {\n      htmlContainer.textContent = params.text;\n      show(htmlContainer, 'block'); // No content\n    } else {\n      hide(htmlContainer);\n    }\n\n    renderInput(instance, params);\n  };\n\n  const renderFooter = (instance, params) => {\n    const footer = getFooter();\n    toggle(footer, params.footer);\n\n    if (params.footer) {\n      parseHtmlToContainer(params.footer, footer);\n    } // Custom class\n\n\n    applyCustomClass(footer, params, 'footer');\n  };\n\n  const renderCloseButton = (instance, params) => {\n    const closeButton = getCloseButton();\n    setInnerHtml(closeButton, params.closeButtonHtml); // Custom class\n\n    applyCustomClass(closeButton, params, 'closeButton');\n    toggle(closeButton, params.showCloseButton);\n    closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);\n  };\n\n  const renderIcon = (instance, params) => {\n    const innerParams = privateProps.innerParams.get(instance);\n    const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon\n\n    if (innerParams && params.icon === innerParams.icon) {\n      // Custom or default content\n      setContent(icon, params);\n      applyStyles(icon, params);\n      return;\n    }\n\n    if (!params.icon && !params.iconHtml) {\n      return hide(icon);\n    }\n\n    if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) {\n      error(\"Unknown icon! Expected \\\"success\\\", \\\"error\\\", \\\"warning\\\", \\\"info\\\" or \\\"question\\\", got \\\"\".concat(params.icon, \"\\\"\"));\n      return hide(icon);\n    }\n\n    show(icon); // Custom or default content\n\n    setContent(icon, params);\n    applyStyles(icon, params); // Animate icon\n\n    addClass(icon, params.showClass.icon);\n  };\n\n  const applyStyles = (icon, params) => {\n    for (const iconType in iconTypes) {\n      if (params.icon !== iconType) {\n        removeClass(icon, iconTypes[iconType]);\n      }\n    }\n\n    addClass(icon, iconTypes[params.icon]); // Icon color\n\n    setColor(icon, params); // Success icon background color\n\n    adjustSuccessIconBackgoundColor(); // Custom class\n\n    applyCustomClass(icon, params, 'icon');\n  }; // Adjust success icon background color to match the popup background color\n\n\n  const adjustSuccessIconBackgoundColor = () => {\n    const popup = getPopup();\n    const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n    const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n\n    for (let i = 0; i < successIconParts.length; i++) {\n      successIconParts[i].style.backgroundColor = popupBackgroundColor;\n    }\n  };\n\n  const setContent = (icon, params) => {\n    icon.textContent = '';\n\n    if (params.iconHtml) {\n      setInnerHtml(icon, iconContent(params.iconHtml));\n    } else if (params.icon === 'success') {\n      setInnerHtml(icon, \"\\n      <div class=\\\"swal2-success-circular-line-left\\\"></div>\\n      <span class=\\\"swal2-success-line-tip\\\"></span> <span class=\\\"swal2-success-line-long\\\"></span>\\n      <div class=\\\"swal2-success-ring\\\"></div> <div class=\\\"swal2-success-fix\\\"></div>\\n      <div class=\\\"swal2-success-circular-line-right\\\"></div>\\n    \");\n    } else if (params.icon === 'error') {\n      setInnerHtml(icon, \"\\n      <span class=\\\"swal2-x-mark\\\">\\n        <span class=\\\"swal2-x-mark-line-left\\\"></span>\\n        <span class=\\\"swal2-x-mark-line-right\\\"></span>\\n      </span>\\n    \");\n    } else {\n      const defaultIconHtml = {\n        question: '?',\n        warning: '!',\n        info: 'i'\n      };\n      setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));\n    }\n  };\n\n  const setColor = (icon, params) => {\n    if (!params.iconColor) {\n      return;\n    }\n\n    icon.style.color = params.iconColor;\n    icon.style.borderColor = params.iconColor;\n\n    for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) {\n      setStyle(icon, sel, 'backgroundColor', params.iconColor);\n    }\n\n    setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);\n  };\n\n  const iconContent = content => \"<div class=\\\"\".concat(swalClasses['icon-content'], \"\\\">\").concat(content, \"</div>\");\n\n  const renderImage = (instance, params) => {\n    const image = getImage();\n\n    if (!params.imageUrl) {\n      return hide(image);\n    }\n\n    show(image, ''); // Src, alt\n\n    image.setAttribute('src', params.imageUrl);\n    image.setAttribute('alt', params.imageAlt); // Width, height\n\n    applyNumericalStyle(image, 'width', params.imageWidth);\n    applyNumericalStyle(image, 'height', params.imageHeight); // Class\n\n    image.className = swalClasses.image;\n    applyCustomClass(image, params, 'image');\n  };\n\n  const createStepElement = step => {\n    const stepEl = document.createElement('li');\n    addClass(stepEl, swalClasses['progress-step']);\n    setInnerHtml(stepEl, step);\n    return stepEl;\n  };\n\n  const createLineElement = params => {\n    const lineEl = document.createElement('li');\n    addClass(lineEl, swalClasses['progress-step-line']);\n\n    if (params.progressStepsDistance) {\n      lineEl.style.width = params.progressStepsDistance;\n    }\n\n    return lineEl;\n  };\n\n  const renderProgressSteps = (instance, params) => {\n    const progressStepsContainer = getProgressSteps();\n\n    if (!params.progressSteps || params.progressSteps.length === 0) {\n      return hide(progressStepsContainer);\n    }\n\n    show(progressStepsContainer);\n    progressStepsContainer.textContent = '';\n\n    if (params.currentProgressStep >= params.progressSteps.length) {\n      warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');\n    }\n\n    params.progressSteps.forEach((step, index) => {\n      const stepEl = createStepElement(step);\n      progressStepsContainer.appendChild(stepEl);\n\n      if (index === params.currentProgressStep) {\n        addClass(stepEl, swalClasses['active-progress-step']);\n      }\n\n      if (index !== params.progressSteps.length - 1) {\n        const lineEl = createLineElement(params);\n        progressStepsContainer.appendChild(lineEl);\n      }\n    });\n  };\n\n  const renderTitle = (instance, params) => {\n    const title = getTitle();\n    toggle(title, params.title || params.titleText, 'block');\n\n    if (params.title) {\n      parseHtmlToContainer(params.title, title);\n    }\n\n    if (params.titleText) {\n      title.innerText = params.titleText;\n    } // Custom class\n\n\n    applyCustomClass(title, params, 'title');\n  };\n\n  const renderPopup = (instance, params) => {\n    const container = getContainer();\n    const popup = getPopup(); // Width\n\n    if (params.toast) {\n      // #2170\n      applyNumericalStyle(container, 'width', params.width);\n      popup.style.width = '100%';\n      popup.insertBefore(getLoader(), getIcon());\n    } else {\n      applyNumericalStyle(popup, 'width', params.width);\n    } // Padding\n\n\n    applyNumericalStyle(popup, 'padding', params.padding); // Background\n\n    if (params.background) {\n      popup.style.background = params.background;\n    }\n\n    hide(getValidationMessage()); // Classes\n\n    addClasses(popup, params);\n  };\n\n  const addClasses = (popup, params) => {\n    // Default Class + showClass when updating Swal.update({})\n    popup.className = \"\".concat(swalClasses.popup, \" \").concat(isVisible(popup) ? params.showClass.popup : '');\n\n    if (params.toast) {\n      addClass([document.documentElement, document.body], swalClasses['toast-shown']);\n      addClass(popup, swalClasses.toast);\n    } else {\n      addClass(popup, swalClasses.modal);\n    } // Custom class\n\n\n    applyCustomClass(popup, params, 'popup');\n\n    if (typeof params.customClass === 'string') {\n      addClass(popup, params.customClass);\n    } // Icon class (#1842)\n\n\n    if (params.icon) {\n      addClass(popup, swalClasses[\"icon-\".concat(params.icon)]);\n    }\n  };\n\n  const render = (instance, params) => {\n    renderPopup(instance, params);\n    renderContainer(instance, params);\n    renderProgressSteps(instance, params);\n    renderIcon(instance, params);\n    renderImage(instance, params);\n    renderTitle(instance, params);\n    renderCloseButton(instance, params);\n    renderContent(instance, params);\n    renderActions(instance, params);\n    renderFooter(instance, params);\n\n    if (typeof params.didRender === 'function') {\n      params.didRender(getPopup());\n    }\n  };\n\n  /*\n   * Global function to determine if SweetAlert2 popup is shown\n   */\n\n  const isVisible$1 = () => {\n    return isVisible(getPopup());\n  };\n  /*\n   * Global function to click 'Confirm' button\n   */\n\n  const clickConfirm = () => getConfirmButton() && getConfirmButton().click();\n  /*\n   * Global function to click 'Deny' button\n   */\n\n  const clickDeny = () => getDenyButton() && getDenyButton().click();\n  /*\n   * Global function to click 'Cancel' button\n   */\n\n  const clickCancel = () => getCancelButton() && getCancelButton().click();\n\n  function fire(...args) {\n    const Swal = this;\n    return new Swal(...args);\n  }\n\n  /**\n   * Returns an extended version of `Swal` containing `params` as defaults.\n   * Useful for reusing Swal configuration.\n   *\n   * For example:\n   *\n   * Before:\n   * const textPromptOptions = { input: 'text', showCancelButton: true }\n   * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })\n   * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })\n   *\n   * After:\n   * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })\n   * const {value: firstName} = await TextPrompt('What is your first name?')\n   * const {value: lastName} = await TextPrompt('What is your last name?')\n   *\n   * @param mixinParams\n   */\n  function mixin(mixinParams) {\n    class MixinSwal extends this {\n      _main(params, priorityMixinParams) {\n        return super._main(params, Object.assign({}, mixinParams, priorityMixinParams));\n      }\n\n    }\n\n    return MixinSwal;\n  }\n\n  /**\n   * Shows loader (spinner), this is useful with AJAX requests.\n   * By default the loader be shown instead of the \"Confirm\" button.\n   */\n\n  const showLoading = buttonToReplace => {\n    let popup = getPopup();\n\n    if (!popup) {\n      Swal.fire();\n    }\n\n    popup = getPopup();\n    const loader = getLoader();\n\n    if (isToast()) {\n      hide(getIcon());\n    } else {\n      replaceButton(popup, buttonToReplace);\n    }\n\n    show(loader);\n    popup.setAttribute('data-loading', true);\n    popup.setAttribute('aria-busy', true);\n    popup.focus();\n  };\n\n  const replaceButton = (popup, buttonToReplace) => {\n    const actions = getActions();\n    const loader = getLoader();\n\n    if (!buttonToReplace && isVisible(getConfirmButton())) {\n      buttonToReplace = getConfirmButton();\n    }\n\n    show(actions);\n\n    if (buttonToReplace) {\n      hide(buttonToReplace);\n      loader.setAttribute('data-button-to-replace', buttonToReplace.className);\n    }\n\n    loader.parentNode.insertBefore(loader, buttonToReplace);\n    addClass([popup, actions], swalClasses.loading);\n  };\n\n  const RESTORE_FOCUS_TIMEOUT = 100;\n\n  const globalState = {};\n\n  const focusPreviousActiveElement = () => {\n    if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {\n      globalState.previousActiveElement.focus();\n      globalState.previousActiveElement = null;\n    } else if (document.body) {\n      document.body.focus();\n    }\n  }; // Restore previous active (focused) element\n\n\n  const restoreActiveElement = returnFocus => {\n    return new Promise(resolve => {\n      if (!returnFocus) {\n        return resolve();\n      }\n\n      const x = window.scrollX;\n      const y = window.scrollY;\n      globalState.restoreFocusTimeout = setTimeout(() => {\n        focusPreviousActiveElement();\n        resolve();\n      }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n      window.scrollTo(x, y);\n    });\n  };\n\n  /**\n   * If `timer` parameter is set, returns number of milliseconds of timer remained.\n   * Otherwise, returns undefined.\n   */\n\n  const getTimerLeft = () => {\n    return globalState.timeout && globalState.timeout.getTimerLeft();\n  };\n  /**\n   * Stop timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const stopTimer = () => {\n    if (globalState.timeout) {\n      stopTimerProgressBar();\n      return globalState.timeout.stop();\n    }\n  };\n  /**\n   * Resume timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const resumeTimer = () => {\n    if (globalState.timeout) {\n      const remaining = globalState.timeout.start();\n      animateTimerProgressBar(remaining);\n      return remaining;\n    }\n  };\n  /**\n   * Resume timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const toggleTimer = () => {\n    const timer = globalState.timeout;\n    return timer && (timer.running ? stopTimer() : resumeTimer());\n  };\n  /**\n   * Increase timer. Returns number of milliseconds of an updated timer.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const increaseTimer = n => {\n    if (globalState.timeout) {\n      const remaining = globalState.timeout.increase(n);\n      animateTimerProgressBar(remaining, true);\n      return remaining;\n    }\n  };\n  /**\n   * Check if timer is running. Returns true if timer is running\n   * or false if timer is paused or stopped.\n   * If `timer` parameter isn't set, returns undefined\n   */\n\n  const isTimerRunning = () => {\n    return globalState.timeout && globalState.timeout.isRunning();\n  };\n\n  let bodyClickListenerAdded = false;\n  const clickHandlers = {};\n  function bindClickHandler(attr = 'data-swal-template') {\n    clickHandlers[attr] = this;\n\n    if (!bodyClickListenerAdded) {\n      document.body.addEventListener('click', bodyClickListener);\n      bodyClickListenerAdded = true;\n    }\n  }\n\n  const bodyClickListener = event => {\n    // TODO: replace with event.composedPath()\n    for (let el = event.target; el && el !== document; el = el.parentNode) {\n      for (const attr in clickHandlers) {\n        const template = el.getAttribute(attr);\n\n        if (template) {\n          clickHandlers[attr].fire({\n            template\n          });\n          return;\n        }\n      }\n    }\n  };\n\n  const defaultParams = {\n    title: '',\n    titleText: '',\n    text: '',\n    html: '',\n    footer: '',\n    icon: undefined,\n    iconColor: undefined,\n    iconHtml: undefined,\n    template: undefined,\n    toast: false,\n    showClass: {\n      popup: 'swal2-show',\n      backdrop: 'swal2-backdrop-show',\n      icon: 'swal2-icon-show'\n    },\n    hideClass: {\n      popup: 'swal2-hide',\n      backdrop: 'swal2-backdrop-hide',\n      icon: 'swal2-icon-hide'\n    },\n    customClass: {},\n    target: 'body',\n    backdrop: true,\n    heightAuto: true,\n    allowOutsideClick: true,\n    allowEscapeKey: true,\n    allowEnterKey: true,\n    stopKeydownPropagation: true,\n    keydownListenerCapture: false,\n    showConfirmButton: true,\n    showDenyButton: false,\n    showCancelButton: false,\n    preConfirm: undefined,\n    preDeny: undefined,\n    confirmButtonText: 'OK',\n    confirmButtonAriaLabel: '',\n    confirmButtonColor: undefined,\n    denyButtonText: 'No',\n    denyButtonAriaLabel: '',\n    denyButtonColor: undefined,\n    cancelButtonText: 'Cancel',\n    cancelButtonAriaLabel: '',\n    cancelButtonColor: undefined,\n    buttonsStyling: true,\n    reverseButtons: false,\n    focusConfirm: true,\n    focusDeny: false,\n    focusCancel: false,\n    returnFocus: true,\n    showCloseButton: false,\n    closeButtonHtml: '&times;',\n    closeButtonAriaLabel: 'Close this dialog',\n    loaderHtml: '',\n    showLoaderOnConfirm: false,\n    showLoaderOnDeny: false,\n    imageUrl: undefined,\n    imageWidth: undefined,\n    imageHeight: undefined,\n    imageAlt: '',\n    timer: undefined,\n    timerProgressBar: false,\n    width: undefined,\n    padding: undefined,\n    background: undefined,\n    input: undefined,\n    inputPlaceholder: '',\n    inputLabel: '',\n    inputValue: '',\n    inputOptions: {},\n    inputAutoTrim: true,\n    inputAttributes: {},\n    inputValidator: undefined,\n    returnInputValueOnDeny: false,\n    validationMessage: undefined,\n    grow: false,\n    position: 'center',\n    progressSteps: [],\n    currentProgressStep: undefined,\n    progressStepsDistance: undefined,\n    willOpen: undefined,\n    didOpen: undefined,\n    didRender: undefined,\n    willClose: undefined,\n    didClose: undefined,\n    didDestroy: undefined,\n    scrollbarPadding: true\n  };\n  const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];\n  const deprecatedParams = {};\n  const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture'];\n  /**\n   * Is valid parameter\n   * @param {String} paramName\n   */\n\n  const isValidParameter = paramName => {\n    return Object.prototype.hasOwnProperty.call(defaultParams, paramName);\n  };\n  /**\n   * Is valid parameter for Swal.update() method\n   * @param {String} paramName\n   */\n\n  const isUpdatableParameter = paramName => {\n    return updatableParams.indexOf(paramName) !== -1;\n  };\n  /**\n   * Is deprecated parameter\n   * @param {String} paramName\n   */\n\n  const isDeprecatedParameter = paramName => {\n    return deprecatedParams[paramName];\n  };\n\n  const checkIfParamIsValid = param => {\n    if (!isValidParameter(param)) {\n      warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n    }\n  };\n\n  const checkIfToastParamIsValid = param => {\n    if (toastIncompatibleParams.includes(param)) {\n      warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n    }\n  };\n\n  const checkIfParamIsDeprecated = param => {\n    if (isDeprecatedParameter(param)) {\n      warnAboutDeprecation(param, isDeprecatedParameter(param));\n    }\n  };\n  /**\n   * Show relevant warnings for given params\n   *\n   * @param params\n   */\n\n\n  const showWarningsForParams = params => {\n    if (!params.backdrop && params.allowOutsideClick) {\n      warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n    }\n\n    for (const param in params) {\n      checkIfParamIsValid(param);\n\n      if (params.toast) {\n        checkIfToastParamIsValid(param);\n      }\n\n      checkIfParamIsDeprecated(param);\n    }\n  };\n\n\n\n  var staticMethods = /*#__PURE__*/Object.freeze({\n    isValidParameter: isValidParameter,\n    isUpdatableParameter: isUpdatableParameter,\n    isDeprecatedParameter: isDeprecatedParameter,\n    argsToParams: argsToParams,\n    isVisible: isVisible$1,\n    clickConfirm: clickConfirm,\n    clickDeny: clickDeny,\n    clickCancel: clickCancel,\n    getContainer: getContainer,\n    getPopup: getPopup,\n    getTitle: getTitle,\n    getHtmlContainer: getHtmlContainer,\n    getImage: getImage,\n    getIcon: getIcon,\n    getInputLabel: getInputLabel,\n    getCloseButton: getCloseButton,\n    getActions: getActions,\n    getConfirmButton: getConfirmButton,\n    getDenyButton: getDenyButton,\n    getCancelButton: getCancelButton,\n    getLoader: getLoader,\n    getFooter: getFooter,\n    getTimerProgressBar: getTimerProgressBar,\n    getFocusableElements: getFocusableElements,\n    getValidationMessage: getValidationMessage,\n    isLoading: isLoading,\n    fire: fire,\n    mixin: mixin,\n    showLoading: showLoading,\n    enableLoading: showLoading,\n    getTimerLeft: getTimerLeft,\n    stopTimer: stopTimer,\n    resumeTimer: resumeTimer,\n    toggleTimer: toggleTimer,\n    increaseTimer: increaseTimer,\n    isTimerRunning: isTimerRunning,\n    bindClickHandler: bindClickHandler\n  });\n\n  /**\n   * Hides loader and shows back the button which was hidden by .showLoading()\n   */\n\n  function hideLoading() {\n    // do nothing if popup is closed\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!innerParams) {\n      return;\n    }\n\n    const domCache = privateProps.domCache.get(this);\n    hide(domCache.loader);\n\n    if (isToast()) {\n      if (innerParams.icon) {\n        show(getIcon());\n      }\n    } else {\n      showRelatedButton(domCache);\n    }\n\n    removeClass([domCache.popup, domCache.actions], swalClasses.loading);\n    domCache.popup.removeAttribute('aria-busy');\n    domCache.popup.removeAttribute('data-loading');\n    domCache.confirmButton.disabled = false;\n    domCache.denyButton.disabled = false;\n    domCache.cancelButton.disabled = false;\n  }\n\n  const showRelatedButton = domCache => {\n    const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace'));\n\n    if (buttonToReplace.length) {\n      show(buttonToReplace[0], 'inline-block');\n    } else if (allButtonsAreHidden()) {\n      hide(domCache.actions);\n    }\n  };\n\n  function getInput$1(instance) {\n    const innerParams = privateProps.innerParams.get(instance || this);\n    const domCache = privateProps.domCache.get(instance || this);\n\n    if (!domCache) {\n      return null;\n    }\n\n    return getInput(domCache.popup, innerParams.input);\n  }\n\n  const fixScrollbar = () => {\n    // for queues, do not do this more than once\n    if (states.previousBodyPadding !== null) {\n      return;\n    } // if the body has overflow\n\n\n    if (document.body.scrollHeight > window.innerHeight) {\n      // add padding so the content doesn't shift after removal of scrollbar\n      states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));\n      document.body.style.paddingRight = \"\".concat(states.previousBodyPadding + measureScrollbar(), \"px\");\n    }\n  };\n  const undoScrollbar = () => {\n    if (states.previousBodyPadding !== null) {\n      document.body.style.paddingRight = \"\".concat(states.previousBodyPadding, \"px\");\n      states.previousBodyPadding = null;\n    }\n  };\n\n  /* istanbul ignore file */\n\n  const iOSfix = () => {\n    const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n    if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n      const offset = document.body.scrollTop;\n      document.body.style.top = \"\".concat(offset * -1, \"px\");\n      addClass(document.body, swalClasses.iosfix);\n      lockBodyScroll();\n      addBottomPaddingForTallPopups(); // #1948\n    }\n  };\n\n  const addBottomPaddingForTallPopups = () => {\n    const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i);\n\n    if (safari) {\n      const bottomPanelHeight = 44;\n\n      if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {\n        getContainer().style.paddingBottom = \"\".concat(bottomPanelHeight, \"px\");\n      }\n    }\n  };\n\n  const lockBodyScroll = () => {\n    // #1246\n    const container = getContainer();\n    let preventTouchMove;\n\n    container.ontouchstart = e => {\n      preventTouchMove = shouldPreventTouchMove(e);\n    };\n\n    container.ontouchmove = e => {\n      if (preventTouchMove) {\n        e.preventDefault();\n        e.stopPropagation();\n      }\n    };\n  };\n\n  const shouldPreventTouchMove = event => {\n    const target = event.target;\n    const container = getContainer();\n\n    if (isStylys(event) || isZoom(event)) {\n      return false;\n    }\n\n    if (target === container) {\n      return true;\n    }\n\n    if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603\n    target.tagName !== 'TEXTAREA' && // #2266\n    !(isScrollable(getHtmlContainer()) && // #1944\n    getHtmlContainer().contains(target))) {\n      return true;\n    }\n\n    return false;\n  };\n\n  const isStylys = event => {\n    // #1786\n    return event.touches && event.touches.length && event.touches[0].touchType === 'stylus';\n  };\n\n  const isZoom = event => {\n    // #1891\n    return event.touches && event.touches.length > 1;\n  };\n\n  const undoIOSfix = () => {\n    if (hasClass(document.body, swalClasses.iosfix)) {\n      const offset = parseInt(document.body.style.top, 10);\n      removeClass(document.body, swalClasses.iosfix);\n      document.body.style.top = '';\n      document.body.scrollTop = offset * -1;\n    }\n  };\n\n  // Adding aria-hidden=\"true\" to elements outside of the active modal dialog ensures that\n  // elements not within the active modal dialog will not be surfaced if a user opens a screen\n  // reader’s list of elements (headings, form controls, landmarks, etc.) in the document.\n\n  const setAriaHidden = () => {\n    const bodyChildren = toArray(document.body.children);\n    bodyChildren.forEach(el => {\n      if (el === getContainer() || el.contains(getContainer())) {\n        return;\n      }\n\n      if (el.hasAttribute('aria-hidden')) {\n        el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));\n      }\n\n      el.setAttribute('aria-hidden', 'true');\n    });\n  };\n  const unsetAriaHidden = () => {\n    const bodyChildren = toArray(document.body.children);\n    bodyChildren.forEach(el => {\n      if (el.hasAttribute('data-previous-aria-hidden')) {\n        el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));\n        el.removeAttribute('data-previous-aria-hidden');\n      } else {\n        el.removeAttribute('aria-hidden');\n      }\n    });\n  };\n\n  /**\n   * This module containts `WeakMap`s for each effectively-\"private  property\" that a `Swal` has.\n   * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n   * This is the approach that Babel will probably take to implement private methods/fields\n   *   https://github.com/tc39/proposal-private-methods\n   *   https://github.com/babel/babel/pull/7555\n   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n   *   then we can use that language feature.\n   */\n  var privateMethods = {\n    swalPromiseResolve: new WeakMap()\n  };\n\n  /*\n   * Instance method to close sweetAlert\n   */\n\n  function removePopupAndResetState(instance, container, returnFocus, didClose) {\n    if (isToast()) {\n      triggerDidCloseAndDispose(instance, didClose);\n    } else {\n      restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose));\n      globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n        capture: globalState.keydownListenerCapture\n      });\n      globalState.keydownHandlerAdded = false;\n    }\n\n    const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088\n    // for some reason removing the container in Safari will scroll the document to bottom\n\n    if (isSafari) {\n      container.setAttribute('style', 'display:none !important');\n      container.removeAttribute('class');\n      container.innerHTML = '';\n    } else {\n      container.remove();\n    }\n\n    if (isModal()) {\n      undoScrollbar();\n      undoIOSfix();\n      unsetAriaHidden();\n    }\n\n    removeBodyClasses();\n  }\n\n  function removeBodyClasses() {\n    removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]);\n  }\n\n  function close(resolveValue) {\n    const popup = getPopup();\n\n    if (!popup) {\n      return;\n    }\n\n    resolveValue = prepareResolveValue(resolveValue);\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {\n      return;\n    }\n\n    const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);\n    removeClass(popup, innerParams.showClass.popup);\n    addClass(popup, innerParams.hideClass.popup);\n    const backdrop = getContainer();\n    removeClass(backdrop, innerParams.showClass.backdrop);\n    addClass(backdrop, innerParams.hideClass.backdrop);\n    handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise\n\n    swalPromiseResolve(resolveValue);\n  }\n\n  const prepareResolveValue = resolveValue => {\n    // When user calls Swal.close()\n    if (typeof resolveValue === 'undefined') {\n      return {\n        isConfirmed: false,\n        isDenied: false,\n        isDismissed: true\n      };\n    }\n\n    return Object.assign({\n      isConfirmed: false,\n      isDenied: false,\n      isDismissed: false\n    }, resolveValue);\n  };\n\n  const handlePopupAnimation = (instance, popup, innerParams) => {\n    const container = getContainer(); // If animation is supported, animate\n\n    const animationIsSupported = animationEndEvent && hasCssAnimation(popup);\n\n    if (typeof innerParams.willClose === 'function') {\n      innerParams.willClose(popup);\n    }\n\n    if (animationIsSupported) {\n      animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose);\n    } else {\n      // Otherwise, remove immediately\n      removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose);\n    }\n  };\n\n  const animatePopup = (instance, popup, container, returnFocus, didClose) => {\n    globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose);\n    popup.addEventListener(animationEndEvent, function (e) {\n      if (e.target === popup) {\n        globalState.swalCloseEventFinishedCallback();\n        delete globalState.swalCloseEventFinishedCallback;\n      }\n    });\n  };\n\n  const triggerDidCloseAndDispose = (instance, didClose) => {\n    setTimeout(() => {\n      if (typeof didClose === 'function') {\n        didClose.bind(instance.params)();\n      }\n\n      instance._destroy();\n    });\n  };\n\n  function setButtonsDisabled(instance, buttons, disabled) {\n    const domCache = privateProps.domCache.get(instance);\n    buttons.forEach(button => {\n      domCache[button].disabled = disabled;\n    });\n  }\n\n  function setInputDisabled(input, disabled) {\n    if (!input) {\n      return false;\n    }\n\n    if (input.type === 'radio') {\n      const radiosContainer = input.parentNode.parentNode;\n      const radios = radiosContainer.querySelectorAll('input');\n\n      for (let i = 0; i < radios.length; i++) {\n        radios[i].disabled = disabled;\n      }\n    } else {\n      input.disabled = disabled;\n    }\n  }\n\n  function enableButtons() {\n    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);\n  }\n  function disableButtons() {\n    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);\n  }\n  function enableInput() {\n    return setInputDisabled(this.getInput(), false);\n  }\n  function disableInput() {\n    return setInputDisabled(this.getInput(), true);\n  }\n\n  function showValidationMessage(error) {\n    const domCache = privateProps.domCache.get(this);\n    const params = privateProps.innerParams.get(this);\n    setInnerHtml(domCache.validationMessage, error);\n    domCache.validationMessage.className = swalClasses['validation-message'];\n\n    if (params.customClass && params.customClass.validationMessage) {\n      addClass(domCache.validationMessage, params.customClass.validationMessage);\n    }\n\n    show(domCache.validationMessage);\n    const input = this.getInput();\n\n    if (input) {\n      input.setAttribute('aria-invalid', true);\n      input.setAttribute('aria-describedby', swalClasses['validation-message']);\n      focusInput(input);\n      addClass(input, swalClasses.inputerror);\n    }\n  } // Hide block with validation message\n\n  function resetValidationMessage$1() {\n    const domCache = privateProps.domCache.get(this);\n\n    if (domCache.validationMessage) {\n      hide(domCache.validationMessage);\n    }\n\n    const input = this.getInput();\n\n    if (input) {\n      input.removeAttribute('aria-invalid');\n      input.removeAttribute('aria-describedby');\n      removeClass(input, swalClasses.inputerror);\n    }\n  }\n\n  function getProgressSteps$1() {\n    const domCache = privateProps.domCache.get(this);\n    return domCache.progressSteps;\n  }\n\n  class Timer {\n    constructor(callback, delay) {\n      this.callback = callback;\n      this.remaining = delay;\n      this.running = false;\n      this.start();\n    }\n\n    start() {\n      if (!this.running) {\n        this.running = true;\n        this.started = new Date();\n        this.id = setTimeout(this.callback, this.remaining);\n      }\n\n      return this.remaining;\n    }\n\n    stop() {\n      if (this.running) {\n        this.running = false;\n        clearTimeout(this.id);\n        this.remaining -= new Date() - this.started;\n      }\n\n      return this.remaining;\n    }\n\n    increase(n) {\n      const running = this.running;\n\n      if (running) {\n        this.stop();\n      }\n\n      this.remaining += n;\n\n      if (running) {\n        this.start();\n      }\n\n      return this.remaining;\n    }\n\n    getTimerLeft() {\n      if (this.running) {\n        this.stop();\n        this.start();\n      }\n\n      return this.remaining;\n    }\n\n    isRunning() {\n      return this.running;\n    }\n\n  }\n\n  var defaultInputValidators = {\n    email: (string, validationMessage) => {\n      return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address');\n    },\n    url: (string, validationMessage) => {\n      // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013\n      return /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-z]{2,63}\\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL');\n    }\n  };\n\n  function setDefaultInputValidators(params) {\n    // Use default `inputValidator` for supported input types if not provided\n    if (!params.inputValidator) {\n      Object.keys(defaultInputValidators).forEach(key => {\n        if (params.input === key) {\n          params.inputValidator = defaultInputValidators[key];\n        }\n      });\n    }\n  }\n\n  function validateCustomTargetElement(params) {\n    // Determine if the custom target element is valid\n    if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {\n      warn('Target parameter is not valid, defaulting to \"body\"');\n      params.target = 'body';\n    }\n  }\n  /**\n   * Set type, text and actions on popup\n   *\n   * @param params\n   * @returns {boolean}\n   */\n\n\n  function setParameters(params) {\n    setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm\n\n    if (params.showLoaderOnConfirm && !params.preConfirm) {\n      warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\\n' + 'https://sweetalert2.github.io/#ajax-request');\n    }\n\n    validateCustomTargetElement(params); // Replace newlines with <br> in title\n\n    if (typeof params.title === 'string') {\n      params.title = params.title.split('\\n').join('<br />');\n    }\n\n    init(params);\n  }\n\n  const swalStringParams = ['swal-title', 'swal-html', 'swal-footer'];\n  const getTemplateParams = params => {\n    const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template;\n\n    if (!template) {\n      return {};\n    }\n\n    const templateContent = template.content;\n    showWarningsForElements(templateContent);\n    const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams));\n    return result;\n  };\n\n  const getSwalParams = templateContent => {\n    const result = {};\n    toArray(templateContent.querySelectorAll('swal-param')).forEach(param => {\n      showWarningsForAttributes(param, ['name', 'value']);\n      const paramName = param.getAttribute('name');\n      let value = param.getAttribute('value');\n\n      if (typeof defaultParams[paramName] === 'boolean' && value === 'false') {\n        value = false;\n      }\n\n      if (typeof defaultParams[paramName] === 'object') {\n        value = JSON.parse(value);\n      }\n\n      result[paramName] = value;\n    });\n    return result;\n  };\n\n  const getSwalButtons = templateContent => {\n    const result = {};\n    toArray(templateContent.querySelectorAll('swal-button')).forEach(button => {\n      showWarningsForAttributes(button, ['type', 'color', 'aria-label']);\n      const type = button.getAttribute('type');\n      result[\"\".concat(type, \"ButtonText\")] = button.innerHTML;\n      result[\"show\".concat(capitalizeFirstLetter(type), \"Button\")] = true;\n\n      if (button.hasAttribute('color')) {\n        result[\"\".concat(type, \"ButtonColor\")] = button.getAttribute('color');\n      }\n\n      if (button.hasAttribute('aria-label')) {\n        result[\"\".concat(type, \"ButtonAriaLabel\")] = button.getAttribute('aria-label');\n      }\n    });\n    return result;\n  };\n\n  const getSwalImage = templateContent => {\n    const result = {};\n    const image = templateContent.querySelector('swal-image');\n\n    if (image) {\n      showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']);\n\n      if (image.hasAttribute('src')) {\n        result.imageUrl = image.getAttribute('src');\n      }\n\n      if (image.hasAttribute('width')) {\n        result.imageWidth = image.getAttribute('width');\n      }\n\n      if (image.hasAttribute('height')) {\n        result.imageHeight = image.getAttribute('height');\n      }\n\n      if (image.hasAttribute('alt')) {\n        result.imageAlt = image.getAttribute('alt');\n      }\n    }\n\n    return result;\n  };\n\n  const getSwalIcon = templateContent => {\n    const result = {};\n    const icon = templateContent.querySelector('swal-icon');\n\n    if (icon) {\n      showWarningsForAttributes(icon, ['type', 'color']);\n\n      if (icon.hasAttribute('type')) {\n        result.icon = icon.getAttribute('type');\n      }\n\n      if (icon.hasAttribute('color')) {\n        result.iconColor = icon.getAttribute('color');\n      }\n\n      result.iconHtml = icon.innerHTML;\n    }\n\n    return result;\n  };\n\n  const getSwalInput = templateContent => {\n    const result = {};\n    const input = templateContent.querySelector('swal-input');\n\n    if (input) {\n      showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']);\n      result.input = input.getAttribute('type') || 'text';\n\n      if (input.hasAttribute('label')) {\n        result.inputLabel = input.getAttribute('label');\n      }\n\n      if (input.hasAttribute('placeholder')) {\n        result.inputPlaceholder = input.getAttribute('placeholder');\n      }\n\n      if (input.hasAttribute('value')) {\n        result.inputValue = input.getAttribute('value');\n      }\n    }\n\n    const inputOptions = templateContent.querySelectorAll('swal-input-option');\n\n    if (inputOptions.length) {\n      result.inputOptions = {};\n      toArray(inputOptions).forEach(option => {\n        showWarningsForAttributes(option, ['value']);\n        const optionValue = option.getAttribute('value');\n        const optionName = option.innerHTML;\n        result.inputOptions[optionValue] = optionName;\n      });\n    }\n\n    return result;\n  };\n\n  const getSwalStringParams = (templateContent, paramNames) => {\n    const result = {};\n\n    for (const i in paramNames) {\n      const paramName = paramNames[i];\n      const tag = templateContent.querySelector(paramName);\n\n      if (tag) {\n        showWarningsForAttributes(tag, []);\n        result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim();\n      }\n    }\n\n    return result;\n  };\n\n  const showWarningsForElements = template => {\n    const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']);\n    toArray(template.children).forEach(el => {\n      const tagName = el.tagName.toLowerCase();\n\n      if (allowedElements.indexOf(tagName) === -1) {\n        warn(\"Unrecognized element <\".concat(tagName, \">\"));\n      }\n    });\n  };\n\n  const showWarningsForAttributes = (el, allowedAttributes) => {\n    toArray(el.attributes).forEach(attribute => {\n      if (allowedAttributes.indexOf(attribute.name) === -1) {\n        warn([\"Unrecognized attribute \\\"\".concat(attribute.name, \"\\\" on <\").concat(el.tagName.toLowerCase(), \">.\"), \"\".concat(allowedAttributes.length ? \"Allowed attributes are: \".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]);\n      }\n    });\n  };\n\n  const SHOW_CLASS_TIMEOUT = 10;\n  /**\n   * Open popup, add necessary classes and styles, fix scrollbar\n   *\n   * @param params\n   */\n\n  const openPopup = params => {\n    const container = getContainer();\n    const popup = getPopup();\n\n    if (typeof params.willOpen === 'function') {\n      params.willOpen(popup);\n    }\n\n    const bodyStyles = window.getComputedStyle(document.body);\n    const initialBodyOverflow = bodyStyles.overflowY;\n    addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n    setTimeout(() => {\n      setScrollingVisibility(container, popup);\n    }, SHOW_CLASS_TIMEOUT);\n\n    if (isModal()) {\n      fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);\n      setAriaHidden();\n    }\n\n    if (!isToast() && !globalState.previousActiveElement) {\n      globalState.previousActiveElement = document.activeElement;\n    }\n\n    if (typeof params.didOpen === 'function') {\n      setTimeout(() => params.didOpen(popup));\n    }\n\n    removeClass(container, swalClasses['no-transition']);\n  };\n\n  const swalOpenAnimationFinished = event => {\n    const popup = getPopup();\n\n    if (event.target !== popup) {\n      return;\n    }\n\n    const container = getContainer();\n    popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);\n    container.style.overflowY = 'auto';\n  };\n\n  const setScrollingVisibility = (container, popup) => {\n    if (animationEndEvent && hasCssAnimation(popup)) {\n      container.style.overflowY = 'hidden';\n      popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);\n    } else {\n      container.style.overflowY = 'auto';\n    }\n  };\n\n  const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => {\n    iOSfix();\n\n    if (scrollbarPadding && initialBodyOverflow !== 'hidden') {\n      fixScrollbar();\n    } // sweetalert2/issues/1247\n\n\n    setTimeout(() => {\n      container.scrollTop = 0;\n    });\n  };\n\n  const addClasses$1 = (container, popup, params) => {\n    addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059\n\n    popup.style.setProperty('opacity', '0', 'important');\n    show(popup, 'grid');\n    setTimeout(() => {\n      // Animate popup right after showing it\n      addClass(popup, params.showClass.popup); // and remove the opacity workaround\n\n      popup.style.removeProperty('opacity');\n    }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062\n\n    addClass([document.documentElement, document.body], swalClasses.shown);\n\n    if (params.heightAuto && params.backdrop && !params.toast) {\n      addClass([document.documentElement, document.body], swalClasses['height-auto']);\n    }\n  };\n\n  const handleInputOptionsAndValue = (instance, params) => {\n    if (params.input === 'select' || params.input === 'radio') {\n      handleInputOptions(instance, params);\n    } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {\n      showLoading(getConfirmButton());\n      handleInputValue(instance, params);\n    }\n  };\n  const getInputValue = (instance, innerParams) => {\n    const input = instance.getInput();\n\n    if (!input) {\n      return null;\n    }\n\n    switch (innerParams.input) {\n      case 'checkbox':\n        return getCheckboxValue(input);\n\n      case 'radio':\n        return getRadioValue(input);\n\n      case 'file':\n        return getFileValue(input);\n\n      default:\n        return innerParams.inputAutoTrim ? input.value.trim() : input.value;\n    }\n  };\n\n  const getCheckboxValue = input => input.checked ? 1 : 0;\n\n  const getRadioValue = input => input.checked ? input.value : null;\n\n  const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;\n\n  const handleInputOptions = (instance, params) => {\n    const popup = getPopup();\n\n    const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params);\n\n    if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {\n      showLoading(getConfirmButton());\n      asPromise(params.inputOptions).then(inputOptions => {\n        instance.hideLoading();\n        processInputOptions(inputOptions);\n      });\n    } else if (typeof params.inputOptions === 'object') {\n      processInputOptions(params.inputOptions);\n    } else {\n      error(\"Unexpected type of inputOptions! Expected object, Map or Promise, got \".concat(typeof params.inputOptions));\n    }\n  };\n\n  const handleInputValue = (instance, params) => {\n    const input = instance.getInput();\n    hide(input);\n    asPromise(params.inputValue).then(inputValue => {\n      input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : \"\".concat(inputValue);\n      show(input);\n      input.focus();\n      instance.hideLoading();\n    }).catch(err => {\n      error(\"Error in inputValue promise: \".concat(err));\n      input.value = '';\n      show(input);\n      input.focus();\n      instance.hideLoading();\n    });\n  };\n\n  const populateInputOptions = {\n    select: (popup, inputOptions, params) => {\n      const select = getChildByClass(popup, swalClasses.select);\n\n      const renderOption = (parent, optionLabel, optionValue) => {\n        const option = document.createElement('option');\n        option.value = optionValue;\n        setInnerHtml(option, optionLabel);\n        option.selected = isSelected(optionValue, params.inputValue);\n        parent.appendChild(option);\n      };\n\n      inputOptions.forEach(inputOption => {\n        const optionValue = inputOption[0];\n        const optionLabel = inputOption[1]; // <optgroup> spec:\n        // https://www.w3.org/TR/html401/interact/forms.html#h-17.6\n        // \"...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)...\"\n        // check whether this is a <optgroup>\n\n        if (Array.isArray(optionLabel)) {\n          // if it is an array, then it is an <optgroup>\n          const optgroup = document.createElement('optgroup');\n          optgroup.label = optionValue;\n          optgroup.disabled = false; // not configurable for now\n\n          select.appendChild(optgroup);\n          optionLabel.forEach(o => renderOption(optgroup, o[1], o[0]));\n        } else {\n          // case of <option>\n          renderOption(select, optionLabel, optionValue);\n        }\n      });\n      select.focus();\n    },\n    radio: (popup, inputOptions, params) => {\n      const radio = getChildByClass(popup, swalClasses.radio);\n      inputOptions.forEach(inputOption => {\n        const radioValue = inputOption[0];\n        const radioLabel = inputOption[1];\n        const radioInput = document.createElement('input');\n        const radioLabelElement = document.createElement('label');\n        radioInput.type = 'radio';\n        radioInput.name = swalClasses.radio;\n        radioInput.value = radioValue;\n\n        if (isSelected(radioValue, params.inputValue)) {\n          radioInput.checked = true;\n        }\n\n        const label = document.createElement('span');\n        setInnerHtml(label, radioLabel);\n        label.className = swalClasses.label;\n        radioLabelElement.appendChild(radioInput);\n        radioLabelElement.appendChild(label);\n        radio.appendChild(radioLabelElement);\n      });\n      const radios = radio.querySelectorAll('input');\n\n      if (radios.length) {\n        radios[0].focus();\n      }\n    }\n  };\n  /**\n   * Converts `inputOptions` into an array of `[value, label]`s\n   * @param inputOptions\n   */\n\n  const formatInputOptions = inputOptions => {\n    const result = [];\n\n    if (typeof Map !== 'undefined' && inputOptions instanceof Map) {\n      inputOptions.forEach((value, key) => {\n        let valueFormatted = value;\n\n        if (typeof valueFormatted === 'object') {\n          // case of <optgroup>\n          valueFormatted = formatInputOptions(valueFormatted);\n        }\n\n        result.push([key, valueFormatted]);\n      });\n    } else {\n      Object.keys(inputOptions).forEach(key => {\n        let valueFormatted = inputOptions[key];\n\n        if (typeof valueFormatted === 'object') {\n          // case of <optgroup>\n          valueFormatted = formatInputOptions(valueFormatted);\n        }\n\n        result.push([key, valueFormatted]);\n      });\n    }\n\n    return result;\n  };\n\n  const isSelected = (optionValue, inputValue) => {\n    return inputValue && inputValue.toString() === optionValue.toString();\n  };\n\n  const handleConfirmButtonClick = (instance, innerParams) => {\n    instance.disableButtons();\n\n    if (innerParams.input) {\n      handleConfirmOrDenyWithInput(instance, innerParams, 'confirm');\n    } else {\n      confirm(instance, innerParams, true);\n    }\n  };\n  const handleDenyButtonClick = (instance, innerParams) => {\n    instance.disableButtons();\n\n    if (innerParams.returnInputValueOnDeny) {\n      handleConfirmOrDenyWithInput(instance, innerParams, 'deny');\n    } else {\n      deny(instance, innerParams, false);\n    }\n  };\n  const handleCancelButtonClick = (instance, dismissWith) => {\n    instance.disableButtons();\n    dismissWith(DismissReason.cancel);\n  };\n\n  const handleConfirmOrDenyWithInput = (instance, innerParams, type\n  /* type is either 'confirm' or 'deny' */\n  ) => {\n    const inputValue = getInputValue(instance, innerParams);\n\n    if (innerParams.inputValidator) {\n      handleInputValidator(instance, innerParams, inputValue, type);\n    } else if (!instance.getInput().checkValidity()) {\n      instance.enableButtons();\n      instance.showValidationMessage(innerParams.validationMessage);\n    } else if (type === 'deny') {\n      deny(instance, innerParams, inputValue);\n    } else {\n      confirm(instance, innerParams, inputValue);\n    }\n  };\n\n  const handleInputValidator = (instance, innerParams, inputValue, type\n  /* type is either 'confirm' or 'deny' */\n  ) => {\n    instance.disableInput();\n    const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)));\n    validationPromise.then(validationMessage => {\n      instance.enableButtons();\n      instance.enableInput();\n\n      if (validationMessage) {\n        instance.showValidationMessage(validationMessage);\n      } else if (type === 'deny') {\n        deny(instance, innerParams, inputValue);\n      } else {\n        confirm(instance, innerParams, inputValue);\n      }\n    });\n  };\n\n  const deny = (instance, innerParams, value) => {\n    if (innerParams.showLoaderOnDeny) {\n      showLoading(getDenyButton());\n    }\n\n    if (innerParams.preDeny) {\n      const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage)));\n      preDenyPromise.then(preDenyValue => {\n        if (preDenyValue === false) {\n          instance.hideLoading();\n        } else {\n          instance.closePopup({\n            isDenied: true,\n            value: typeof preDenyValue === 'undefined' ? value : preDenyValue\n          });\n        }\n      });\n    } else {\n      instance.closePopup({\n        isDenied: true,\n        value\n      });\n    }\n  };\n\n  const succeedWith = (instance, value) => {\n    instance.closePopup({\n      isConfirmed: true,\n      value\n    });\n  };\n\n  const confirm = (instance, innerParams, value) => {\n    if (innerParams.showLoaderOnConfirm) {\n      showLoading(); // TODO: make showLoading an *instance* method\n    }\n\n    if (innerParams.preConfirm) {\n      instance.resetValidationMessage();\n      const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage)));\n      preConfirmPromise.then(preConfirmValue => {\n        if (isVisible(getValidationMessage()) || preConfirmValue === false) {\n          instance.hideLoading();\n        } else {\n          succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);\n        }\n      });\n    } else {\n      succeedWith(instance, value);\n    }\n  };\n\n  const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => {\n    if (globalState.keydownTarget && globalState.keydownHandlerAdded) {\n      globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n        capture: globalState.keydownListenerCapture\n      });\n      globalState.keydownHandlerAdded = false;\n    }\n\n    if (!innerParams.toast) {\n      globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith);\n\n      globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();\n      globalState.keydownListenerCapture = innerParams.keydownListenerCapture;\n      globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {\n        capture: globalState.keydownListenerCapture\n      });\n      globalState.keydownHandlerAdded = true;\n    }\n  }; // Focus handling\n\n  const setFocus = (innerParams, index, increment) => {\n    const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match\n\n    if (focusableElements.length) {\n      index = index + increment; // rollover to first item\n\n      if (index === focusableElements.length) {\n        index = 0; // go to last item\n      } else if (index === -1) {\n        index = focusableElements.length - 1;\n      }\n\n      return focusableElements[index].focus();\n    } // no visible focusable elements, focus the popup\n\n\n    getPopup().focus();\n  };\n  const arrowKeysNextButton = ['ArrowRight', 'ArrowDown'];\n  const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp'];\n\n  const keydownHandler = (instance, e, dismissWith) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (!innerParams) {\n      return; // This instance has already been destroyed\n    }\n\n    if (innerParams.stopKeydownPropagation) {\n      e.stopPropagation();\n    } // ENTER\n\n\n    if (e.key === 'Enter') {\n      handleEnter(instance, e, innerParams); // TAB\n    } else if (e.key === 'Tab') {\n      handleTab(e, innerParams); // ARROWS - switch focus between buttons\n    } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) {\n      handleArrows(e.key); // ESC\n    } else if (e.key === 'Escape') {\n      handleEsc(e, innerParams, dismissWith);\n    }\n  };\n\n  const handleEnter = (instance, e, innerParams) => {\n    // #720 #721\n    if (e.isComposing) {\n      return;\n    }\n\n    if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {\n      if (['textarea', 'file'].includes(innerParams.input)) {\n        return; // do not submit\n      }\n\n      clickConfirm();\n      e.preventDefault();\n    }\n  };\n\n  const handleTab = (e, innerParams) => {\n    const targetElement = e.target;\n    const focusableElements = getFocusableElements();\n    let btnIndex = -1;\n\n    for (let i = 0; i < focusableElements.length; i++) {\n      if (targetElement === focusableElements[i]) {\n        btnIndex = i;\n        break;\n      }\n    }\n\n    if (!e.shiftKey) {\n      // Cycle to the next button\n      setFocus(innerParams, btnIndex, 1);\n    } else {\n      // Cycle to the prev button\n      setFocus(innerParams, btnIndex, -1);\n    }\n\n    e.stopPropagation();\n    e.preventDefault();\n  };\n\n  const handleArrows = key => {\n    const confirmButton = getConfirmButton();\n    const denyButton = getDenyButton();\n    const cancelButton = getCancelButton();\n\n    if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) {\n      return;\n    }\n\n    const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling';\n    const buttonToFocus = document.activeElement[sibling];\n\n    if (buttonToFocus) {\n      buttonToFocus.focus();\n    }\n  };\n\n  const handleEsc = (e, innerParams, dismissWith) => {\n    if (callIfFunction(innerParams.allowEscapeKey)) {\n      e.preventDefault();\n      dismissWith(DismissReason.esc);\n    }\n  };\n\n  const handlePopupClick = (instance, domCache, dismissWith) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (innerParams.toast) {\n      handleToastClick(instance, domCache, dismissWith);\n    } else {\n      // Ignore click events that had mousedown on the popup but mouseup on the container\n      // This can happen when the user drags a slider\n      handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup\n\n      handleContainerMousedown(domCache);\n      handleModalClick(instance, domCache, dismissWith);\n    }\n  };\n\n  const handleToastClick = (instance, domCache, dismissWith) => {\n    // Closing toast by internal click\n    domCache.popup.onclick = () => {\n      const innerParams = privateProps.innerParams.get(instance);\n\n      if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) {\n        return;\n      }\n\n      dismissWith(DismissReason.close);\n    };\n  };\n\n  let ignoreOutsideClick = false;\n\n  const handleModalMousedown = domCache => {\n    domCache.popup.onmousedown = () => {\n      domCache.container.onmouseup = function (e) {\n        domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't\n        // have any other direct children aside of the popup\n\n        if (e.target === domCache.container) {\n          ignoreOutsideClick = true;\n        }\n      };\n    };\n  };\n\n  const handleContainerMousedown = domCache => {\n    domCache.container.onmousedown = () => {\n      domCache.popup.onmouseup = function (e) {\n        domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup\n\n        if (e.target === domCache.popup || domCache.popup.contains(e.target)) {\n          ignoreOutsideClick = true;\n        }\n      };\n    };\n  };\n\n  const handleModalClick = (instance, domCache, dismissWith) => {\n    domCache.container.onclick = e => {\n      const innerParams = privateProps.innerParams.get(instance);\n\n      if (ignoreOutsideClick) {\n        ignoreOutsideClick = false;\n        return;\n      }\n\n      if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {\n        dismissWith(DismissReason.backdrop);\n      }\n    };\n  };\n\n  function _main(userParams, mixinParams = {}) {\n    showWarningsForParams(Object.assign({}, mixinParams, userParams));\n\n    if (globalState.currentInstance) {\n      globalState.currentInstance._destroy();\n    }\n\n    globalState.currentInstance = this;\n    const innerParams = prepareParams(userParams, mixinParams);\n    setParameters(innerParams);\n    Object.freeze(innerParams); // clear the previous timer\n\n    if (globalState.timeout) {\n      globalState.timeout.stop();\n      delete globalState.timeout;\n    } // clear the restore focus timeout\n\n\n    clearTimeout(globalState.restoreFocusTimeout);\n    const domCache = populateDomCache(this);\n    render(this, innerParams);\n    privateProps.innerParams.set(this, innerParams);\n    return swalPromise(this, domCache, innerParams);\n  }\n\n  const prepareParams = (userParams, mixinParams) => {\n    const templateParams = getTemplateParams(userParams);\n    const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131\n\n    params.showClass = Object.assign({}, defaultParams.showClass, params.showClass);\n    params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass);\n    return params;\n  };\n\n  const swalPromise = (instance, domCache, innerParams) => {\n    return new Promise(resolve => {\n      // functions to handle all closings/dismissals\n      const dismissWith = dismiss => {\n        instance.closePopup({\n          isDismissed: true,\n          dismiss\n        });\n      };\n\n      privateMethods.swalPromiseResolve.set(instance, resolve);\n\n      domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance, innerParams);\n\n      domCache.denyButton.onclick = () => handleDenyButtonClick(instance, innerParams);\n\n      domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith);\n\n      domCache.closeButton.onclick = () => dismissWith(DismissReason.close);\n\n      handlePopupClick(instance, domCache, dismissWith);\n      addKeydownHandler(instance, globalState, innerParams, dismissWith);\n      handleInputOptionsAndValue(instance, innerParams);\n      openPopup(innerParams);\n      setupTimer(globalState, innerParams, dismissWith);\n      initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)\n\n      setTimeout(() => {\n        domCache.container.scrollTop = 0;\n      });\n    });\n  };\n\n  const populateDomCache = instance => {\n    const domCache = {\n      popup: getPopup(),\n      container: getContainer(),\n      actions: getActions(),\n      confirmButton: getConfirmButton(),\n      denyButton: getDenyButton(),\n      cancelButton: getCancelButton(),\n      loader: getLoader(),\n      closeButton: getCloseButton(),\n      validationMessage: getValidationMessage(),\n      progressSteps: getProgressSteps()\n    };\n    privateProps.domCache.set(instance, domCache);\n    return domCache;\n  };\n\n  const setupTimer = (globalState$$1, innerParams, dismissWith) => {\n    const timerProgressBar = getTimerProgressBar();\n    hide(timerProgressBar);\n\n    if (innerParams.timer) {\n      globalState$$1.timeout = new Timer(() => {\n        dismissWith('timer');\n        delete globalState$$1.timeout;\n      }, innerParams.timer);\n\n      if (innerParams.timerProgressBar) {\n        show(timerProgressBar);\n        setTimeout(() => {\n          if (globalState$$1.timeout && globalState$$1.timeout.running) {\n            // timer can be already stopped or unset at this point\n            animateTimerProgressBar(innerParams.timer);\n          }\n        });\n      }\n    }\n  };\n\n  const initFocus = (domCache, innerParams) => {\n    if (innerParams.toast) {\n      return;\n    }\n\n    if (!callIfFunction(innerParams.allowEnterKey)) {\n      return blurActiveElement();\n    }\n\n    if (!focusButton(domCache, innerParams)) {\n      setFocus(innerParams, -1, 1);\n    }\n  };\n\n  const focusButton = (domCache, innerParams) => {\n    if (innerParams.focusDeny && isVisible(domCache.denyButton)) {\n      domCache.denyButton.focus();\n      return true;\n    }\n\n    if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {\n      domCache.cancelButton.focus();\n      return true;\n    }\n\n    if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {\n      domCache.confirmButton.focus();\n      return true;\n    }\n\n    return false;\n  };\n\n  const blurActiveElement = () => {\n    if (document.activeElement && typeof document.activeElement.blur === 'function') {\n      document.activeElement.blur();\n    }\n  };\n\n  /**\n   * Updates popup parameters.\n   */\n\n  function update(params) {\n    const popup = getPopup();\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!popup || hasClass(popup, innerParams.hideClass.popup)) {\n      return warn(\"You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.\");\n    }\n\n    const validUpdatableParams = {}; // assign valid params from `params` to `defaults`\n\n    Object.keys(params).forEach(param => {\n      if (Swal.isUpdatableParameter(param)) {\n        validUpdatableParams[param] = params[param];\n      } else {\n        warn(\"Invalid parameter to update: \\\"\".concat(param, \"\\\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\\n\\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md\"));\n      }\n    });\n    const updatedParams = Object.assign({}, innerParams, validUpdatableParams);\n    render(this, updatedParams);\n    privateProps.innerParams.set(this, updatedParams);\n    Object.defineProperties(this, {\n      params: {\n        value: Object.assign({}, this.params, params),\n        writable: false,\n        enumerable: true\n      }\n    });\n  }\n\n  function _destroy() {\n    const domCache = privateProps.domCache.get(this);\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!innerParams) {\n      return; // This instance has already been destroyed\n    } // Check if there is another Swal closing\n\n\n    if (domCache.popup && globalState.swalCloseEventFinishedCallback) {\n      globalState.swalCloseEventFinishedCallback();\n      delete globalState.swalCloseEventFinishedCallback;\n    } // Check if there is a swal disposal defer timer\n\n\n    if (globalState.deferDisposalTimer) {\n      clearTimeout(globalState.deferDisposalTimer);\n      delete globalState.deferDisposalTimer;\n    }\n\n    if (typeof innerParams.didDestroy === 'function') {\n      innerParams.didDestroy();\n    }\n\n    disposeSwal(this);\n  }\n\n  const disposeSwal = instance => {\n    // Unset this.params so GC will dispose it (#1569)\n    delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)\n\n    delete globalState.keydownHandler;\n    delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569)\n\n    unsetWeakMaps(privateProps);\n    unsetWeakMaps(privateMethods);\n  };\n\n  const unsetWeakMaps = obj => {\n    for (const i in obj) {\n      obj[i] = new WeakMap();\n    }\n  };\n\n\n\n  var instanceMethods = /*#__PURE__*/Object.freeze({\n    hideLoading: hideLoading,\n    disableLoading: hideLoading,\n    getInput: getInput$1,\n    close: close,\n    closePopup: close,\n    closeModal: close,\n    closeToast: close,\n    enableButtons: enableButtons,\n    disableButtons: disableButtons,\n    enableInput: enableInput,\n    disableInput: disableInput,\n    showValidationMessage: showValidationMessage,\n    resetValidationMessage: resetValidationMessage$1,\n    getProgressSteps: getProgressSteps$1,\n    _main: _main,\n    update: update,\n    _destroy: _destroy\n  });\n\n  let currentInstance;\n\n  class SweetAlert {\n    constructor(...args) {\n      // Prevent run in Node env\n      if (typeof window === 'undefined') {\n        return;\n      }\n\n      currentInstance = this;\n      const outerParams = Object.freeze(this.constructor.argsToParams(args));\n      Object.defineProperties(this, {\n        params: {\n          value: outerParams,\n          writable: false,\n          enumerable: true,\n          configurable: true\n        }\n      });\n\n      const promise = this._main(this.params);\n\n      privateProps.promise.set(this, promise);\n    } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n\n    then(onFulfilled) {\n      const promise = privateProps.promise.get(this);\n      return promise.then(onFulfilled);\n    }\n\n    finally(onFinally) {\n      const promise = privateProps.promise.get(this);\n      return promise.finally(onFinally);\n    }\n\n  } // Assign instance methods from src/instanceMethods/*.js to prototype\n\n\n  Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n  Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n  Object.keys(instanceMethods).forEach(key => {\n    SweetAlert[key] = function (...args) {\n      if (currentInstance) {\n        return currentInstance[key](...args);\n      }\n    };\n  });\n  SweetAlert.DismissReason = DismissReason;\n  SweetAlert.version = '11.0.17';\n\n  const Swal = SweetAlert;\n  Swal.default = Swal;\n\n  return Swal;\n\n}));\nif (typeof this !== 'undefined' && this.Sweetalert2){  this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}\n\n\"undefined\"!=typeof document&&function(e,t){var n=e.createElement(\"style\");if(e.getElementsByTagName(\"head\")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,\".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\\\"top-start     top            top-end\\\" \\\"center-start  center         center-end\\\" \\\"bottom-start  bottom-center  bottom-end\\\" \\\"gap gap gap\\\";grid-template-rows:auto auto auto .625em;height:100%;padding:.625em .625em 0;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container::after{content:\\\"\\\";grid-column:1/4;grid-row:4;height:.625em}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\\\"!\\\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}\");\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/sweetalert2/dist/sweetalert2.all.js?\n}");

/***/ }),

/***/ "./node_modules/whatwg-fetch/fetch.js":
/*!********************************************!*\
  !*** ./node_modules/whatwg-fetch/fetch.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   DOMException: () => (/* binding */ DOMException),\n/* harmony export */   Headers: () => (/* binding */ Headers),\n/* harmony export */   Request: () => (/* binding */ Request),\n/* harmony export */   Response: () => (/* binding */ Response),\n/* harmony export */   fetch: () => (/* binding */ fetch)\n/* harmony export */ });\nvar support = {\n  searchParams: 'URLSearchParams' in self,\n  iterable: 'Symbol' in self && 'iterator' in Symbol,\n  blob:\n    'FileReader' in self &&\n    'Blob' in self &&\n    (function() {\n      try {\n        new Blob()\n        return true\n      } catch (e) {\n        return false\n      }\n    })(),\n  formData: 'FormData' in self,\n  arrayBuffer: 'ArrayBuffer' in self\n}\n\nfunction isDataView(obj) {\n  return obj && DataView.prototype.isPrototypeOf(obj)\n}\n\nif (support.arrayBuffer) {\n  var viewClasses = [\n    '[object Int8Array]',\n    '[object Uint8Array]',\n    '[object Uint8ClampedArray]',\n    '[object Int16Array]',\n    '[object Uint16Array]',\n    '[object Int32Array]',\n    '[object Uint32Array]',\n    '[object Float32Array]',\n    '[object Float64Array]'\n  ]\n\n  var isArrayBufferView =\n    ArrayBuffer.isView ||\n    function(obj) {\n      return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n    }\n}\n\nfunction normalizeName(name) {\n  if (typeof name !== 'string') {\n    name = String(name)\n  }\n  if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n    throw new TypeError('Invalid character in header field name')\n  }\n  return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n  if (typeof value !== 'string') {\n    value = String(value)\n  }\n  return value\n}\n\n// Build a destructive iterator for the value list\nfunction iteratorFor(items) {\n  var iterator = {\n    next: function() {\n      var value = items.shift()\n      return {done: value === undefined, value: value}\n    }\n  }\n\n  if (support.iterable) {\n    iterator[Symbol.iterator] = function() {\n      return iterator\n    }\n  }\n\n  return iterator\n}\n\nfunction Headers(headers) {\n  this.map = {}\n\n  if (headers instanceof Headers) {\n    headers.forEach(function(value, name) {\n      this.append(name, value)\n    }, this)\n  } else if (Array.isArray(headers)) {\n    headers.forEach(function(header) {\n      this.append(header[0], header[1])\n    }, this)\n  } else if (headers) {\n    Object.getOwnPropertyNames(headers).forEach(function(name) {\n      this.append(name, headers[name])\n    }, this)\n  }\n}\n\nHeaders.prototype.append = function(name, value) {\n  name = normalizeName(name)\n  value = normalizeValue(value)\n  var oldValue = this.map[name]\n  this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nHeaders.prototype['delete'] = function(name) {\n  delete this.map[normalizeName(name)]\n}\n\nHeaders.prototype.get = function(name) {\n  name = normalizeName(name)\n  return this.has(name) ? this.map[name] : null\n}\n\nHeaders.prototype.has = function(name) {\n  return this.map.hasOwnProperty(normalizeName(name))\n}\n\nHeaders.prototype.set = function(name, value) {\n  this.map[normalizeName(name)] = normalizeValue(value)\n}\n\nHeaders.prototype.forEach = function(callback, thisArg) {\n  for (var name in this.map) {\n    if (this.map.hasOwnProperty(name)) {\n      callback.call(thisArg, this.map[name], name, this)\n    }\n  }\n}\n\nHeaders.prototype.keys = function() {\n  var items = []\n  this.forEach(function(value, name) {\n    items.push(name)\n  })\n  return iteratorFor(items)\n}\n\nHeaders.prototype.values = function() {\n  var items = []\n  this.forEach(function(value) {\n    items.push(value)\n  })\n  return iteratorFor(items)\n}\n\nHeaders.prototype.entries = function() {\n  var items = []\n  this.forEach(function(value, name) {\n    items.push([name, value])\n  })\n  return iteratorFor(items)\n}\n\nif (support.iterable) {\n  Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n}\n\nfunction consumed(body) {\n  if (body.bodyUsed) {\n    return Promise.reject(new TypeError('Already read'))\n  }\n  body.bodyUsed = true\n}\n\nfunction fileReaderReady(reader) {\n  return new Promise(function(resolve, reject) {\n    reader.onload = function() {\n      resolve(reader.result)\n    }\n    reader.onerror = function() {\n      reject(reader.error)\n    }\n  })\n}\n\nfunction readBlobAsArrayBuffer(blob) {\n  var reader = new FileReader()\n  var promise = fileReaderReady(reader)\n  reader.readAsArrayBuffer(blob)\n  return promise\n}\n\nfunction readBlobAsText(blob) {\n  var reader = new FileReader()\n  var promise = fileReaderReady(reader)\n  reader.readAsText(blob)\n  return promise\n}\n\nfunction readArrayBufferAsText(buf) {\n  var view = new Uint8Array(buf)\n  var chars = new Array(view.length)\n\n  for (var i = 0; i < view.length; i++) {\n    chars[i] = String.fromCharCode(view[i])\n  }\n  return chars.join('')\n}\n\nfunction bufferClone(buf) {\n  if (buf.slice) {\n    return buf.slice(0)\n  } else {\n    var view = new Uint8Array(buf.byteLength)\n    view.set(new Uint8Array(buf))\n    return view.buffer\n  }\n}\n\nfunction Body() {\n  this.bodyUsed = false\n\n  this._initBody = function(body) {\n    /*\n      fetch-mock wraps the Response object in an ES6 Proxy to\n      provide useful test harness features such as flush. However, on\n      ES5 browsers without fetch or Proxy support pollyfills must be used;\n      the proxy-pollyfill is unable to proxy an attribute unless it exists\n      on the object before the Proxy is created. This change ensures\n      Response.bodyUsed exists on the instance, while maintaining the\n      semantic of setting Request.bodyUsed in the constructor before\n      _initBody is called.\n    */\n    this.bodyUsed = this.bodyUsed\n    this._bodyInit = body\n    if (!body) {\n      this._bodyText = ''\n    } else if (typeof body === 'string') {\n      this._bodyText = body\n    } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n      this._bodyBlob = body\n    } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n      this._bodyFormData = body\n    } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n      this._bodyText = body.toString()\n    } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n      this._bodyArrayBuffer = bufferClone(body.buffer)\n      // IE 10-11 can't handle a DataView body.\n      this._bodyInit = new Blob([this._bodyArrayBuffer])\n    } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n      this._bodyArrayBuffer = bufferClone(body)\n    } else {\n      this._bodyText = body = Object.prototype.toString.call(body)\n    }\n\n    if (!this.headers.get('content-type')) {\n      if (typeof body === 'string') {\n        this.headers.set('content-type', 'text/plain;charset=UTF-8')\n      } else if (this._bodyBlob && this._bodyBlob.type) {\n        this.headers.set('content-type', this._bodyBlob.type)\n      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n        this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n      }\n    }\n  }\n\n  if (support.blob) {\n    this.blob = function() {\n      var rejected = consumed(this)\n      if (rejected) {\n        return rejected\n      }\n\n      if (this._bodyBlob) {\n        return Promise.resolve(this._bodyBlob)\n      } else if (this._bodyArrayBuffer) {\n        return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n      } else if (this._bodyFormData) {\n        throw new Error('could not read FormData body as blob')\n      } else {\n        return Promise.resolve(new Blob([this._bodyText]))\n      }\n    }\n\n    this.arrayBuffer = function() {\n      if (this._bodyArrayBuffer) {\n        return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n      } else {\n        return this.blob().then(readBlobAsArrayBuffer)\n      }\n    }\n  }\n\n  this.text = function() {\n    var rejected = consumed(this)\n    if (rejected) {\n      return rejected\n    }\n\n    if (this._bodyBlob) {\n      return readBlobAsText(this._bodyBlob)\n    } else if (this._bodyArrayBuffer) {\n      return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n    } else if (this._bodyFormData) {\n      throw new Error('could not read FormData body as text')\n    } else {\n      return Promise.resolve(this._bodyText)\n    }\n  }\n\n  if (support.formData) {\n    this.formData = function() {\n      return this.text().then(decode)\n    }\n  }\n\n  this.json = function() {\n    return this.text().then(JSON.parse)\n  }\n\n  return this\n}\n\n// HTTP methods whose capitalization should be normalized\nvar methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\nfunction normalizeMethod(method) {\n  var upcased = method.toUpperCase()\n  return methods.indexOf(upcased) > -1 ? upcased : method\n}\n\nfunction Request(input, options) {\n  options = options || {}\n  var body = options.body\n\n  if (input instanceof Request) {\n    if (input.bodyUsed) {\n      throw new TypeError('Already read')\n    }\n    this.url = input.url\n    this.credentials = input.credentials\n    if (!options.headers) {\n      this.headers = new Headers(input.headers)\n    }\n    this.method = input.method\n    this.mode = input.mode\n    this.signal = input.signal\n    if (!body && input._bodyInit != null) {\n      body = input._bodyInit\n      input.bodyUsed = true\n    }\n  } else {\n    this.url = String(input)\n  }\n\n  this.credentials = options.credentials || this.credentials || 'same-origin'\n  if (options.headers || !this.headers) {\n    this.headers = new Headers(options.headers)\n  }\n  this.method = normalizeMethod(options.method || this.method || 'GET')\n  this.mode = options.mode || this.mode || null\n  this.signal = options.signal || this.signal\n  this.referrer = null\n\n  if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n    throw new TypeError('Body not allowed for GET or HEAD requests')\n  }\n  this._initBody(body)\n}\n\nRequest.prototype.clone = function() {\n  return new Request(this, {body: this._bodyInit})\n}\n\nfunction decode(body) {\n  var form = new FormData()\n  body\n    .trim()\n    .split('&')\n    .forEach(function(bytes) {\n      if (bytes) {\n        var split = bytes.split('=')\n        var name = split.shift().replace(/\\+/g, ' ')\n        var value = split.join('=').replace(/\\+/g, ' ')\n        form.append(decodeURIComponent(name), decodeURIComponent(value))\n      }\n    })\n  return form\n}\n\nfunction parseHeaders(rawHeaders) {\n  var headers = new Headers()\n  // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n  // https://tools.ietf.org/html/rfc7230#section-3.2\n  var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n  preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n    var parts = line.split(':')\n    var key = parts.shift().trim()\n    if (key) {\n      var value = parts.join(':').trim()\n      headers.append(key, value)\n    }\n  })\n  return headers\n}\n\nBody.call(Request.prototype)\n\nfunction Response(bodyInit, options) {\n  if (!options) {\n    options = {}\n  }\n\n  this.type = 'default'\n  this.status = options.status === undefined ? 200 : options.status\n  this.ok = this.status >= 200 && this.status < 300\n  this.statusText = 'statusText' in options ? options.statusText : ''\n  this.headers = new Headers(options.headers)\n  this.url = options.url || ''\n  this._initBody(bodyInit)\n}\n\nBody.call(Response.prototype)\n\nResponse.prototype.clone = function() {\n  return new Response(this._bodyInit, {\n    status: this.status,\n    statusText: this.statusText,\n    headers: new Headers(this.headers),\n    url: this.url\n  })\n}\n\nResponse.error = function() {\n  var response = new Response(null, {status: 0, statusText: ''})\n  response.type = 'error'\n  return response\n}\n\nvar redirectStatuses = [301, 302, 303, 307, 308]\n\nResponse.redirect = function(url, status) {\n  if (redirectStatuses.indexOf(status) === -1) {\n    throw new RangeError('Invalid status code')\n  }\n\n  return new Response(null, {status: status, headers: {location: url}})\n}\n\nvar DOMException = self.DOMException\ntry {\n  new DOMException()\n} catch (err) {\n  DOMException = function(message, name) {\n    this.message = message\n    this.name = name\n    var error = Error(message)\n    this.stack = error.stack\n  }\n  DOMException.prototype = Object.create(Error.prototype)\n  DOMException.prototype.constructor = DOMException\n}\n\nfunction fetch(input, init) {\n  return new Promise(function(resolve, reject) {\n    var request = new Request(input, init)\n\n    if (request.signal && request.signal.aborted) {\n      return reject(new DOMException('Aborted', 'AbortError'))\n    }\n\n    var xhr = new XMLHttpRequest()\n\n    function abortXhr() {\n      xhr.abort()\n    }\n\n    xhr.onload = function() {\n      var options = {\n        status: xhr.status,\n        statusText: xhr.statusText,\n        headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n      }\n      options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n      var body = 'response' in xhr ? xhr.response : xhr.responseText\n      setTimeout(function() {\n        resolve(new Response(body, options))\n      }, 0)\n    }\n\n    xhr.onerror = function() {\n      setTimeout(function() {\n        reject(new TypeError('Network request failed'))\n      }, 0)\n    }\n\n    xhr.ontimeout = function() {\n      setTimeout(function() {\n        reject(new TypeError('Network request failed'))\n      }, 0)\n    }\n\n    xhr.onabort = function() {\n      setTimeout(function() {\n        reject(new DOMException('Aborted', 'AbortError'))\n      }, 0)\n    }\n\n    function fixUrl(url) {\n      try {\n        return url === '' && self.location.href ? self.location.href : url\n      } catch (e) {\n        return url\n      }\n    }\n\n    xhr.open(request.method, fixUrl(request.url), true)\n\n    if (request.credentials === 'include') {\n      xhr.withCredentials = true\n    } else if (request.credentials === 'omit') {\n      xhr.withCredentials = false\n    }\n\n    if ('responseType' in xhr) {\n      if (support.blob) {\n        xhr.responseType = 'blob'\n      } else if (\n        support.arrayBuffer &&\n        request.headers.get('Content-Type') &&\n        request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1\n      ) {\n        xhr.responseType = 'arraybuffer'\n      }\n    }\n\n    request.headers.forEach(function(value, name) {\n      xhr.setRequestHeader(name, value)\n    })\n\n    if (request.signal) {\n      request.signal.addEventListener('abort', abortXhr)\n\n      xhr.onreadystatechange = function() {\n        // DONE (success or failure)\n        if (xhr.readyState === 4) {\n          request.signal.removeEventListener('abort', abortXhr)\n        }\n      }\n    }\n\n    xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n  })\n}\n\nfetch.polyfill = true\n\nif (!self.fetch) {\n  self.fetch = fetch\n  self.Headers = Headers\n  self.Request = Request\n  self.Response = Response\n}\n\n\n//# sourceURL=webpack://IndexLibrary/./node_modules/whatwg-fetch/fetch.js?\n}");

/***/ }),

/***/ "./src/bundle-src/index.ts":
/*!*********************************!*\
  !*** ./src/bundle-src/index.ts ***!
  \*********************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! azure-devops-extension-sdk */ \"./node_modules/azure-devops-extension-sdk/SDK.min.js\"), __webpack_require__(/*! azure-devops-extension-api */ \"./node_modules/azure-devops-extension-api/index.js\"), __webpack_require__(/*! azure-devops-extension-api/WorkItemTracking */ \"./node_modules/azure-devops-extension-api/WorkItemTracking/index.js\"), __webpack_require__(/*! sweetalert2 */ \"./node_modules/sweetalert2/dist/sweetalert2.all.js\"), __webpack_require__(/*! azure-devops-extension-api/Core */ \"./node_modules/azure-devops-extension-api/Core/index.js\"), __webpack_require__(/*! azure-devops-extension-api/Git */ \"./node_modules/azure-devops-extension-api/Git/index.js\"), __webpack_require__(/*! marked */ \"./node_modules/marked/lib/marked.cjs\"), __webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.cjs.js\"), __webpack_require__(/*! luxon */ \"./node_modules/luxon/build/node/luxon.js\"), __webpack_require__(/*! ./shared/sdk-lifecycle */ \"./src/bundle-src/shared/sdk-lifecycle.ts\"), __webpack_require__(/*! ./shared/models */ \"./src/bundle-src/shared/models.ts\"), __webpack_require__(/*! ./shared/toast */ \"./src/bundle-src/shared/toast.ts\"), __webpack_require__(/*! ./shared/swal */ \"./src/bundle-src/shared/swal.ts\"), __webpack_require__(/*! ./shared/core */ \"./src/bundle-src/shared/core.ts\"), __webpack_require__(/*! ./shared/api-requests */ \"./src/bundle-src/shared/api-requests.ts\"), __webpack_require__(/*! ./modules/code-review */ \"./src/bundle-src/modules/code-review.ts\"), __webpack_require__(/*! ./shared/sdk-lifecycle */ \"./src/bundle-src/shared/sdk-lifecycle.ts\"), __webpack_require__(/*! ./modules/common */ \"./src/bundle-src/modules/common.ts\"), __webpack_require__(/*! ./modules/code-review */ \"./src/bundle-src/modules/code-review.ts\"), __webpack_require__(/*! ./shared/api-requests */ \"./src/bundle-src/shared/api-requests.ts\"), __webpack_require__(/*! ./shared/chat-attachments */ \"./src/bundle-src/shared/chat-attachments.ts\"), __webpack_require__(/*! ./shared/core */ \"./src/bundle-src/shared/core.ts\"), __webpack_require__(/*! ./shared/toast */ \"./src/bundle-src/shared/toast.ts\"), __webpack_require__(/*! ./shared/swal */ \"./src/bundle-src/shared/swal.ts\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, SDK, azure_devops_extension_api_1, WorkItemTracking_1, sweetalert2_1, Core_1, Git_1, marked_1, DOMPurify, luxon_1, sdk_lifecycle_1, models_1, toast_1, swal_1, core_1, api_requests_1, code_review_1, sdk_lifecycle_2, common_1, code_review_2, api_requests_2, chat_attachments_1, core_2, toast_2, swal_2) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.showValidationMessage = exports.showLoadingDialog = exports.showInputDialog = exports.showCustomDialog = exports.showConfirmDialog = exports.showAlertDialog = exports.ShowToast = exports.sanitizeCssColor = exports.openInNewTab = exports.NotifyLoad = exports.NavigateToUrl = exports.Navigate = exports.GetUserId = exports.GetUserEmail = exports.GetUserDisplayName = exports.getInitials = exports.GetCurrentProjectName = exports.GetCurrentProjectId = exports.GetCurrentProject = exports.GetExtensionConfig = exports.GetAccountNameAsync = exports.GetAccountIdAfterInit = exports.GetAccountIdAsync = exports.GetAccountId = exports.GetAccessToken = exports.formatHours = exports.escapeHtml = exports.convertUtcToLocal = exports.convertLocalToUtc = exports.ClosePanel = exports.changeTimeFormat = exports.buildReviewDetailsTooltipHtml = exports.buildQueuedByTooltipHtml = exports.ValidateAttachmentSize = exports.UploadAttachments = exports.UploadAttachment = exports.MAX_ATTACHMENTS_PER_MESSAGE = exports.IsImageAttachment = exports.IsAcceptedAttachment = exports.GetCachedAttachmentUrl = exports.GetAttachmentUrl = exports.CompressImage = exports.ClearAttachmentUrlCache = exports.ACCEPTED_ATTACHMENT_EXTENSIONS = exports.PutRequest = exports.PostRequest = exports.PatchRequest = exports.GetRequest = exports.DeleteRequest = exports.QueueCodeReviewPR = exports.GetPullRequestData = exports.GetUserLicensesType = exports.ensureSdkReady = exports.WorkItemTypeState = exports.WorkItemType = exports.SDK = void 0;\n    exports.getWorkItems = getWorkItems;\n    exports.getAllProjectIds = getAllProjectIds;\n    exports.getAllProjectsWithNames = getAllProjectsWithNames;\n    exports.getReposByProject = getReposByProject;\n    exports.getAllWorkItemTypes = getAllWorkItemTypes;\n    exports.getWorkItemsByIds = getWorkItemsByIds;\n    exports.calculateProgress = calculateProgress;\n    exports.showWorkItems = showWorkItems;\n    exports.GetFilteredWorkItems = GetFilteredWorkItems;\n    exports.InitializeSDK = InitializeSDK;\n    exports.checkFeatures = checkFeatures;\n    exports.QueueDeveloperAgentWorkItem = QueueDeveloperAgentWorkItem;\n    exports.CurrentWorkItem = CurrentWorkItem;\n    exports.GetCurrentWorkItemType = GetCurrentWorkItemType;\n    exports.HandleTimeTrackingMenuOptionClick = HandleTimeTrackingMenuOptionClick;\n    exports.HandleAddToRealeaseOptionClick = HandleAddToRealeaseOptionClick;\n    exports.HandleCreateWorkItemTypeClick = HandleCreateWorkItemTypeClick;\n    exports.HandleEditWorkItemTypeClick = HandleEditWorkItemTypeClick;\n    exports.HandleAdvancedReportingCreationClick = HandleAdvancedReportingCreationClick;\n    exports.HandleEditLoggedTimeClick = HandleEditLoggedTimeClick;\n    exports.GetPanelContext = GetPanelContext;\n    exports.GetWorkItemById = GetWorkItemById;\n    exports.validateTimeRangeLocal = validateTimeRangeLocal;\n    exports.SaveTimesheet = SaveTimesheet;\n    exports.UpdateTimesheet = UpdateTimesheet;\n    exports.DeleteTimesheet = DeleteTimesheet;\n    exports.LoadTimesheets = LoadTimesheets;\n    exports.loadAvatarsFor = loadAvatarsFor;\n    exports.getCachedAvatar = getCachedAvatar;\n    exports.getUserLookupFor = getUserLookupFor;\n    exports.getAllUsers = getAllUsers;\n    exports.buildUserLookup = buildUserLookup;\n    exports.getUserByEmail = getUserByEmail;\n    exports.SaveWorkType = SaveWorkType;\n    exports.UpdateWorkType = UpdateWorkType;\n    exports.GetWorkTypes = GetWorkTypes;\n    exports.LoadWorkTypes = LoadWorkTypes;\n    exports.safeUpdateUrl = safeUpdateUrl;\n    exports.CreateAdvancedReportingTemplate = CreateAdvancedReportingTemplate;\n    exports.UpdateAdvancedReportingTemplate = UpdateAdvancedReportingTemplate;\n    exports.GetAllReportingTemplates = GetAllReportingTemplates;\n    exports.GetUserReportingTemplates = GetUserReportingTemplates;\n    exports.CreateWorkItemsInDevops = CreateWorkItemsInDevops;\n    exports.UpdateWorkItemDescriptionInDevops = UpdateWorkItemDescriptionInDevops;\n    exports.GetWorkItemsInDevops = GetWorkItemsInDevops;\n    exports.ExecuteQueryByWiql = ExecuteQueryByWiql;\n    exports.GetWorkItemWithFields = GetWorkItemWithFields;\n    exports.GetWorkItemTypeFieldRefNames = GetWorkItemTypeFieldRefNames;\n    exports.UpdateWorkItemFieldInDevops = UpdateWorkItemFieldInDevops;\n    exports.AddWorkItemDiscussionComment = AddWorkItemDiscussionComment;\n    exports.GetWorkItemWithRelations = GetWorkItemWithRelations;\n    exports.GetWorkItemsWithFields = GetWorkItemsWithFields;\n    exports.TriggerSummarizeAction = TriggerSummarizeAction;\n    exports.CreateTrialLicense = CreateTrialLicense;\n    exports.AutoCreateTrialLicense = AutoCreateTrialLicense;\n    exports.SDK = SDK;\n    Object.defineProperty(exports, \"WorkItemType\", ({ enumerable: true, get: function () { return models_1.WorkItemType; } }));\n    Object.defineProperty(exports, \"WorkItemTypeState\", ({ enumerable: true, get: function () { return models_1.WorkItemTypeState; } }));\n    Object.defineProperty(exports, \"ensureSdkReady\", ({ enumerable: true, get: function () { return sdk_lifecycle_2.ensureSdkReady; } }));\n    Object.defineProperty(exports, \"GetUserLicensesType\", ({ enumerable: true, get: function () { return common_1.GetUserLicensesType; } }));\n    Object.defineProperty(exports, \"GetPullRequestData\", ({ enumerable: true, get: function () { return code_review_2.GetPullRequestData; } }));\n    Object.defineProperty(exports, \"QueueCodeReviewPR\", ({ enumerable: true, get: function () { return code_review_2.QueueCodeReviewPR; } }));\n    Object.defineProperty(exports, \"DeleteRequest\", ({ enumerable: true, get: function () { return api_requests_2.DeleteRequest; } }));\n    Object.defineProperty(exports, \"GetRequest\", ({ enumerable: true, get: function () { return api_requests_2.GetRequest; } }));\n    Object.defineProperty(exports, \"PatchRequest\", ({ enumerable: true, get: function () { return api_requests_2.PatchRequest; } }));\n    Object.defineProperty(exports, \"PostRequest\", ({ enumerable: true, get: function () { return api_requests_2.PostRequest; } }));\n    Object.defineProperty(exports, \"PutRequest\", ({ enumerable: true, get: function () { return api_requests_2.PutRequest; } }));\n    Object.defineProperty(exports, \"ACCEPTED_ATTACHMENT_EXTENSIONS\", ({ enumerable: true, get: function () { return chat_attachments_1.ACCEPTED_ATTACHMENT_EXTENSIONS; } }));\n    Object.defineProperty(exports, \"ClearAttachmentUrlCache\", ({ enumerable: true, get: function () { return chat_attachments_1.ClearAttachmentUrlCache; } }));\n    Object.defineProperty(exports, \"CompressImage\", ({ enumerable: true, get: function () { return chat_attachments_1.CompressImage; } }));\n    Object.defineProperty(exports, \"GetAttachmentUrl\", ({ enumerable: true, get: function () { return chat_attachments_1.GetAttachmentUrl; } }));\n    Object.defineProperty(exports, \"GetCachedAttachmentUrl\", ({ enumerable: true, get: function () { return chat_attachments_1.GetCachedAttachmentUrl; } }));\n    Object.defineProperty(exports, \"IsAcceptedAttachment\", ({ enumerable: true, get: function () { return chat_attachments_1.IsAcceptedAttachment; } }));\n    Object.defineProperty(exports, \"IsImageAttachment\", ({ enumerable: true, get: function () { return chat_attachments_1.IsImageAttachment; } }));\n    Object.defineProperty(exports, \"MAX_ATTACHMENTS_PER_MESSAGE\", ({ enumerable: true, get: function () { return chat_attachments_1.MAX_ATTACHMENTS_PER_MESSAGE; } }));\n    Object.defineProperty(exports, \"UploadAttachment\", ({ enumerable: true, get: function () { return chat_attachments_1.UploadAttachment; } }));\n    Object.defineProperty(exports, \"UploadAttachments\", ({ enumerable: true, get: function () { return chat_attachments_1.UploadAttachments; } }));\n    Object.defineProperty(exports, \"ValidateAttachmentSize\", ({ enumerable: true, get: function () { return chat_attachments_1.ValidateAttachmentSize; } }));\n    Object.defineProperty(exports, \"buildQueuedByTooltipHtml\", ({ enumerable: true, get: function () { return core_2.buildQueuedByTooltipHtml; } }));\n    Object.defineProperty(exports, \"buildReviewDetailsTooltipHtml\", ({ enumerable: true, get: function () { return core_2.buildReviewDetailsTooltipHtml; } }));\n    Object.defineProperty(exports, \"changeTimeFormat\", ({ enumerable: true, get: function () { return core_2.changeTimeFormat; } }));\n    Object.defineProperty(exports, \"ClosePanel\", ({ enumerable: true, get: function () { return core_2.ClosePanel; } }));\n    Object.defineProperty(exports, \"convertLocalToUtc\", ({ enumerable: true, get: function () { return core_2.convertLocalToUtc; } }));\n    Object.defineProperty(exports, \"convertUtcToLocal\", ({ enumerable: true, get: function () { return core_2.convertUtcToLocal; } }));\n    Object.defineProperty(exports, \"escapeHtml\", ({ enumerable: true, get: function () { return core_2.escapeHtml; } }));\n    Object.defineProperty(exports, \"formatHours\", ({ enumerable: true, get: function () { return core_2.formatHours; } }));\n    Object.defineProperty(exports, \"GetAccessToken\", ({ enumerable: true, get: function () { return core_2.GetAccessToken; } }));\n    Object.defineProperty(exports, \"GetAccountId\", ({ enumerable: true, get: function () { return core_2.GetAccountId; } }));\n    Object.defineProperty(exports, \"GetAccountIdAsync\", ({ enumerable: true, get: function () { return core_2.GetAccountIdAsync; } }));\n    Object.defineProperty(exports, \"GetAccountIdAfterInit\", ({ enumerable: true, get: function () { return core_2.GetAccountIdAfterInit; } }));\n    Object.defineProperty(exports, \"GetAccountNameAsync\", ({ enumerable: true, get: function () { return core_2.GetAccountNameAsync; } }));\n    Object.defineProperty(exports, \"GetExtensionConfig\", ({ enumerable: true, get: function () { return core_2.GetExtensionConfig; } }));\n    Object.defineProperty(exports, \"GetCurrentProject\", ({ enumerable: true, get: function () { return core_2.GetCurrentProject; } }));\n    Object.defineProperty(exports, \"GetCurrentProjectId\", ({ enumerable: true, get: function () { return core_2.GetCurrentProjectId; } }));\n    Object.defineProperty(exports, \"GetCurrentProjectName\", ({ enumerable: true, get: function () { return core_2.GetCurrentProjectName; } }));\n    Object.defineProperty(exports, \"getInitials\", ({ enumerable: true, get: function () { return core_2.getInitials; } }));\n    Object.defineProperty(exports, \"GetUserDisplayName\", ({ enumerable: true, get: function () { return core_2.GetUserDisplayName; } }));\n    Object.defineProperty(exports, \"GetUserEmail\", ({ enumerable: true, get: function () { return core_2.GetUserEmail; } }));\n    Object.defineProperty(exports, \"GetUserId\", ({ enumerable: true, get: function () { return core_2.GetUserId; } }));\n    Object.defineProperty(exports, \"Navigate\", ({ enumerable: true, get: function () { return core_2.Navigate; } }));\n    Object.defineProperty(exports, \"NavigateToUrl\", ({ enumerable: true, get: function () { return core_2.NavigateToUrl; } }));\n    Object.defineProperty(exports, \"NotifyLoad\", ({ enumerable: true, get: function () { return core_2.NotifyLoad; } }));\n    Object.defineProperty(exports, \"openInNewTab\", ({ enumerable: true, get: function () { return core_2.openInNewTab; } }));\n    Object.defineProperty(exports, \"sanitizeCssColor\", ({ enumerable: true, get: function () { return core_2.sanitizeCssColor; } }));\n    var workItemsColumns = [];\n    var workItemIds = [];\n    var filteredWorkItems = [];\n    function getWorkItems(ProjectId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, query, workItems, workItemIds, workItemsData;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        query = {\n                            query: \"SELECT [System.Id]  FROM workitems WHERE [System.TeamProject] = @project\"\n                        };\n                        return [4 /*yield*/, client.queryByWiql(query, ProjectId)];\n                    case 1:\n                        workItems = _a.sent();\n                        workItemIds = workItems.workItems.map(function (item) { return item.id; });\n                        workItemsColumns = [];\n                        return [4 /*yield*/, client.getWorkItems(workItemIds, ProjectId, [\"System.Id\", \"System.WorkItemType\", \"System.Title\", \"System.State\"])];\n                    case 2:\n                        workItemsData = _a.sent();\n                        workItemsData.forEach(function (element) {\n                            workItemsColumns.push({\n                                id: element.fields[\"System.Id\"],\n                                type: element.fields[\"System.WorkItemType\"],\n                                title: element.fields[\"System.Title\"],\n                                state: element.fields[\"System.State\"]\n                            });\n                        });\n                        return [2 /*return*/, workItemsColumns];\n                }\n            });\n        });\n    }\n    function getAllProjectIds() {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, result, projectIds;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(Core_1.CoreRestClient);\n                        return [4 /*yield*/, client.getProjects()];\n                    case 1:\n                        result = _a.sent();\n                        projectIds = result.map(function (element) {\n                            return element.id;\n                        });\n                        return [2 /*return*/, projectIds];\n                }\n            });\n        });\n    }\n    function getAllProjectsWithNames() {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, result;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(Core_1.CoreRestClient);\n                        return [4 /*yield*/, client.getProjects()];\n                    case 1:\n                        result = _a.sent();\n                        return [2 /*return*/, result.map(function (p) { return ({ id: p.id, name: p.name }); })];\n                }\n            });\n        });\n    }\n    function getReposByProject(projectId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, result;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(Git_1.GitRestClient);\n                        return [4 /*yield*/, client.getRepositories(projectId)];\n                    case 1:\n                        result = _a.sent();\n                        return [2 /*return*/, result.map(function (r) { return ({ id: r.id, name: r.name }); })];\n                }\n            });\n        });\n    }\n    function getAllWorkItemTypes() {\n        return __awaiter(this, void 0, void 0, function () {\n            var projectClient, projects, projectIds, client, workItemTypes, workItemTypesTest, projectIndex, result, workItemTypeIndex, wType, workItemTypeStates, workItemTypeStateIndex, wTypeState;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        projectClient = (0, azure_devops_extension_api_1.getClient)(Core_1.CoreRestClient);\n                        return [4 /*yield*/, projectClient.getProjects()];\n                    case 1:\n                        projects = _a.sent();\n                        projectIds = projects.map(function (element) {\n                            return element.id;\n                        });\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        workItemTypes = [];\n                        workItemTypesTest = [];\n                        projectIndex = 0;\n                        _a.label = 2;\n                    case 2:\n                        if (!(projectIndex < projectIds.length)) return [3 /*break*/, 9];\n                        return [4 /*yield*/, client.getWorkItemTypes(projectIds[projectIndex])];\n                    case 3:\n                        result = _a.sent();\n                        workItemTypeIndex = 0;\n                        _a.label = 4;\n                    case 4:\n                        if (!(workItemTypeIndex < result.length)) return [3 /*break*/, 8];\n                        if (!!(workItemTypes.filter(function (x) { return x.name === result[workItemTypeIndex].name; }).length > 0)) return [3 /*break*/, 6];\n                        wType = new models_1.WorkItemType();\n                        wType.name = result[workItemTypeIndex].name;\n                        wType.iconUrl = result[workItemTypeIndex].icon.url;\n                        wType.states = new Array;\n                        wType.states = [];\n                        return [4 /*yield*/, client.getWorkItemTypeStates(projectIds[projectIndex], wType.name)];\n                    case 5:\n                        workItemTypeStates = _a.sent();\n                        for (workItemTypeStateIndex = 0; workItemTypeStateIndex < workItemTypeStates.length; workItemTypeStateIndex++) {\n                            wTypeState = new models_1.WorkItemTypeState();\n                            wTypeState.name = workItemTypeStates[workItemTypeStateIndex].name;\n                            wTypeState.category = workItemTypeStates[workItemTypeStateIndex].category;\n                            wTypeState.color = workItemTypeStates[workItemTypeStateIndex].color;\n                            wType.states.push(wTypeState);\n                        }\n                        workItemTypes.push(wType);\n                        _a.label = 6;\n                    case 6:\n                        workItemTypesTest.push(result);\n                        _a.label = 7;\n                    case 7:\n                        workItemTypeIndex++;\n                        return [3 /*break*/, 4];\n                    case 8:\n                        projectIndex++;\n                        return [3 /*break*/, 2];\n                    case 9: return [2 /*return*/, workItemTypes];\n                }\n            });\n        });\n    }\n    function getWorkItemsByIds(Ids) {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, currentProjectId, workItemsData;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        workItemsColumns = [];\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectId)()];\n                    case 1:\n                        currentProjectId = _a.sent();\n                        return [4 /*yield*/, client.getWorkItems(Ids, currentProjectId, [\"System.Id\", \"System.WorkItemType\", \"System.Title\", \"System.State\", \"System.TeamProject\"])];\n                    case 2:\n                        workItemsData = _a.sent();\n                        workItemsData.forEach(function (element) {\n                            workItemsColumns.push({\n                                id: element.fields[\"System.Id\"],\n                                type: element.fields[\"System.WorkItemType\"],\n                                title: element.fields[\"System.Title\"],\n                                state: element.fields[\"System.State\"],\n                                project: element.fields[\"System.TeamProject\"]\n                            });\n                        });\n                        return [2 /*return*/, workItemsColumns];\n                }\n            });\n        });\n    }\n    function calculateProgress(Ids) {\n        return __awaiter(this, void 0, void 0, function () {\n            var completionPercentage, client, completedWorkItems_1, totalWorkItems, currentProjectId, workItemsData;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        completionPercentage = 0;\n                        if (!(Ids.length > 0)) return [3 /*break*/, 3];\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        completedWorkItems_1 = 0;\n                        totalWorkItems = Ids.length;\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectId)()];\n                    case 1:\n                        currentProjectId = _a.sent();\n                        return [4 /*yield*/, client.getWorkItems(Ids, currentProjectId, [\"System.Id\", \"System.WorkItemType\", \"System.Title\", \"System.State\"])];\n                    case 2:\n                        workItemsData = _a.sent();\n                        workItemsData.forEach(function (element) {\n                            if (element.fields[\"System.State\"] == \"Done\") {\n                                completedWorkItems_1++;\n                            }\n                        });\n                        completionPercentage = (completedWorkItems_1 / totalWorkItems) * 100;\n                        _a.label = 3;\n                    case 3: return [2 /*return*/, completionPercentage.toFixed(1).toString()];\n                }\n            });\n        });\n    }\n    function showWorkItems(ProjectId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, currentProjectId, query, workItemsResult, workItemIds, html, response, workItemsData;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectId)()];\n                    case 1:\n                        currentProjectId = _a.sent();\n                        query = {\n                            query: \"SELECT [System.Id]  FROM workitems\"\n                        };\n                        return [4 /*yield*/, client.queryByWiql(query, ProjectId)];\n                    case 2:\n                        workItemsResult = _a.sent();\n                        workItemIds = workItemsResult.workItems.map(function (item) { return item.id; });\n                        response = {};\n                        html = \"\";\n                        if (!(workItemIds.length > 0)) return [3 /*break*/, 4];\n                        html = html + \"<table id='workItemsListTable'><thead><tr><th></th><th>Work Item ID</th><th>Project</th><th>Work Item Type</th><th>Title</th><th>State</th></tr></thead><tbody>\";\n                        return [4 /*yield*/, client.getWorkItems(workItemIds, currentProjectId, [\"System.Id\", \"System.WorkItemType\", \"System.Title\", \"System.State\", \"System.TeamProject\"])];\n                    case 3:\n                        workItemsData = _a.sent();\n                        workItemsData.forEach(function (element) {\n                            html = html + \"<tr><td><input type='checkbox' class='form-check-input workItemCheckBox chk\" + element.fields[\"System.Id\"] + \"' data-workitem-id='\" + element.fields[\"System.Id\"] + \"' /></td><td>\" + element.fields[\"System.Id\"] + \"</td><td>\" + element.fields[\"System.TeamProject\"] + \"</td><td>\" + element.fields[\"System.WorkItemType\"] + \"</td><td>\" + element.fields[\"System.Title\"] + \"</td><td>\" + element.fields[\"System.State\"] + \"</td></tr>\";\n                            workItemsColumns.push({ id: element.fields[\"System.Id\"], project: element.fields[\"System.TeamProject\"], type: element.fields[\"System.WorkItemType\"], title: element.fields[\"System.Title\"], state: element.fields[\"System.State\"] });\n                        });\n                        html = html + \"</tbody>\";\n                        response.html = html;\n                        response.status = \"Success\";\n                        return [3 /*break*/, 5];\n                    case 4:\n                        html = html + \"<div class='alert alert-primary' role='alert'>No tasks found in this project</div>\";\n                        response.html = html;\n                        response.status = \"NoTasks\";\n                        _a.label = 5;\n                    case 5: return [2 /*return*/, response];\n                }\n            });\n        });\n    }\n    function escapeWiqlLiteral(value) {\n        return String(value).replace(/'/g, \"''\");\n    }\n    function GetFilteredWorkItems(filter, workItemTypes, workItemStates, project) {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, filteredWorkItemIds, filteredWorkItems, workItemTypesFilterString, workItemStatesFilterString, i, i, query;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        filteredWorkItemIds = [];\n                        filteredWorkItemIds = [];\n                        workItemTypesFilterString = \"\";\n                        workItemStatesFilterString = \"\";\n                        if (workItemTypes.length > 0) {\n                            for (i = 0; i < workItemTypes.length - 1; i++) {\n                                workItemTypesFilterString = workItemTypesFilterString + \"'\" + escapeWiqlLiteral(workItemTypes[i]) + \"', \";\n                            }\n                            workItemTypesFilterString = workItemTypesFilterString + \"'\" + escapeWiqlLiteral(workItemTypes[workItemTypes.length - 1]) + \"'\";\n                        }\n                        if (workItemStates.length > 0) {\n                            for (i = 0; i < workItemStates.length - 1; i++) {\n                                workItemStatesFilterString = workItemStatesFilterString + \"'\" + escapeWiqlLiteral(workItemStates[i]) + \"', \";\n                            }\n                            workItemStatesFilterString = workItemStatesFilterString + \"'\" + escapeWiqlLiteral(workItemStates[workItemStates.length - 1]) + \"'\";\n                        }\n                        query = {\n                            query: \"SELECT [System.Id]  FROM workitems WHERE [System.Title] Contains '\" + escapeWiqlLiteral(filter) + \"'\" +\n                                (workItemTypesFilterString !== \"\" ? \" AND [System.WorkItemType] In (\" + workItemTypesFilterString + \")\" : \"\") +\n                                (workItemStatesFilterString !== \"\" ? \" AND [System.State] In (\" + workItemStatesFilterString + \")\" : \"\") +\n                                (project !== \"\" ? \" AND [System.TeamProject] = '\" + escapeWiqlLiteral(project) + \"'\" : \"\")\n                        };\n                        return [4 /*yield*/, client.queryByWiql(query).then(function (workItems) {\n                                workItems.workItems.forEach(function (element) {\n                                    filteredWorkItemIds.push(element.id);\n                                });\n                            })];\n                    case 1:\n                        _a.sent();\n                        if (!(filteredWorkItemIds.length > 0)) return [3 /*break*/, 3];\n                        return [4 /*yield*/, getWorkItemsByIds(filteredWorkItemIds)];\n                    case 2:\n                        filteredWorkItems = _a.sent();\n                        return [2 /*return*/, filteredWorkItems];\n                    case 3: return [2 /*return*/, null];\n                }\n            });\n        });\n    }\n    var dialog;\n    (0, sdk_lifecycle_1.initializeSdk)({\n        loaded: false, // Extension will call notifyLoadSucceeded() when ready\n        applyTheme: true // Apply Azure DevOps theme automatically\n    });\n    (0, sdk_lifecycle_1.ensureSdkReady)().then(function () { return __awaiter(void 0, void 0, void 0, function () {\n        // Helper function to show summary popup with regenerate capability\n        function showSummaryPopup(summary, lastUpdated, workItemId, baseAPIUrl, authToken, organizationName, organizationId, projectId, projectName, userEmail, fieldsToFetch) {\n            return __awaiter(this, void 0, void 0, function () {\n                var formattedDate, result, freshWorkItem_1, freshFields_1, regenerateRes, errorData, newSummaryData, error_1;\n                return __generator(this, function (_a) {\n                    switch (_a.label) {\n                        case 0:\n                            formattedDate = new Date(lastUpdated).toLocaleString();\n                            return [4 /*yield*/, sweetalert2_1.default.fire({\n                                    title: 'AI Summary',\n                                    html: \"\\n                <div style=\\\"text-align: left; max-height: 500px; overflow-y: auto;\\\">\\n                    <div style=\\\"margin-bottom: 15px; padding: 10px; background-color: #f5f5f5; border-radius: 4px;\\\">\\n                        <small style=\\\"color: #666;\\\"><strong>Last updated:</strong> \".concat(formattedDate, \"</small>\\n                    </div>\\n                    <div class=\\\"summary-content\\\" style=\\\"line-height: 1.6;\\\">\\n                        \").concat(DOMPurify.sanitize(marked_1.marked.parse(summary), { USE_PROFILES: { html: true } }), \"\\n                    </div>\\n                </div>\\n            \"),\n                                    width: 700,\n                                    showCancelButton: true,\n                                    confirmButtonText: 'Summarize',\n                                    confirmButtonColor: '#0078d4',\n                                    cancelButtonText: 'Close',\n                                    customClass: {\n                                        confirmButton: 'regenerate-summary-btn'\n                                    }\n                                })];\n                        case 1:\n                            result = _a.sent();\n                            if (!result.isConfirmed) return [3 /*break*/, 11];\n                            // User clicked \"Summarize\" button - regenerate\n                            (0, swal_1.showLoadingDialog)({\n                                title: \"Regenerating Summary...\",\n                                html: \"AI is analyzing the work item\"\n                            });\n                            _a.label = 2;\n                        case 2:\n                            _a.trys.push([2, 9, , 11]);\n                            return [4 /*yield*/, GetWorkItemWithFields(workItemId, fieldsToFetch)];\n                        case 3:\n                            freshWorkItem_1 = _a.sent();\n                            freshFields_1 = {};\n                            fieldsToFetch.forEach(function (field) {\n                                freshFields_1[field] = freshWorkItem_1.fields[field];\n                            });\n                            return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/WorkItemSummary/Generate\"), {\n                                    method: 'POST',\n                                    headers: {\n                                        'Content-Type': 'application/json',\n                                        'Authorization': authToken,\n                                        'OrganizationName': organizationName\n                                    },\n                                    body: JSON.stringify({\n                                        organizationId: organizationId,\n                                        devOpsProjectId: projectId,\n                                        devOpsProjectName: projectName,\n                                        workItemId: workItemId,\n                                        workItemFields: freshFields_1,\n                                        createdBy: userEmail\n                                    })\n                                })];\n                        case 4:\n                            regenerateRes = _a.sent();\n                            if (!!regenerateRes.ok) return [3 /*break*/, 6];\n                            return [4 /*yield*/, regenerateRes.text()];\n                        case 5:\n                            errorData = _a.sent();\n                            throw new Error(errorData || 'Failed to regenerate summary');\n                        case 6: return [4 /*yield*/, regenerateRes.json()];\n                        case 7:\n                            newSummaryData = _a.sent();\n                            // Show updated summary (recursive call)\n                            return [4 /*yield*/, showSummaryPopup(newSummaryData.summary, newSummaryData.lastUpdated, workItemId, baseAPIUrl, authToken, organizationName, organizationId, projectId, projectName, userEmail, fieldsToFetch)];\n                        case 8:\n                            // Show updated summary (recursive call)\n                            _a.sent();\n                            return [3 /*break*/, 11];\n                        case 9:\n                            error_1 = _a.sent();\n                            console.error(\"Error regenerating summary:\", error_1);\n                            return [4 /*yield*/, (0, swal_1.showAlertDialog)({\n                                    title: \"Error\",\n                                    text: error_1.message || \"Failed to regenerate summary. Please try again.\",\n                                    icon: \"error\"\n                                })];\n                        case 10:\n                            _a.sent();\n                            return [3 /*break*/, 11];\n                        case 11: return [2 /*return*/];\n                    }\n                });\n            });\n        }\n        var extContext, webContext, quickAccessHandler, developerAgentHandler, timesheetQuickAccessHandler;\n        return __generator(this, function (_a) {\n            console.log(\"Extension initialized\");\n            extContext = SDK.getExtensionContext();\n            webContext = SDK.getWebContext();\n            // Expose URL update function globally for use in evolve-assist-detail.js\n            // Uses modern Azure DevOps Extension SDK to update the visible URL\n            window.updateEvolveAssistUrl = function (projectId) { return __awaiter(void 0, void 0, void 0, function () {\n                var urlParams, currentEid, organizationName, orgUrl, projectName, publisherId, extensionId, hubUrl, navService, error_2, currentUrl;\n                var _a;\n                return __generator(this, function (_b) {\n                    switch (_b.label) {\n                        case 0:\n                            _b.trys.push([0, 3, , 4]);\n                            urlParams = new URLSearchParams(window.location.search);\n                            currentEid = urlParams.get('eId');\n                            if (currentEid === String(projectId)) {\n                                return [2 /*return*/];\n                            }\n                            return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                        case 1:\n                            organizationName = _b.sent();\n                            orgUrl = \"https://dev.azure.com/\".concat(organizationName);\n                            projectName = encodeURIComponent(((_a = webContext.project) === null || _a === void 0 ? void 0 : _a.name) || \"\");\n                            publisherId = extContext.publisherId;\n                            extensionId = extContext.extensionId;\n                            hubUrl = \"\".concat(orgUrl, \"/\").concat(projectName, \"/_apps/hub/\").concat(publisherId, \".\").concat(extensionId, \".release-groups-hub-group.create-evolve-assist?eId=\").concat(projectId);\n                            return [4 /*yield*/, SDK.getService(\"ms.vss-features.host-navigation-service\" /* CommonServiceIds.HostNavigationService */)];\n                        case 2:\n                            navService = _b.sent();\n                            navService.navigate(hubUrl);\n                            return [3 /*break*/, 4];\n                        case 3:\n                            error_2 = _b.sent();\n                            // Fallback to history API (updates iframe URL only, not visible in browser bar)\n                            try {\n                                currentUrl = new URL(window.location.href);\n                                currentUrl.searchParams.set('eId', String(projectId));\n                                window.history.replaceState({}, '', currentUrl.toString());\n                            }\n                            catch (fallbackError) {\n                                // Silent fail\n                            }\n                            return [3 /*break*/, 4];\n                        case 4: return [2 /*return*/];\n                    }\n                });\n            }); };\n            // Track Time Menu\n            SDK.register(SDK.getExtensionContext().id + \".track-time-menu\", function () {\n                return {\n                    execute: function (actionContext) {\n                        console.log(\"Clicked track-time-menu:\", actionContext);\n                        HandleTimeTrackingMenuOptionClick(actionContext);\n                    }\n                };\n            });\n            // Evolve Assist Menu\n            SDK.register(extContext.id + \".evolve-menu\", function () {\n                return {\n                    execute: function (actionContext) { return __awaiter(void 0, void 0, void 0, function () {\n                        var workItemId, selectionService, selectedIds, err_1, formService, err_2, organizationName, orgUrl, projectName, publisherId, extensionId, hubUrl, navService, err_3;\n                        var _a;\n                        return __generator(this, function (_b) {\n                            switch (_b.label) {\n                                case 0:\n                                    console.log(\"Evolve Assist clicked:\", actionContext);\n                                    workItemId = (actionContext === null || actionContext === void 0 ? void 0 : actionContext.id) || ((actionContext === null || actionContext === void 0 ? void 0 : actionContext.workItemIds) && actionContext.workItemIds[0]);\n                                    if (!!workItemId) return [3 /*break*/, 4];\n                                    _b.label = 1;\n                                case 1:\n                                    _b.trys.push([1, 3, , 4]);\n                                    return [4 /*yield*/, SDK.getService(\"ms.vss-work-web.work-item-selection-service\")];\n                                case 2:\n                                    selectionService = _b.sent();\n                                    selectedIds = selectionService.getSelectedWorkItemIds();\n                                    if (selectedIds && selectedIds.length > 0) {\n                                        workItemId = selectedIds[0];\n                                    }\n                                    return [3 /*break*/, 4];\n                                case 3:\n                                    err_1 = _b.sent();\n                                    console.error(\"Failed to get work item from backlog selection:\", err_1);\n                                    return [3 /*break*/, 4];\n                                case 4:\n                                    if (!!workItemId) return [3 /*break*/, 9];\n                                    _b.label = 5;\n                                case 5:\n                                    _b.trys.push([5, 8, , 9]);\n                                    return [4 /*yield*/, SDK.getService(\"ms.vss-work-web.work-item-form\")];\n                                case 6:\n                                    formService = _b.sent();\n                                    return [4 /*yield*/, formService.getId()];\n                                case 7:\n                                    workItemId = _b.sent();\n                                    return [3 /*break*/, 9];\n                                case 8:\n                                    err_2 = _b.sent();\n                                    console.error(\"Failed to get work item from form service:\", err_2);\n                                    return [3 /*break*/, 9];\n                                case 9:\n                                    console.log(\"Work Item ID to navigate with:\", workItemId);\n                                    if (!workItemId) return [3 /*break*/, 17];\n                                    return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                                case 10:\n                                    organizationName = _b.sent();\n                                    orgUrl = \"https://dev.azure.com/\".concat(organizationName);\n                                    projectName = encodeURIComponent(((_a = webContext.project) === null || _a === void 0 ? void 0 : _a.name) || \"\");\n                                    publisherId = extContext.publisherId;\n                                    extensionId = extContext.extensionId;\n                                    hubUrl = \"\".concat(orgUrl, \"/\").concat(projectName, \"/_apps/hub/\").concat(publisherId, \".\").concat(extensionId, \".release-groups-hub-group.create-evolve-assist?workItemId=\").concat(workItemId);\n                                    console.log(\"Hub URL:\", hubUrl);\n                                    _b.label = 11;\n                                case 11:\n                                    _b.trys.push([11, 14, , 16]);\n                                    return [4 /*yield*/, SDK.getService(\"ms.vss-web.navigation-service\")];\n                                case 12:\n                                    navService = _b.sent();\n                                    return [4 /*yield*/, navService.navigate(hubUrl)];\n                                case 13:\n                                    _b.sent();\n                                    return [3 /*break*/, 16];\n                                case 14:\n                                    err_3 = _b.sent();\n                                    console.error(\"Failed to navigate to hub:\", err_3);\n                                    return [4 /*yield*/, (0, swal_1.showAlertDialog)({ title: \"Navigation Failed\", text: \"Could not navigate to Evolve Assist hub\", icon: \"error\" })];\n                                case 15:\n                                    _b.sent();\n                                    return [3 /*break*/, 16];\n                                case 16: return [3 /*break*/, 19];\n                                case 17: return [4 /*yield*/, (0, swal_1.showAlertDialog)({ title: \"No Work Item\", text: \"Please select a work item first\", icon: \"warning\" })];\n                                case 18:\n                                    _b.sent();\n                                    _b.label = 19;\n                                case 19: return [2 /*return*/];\n                            }\n                        });\n                    }); }\n                };\n            });\n            // Add to Realease Menu\n            SDK.register(extContext.id + \".add-to-release-menu\", function () {\n                return {\n                    execute: function (actionContext) {\n                        console.log(\"Clicked track-time-menu:\", actionContext);\n                        HandleAddToRealeaseOptionClick(actionContext);\n                    }\n                };\n            });\n            // Summarize Work Item Button\n            SDK.register(extContext.id + \".summarize-work-item\", function () {\n                return {\n                    execute: function (actionContext) { return __awaiter(void 0, void 0, void 0, function () {\n                        var workItemId, selectionService, selectedIds, err_4, config, baseAPIUrl, authToken, organizationName, organizationId, projectName, projectId, userEmail, configRes, configData, fieldsToFetch, workItem_1, workItemFields_1, generateRes, errorData, summaryData, error_3;\n                        return __generator(this, function (_a) {\n                            switch (_a.label) {\n                                case 0:\n                                    console.log(\"Summarize button clicked:\", actionContext);\n                                    workItemId = (actionContext === null || actionContext === void 0 ? void 0 : actionContext.id) || ((actionContext === null || actionContext === void 0 ? void 0 : actionContext.workItemIds) && actionContext.workItemIds[0]);\n                                    if (!!workItemId) return [3 /*break*/, 4];\n                                    _a.label = 1;\n                                case 1:\n                                    _a.trys.push([1, 3, , 4]);\n                                    return [4 /*yield*/, SDK.getService(\"ms.vss-work-web.work-item-selection-service\")];\n                                case 2:\n                                    selectionService = _a.sent();\n                                    selectedIds = selectionService.getSelectedWorkItemIds();\n                                    if (selectedIds && selectedIds.length > 0) {\n                                        workItemId = selectedIds[0];\n                                    }\n                                    return [3 /*break*/, 4];\n                                case 3:\n                                    err_4 = _a.sent();\n                                    console.error(\"Failed to get work item from backlog selection:\", err_4);\n                                    return [3 /*break*/, 4];\n                                case 4:\n                                    if (!!workItemId) return [3 /*break*/, 6];\n                                    return [4 /*yield*/, (0, swal_1.showAlertDialog)({ title: \"No Work Item\", text: \"Please open a work item first\", icon: \"warning\" })];\n                                case 5:\n                                    _a.sent();\n                                    return [2 /*return*/];\n                                case 6:\n                                    (0, swal_1.showLoadingDialog)({\n                                        title: \"Generating Summary...\",\n                                        html: \"AI is analyzing the work item\"\n                                    });\n                                    _a.label = 7;\n                                case 7:\n                                    _a.trys.push([7, 21, , 23]);\n                                    return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                                case 8:\n                                    config = _a.sent();\n                                    baseAPIUrl = config.apiBaseUrl;\n                                    return [4 /*yield*/, (0, core_1.GetAccessToken)()];\n                                case 9:\n                                    authToken = _a.sent();\n                                    return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                                case 10:\n                                    organizationName = _a.sent();\n                                    organizationId = (0, core_1.GetAccountId)();\n                                    return [4 /*yield*/, (0, core_1.GetCurrentProjectName)()];\n                                case 11:\n                                    projectName = _a.sent();\n                                    return [4 /*yield*/, (0, core_1.GetCurrentProjectId)()];\n                                case 12:\n                                    projectId = _a.sent();\n                                    userEmail = (0, core_1.GetUserEmail)();\n                                    return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/Settings/GetSummarizeConfigurations\"), {\n                                            method: 'GET',\n                                            headers: {\n                                                'Authorization': authToken,\n                                                'OrganizationName': organizationName\n                                            }\n                                        })];\n                                case 13:\n                                    configRes = _a.sent();\n                                    if (!configRes.ok) {\n                                        throw new Error('Failed to fetch summarization configuration');\n                                    }\n                                    return [4 /*yield*/, configRes.json()];\n                                case 14:\n                                    configData = _a.sent();\n                                    fieldsToFetch = configData.summarizeFields\n                                        ? configData.summarizeFields.split(',').map(function (f) { return f.trim(); })\n                                        : [\"System.Id\", \"System.Title\", \"System.Description\", \"System.State\"];\n                                    return [4 /*yield*/, GetWorkItemWithFields(workItemId, fieldsToFetch)];\n                                case 15:\n                                    workItem_1 = _a.sent();\n                                    workItemFields_1 = {};\n                                    fieldsToFetch.forEach(function (field) {\n                                        workItemFields_1[field] = workItem_1.fields[field];\n                                    });\n                                    return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/WorkItemSummary/Generate\"), {\n                                            method: 'POST',\n                                            headers: {\n                                                'Content-Type': 'application/json',\n                                                'Authorization': authToken,\n                                                'OrganizationName': organizationName\n                                            },\n                                            body: JSON.stringify({\n                                                organizationId: organizationId,\n                                                devOpsProjectId: projectId,\n                                                devOpsProjectName: projectName,\n                                                workItemId: workItemId,\n                                                workItemFields: workItemFields_1,\n                                                createdBy: userEmail\n                                            })\n                                        })];\n                                case 16:\n                                    generateRes = _a.sent();\n                                    if (!!generateRes.ok) return [3 /*break*/, 18];\n                                    return [4 /*yield*/, generateRes.text()];\n                                case 17:\n                                    errorData = _a.sent();\n                                    throw new Error(errorData || 'Failed to generate summary');\n                                case 18: return [4 /*yield*/, generateRes.json()];\n                                case 19:\n                                    summaryData = _a.sent();\n                                    // Display summary in popup with regenerate button\n                                    return [4 /*yield*/, showSummaryPopup(summaryData.summary, summaryData.lastUpdated, workItemId, baseAPIUrl, authToken, organizationName, organizationId, projectId, projectName, userEmail, fieldsToFetch)];\n                                case 20:\n                                    // Display summary in popup with regenerate button\n                                    _a.sent();\n                                    return [3 /*break*/, 23];\n                                case 21:\n                                    error_3 = _a.sent();\n                                    console.error(\"Error generating summary:\", error_3);\n                                    return [4 /*yield*/, (0, swal_1.showAlertDialog)({\n                                            title: \"Error\",\n                                            text: error_3.message || \"Failed to generate summary. Please try again.\",\n                                            icon: \"error\"\n                                        })];\n                                case 22:\n                                    _a.sent();\n                                    return [3 /*break*/, 23];\n                                case 23: return [2 /*return*/];\n                            }\n                        });\n                    }); }\n                };\n            });\n            // Add to PR Action Menu\n            SDK.register(extContext.id + \".ai-pr-review-action\", function () {\n                return {\n                    execute: function (actionContext) {\n                        (0, code_review_1.QueueCodeReviewPR)();\n                    }\n                };\n            });\n            // Work Item Form Time Tracking Menu\n            SDK.register(extContext.id + \".work-item-page-time-tracking\", function () {\n                return {\n                    execute: function (actionContext) {\n                        console.log(\"Clicked work-item-page-time-tracking:\", actionContext);\n                        HandleTimeTrackingMenuOptionClick(actionContext);\n                    }\n                };\n            });\n            quickAccessHandler = {\n                onLoaded: function () { },\n                onSaved: function (args) {\n                    var _a, _b;\n                    window.dispatchEvent(new CustomEvent('qa-workitem-saved', { detail: { id: (_b = (_a = args === null || args === void 0 ? void 0 : args.id) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : \"\" } }));\n                }\n            };\n            SDK.register(\"\".concat(extContext.id, \".work-item-form-quick-access\"), quickAccessHandler);\n            SDK.register(\"work-item-form-quick-access\", quickAccessHandler);\n            developerAgentHandler = { onLoaded: function () { } };\n            SDK.register(\"\".concat(extContext.id, \".work-item-page-developer-agent\"), developerAgentHandler);\n            SDK.register(\"work-item-page-developer-agent\", developerAgentHandler);\n            timesheetQuickAccessHandler = { onLoaded: function () { } };\n            SDK.register(\"\".concat(extContext.id, \".work-item-form-timesheet-quick-access\"), timesheetQuickAccessHandler);\n            SDK.register(\"work-item-form-timesheet-quick-access\", timesheetQuickAccessHandler);\n            SDK.notifyLoadSucceeded();\n            return [2 /*return*/];\n        });\n    }); });\n    function InitializeSDK() {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function checkFeatures() {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, error_4;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        _a.trys.push([0, 2, , 3]);\n                        return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _a.sent();\n                        return [2 /*return*/, config.features || {}];\n                    case 2:\n                        error_4 = _a.sent();\n                        console.error(\"Failed to load config or get features:\", error_4);\n                        return [2 /*return*/, {}];\n                    case 3: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function QueueDeveloperAgentWorkItem(workItemId_1, projectName_1, projectId_1, organizationId_1, organizationName_1, repositoryNames_1, repositoryRoles_1) {\n        return __awaiter(this, arguments, void 0, function (workItemId, projectName, projectId, organizationId, organizationName, repositoryNames, repositoryRoles, // optional — not sent by v1 callers\n        agentVersion, \n        // Bug runs select no repositories, so the repo behind the linked PR is passed separately —\n        // used only to route large repositories to the Humongous agent, never as a repo to work on.\n        pullRequestRepositoryName) {\n            var config, orchestratorApiBaseUrl, orchestratorApiKey, azureAuthenticationHeader, currentOrganizationName, requestBody, response, result, result, error_5;\n            if (agentVersion === void 0) { agentVersion = \"v1\"; }\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _a.sent();\n                        orchestratorApiBaseUrl = config.orchestratorApiBaseUrl;\n                        orchestratorApiKey = config.orchestratorApiKey;\n                        return [4 /*yield*/, (0, core_1.GetAccessToken)()];\n                    case 2:\n                        azureAuthenticationHeader = _a.sent();\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 3:\n                        currentOrganizationName = _a.sent();\n                        _a.label = 4;\n                    case 4:\n                        _a.trys.push([4, 12, , 13]);\n                        requestBody = {\n                            workItemId: workItemId,\n                            projectName: projectName,\n                            organizationId: organizationId,\n                            organizationName: organizationName,\n                            repositoryNames: repositoryNames,\n                            CreatedBy: (0, core_1.GetUserEmail)(),\n                            agentVersion: agentVersion\n                        };\n                        // projectId maps to a server-side Guid, so only send it when we actually have one — an\n                        // empty string fails Guid model binding. Bug runs are queued without a project (derived\n                        // from the linked PR), so projectId is omitted and defaults to Guid.Empty server-side.\n                        if (projectId) {\n                            requestBody.projectId = projectId;\n                        }\n                        // Only include repositoryRoles when the caller provides them (v2+)\n                        if (repositoryRoles && Object.keys(repositoryRoles).length > 0) {\n                            requestBody.repositoryRoles = repositoryRoles;\n                        }\n                        // Omitted when the repo could not be named — the backend then routes as it did before.\n                        if (pullRequestRepositoryName) {\n                            requestBody.pullRequestRepositoryName = pullRequestRepositoryName;\n                        }\n                        return [4 /*yield*/, (0, api_requests_1.PostRequest)({\n                                baseAPIUrl: orchestratorApiBaseUrl,\n                                endpoint: \"/api/orchestrator/developer\",\n                                xApiKey: orchestratorApiKey,\n                                azureAuthenticationHeader: azureAuthenticationHeader,\n                                organizationName: currentOrganizationName,\n                                organizationId: (0, core_1.GetAccountId)(),\n                                body: requestBody\n                            })];\n                    case 5:\n                        response = _a.sent();\n                        if (!!response.ok) return [3 /*break*/, 9];\n                        if (!(response.status === 400)) return [3 /*break*/, 7];\n                        return [4 /*yield*/, response.json()];\n                    case 6:\n                        result = _a.sent();\n                        (0, toast_1.ShowToast)(\"warning\", \"\".concat(result.message));\n                        return [3 /*break*/, 8];\n                    case 7:\n                        (0, toast_1.ShowToast)(\"error\", \"API call failed: \".concat(response.status));\n                        _a.label = 8;\n                    case 8: return [2 /*return*/];\n                    case 9: return [4 /*yield*/, response.json()];\n                    case 10:\n                        result = _a.sent();\n                        (0, toast_1.ShowToast)(\"success\", \"\".concat(result.message));\n                        _a.label = 11;\n                    case 11: return [3 /*break*/, 13];\n                    case 12:\n                        error_5 = _a.sent();\n                        console.error(\"Queue Developer Agent Error:\", error_5);\n                        (0, toast_1.ShowToast)(\"error\", \"Failed to queue Developer Agent. Please try again.\");\n                        return [3 /*break*/, 13];\n                    case 13: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    Object.defineProperty(exports, \"ShowToast\", ({ enumerable: true, get: function () { return toast_2.ShowToast; } }));\n    Object.defineProperty(exports, \"showAlertDialog\", ({ enumerable: true, get: function () { return swal_2.showAlertDialog; } }));\n    Object.defineProperty(exports, \"showConfirmDialog\", ({ enumerable: true, get: function () { return swal_2.showConfirmDialog; } }));\n    Object.defineProperty(exports, \"showCustomDialog\", ({ enumerable: true, get: function () { return swal_2.showCustomDialog; } }));\n    Object.defineProperty(exports, \"showInputDialog\", ({ enumerable: true, get: function () { return swal_2.showInputDialog; } }));\n    Object.defineProperty(exports, \"showLoadingDialog\", ({ enumerable: true, get: function () { return swal_2.showLoadingDialog; } }));\n    Object.defineProperty(exports, \"showValidationMessage\", ({ enumerable: true, get: function () { return swal_2.showValidationMessage; } }));\n    function CurrentWorkItem() {\n        return __awaiter(this, void 0, void 0, function () {\n            var service, workItemId;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, SDK.getService(WorkItemTracking_1.WorkItemTrackingServiceIds.WorkItemFormService)];\n                    case 1:\n                        service = _a.sent();\n                        return [4 /*yield*/, service.getId()];\n                    case 2:\n                        workItemId = _a.sent();\n                        if (!workItemId || workItemId <= 0) {\n                            return [2 /*return*/, \"\"];\n                        }\n                        return [2 /*return*/, workItemId.toString()];\n                }\n            });\n        });\n    }\n    // Returns the current work item's type (e.g. \"Bug\", \"Issue\", \"User Story\", \"Task\"), or \"\" if\n    // there is no open work item. Used to offer the streamlined bug-fix queue flow, which needs no\n    // project/repo input because those are resolved from the linked pull request.\n    function GetCurrentWorkItemType() {\n        return __awaiter(this, void 0, void 0, function () {\n            var service, workItemId, client, workItem;\n            var _a, _b;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0: return [4 /*yield*/, SDK.getService(WorkItemTracking_1.WorkItemTrackingServiceIds.WorkItemFormService)];\n                    case 1:\n                        service = _c.sent();\n                        return [4 /*yield*/, service.getId()];\n                    case 2:\n                        workItemId = _c.sent();\n                        if (!workItemId || workItemId <= 0) {\n                            return [2 /*return*/, \"\"];\n                        }\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        return [4 /*yield*/, client.getWorkItem(workItemId, null, [\"System.WorkItemType\"])];\n                    case 3:\n                        workItem = _c.sent();\n                        return [2 /*return*/, ((_b = (_a = workItem.fields) === null || _a === void 0 ? void 0 : _a[\"System.WorkItemType\"]) !== null && _b !== void 0 ? _b : \"\").toString()];\n                }\n            });\n        });\n    }\n    function HandleTimeTrackingMenuOptionClick(actionContext) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        SDK.getService(\"ms.vss-features.host-page-layout-service\" /* CommonServiceIds.HostPageLayoutService */).then(function (dService) {\n                            dialog = dService.openPanel(SDK.getExtensionContext().id + \".log-time-form\", {\n                                title: \"Log Time\",\n                                description: \"Use this panel to log time against work item\",\n                                configuration: {\n                                    context: actionContext\n                                },\n                                onClose: function (args) {\n                                    if (args !== null) {\n                                        console.log(args);\n                                    }\n                                }\n                            });\n                        });\n                        console.log(actionContext);\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function HandleAddToRealeaseOptionClick(actionContext) {\n        return __awaiter(this, void 0, void 0, function () {\n            var workItemIds, workItemFormService, currentId, layoutService;\n            var _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _b.sent();\n                        workItemIds = [];\n                        if (!(((_a = actionContext === null || actionContext === void 0 ? void 0 : actionContext.workItemIds) === null || _a === void 0 ? void 0 : _a.length) > 0)) return [3 /*break*/, 2];\n                        workItemIds = actionContext.workItemIds;\n                        return [3 /*break*/, 6];\n                    case 2:\n                        if (!(actionContext === null || actionContext === void 0 ? void 0 : actionContext.id)) return [3 /*break*/, 3];\n                        workItemIds = [actionContext.id];\n                        return [3 /*break*/, 6];\n                    case 3: return [4 /*yield*/, SDK.getService(WorkItemTracking_1.WorkItemTrackingServiceIds.WorkItemFormService)];\n                    case 4:\n                        workItemFormService = _b.sent();\n                        return [4 /*yield*/, workItemFormService.getId()];\n                    case 5:\n                        currentId = _b.sent();\n                        if (currentId) {\n                            workItemIds = [currentId];\n                        }\n                        _b.label = 6;\n                    case 6:\n                        if (!workItemIds.length) {\n                            return [2 /*return*/];\n                        }\n                        return [4 /*yield*/, SDK.getService(\"ms.vss-features.host-page-layout-service\" /* CommonServiceIds.HostPageLayoutService */)];\n                    case 7:\n                        layoutService = _b.sent();\n                        layoutService.openPanel(SDK.getExtensionContext().id + \".add-to-release-form\", {\n                            title: \"Add to Release\",\n                            description: \"Use this panel to add work item to release\",\n                            configuration: {\n                                context: {\n                                    workItemIds: workItemIds\n                                }\n                            }\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function HandleCreateWorkItemTypeClick(actionContext) {\n        return __awaiter(this, void 0, void 0, function () {\n            var dialogService;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        dialogService = SDK.getService(\"ms.vss-features.host-page-layout-service\" /* CommonServiceIds.HostPageLayoutService */);\n                        return [4 /*yield*/, dialogService];\n                    case 2:\n                        (_a.sent()).openPanel(SDK.getExtensionContext().id + \".create-work-item-type-form\", {\n                            title: \"Create new work type\",\n                            description: \"Use this form to create new work types against which time can be logged\",\n                            configuration: {\n                                context: actionContext\n                            },\n                            onClose: function (args) {\n                                if (args !== null)\n                                    LoadWorkTypes(args, null);\n                            }\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function HandleEditWorkItemTypeClick(actionContext) {\n        return __awaiter(this, void 0, void 0, function () {\n            var dialogService;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        dialogService = SDK.getService(\"ms.vss-features.host-page-layout-service\" /* CommonServiceIds.HostPageLayoutService */);\n                        return [4 /*yield*/, dialogService];\n                    case 2:\n                        (_a.sent()).openPanel(SDK.getExtensionContext().id + \".edit-work-item-type-form\", {\n                            title: \"Edit work type\",\n                            description: \"Use this form to edit work types against which time can be logged\",\n                            configuration: {\n                                context: actionContext\n                            },\n                            onClose: function (args) {\n                                if (args)\n                                    LoadWorkTypes(args, 'Work Type updated successfully');\n                            }\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function HandleAdvancedReportingCreationClick(actionContext) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        SDK.getService(\"ms.vss-features.host-page-layout-service\" /* CommonServiceIds.HostPageLayoutService */).then(function (dService) {\n                            dialog = dService.openPanel(SDK.getExtensionContext().id + \".advanced-reporting-config-panel\", {\n                                title: \"Reporting Templates\",\n                                description: \"Define a template by adding work item columns and ordering them\",\n                                configuration: {\n                                    context: actionContext\n                                },\n                                onClose: function (vals) {\n                                    (0, core_1.GetAccessToken)().then(function (token) {\n                                        return __awaiter(this, void 0, void 0, function () {\n                                            var templates, dropdown_1, selectedValue, defaultOption, error_6;\n                                            return __generator(this, function (_a) {\n                                                switch (_a.label) {\n                                                    case 0:\n                                                        _a.trys.push([0, 2, , 3]);\n                                                        return [4 /*yield*/, GetAllReportingTemplates(token)];\n                                                    case 1:\n                                                        templates = _a.sent();\n                                                        dropdown_1 = document.getElementById('ddlTemplates');\n                                                        selectedValue = dropdown_1.value;\n                                                        // Clear existing options\n                                                        dropdown_1.innerHTML = '';\n                                                        defaultOption = document.createElement('option');\n                                                        defaultOption.value = '0';\n                                                        defaultOption.textContent = 'Default Report Template';\n                                                        dropdown_1.appendChild(defaultOption);\n                                                        // Populate with templates\n                                                        templates.forEach(function (template) {\n                                                            var option = document.createElement('option');\n                                                            option.value = template.id;\n                                                            option.textContent = template.templateName;\n                                                            dropdown_1.appendChild(option);\n                                                        });\n                                                        if (selectedValue) {\n                                                            dropdown_1.value = selectedValue;\n                                                        }\n                                                        return [3 /*break*/, 3];\n                                                    case 2:\n                                                        error_6 = _a.sent();\n                                                        console.error('Error populating templates dropdown:', error_6);\n                                                        return [3 /*break*/, 3];\n                                                    case 3: return [2 /*return*/];\n                                                }\n                                            });\n                                        });\n                                    });\n                                }\n                            });\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function HandleEditLoggedTimeClick(actionContext) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: \n                    //console.log(actionContext);\n                    return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        //console.log(actionContext);\n                        _a.sent();\n                        SDK.getService(\"ms.vss-features.host-page-layout-service\" /* CommonServiceIds.HostPageLayoutService */)\n                            .then(function (dialogService) {\n                            dialogService.openPanel(SDK.getExtensionContext().id + \".edit-logged-time-form\", {\n                                title: \"Edit logged time\",\n                                description: \"Edit logged time\",\n                                configuration: {\n                                    context: actionContext\n                                },\n                                onClose: function (args) {\n                                    if (args !== null) {\n                                        console.log(args);\n                                    }\n                                }\n                            });\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function GetPanelContext() {\n        var config = SDK.getConfiguration();\n        return config.context;\n    }\n    function GetWorkItemById(Id, baseAPIUrl, azureAuthenticationHeader, organizationName) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                fetch(\"\".concat(baseAPIUrl, \"/api/AzureDevOps/GetTimeSheetWorkItemsByIds?workItemIds=\") + Id.toString(), { headers: { 'Content-Type': 'application/json', \"Authorization\": azureAuthenticationHeader, \"OrganizationName\": organizationName } })\n                    .then(function (response) { return response.json(); })\n                    .then(function (workItems) {\n                    return __awaiter(this, void 0, void 0, function () {\n                        return __generator(this, function (_a) {\n                            return [2 /*return*/, workItems];\n                        });\n                    });\n                });\n                return [2 /*return*/];\n            });\n        });\n    }\n    function validateTimeRangeLocal(startLocal, endLocal) {\n        var startUtc = (0, core_1.convertLocalToUtc)(startLocal);\n        var endUtc = (0, core_1.convertLocalToUtc)(endLocal);\n        var start = luxon_1.DateTime.fromISO(startUtc);\n        var end = luxon_1.DateTime.fromISO(endUtc);\n        if (!start.isValid || !end.isValid) {\n            return { isValid: false, message: \"Invalid date format.\" };\n        }\n        if (end <= start) {\n            return { isValid: false, message: \"End date cannot be before Start date.\" };\n        }\n        return { isValid: true };\n    }\n    function SaveTimesheet(currentWorkItemId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var currentProjectName, currentProjectId, config, baseAPIUrl, normalizedBaseAPIUrl, localTimeZoneStartTime, localTimeZoneEndTime, validation, createTimesheetResponse, _a, errorMessage, errorText, _b, azureAuthenticationHeader;\n            var _c, _d;\n            return __generator(this, function (_e) {\n                switch (_e.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetCurrentProjectName)()];\n                    case 1:\n                        currentProjectName = _e.sent();\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectId)()];\n                    case 2:\n                        currentProjectId = _e.sent();\n                        return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 3:\n                        config = _e.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        normalizedBaseAPIUrl = (baseAPIUrl || \"\").replace(/\\/+$/, \"\");\n                        localTimeZoneStartTime = $(\"#txtStartTime\").val();\n                        localTimeZoneEndTime = $(\"#txtEndTime\").val();\n                        validation = validateTimeRangeLocal(String(localTimeZoneStartTime), String(localTimeZoneEndTime));\n                        if (!!validation.isValid) return [3 /*break*/, 5];\n                        return [4 /*yield*/, (0, swal_1.showAlertDialog)({\n                                title: \"Invalid Time Range\",\n                                text: validation.message || \"Invalid time range.\",\n                                icon: \"error\"\n                            })];\n                    case 4:\n                        _e.sent();\n                        return [2 /*return*/];\n                    case 5:\n                        _a = api_requests_1.PostRequest;\n                        _c = {\n                            endpoint: '/api/Timesheet/CreateTimesheet'\n                        };\n                        _d = {};\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 6: return [4 /*yield*/, _a.apply(void 0, [(_c.body = (_d.organizationName = _e.sent(),\n                                _d.workItemId = currentWorkItemId,\n                                _d.userEmail = (0, core_1.GetUserEmail)(),\n                                _d.workStarted = (0, core_1.convertLocalToUtc)(String(localTimeZoneStartTime)),\n                                _d.workEnded = (0, core_1.convertLocalToUtc)(String(localTimeZoneEndTime)),\n                                _d.trackingWorkItemTypeId = $(\"#txtWorkType\").val(),\n                                _d.description = $(\"#txtDescription\").val(),\n                                _d.projectId = currentProjectId,\n                                _d.projectName = currentProjectName,\n                                _d.isBillable = $(\"#chkIsBillable\").is(':checked'),\n                                _d),\n                                _c)])];\n                    case 7:\n                        createTimesheetResponse = _e.sent();\n                        if (!!createTimesheetResponse.ok) return [3 /*break*/, 13];\n                        errorMessage = \"Failed to record time. (\".concat(createTimesheetResponse.status, \")\");\n                        _e.label = 8;\n                    case 8:\n                        _e.trys.push([8, 10, , 11]);\n                        return [4 /*yield*/, createTimesheetResponse.text()];\n                    case 9:\n                        errorText = _e.sent();\n                        if (errorText && errorText.trim().length > 0) {\n                            errorMessage = errorText;\n                        }\n                        return [3 /*break*/, 11];\n                    case 10:\n                        _b = _e.sent();\n                        return [3 /*break*/, 11];\n                    case 11: return [4 /*yield*/, (0, swal_1.showAlertDialog)({\n                            title: \"Unable to Record Time\",\n                            text: errorMessage,\n                            icon: \"error\"\n                        })];\n                    case 12:\n                        _e.sent();\n                        return [2 /*return*/];\n                    case 13: return [4 /*yield*/, (0, toast_1.ShowToast)(\"success\", \"Time recorded successfully\")];\n                    case 14:\n                        _e.sent();\n                        return [4 /*yield*/, (0, core_1.GetAccessToken)()];\n                    case 15:\n                        azureAuthenticationHeader = _e.sent();\n                        return [4 /*yield*/, LoadTimesheets(normalizedBaseAPIUrl, azureAuthenticationHeader, currentWorkItemId)];\n                    case 16:\n                        _e.sent();\n                        $(\"#start-time\").val();\n                        $(\"#end-time\").val();\n                        $(\"#description\").val();\n                        $(\"#work-type\").val();\n                        (0, core_1.ClosePanel)(true);\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function UpdateTimesheet() {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, baseAPIUrl, localTimeZoneStartTime, localTimeZoneEndTime, validation, response, _a;\n            var _b, _c;\n            return __generator(this, function (_d) {\n                switch (_d.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _d.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        localTimeZoneStartTime = $(\"#txtStartTime\").val();\n                        localTimeZoneEndTime = $(\"#txtEndTime\").val();\n                        validation = validateTimeRangeLocal(String(localTimeZoneStartTime), String(localTimeZoneEndTime));\n                        if (!!validation.isValid) return [3 /*break*/, 3];\n                        return [4 /*yield*/, (0, swal_1.showAlertDialog)({\n                                title: \"Invalid Time Range\",\n                                text: validation.message || \"Invalid time range.\",\n                                icon: \"error\"\n                            })];\n                    case 2:\n                        _d.sent();\n                        return [2 /*return*/];\n                    case 3:\n                        _a = api_requests_1.PostRequest;\n                        _b = {\n                            baseAPIUrl: baseAPIUrl,\n                            endpoint: '/api/Timesheet/UpdateTimesheet'\n                        };\n                        _c = {};\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 4: return [4 /*yield*/, _a.apply(void 0, [(_b.body = (_c.organizationName = _d.sent(),\n                                _c.timesheetId = $(\"#timesheetId\").val(),\n                                _c.workItemId = $(\"#workItemId\").val(),\n                                _c.workStarted = (0, core_1.convertLocalToUtc)(String(localTimeZoneStartTime)),\n                                _c.workEnded = (0, core_1.convertLocalToUtc)(String(localTimeZoneEndTime)),\n                                _c.trackingWorkItemTypeId = $(\"#txtWorkType\").val(),\n                                _c.description = $(\"#txtDescription\").val(),\n                                _c.isBillable = $(\"#chkIsBillable\").is(':checked'),\n                                _c.UpdatedBy = (0, core_1.GetUserEmail)(),\n                                _c),\n                                _b)])];\n                    case 5:\n                        response = _d.sent();\n                        // 3️⃣ wait for API result (important)\n                        return [4 /*yield*/, response.json()];\n                    case 6:\n                        // 3️⃣ wait for API result (important)\n                        _d.sent();\n                        console.log(\"Api response received...\", response.json);\n                        // 4️⃣ show toast\n                        return [4 /*yield*/, (0, toast_1.ShowToast)(\"success\", \"Time updated successfully\")];\n                    case 7:\n                        // 4️⃣ show toast\n                        _d.sent();\n                        setTimeout(function () {\n                            (0, core_1.ClosePanel)(true);\n                        }, 300);\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function DeleteTimesheet(timesheetId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, baseAPIUrl, organizationName, deletedBy, response;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _a.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 2:\n                        organizationName = _a.sent();\n                        deletedBy = (0, core_1.GetUserEmail)();\n                        return [4 /*yield*/, (0, api_requests_1.DeleteRequest)({\n                                baseAPIUrl: baseAPIUrl,\n                                endpoint: \"/api/Timesheet/DeleteTimesheet\" +\n                                    \"?organizationName=\".concat(encodeURIComponent(organizationName)) +\n                                    \"&timesheetId=\".concat(timesheetId) +\n                                    \"&deletedBy=\".concat(encodeURIComponent(deletedBy))\n                            })];\n                    case 3:\n                        response = _a.sent();\n                        return [4 /*yield*/, response.json()];\n                    case 4:\n                        _a.sent();\n                        console.log(\"Delete API response received...\", response.status);\n                        return [4 /*yield*/, (0, toast_1.ShowToast)(\"success\", \"Timesheet deleted \")];\n                    case 5:\n                        _a.sent();\n                        setTimeout(function () {\n                            (0, core_1.ClosePanel)(true);\n                        }, 300);\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function ReloadTimesheetTable(workItemId, totalLoggedHoursLabel, reloadTable, baseApiUrl) {\n        return __awaiter(this, void 0, void 0, function () {\n            var _a, _b, _c, _d;\n            var _e, _f;\n            return __generator(this, function (_g) {\n                switch (_g.label) {\n                    case 0:\n                        _a = fetch;\n                        _b = [\"\".concat(baseApiUrl, \"/api/Timesheet/GetTimesheetsByWorkItemId\")];\n                        _e = {\n                            method: \"POST\"\n                        };\n                        _d = (_c = JSON).stringify;\n                        _f = {};\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 1:\n                        _a.apply(void 0, _b.concat([(_e.body = _d.apply(_c, [(_f.organizationName = _g.sent(),\n                                    _f.workItemId = workItemId,\n                                    _f.userEmail = (0, core_1.GetUserEmail)(),\n                                    _f)]),\n                                _e.headers = {\n                                    \"Content-type\": \"application/json; charset=UTF-8\"\n                                },\n                                _e)]))\n                            .then(function (response) { return response.json(); })\n                            .then(function (json) {\n                            if (json.length == 0) {\n                                totalLoggedHoursLabel.val(\"0 h\");\n                            }\n                            else {\n                                var html = '';\n                                var totalHours = 0.0;\n                                html = html + \"<table id='timesheetsTable' style='width:100%'><thead><tr><th>Start Date Time</th><th>End Date Time</th><th>Total Time (hrs)</th><th>User</th><th>Work Type</th><th>Description</th><th>Is Billable</th><th></th></tr></thead>\";\n                                html = html + \"<tbody>\";\n                                for (var i = 0; i < json.length; i++) {\n                                    html = html + \"<tr>\";\n                                    var workStarted = new Date(json[i].workStarted);\n                                    var workEnded = new Date(json[i].workEnded);\n                                    html = html + \"<td>\" + (workStarted.toLocaleDateString(\"en-US\") + \" \" + (0, core_1.changeTimeFormat)(workStarted)) + \"</td>\";\n                                    html = html + \"<td>\" + (json[i].workEnded == null ? \"\" : (workEnded.toLocaleDateString(\"en-US\") + \" \" + (0, core_1.changeTimeFormat)(workEnded))) + \"</td>\";\n                                    html = html + \"<td>\" + parseFloat(json[i].totalTimeSpent).toFixed(3) + \"</td>\";\n                                    html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].userEmail) + \"</td>\";\n                                    html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].workType) + \"</td>\";\n                                    html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].description) + \"</td>\";\n                                    html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].isBillable) + \"</td>\";\n                                    html = html + \"<td><a href=\\\"#\\\" data-timesheet-id=\\\"\" + (0, core_1.escapeHtml)(json[i].timesheetId) + \"\\\" class='editTimesheet'>Edit</a></td>\";\n                                    html = html + \"</tr>\";\n                                    totalHours = totalHours + parseFloat(json[i].totalTimeSpent);\n                                }\n                                html = html + \"</tbody>\";\n                                totalLoggedHoursLabel.val(totalHours.toString() + \" h\");\n                                reloadTable.html(html);\n                                $(\".editTimesheet\").on('click', function () {\n                                    var timesheetId = $(this).data('timesheetId');\n                                    HandleEditLoggedTimeClick({ workItemId: workItemId, id: timesheetId, timesheetTable: reloadTable, totalLoggedHoursLabel: totalLoggedHoursLabel });\n                                });\n                            }\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    //#region WorkItemPageTimeTracking methods\n    function LoadTimesheets(baseAPIUrl_1, azureAuthenticationHeader_1, currentWorkItemId_1) {\n        return __awaiter(this, arguments, void 0, function (baseAPIUrl, azureAuthenticationHeader, currentWorkItemId, showEditLinks) {\n            var _a, _b, _c, _d, _e;\n            var _f, _g, _h;\n            if (showEditLinks === void 0) { showEditLinks = true; }\n            return __generator(this, function (_j) {\n                switch (_j.label) {\n                    case 0:\n                        _a = fetch;\n                        _b = [\"\".concat(baseAPIUrl, \"/api/Timesheet/GetTimesheetsByWorkItemId\")];\n                        _f = {\n                            method: \"POST\"\n                        };\n                        _d = (_c = JSON).stringify;\n                        _g = {};\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 1:\n                        _f.body = _d.apply(_c, [(_g.organizationName = _j.sent(),\n                                _g.workItemId = currentWorkItemId,\n                                _g.userEmail = (0, core_1.GetUserEmail)(),\n                                _g)]);\n                        _h = {\n                            \"Content-type\": \"application/json; charset=UTF-8\",\n                            \"Authorization\": azureAuthenticationHeader\n                        };\n                        _e = \"OrganizationName\";\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 2:\n                        _a.apply(void 0, _b.concat([(_f.headers = (_h[_e] = _j.sent(),\n                                _h),\n                                _f)]))\n                            .then(function (response) { return response.json(); })\n                            .then(function (json) {\n                            return __awaiter(this, void 0, void 0, function () {\n                                var html, totalHours, userLookup, i, email, user, userName, avatarLink, userNameTrimmed, userEmailTrimmed, tooltipText, workStarted, workEnded, timeSummaryData;\n                                var _a, _b;\n                                return __generator(this, function (_c) {\n                                    switch (_c.label) {\n                                        case 0:\n                                            html = '';\n                                            totalHours = 0.0;\n                                            html = html + \"<table id='timesheetsTable' style='width:100%'><thead><tr><th>Start Date Time</th><th>End Date Time</th><th>Total Time (hrs)</th><th>User</th><th>Work Type</th><th>Description</th><th>Is Billable</th><th></th></tr></thead>\";\n                                            html = html + \"<tbody>\";\n                                            return [4 /*yield*/, getUserLookupFor(json.map(function (entry) { return entry.userEmail; }))];\n                                        case 1:\n                                            userLookup = _c.sent();\n                                            for (i = 0; i < json.length; i++) {\n                                                email = (_a = json[i].userEmail) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n                                                user = userLookup[email];\n                                                userName = user ? user.name || json[i].userEmail : json[i].userEmail;\n                                                avatarLink = user ? user.avatar || \"\" : \"\";\n                                                userNameTrimmed = userName === null || userName === void 0 ? void 0 : userName.trim();\n                                                userEmailTrimmed = (_b = json[i].userEmail) === null || _b === void 0 ? void 0 : _b.trim();\n                                                tooltipText = \"\";\n                                                if (userNameTrimmed && userEmailTrimmed && userNameTrimmed.toLowerCase() !== userEmailTrimmed.toLowerCase()) {\n                                                    tooltipText = \"\".concat(userNameTrimmed, \"\\n\").concat(userEmailTrimmed);\n                                                }\n                                                else {\n                                                    tooltipText = userNameTrimmed || userEmailTrimmed || \"\";\n                                                }\n                                                html = html + \"<tr>\";\n                                                workStarted = json[i].workStarted;\n                                                workEnded = json[i].workEnded;\n                                                html = html + \"<td>\" + ((0, core_1.convertUtcToLocal)(workStarted)) + \"</td>\";\n                                                html = html + \"<td>\" + (workEnded == null ? \"Active\" : (0, core_1.convertUtcToLocal)(workEnded)) + \"</td>\";\n                                                html = html + \"<td>\" + (workEnded == null ? \"Active\" : (0, core_1.formatHours)(parseFloat(json[i].totalTimeSpent).toFixed(2))) + \"</td>\";\n                                                html += \"<td class='user' title='\" + (0, core_1.escapeHtml)(tooltipText) + \"'>\";\n                                                if (avatarLink) {\n                                                    html += \"<img src='\" + (0, core_1.escapeHtml)(avatarLink) + \"' class='avatar-img' alt='Avatar' /> \";\n                                                }\n                                                else {\n                                                    html += \"<span class='avatar'>\" + (0, core_1.escapeHtml)((0, core_1.getInitials)(json[i].userEmail)) + \"</span> \";\n                                                }\n                                                html += (0, core_1.escapeHtml)(userName) + \"</td>\";\n                                                html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].workType) + \"</td>\";\n                                                html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].description) + \"</td>\";\n                                                html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].isBillable) + \"</td>\";\n                                                if (json[i].userEmail === (0, core_1.GetUserEmail)() && showEditLinks) {\n                                                    html += \"<td><a href=\\\"#\\\" data-timesheet-id=\\\"\" + (0, core_1.escapeHtml)(json[i].timesheetId) + \"\\\" class='editTimesheet'>Edit</a></td>\";\n                                                }\n                                                else {\n                                                    html += \"<td></td>\";\n                                                }\n                                                html = html + \"</tr>\";\n                                                totalHours = totalHours + parseFloat(json[i].totalTimeSpent);\n                                            }\n                                            html = html + \"</tbody>\";\n                                            $(\"#workitem-page-logged-hours-button\").val(parseFloat(totalHours.toString()).toFixed(2).toString() + \" h\");\n                                            $(\"#timesheetsgrid\").html(html);\n                                            $(\".editTimesheet\").on('click', function () {\n                                                var timesheetId = $(this).data('timesheetId');\n                                                HandleEditLoggedTimeClick({ workItemId: CurrentWorkItem(), id: timesheetId, timesheetTable: $(\"#timesheetsTable\"), totalLoggedHoursLabel: $(\"#workitem-page-logged-hours-button\"), apiUrl: baseAPIUrl, azureAuthenticationHeader: azureAuthenticationHeader });\n                                            });\n                                            return [4 /*yield*/, generateTimeSummaryData(json)];\n                                        case 2:\n                                            timeSummaryData = _c.sent();\n                                            bindWorkItemTypesSummary(timeSummaryData);\n                                            bindUsersSummary(timeSummaryData);\n                                            return [2 /*return*/];\n                                    }\n                                });\n                            });\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function generateTimeSummaryData(dataObject) {\n        return __awaiter(this, void 0, void 0, function () {\n            var timesheets, workItemsSummary, userSummary, totalMinutes, userLookup, _i, timesheets_1, entry, minutes, workTypeKey, email, user;\n            var _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        timesheets = objectToArray(dataObject);\n                        workItemsSummary = {};\n                        userSummary = {};\n                        totalMinutes = 0;\n                        return [4 /*yield*/, getUserLookupFor(timesheets.map(function (entry) { return entry.userEmail; }))];\n                    case 1:\n                        userLookup = _b.sent();\n                        for (_i = 0, timesheets_1 = timesheets; _i < timesheets_1.length; _i++) {\n                            entry = timesheets_1[_i];\n                            minutes = getDurationMinutes(entry.workStarted, entry.workEnded);\n                            totalMinutes += minutes;\n                            workTypeKey = entry.workType || \"Not Specified\";\n                            if (!workItemsSummary[workTypeKey]) {\n                                workItemsSummary[workTypeKey] = {\n                                    type: workTypeKey,\n                                    color: entry.workTypeColor || \"#CCCCCC\",\n                                    minutes: 0\n                                };\n                            }\n                            workItemsSummary[workTypeKey].minutes += minutes;\n                            email = (_a = entry.userEmail) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n                            user = userLookup[email];\n                            if (!userSummary[email]) {\n                                userSummary[email] = {\n                                    initials: (0, core_1.getInitials)(email),\n                                    name: (user === null || user === void 0 ? void 0 : user.name) || email, // fallback to email\n                                    avatar: (user === null || user === void 0 ? void 0 : user.avatar) || \"\", // empty if not found\n                                    minutes: 0,\n                                    avatarClass: \"avatar\"\n                                };\n                            }\n                            userSummary[email].minutes += minutes;\n                        }\n                        ;\n                        return [2 /*return*/, {\n                                totalHours: formatMinutes(totalMinutes),\n                                workItems: Object.keys(workItemsSummary).map(function (item) { return ({\n                                    type: workItemsSummary[item].type,\n                                    color: workItemsSummary[item].color,\n                                    hours: formatMinutes(workItemsSummary[item].minutes)\n                                }); }),\n                                users: Object.keys(userSummary).map(function (email) { return ({\n                                    initials: userSummary[email].initials,\n                                    name: userSummary[email].name,\n                                    hours: formatMinutes(userSummary[email].minutes),\n                                    avatar: userSummary[email].avatar,\n                                    avatarClass: userSummary[email].avatarClass,\n                                    email: email\n                                }); })\n                            }];\n                }\n            });\n        });\n    }\n    function bindWorkItemTypesSummary(timeSummaryData) {\n        // Render Work Items\n        var workContainer = document.getElementById(\"work-items-container\");\n        workContainer.innerHTML = \"<div class=\\\"total\\\">Total: \".concat((0, core_1.escapeHtml)(timeSummaryData.totalHours), \"</div>\");\n        timeSummaryData.workItems.forEach(function (item) {\n            var itemDiv = document.createElement(\"div\");\n            itemDiv.className = \"item\";\n            var dot = document.createElement(\"span\");\n            dot.className = \"dot\"; // keep existing class\n            dot.style.backgroundColor = item.color; // dynamically set color\n            var label = document.createElement(\"span\");\n            label.className = \"label\";\n            label.textContent = \"\".concat(item.type, \":\");\n            var time = document.createElement(\"span\");\n            time.className = \"time\";\n            time.textContent = item.hours;\n            itemDiv.append(dot, label, time);\n            workContainer.appendChild(itemDiv);\n        });\n    }\n    function bindUsersSummary(timeSummaryData) {\n        // Render Users\n        var userContainer = document.getElementById(\"user-summary-container\");\n        userContainer.innerHTML = \"<div class=\\\"total\\\">Total: \".concat(timeSummaryData.totalHours, \"</div>\");\n        timeSummaryData.users.forEach(function (user) {\n            var _a, _b;\n            var userName = (_a = user.name) === null || _a === void 0 ? void 0 : _a.trim();\n            var userEmail = (_b = user.email) === null || _b === void 0 ? void 0 : _b.trim();\n            var userDiv = document.createElement(\"div\");\n            userDiv.className = \"user\";\n            var avatar = document.createElement(\"div\");\n            avatar.className = user.avatarClass; // keep existing class\n            if (user.avatar) {\n                // ✅ Image avatar\n                var img = document.createElement(\"img\");\n                img.src = user.avatar;\n                img.alt = user.name;\n                img.className = \"avatar-img\";\n                if (userName && userEmail && userName.toLowerCase() !== userEmail.toLowerCase()) {\n                    img.title = \"\".concat(userName, \"\\n\").concat(userEmail);\n                }\n                else {\n                    img.title = userName || userEmail || \"\";\n                }\n                avatar.appendChild(img);\n            }\n            else {\n                // ✅ Fallback to initials\n                avatar.textContent = user.initials;\n                if (userName && userEmail && userName.toLowerCase() !== userEmail.toLowerCase()) {\n                    avatar.title = \"\".concat(userName, \"\\n\").concat(userEmail);\n                }\n                else {\n                    avatar.title = userName || userEmail || \"\";\n                }\n            }\n            var userInfo = document.createElement(\"div\");\n            userInfo.className = \"user-info\";\n            if (userName && userEmail && userName.toLowerCase() !== userEmail.toLowerCase()) {\n                userInfo.title = \"\".concat(userName, \"\\n\").concat(userEmail);\n            }\n            else {\n                userInfo.title = userName || userEmail || \"\";\n            }\n            var name = document.createElement(\"div\");\n            name.className = \"name\";\n            name.textContent = user.name;\n            var userTime = document.createElement(\"div\");\n            userTime.className = \"user-time\";\n            userTime.textContent = user.hours;\n            userInfo.append(name, userTime);\n            userDiv.append(avatar, userInfo);\n            userContainer.appendChild(userDiv);\n        });\n    }\n    /**\n     * Fetch user by email from Azure DevOps\n     */\n    var AVATAR_FETCH_CONCURRENCY = 8;\n    var avatarByDescriptor = new Map();\n    var avatarRequests = new Map();\n    var descriptorByEmail = new Map();\n    var allUsersPromise = null;\n    var allUsersOrganization = null;\n    var ALL_USERS_SUBJECT_TYPES = \"aad,msa,vss,imp\";\n    var ALL_USERS_CACHE_TTL_MS = 10 * 60 * 1000;\n    var ALL_USERS_CACHE_MAX_BYTES = 2 * 1024 * 1024;\n    function normalizeEmail(email) {\n        return typeof email === \"string\" ? email.trim().toLowerCase() : \"\";\n    }\n    function allUsersCacheKey(organizationName) {\n        return \"da.graphUsers.\".concat(organizationName);\n    }\n    function readAllUsersCache(organizationName) {\n        try {\n            var raw = sessionStorage.getItem(allUsersCacheKey(organizationName));\n            if (!raw)\n                return null;\n            var cached = JSON.parse(raw);\n            if (!cached || !Array.isArray(cached.users))\n                return null;\n            if (Date.now() - cached.savedAt > ALL_USERS_CACHE_TTL_MS)\n                return null;\n            return cached.users;\n        }\n        catch (_a) {\n            return null;\n        }\n    }\n    function writeAllUsersCache(organizationName, users) {\n        try {\n            var raw = JSON.stringify({ savedAt: Date.now(), users: users });\n            if (raw.length > ALL_USERS_CACHE_MAX_BYTES)\n                return;\n            sessionStorage.setItem(allUsersCacheKey(organizationName), raw);\n        }\n        catch (_a) { }\n    }\n    function indexUserDescriptors(users) {\n        users.forEach(function (user) {\n            var _a;\n            if (!user.mailAddress || !user.descriptor || !((_a = user._links) === null || _a === void 0 ? void 0 : _a.avatar))\n                return;\n            if (/^svc\\./i.test(user.descriptor))\n                return;\n            descriptorByEmail.set(user.mailAddress.toLowerCase(), user.descriptor);\n        });\n    }\n    function fetchAvatar(descriptor, organizationName, personalAccessToken) {\n        var _this = this;\n        if (avatarByDescriptor.has(descriptor))\n            return Promise.resolve(avatarByDescriptor.get(descriptor) || \"\");\n        var inFlight = avatarRequests.get(descriptor);\n        if (inFlight)\n            return inFlight;\n        var url = \"https://vssps.dev.azure.com/\".concat(organizationName, \"/_apis/graph/Subjects/\").concat(encodeURIComponent(descriptor), \"/avatars?size=2&api-version=7.1-preview.1\");\n        var request = (function () { return __awaiter(_this, void 0, void 0, function () {\n            var dataUrl, res, value, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        dataUrl = \"\";\n                        _b.label = 1;\n                    case 1:\n                        _b.trys.push([1, 5, , 6]);\n                        return [4 /*yield*/, fetch(url, {\n                                headers: { \"Authorization\": \"Basic \".concat(btoa(\":\" + personalAccessToken)) }\n                            })];\n                    case 2:\n                        res = _b.sent();\n                        if (!res.ok) return [3 /*break*/, 4];\n                        return [4 /*yield*/, res.json()];\n                    case 3:\n                        value = (_b.sent()).value;\n                        if (value)\n                            dataUrl = \"data:image/png;base64,\".concat(value);\n                        _b.label = 4;\n                    case 4: return [3 /*break*/, 6];\n                    case 5:\n                        _a = _b.sent();\n                        return [3 /*break*/, 6];\n                    case 6:\n                        avatarByDescriptor.set(descriptor, dataUrl);\n                        avatarRequests.delete(descriptor);\n                        return [2 /*return*/, dataUrl];\n                }\n            });\n        }); })();\n        avatarRequests.set(descriptor, request);\n        return request;\n    }\n    function loadAvatarsFor(emails) {\n        return __awaiter(this, void 0, void 0, function () {\n            var requested, pending, organizationName_1, personalAccessToken_1, descriptors, resolvedAny, i, batch, results, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        requested = Array.isArray(emails) ? emails : [emails];\n                        if (!requested.length)\n                            return [2 /*return*/, false];\n                        return [4 /*yield*/, getAllUsers()];\n                    case 1:\n                        _b.sent();\n                        pending = new Set();\n                        requested.forEach(function (email) {\n                            var descriptor = descriptorByEmail.get(normalizeEmail(email));\n                            if (descriptor && !avatarByDescriptor.has(descriptor))\n                                pending.add(descriptor);\n                        });\n                        if (!pending.size)\n                            return [2 /*return*/, false];\n                        _b.label = 2;\n                    case 2:\n                        _b.trys.push([2, 9, , 10]);\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 3:\n                        organizationName_1 = _b.sent();\n                        return [4 /*yield*/, SDK.getAccessToken()];\n                    case 4:\n                        personalAccessToken_1 = _b.sent();\n                        descriptors = Array.from(pending);\n                        resolvedAny = false;\n                        i = 0;\n                        _b.label = 5;\n                    case 5:\n                        if (!(i < descriptors.length)) return [3 /*break*/, 8];\n                        batch = descriptors.slice(i, i + AVATAR_FETCH_CONCURRENCY);\n                        return [4 /*yield*/, Promise.all(batch.map(function (descriptor) { return fetchAvatar(descriptor, organizationName_1, personalAccessToken_1); }))];\n                    case 6:\n                        results = _b.sent();\n                        if (results.some(Boolean))\n                            resolvedAny = true;\n                        _b.label = 7;\n                    case 7:\n                        i += AVATAR_FETCH_CONCURRENCY;\n                        return [3 /*break*/, 5];\n                    case 8: return [2 /*return*/, resolvedAny];\n                    case 9:\n                        _a = _b.sent();\n                        return [2 /*return*/, false];\n                    case 10: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function getCachedAvatar(email) {\n        var descriptor = descriptorByEmail.get(normalizeEmail(email));\n        return (descriptor && avatarByDescriptor.get(descriptor)) || \"\";\n    }\n    function getUserLookupFor(emails) {\n        return __awaiter(this, void 0, void 0, function () {\n            var users;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, getAllUsers()];\n                    case 1:\n                        users = _a.sent();\n                        return [4 /*yield*/, loadAvatarsFor(emails)];\n                    case 2:\n                        _a.sent();\n                        return [2 /*return*/, buildUserLookup(users)];\n                }\n            });\n        });\n    }\n    function getAllUsers() {\n        return __awaiter(this, void 0, void 0, function () {\n            var organizationName, _a, _b;\n            var _this = this;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0:\n                        organizationName = \"\";\n                        _c.label = 1;\n                    case 1:\n                        _c.trys.push([1, 3, , 4]);\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 2:\n                        organizationName = _c.sent();\n                        return [3 /*break*/, 4];\n                    case 3:\n                        _a = _c.sent();\n                        return [2 /*return*/, []];\n                    case 4:\n                        if (!allUsersPromise || allUsersOrganization !== organizationName) {\n                            allUsersOrganization = organizationName;\n                            allUsersPromise = (function () { return __awaiter(_this, void 0, void 0, function () {\n                                var cached, personalAccessToken, baseUrl, users, continuationToken, url, response, data;\n                                var _a;\n                                return __generator(this, function (_b) {\n                                    switch (_b.label) {\n                                        case 0:\n                                            cached = readAllUsersCache(organizationName);\n                                            if (cached) {\n                                                indexUserDescriptors(cached);\n                                                return [2 /*return*/, cached];\n                                            }\n                                            return [4 /*yield*/, SDK.getAccessToken()];\n                                        case 1:\n                                            personalAccessToken = _b.sent();\n                                            baseUrl = \"https://vssps.dev.azure.com/\".concat(organizationName, \"/_apis/graph/users\") +\n                                                \"?subjectTypes=\".concat(ALL_USERS_SUBJECT_TYPES, \"&api-version=7.1-preview.1\");\n                                            users = [];\n                                            continuationToken = null;\n                                            _b.label = 2;\n                                        case 2:\n                                            url = continuationToken\n                                                ? \"\".concat(baseUrl, \"&continuationToken=\").concat(encodeURIComponent(continuationToken))\n                                                : baseUrl;\n                                            return [4 /*yield*/, fetch(url, {\n                                                    headers: {\n                                                        \"Authorization\": \"Basic \".concat(btoa(\":\" + personalAccessToken))\n                                                    }\n                                                })];\n                                        case 3:\n                                            response = _b.sent();\n                                            return [4 /*yield*/, response.json()];\n                                        case 4:\n                                            data = _b.sent();\n                                            users.push.apply(users, ((_a = data.value) !== null && _a !== void 0 ? _a : []));\n                                            continuationToken = response.headers.get(\"X-MS-ContinuationToken\");\n                                            _b.label = 5;\n                                        case 5:\n                                            if (continuationToken) return [3 /*break*/, 2];\n                                            _b.label = 6;\n                                        case 6:\n                                            indexUserDescriptors(users);\n                                            writeAllUsersCache(organizationName, users);\n                                            return [2 /*return*/, users];\n                                    }\n                                });\n                            }); })();\n                            allUsersPromise.catch(function () {\n                                if (allUsersOrganization === organizationName) {\n                                    allUsersPromise = null;\n                                    allUsersOrganization = null;\n                                }\n                            });\n                        }\n                        _c.label = 5;\n                    case 5:\n                        _c.trys.push([5, 7, , 8]);\n                        return [4 /*yield*/, allUsersPromise];\n                    case 6: return [2 /*return*/, _c.sent()];\n                    case 7:\n                        _b = _c.sent();\n                        return [2 /*return*/, []];\n                    case 8: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function buildUserFromGraphUser(user) {\n        return {\n            name: user.displayName,\n            avatar: user.descriptor ? (avatarByDescriptor.get(user.descriptor) || \"\") : \"\",\n            email: user.mailAddress\n        };\n    }\n    function buildUserLookup(graphUsers) {\n        var lookup = {};\n        graphUsers.forEach(function (user) {\n            if (!user.mailAddress)\n                return;\n            var normalizedEmail = user.mailAddress.toLowerCase();\n            lookup[normalizedEmail] = buildUserFromGraphUser(user);\n        });\n        return lookup;\n    }\n    // Convert object with numeric keys to sorted array\n    function objectToArray(obj) {\n        return Object.keys(obj)\n            .sort(function (a, b) { return Number(a) - Number(b); })\n            .map(function (key) { return obj[key]; });\n    }\n    // Calculate duration in minutes\n    function getDurationMinutes(workStarted, workEnded) {\n        if (!workEnded)\n            return 0;\n        var start = new Date(workStarted);\n        var end = new Date(workEnded);\n        return Math.round((end.getTime() - start.getTime()) / 60000); // ms → minutes\n    }\n    // Format minutes to \"X h Y m\"\n    function formatMinutes(minutes) {\n        var h = Math.floor(minutes / 60);\n        var m = minutes % 60;\n        return \"\".concat(h, \" h\").concat(m > 0 ? \" \".concat(m, \" m\") : \"\");\n    }\n    //#endregion\n    function getUserByEmail(email) {\n        return __awaiter(this, void 0, void 0, function () {\n            var users, normalizedEmail;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        if (!email || !email.trim()) {\n                            return [2 /*return*/, \"\"];\n                        }\n                        return [4 /*yield*/, getAllUsers()];\n                    case 1:\n                        users = _a.sent();\n                        normalizedEmail = email.toLowerCase();\n                        return [2 /*return*/, users.find(function (user) {\n                                var _a, _b;\n                                return ((_a = user.principalName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === normalizedEmail ||\n                                    ((_b = user.mailAddress) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === normalizedEmail;\n                            }) || null];\n                }\n            });\n        });\n    }\n    function SaveWorkType(workType, workTypeColor, isDefault, isEffortIncluded, baseApiUrl) {\n        return __awaiter(this, void 0, void 0, function () {\n            var _a, _b, _c, _d;\n            var _e, _f;\n            var _this = this;\n            return __generator(this, function (_g) {\n                switch (_g.label) {\n                    case 0:\n                        _a = fetch;\n                        _b = [\"\".concat(baseApiUrl, \"/api/TrackingWorkType/CreateTrackingWorkType\")];\n                        _e = {\n                            method: \"POST\"\n                        };\n                        _d = (_c = JSON).stringify;\n                        _f = {};\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 1:\n                        _a.apply(void 0, _b.concat([(_e.body = _d.apply(_c, [(_f.organizationName = _g.sent(),\n                                    _f.TrackingWorkTypeTitle = workType.toString(),\n                                    _f.TrackingWorkTypeColor = workTypeColor.toString(),\n                                    _f.IsDefault = isDefault,\n                                    _f.IsEffortIncluded = isEffortIncluded,\n                                    _f.createdBy = (0, core_1.GetUserEmail)(),\n                                    _f)]),\n                                _e.headers = {\n                                    \"Content-type\": \"application/json; charset=UTF-8\"\n                                },\n                                _e)]))\n                            .then(function (response) { return __awaiter(_this, void 0, void 0, function () {\n                            var _a, _b;\n                            return __generator(this, function (_c) {\n                                switch (_c.label) {\n                                    case 0:\n                                        if (!!response.ok) return [3 /*break*/, 3];\n                                        _a = toast_1.ShowToast;\n                                        _b = [\"error\"];\n                                        return [4 /*yield*/, response.text()];\n                                    case 1: return [4 /*yield*/, _a.apply(void 0, _b.concat([_c.sent()]))];\n                                    case 2:\n                                        _c.sent();\n                                        return [2 /*return*/];\n                                    case 3:\n                                        (0, core_1.ClosePanel)(baseApiUrl);\n                                        return [4 /*yield*/, (0, toast_1.ShowToast)(\"success\", \"Work Type added successfully\")];\n                                    case 4:\n                                        _c.sent();\n                                        return [2 /*return*/];\n                                }\n                            });\n                        }); });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function UpdateWorkType(workTypeId, workType, workTypeColor, isDefault, isEffortIncluded, baseApiUrl) {\n        return __awaiter(this, void 0, void 0, function () {\n            var _a, _b, _c, _d;\n            var _e, _f;\n            var _this = this;\n            return __generator(this, function (_g) {\n                switch (_g.label) {\n                    case 0:\n                        _a = fetch;\n                        _b = [\"\".concat(baseApiUrl, \"/api/TrackingWorkType/UpdateTrackingWorkType\")];\n                        _e = {\n                            method: \"POST\"\n                        };\n                        _d = (_c = JSON).stringify;\n                        _f = {\n                            trackingWorkTypeId: workTypeId\n                        };\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 1:\n                        _a.apply(void 0, _b.concat([(_e.body = _d.apply(_c, [(_f.organizationName = _g.sent(),\n                                    _f.trackingWorkTypeTitle = workType.toString(),\n                                    _f.trackingWorkTypeColor = workTypeColor.toString(),\n                                    _f.isDefault = isDefault,\n                                    _f.isEffortIncluded = isEffortIncluded,\n                                    _f.updatedBy = (0, core_1.GetUserEmail)(),\n                                    _f)]),\n                                _e.headers = {\n                                    \"Content-type\": \"application/json; charset=UTF-8\"\n                                },\n                                _e)]))\n                            .then(function (response) { return __awaiter(_this, void 0, void 0, function () {\n                            var _a, _b;\n                            return __generator(this, function (_c) {\n                                switch (_c.label) {\n                                    case 0:\n                                        if (!!response.ok) return [3 /*break*/, 3];\n                                        _a = toast_1.ShowToast;\n                                        _b = [\"error\"];\n                                        return [4 /*yield*/, response.text()];\n                                    case 1: return [4 /*yield*/, _a.apply(void 0, _b.concat([_c.sent()]))];\n                                    case 2:\n                                        _c.sent();\n                                        return [2 /*return*/];\n                                    case 3:\n                                        (0, core_1.ClosePanel)(baseApiUrl);\n                                        return [2 /*return*/];\n                                }\n                            });\n                        }); });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function GetWorkTypes(baseApiUrl) {\n        return __awaiter(this, void 0, void 0, function () {\n            var hostContext, response, errorText, json, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        hostContext = SDK.getHost();\n                        return [4 /*yield*/, (0, api_requests_1.GetRequest)({\n                                baseAPIUrl: baseApiUrl,\n                                endpoint: \"/api/TrackingWorkType/GetAll/\".concat(hostContext.name)\n                            })];\n                    case 1:\n                        response = _b.sent();\n                        if (!!response.ok) return [3 /*break*/, 3];\n                        return [4 /*yield*/, response.text().catch(function () { return \"\"; })];\n                    case 2:\n                        errorText = _b.sent();\n                        throw new Error(errorText || \"Failed to load work types (\".concat(response.status, \")\"));\n                    case 3:\n                        _b.trys.push([3, 5, , 6]);\n                        return [4 /*yield*/, response.json()];\n                    case 4:\n                        json = _b.sent();\n                        return [2 /*return*/, Array.isArray(json) ? json : []];\n                    case 5:\n                        _a = _b.sent();\n                        throw new Error(\"Invalid work type response from server\");\n                    case 6: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function LoadWorkTypes(baseAPIUrl, message) {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, _a, _b;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _c.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        _a = fetch;\n                        _b = \"\".concat(baseAPIUrl, \"/api/TrackingWorkType/GetAll/\");\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 2:\n                        _a.apply(void 0, [_b + (_c.sent())])\n                            .then(function (response) { return response.json(); })\n                            .then(function (json) {\n                            if (json.length == 0) {\n                                $(\"#noWorkTypesDefined\").show();\n                            }\n                            else {\n                                var html = '';\n                                html = html + \"<table id='workTypesTable' style='width:100%'><thead><tr><th>Color</th><th>Work Type</th><th>Is Default</th><th>Effort Included</th><th></th><th></th></tr></thead>\";\n                                html = html + \"<tbody>\";\n                                for (var i = 0; i < json.length; i++) {\n                                    html = html + \"<tr>\";\n                                    html = html + \"<td><span style='display:inline-block; width:20%;background-color: \" + (0, core_1.sanitizeCssColor)(json[i].trackingWorkTypeColor) + \"'>&nbsp;</span>\" + \"</td>\";\n                                    html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].trackingWorkTypeTitle) + \"</td>\";\n                                    html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].isDefault) + \"</td>\";\n                                    html = html + \"<td>\" + (0, core_1.escapeHtml)(json[i].isEffortIncluded) + \"</td>\";\n                                    html = html + \"<td><a href='#' class='editWorkType'\"\n                                        + \" data-worktype-id='\" + (0, core_1.escapeHtml)(json[i].id) + \"'\"\n                                        + \" data-worktype-title='\" + (0, core_1.escapeHtml)(json[i].trackingWorkTypeTitle) + \"'\"\n                                        + \" data-worktype-default='\" + (0, core_1.escapeHtml)(json[i].isDefault) + \"'\"\n                                        + \" data-worktype-effort='\" + (0, core_1.escapeHtml)(json[i].isEffortIncluded) + \"'\"\n                                        + \" data-worktype-color='\" + (0, core_1.escapeHtml)(json[i].trackingWorkTypeColor) + \"'>Edit</a></td>\";\n                                    html = html + \"<td><a href='#' class='deleteWorkType' data-worktype-id='\" + (0, core_1.escapeHtml)(json[i].id) + \"'>Delete</a></td>\";\n                                    html = html + \"</tr>\";\n                                }\n                                html = html + \"</tbody></table>\";\n                                $(\"#worktypesgrid\").html(html);\n                                $(\"#worktypesgrid\").off('click', '.editWorkType').on('click', '.editWorkType', function (e) {\n                                    var _a, _b;\n                                    e.preventDefault();\n                                    var link = $(this);\n                                    (_b = (_a = window).EditWorkType) === null || _b === void 0 ? void 0 : _b.call(_a, link.data('worktypeId'), link.data('worktypeTitle'), link.data('worktypeDefault'), link.data('worktypeColor'), link.data('worktypeEffort'));\n                                });\n                                $(\"#worktypesgrid\").off('click', '.deleteWorkType').on('click', '.deleteWorkType', function (e) {\n                                    var _a, _b;\n                                    e.preventDefault();\n                                    (_b = (_a = window).DeleteWorkType) === null || _b === void 0 ? void 0 : _b.call(_a, $(this).data('worktypeId'));\n                                });\n                                if (message != null) {\n                                    void (0, toast_1.ShowToast)(\"success\", message);\n                                }\n                            }\n                        });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function safeUpdateUrl(projectId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var navigationService, error_7;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        _a.trys.push([0, 3, , 4]);\n                        return [4 /*yield*/, SDK.getService(\"ms.vss-features.host-navigation-service\" // or correct service id\n                            )];\n                    case 1:\n                        navigationService = _a.sent();\n                        return [4 /*yield*/, navigationService.setQueryParams({ eId: projectId })];\n                    case 2:\n                        _a.sent();\n                        return [3 /*break*/, 4];\n                    case 3:\n                        error_7 = _a.sent();\n                        return [3 /*break*/, 4];\n                    case 4: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function CreateAdvancedReportingTemplate(reportingTemplate) {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, baseAPIUrl, response, errorData, json, error_8;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        _a.trys.push([0, 7, , 9]);\n                        return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _a.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/TimesheetReportingTemplate/CreateTemplate\"), {\n                                method: \"POST\",\n                                headers: {\n                                    \"Content-Type\": \"application/json; charset=UTF-8\"\n                                },\n                                body: JSON.stringify({\n                                    organizationId: (0, core_1.GetAccountId)(),\n                                    templateName: reportingTemplate.templateName,\n                                    isShared: reportingTemplate.isShared,\n                                    createdBy: (0, core_1.GetUserEmail)(),\n                                    templateColumns: reportingTemplate.templateColumns\n                                })\n                            })];\n                    case 2:\n                        response = _a.sent();\n                        if (!!response.ok) return [3 /*break*/, 4];\n                        return [4 /*yield*/, response.text()];\n                    case 3:\n                        errorData = _a.sent();\n                        throw new Error(errorData);\n                    case 4: return [4 /*yield*/, response.json()];\n                    case 5:\n                        json = _a.sent();\n                        return [4 /*yield*/, (0, toast_1.ShowToast)(\"success\", \"Template created successfully\")];\n                    case 6:\n                        _a.sent();\n                        return [3 /*break*/, 9];\n                    case 7:\n                        error_8 = _a.sent();\n                        return [4 /*yield*/, (0, toast_1.ShowToast)(\"error\", error_8.message || \"Failed to create template. Please try again later.\")];\n                    case 8:\n                        _a.sent();\n                        return [3 /*break*/, 9];\n                    case 9: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function UpdateAdvancedReportingTemplate(reportingTemplate) {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, baseAPIUrl, response, errorData, json, error_9;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        _a.trys.push([0, 7, , 9]);\n                        return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _a.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/TimesheetReportingTemplate/UpdateTemplate\"), {\n                                method: \"POST\",\n                                headers: {\n                                    \"Content-Type\": \"application/json; charset=UTF-8\"\n                                },\n                                body: JSON.stringify({\n                                    id: reportingTemplate.templateId,\n                                    organizationId: (0, core_1.GetAccountId)(),\n                                    templateName: reportingTemplate.templateName,\n                                    isShared: reportingTemplate.isShared,\n                                    modifiedBy: (0, core_1.GetUserEmail)(),\n                                    templateColumns: reportingTemplate.templateColumns\n                                })\n                            })];\n                    case 2:\n                        response = _a.sent();\n                        if (!!response.ok) return [3 /*break*/, 4];\n                        return [4 /*yield*/, response.text()];\n                    case 3:\n                        errorData = _a.sent();\n                        throw new Error(errorData);\n                    case 4: return [4 /*yield*/, response.json()];\n                    case 5:\n                        json = _a.sent();\n                        return [4 /*yield*/, (0, toast_1.ShowToast)(\"success\", \"Template updated successfully\")];\n                    case 6:\n                        _a.sent();\n                        return [3 /*break*/, 9];\n                    case 7:\n                        error_9 = _a.sent();\n                        return [4 /*yield*/, (0, toast_1.ShowToast)(\"error\", error_9.message || \"Failed to create template. Please try again later.\")];\n                    case 8:\n                        _a.sent();\n                        return [3 /*break*/, 9];\n                    case 9: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function GetAllReportingTemplates(azureAuthenticationHeader) {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, baseAPIUrl, orgName, response, errorText, templates, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _b.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 2:\n                        orgName = _b.sent();\n                        return [4 /*yield*/, (0, api_requests_1.GetRequest)({\n                                baseAPIUrl: baseAPIUrl,\n                                endpoint: \"/api/TimesheetReportingTemplate/GetAll/\".concat(encodeURIComponent((0, core_1.GetUserEmail)()), \"/\").concat(encodeURIComponent(orgName)),\n                                azureAuthenticationHeader: azureAuthenticationHeader,\n                                organizationName: orgName,\n                                headers: {\n                                    'Content-Type': 'application/json'\n                                }\n                            })];\n                    case 3:\n                        response = _b.sent();\n                        if (!!response.ok) return [3 /*break*/, 5];\n                        return [4 /*yield*/, response.text().catch(function () { return \"\"; })];\n                    case 4:\n                        errorText = _b.sent();\n                        throw new Error(errorText || \"Failed to load reporting templates (\".concat(response.status, \")\"));\n                    case 5:\n                        _b.trys.push([5, 7, , 8]);\n                        return [4 /*yield*/, response.json()];\n                    case 6:\n                        templates = _b.sent();\n                        return [2 /*return*/, Array.isArray(templates) ? templates : []];\n                    case 7:\n                        _a = _b.sent();\n                        throw new Error(\"Invalid reporting templates response from server\");\n                    case 8: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function GetUserReportingTemplates(azureAuthenticationHeader) {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, baseAPIUrl, orgName, response, errorText, templates, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _b.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 2:\n                        orgName = _b.sent();\n                        return [4 /*yield*/, (0, api_requests_1.GetRequest)({\n                                baseAPIUrl: baseAPIUrl,\n                                endpoint: \"/api/TimesheetReportingTemplate/GetUserTemplates/\".concat(encodeURIComponent((0, core_1.GetUserEmail)()), \"/\").concat(encodeURIComponent(orgName)),\n                                azureAuthenticationHeader: azureAuthenticationHeader,\n                                organizationName: orgName,\n                                headers: {\n                                    'Content-Type': 'application/json'\n                                }\n                            })];\n                    case 3:\n                        response = _b.sent();\n                        if (!!response.ok) return [3 /*break*/, 5];\n                        return [4 /*yield*/, response.text().catch(function () { return \"\"; })];\n                    case 4:\n                        errorText = _b.sent();\n                        throw new Error(errorText || \"Failed to load user reporting templates (\".concat(response.status, \")\"));\n                    case 5:\n                        _b.trys.push([5, 7, , 8]);\n                        return [4 /*yield*/, response.json()];\n                    case 6:\n                        templates = _b.sent();\n                        return [2 /*return*/, Array.isArray(templates) ? templates : []];\n                    case 7:\n                        _a = _b.sent();\n                        throw new Error(\"Invalid user templates response from server\");\n                    case 8: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function CreateWorkItemsInDevops(workItemPatch, project, workItemType) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, wi;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        return [4 /*yield*/, witClient.createWorkItem(workItemPatch, project, workItemType)];\n                    case 1:\n                        wi = _a.sent();\n                        return [2 /*return*/, wi];\n                }\n            });\n        });\n    }\n    function UpdateWorkItemDescriptionInDevops(workItemId, project, updatedDescription) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, patch, wi;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        patch = [\n                            {\n                                op: \"replace\",\n                                path: \"/fields/System.Description\",\n                                value: updatedDescription\n                            }\n                        ];\n                        return [4 /*yield*/, witClient.updateWorkItem(patch, workItemId, project)];\n                    case 1:\n                        wi = _a.sent();\n                        return [2 /*return*/, wi];\n                }\n            });\n        });\n    }\n    function GetWorkItemsInDevops(workitemIds, projectName, fields) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        if (!(typeof workitemIds === \"number\")) return [3 /*break*/, 2];\n                        return [4 /*yield*/, witClient.getWorkItem(workitemIds, null, fields)];\n                    case 1: return [2 /*return*/, _a.sent()];\n                    case 2:\n                        if (!Array.isArray(workitemIds)) return [3 /*break*/, 4];\n                        return [4 /*yield*/, witClient.getWorkItems(workitemIds, null, fields)];\n                    case 3: return [2 /*return*/, _a.sent()];\n                    case 4: throw new Error(\"workitemIds must be a number or an array of numbers\");\n                }\n            });\n        });\n    }\n    function ExecuteQueryByWiql(wiqlQuery) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, webContext, project, wiqlResult;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        webContext = SDK.getWebContext();\n                        project = webContext.project.name;\n                        return [4 /*yield*/, witClient.queryByWiql(wiqlQuery, undefined, undefined, true, 5)];\n                    case 1:\n                        wiqlResult = _a.sent();\n                        return [2 /*return*/, wiqlResult];\n                }\n            });\n        });\n    }\n    function GetWorkItemWithFields(workItemId, fields) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, webContext, project, workItem;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        webContext = SDK.getWebContext();\n                        project = webContext.project.name;\n                        return [4 /*yield*/, witClient.getWorkItem(workItemId, project, fields)];\n                    case 1:\n                        workItem = _a.sent();\n                        return [2 /*return*/, workItem];\n                }\n            });\n        });\n    }\n    function GetWorkItemTypeFieldRefNames(workItemTypeName) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, webContext, project, wit;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        webContext = SDK.getWebContext();\n                        project = webContext.project.name;\n                        return [4 /*yield*/, witClient.getWorkItemType(project, workItemTypeName)];\n                    case 1:\n                        wit = _a.sent();\n                        return [2 /*return*/, ((wit === null || wit === void 0 ? void 0 : wit.fields) || [])\n                                .map(function (f) { return f.referenceName; })\n                                .filter(Boolean)];\n                }\n            });\n        });\n    }\n    function UpdateWorkItemFieldInDevops(workItemId, project, fieldRefName, value) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, patch, wi;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        patch = [\n                            {\n                                op: \"replace\",\n                                path: \"/fields/\".concat(fieldRefName),\n                                value: value\n                            }\n                        ];\n                        return [4 /*yield*/, witClient.updateWorkItem(patch, workItemId, project)];\n                    case 1:\n                        wi = _a.sent();\n                        return [2 /*return*/, wi];\n                }\n            });\n        });\n    }\n    function AddWorkItemDiscussionComment(workItemId, project, commentHtml) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, patch, wi;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        patch = [\n                            {\n                                op: \"add\",\n                                path: \"/fields/System.History\",\n                                value: commentHtml\n                            }\n                        ];\n                        return [4 /*yield*/, witClient.updateWorkItem(patch, workItemId, project)];\n                    case 1:\n                        wi = _a.sent();\n                        return [2 /*return*/, wi];\n                }\n            });\n        });\n    }\n    function GetWorkItemWithRelations(workItemId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var witClient, webContext, project, workItem;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        witClient = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        webContext = SDK.getWebContext();\n                        project = webContext.project.name;\n                        return [4 /*yield*/, witClient.getWorkItem(workItemId, project, undefined, undefined, WorkItemTracking_1.WorkItemExpand.Relations)];\n                    case 1:\n                        workItem = _a.sent();\n                        return [2 /*return*/, workItem];\n                }\n            });\n        });\n    }\n    function GetWorkItemsWithFields(Ids, fields) {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, workItems;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        client = (0, azure_devops_extension_api_1.getClient)(WorkItemTracking_1.WorkItemTrackingRestClient);\n                        workItemsColumns = [];\n                        return [4 /*yield*/, client.getWorkItems(Ids, undefined, fields)];\n                    case 1:\n                        workItems = _a.sent();\n                        return [2 /*return*/, workItems];\n                }\n            });\n        });\n    }\n    function TriggerSummarizeAction(workItemId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var panelService, extensionContext, panelId, error_10;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        _a.trys.push([0, 3, , 4]);\n                        console.log(\"=== TriggerSummarizeAction - Opening side panel ===\");\n                        return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        console.log(\"Opening summarize panel for work item:\", workItemId);\n                        return [4 /*yield*/, SDK.getService(\"ms.vss-features.host-page-layout-service\" /* CommonServiceIds.HostPageLayoutService */)];\n                    case 2:\n                        panelService = _a.sent();\n                        extensionContext = SDK.getExtensionContext();\n                        panelId = \"\".concat(extensionContext.publisherId, \".\").concat(extensionContext.extensionId, \".summarize-dialog\");\n                        console.log(\"Opening panel with ID:\", panelId);\n                        panelService.openPanel(panelId, {\n                            title: \"AI Summary\",\n                            description: \"Work item summary\",\n                            size: 1, // 0=small, 1=medium, 2=large\n                            configuration: {\n                                workItemId: workItemId\n                            }\n                        });\n                        return [3 /*break*/, 4];\n                    case 3:\n                        error_10 = _a.sent();\n                        console.error(\"Error opening summarize panel:\", error_10);\n                        alert('Failed to open summary panel. Please try again.');\n                        return [3 /*break*/, 4];\n                    case 4: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function CreateTrialLicense() {\n        return __awaiter(this, arguments, void 0, function (fromSettingsPage) {\n            var config, baseAPIUrl, docsBaseUrl, isDevOpsAssistEnabled, isTimesheetEnabled, isTimesheetOnlyMode, azureAuthenticationHeader, orgName, userName, userEmail, userId, expiryDate, formattedExpiryDate, result, _a, licenses, tokens, perfectTimesheetLicenses, codeReviewLicenses;\n            var _b, _c;\n            if (fromSettingsPage === void 0) { fromSettingsPage = false; }\n            return __generator(this, function (_d) {\n                switch (_d.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _d.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        docsBaseUrl = config.docs || \"\";\n                        isDevOpsAssistEnabled = ((_b = config.features) === null || _b === void 0 ? void 0 : _b.devopsAssist) === \"enable\";\n                        isTimesheetEnabled = ((_c = config.features) === null || _c === void 0 ? void 0 : _c.timesheet) === \"enable\";\n                        isTimesheetOnlyMode = !isDevOpsAssistEnabled && isTimesheetEnabled;\n                        return [4 /*yield*/, (0, core_1.GetAccessToken)()];\n                    case 2:\n                        azureAuthenticationHeader = _d.sent();\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 3:\n                        orgName = _d.sent();\n                        userName = (0, core_1.GetUserDisplayName)();\n                        userEmail = (0, core_1.GetUserEmail)();\n                        userId = (0, core_1.GetUserId)();\n                        expiryDate = new Date();\n                        expiryDate.setDate(expiryDate.getDate() + 30);\n                        formattedExpiryDate = \"\".concat(expiryDate.getMonth() + 1, \"/\").concat(expiryDate.getDate(), \"/\").concat(expiryDate.getFullYear());\n                        return [4 /*yield*/, sweetalert2_1.default.fire({\n                                title: 'Subscription Details',\n                                html: \"\\n            <style>\\n                .trial-grid {\\n                    display: grid;\\n                    grid-template-columns: 200px 1fr;\\n                    row-gap: 10px;\\n                    column-gap: 15px;\\n                    font-size: 14px;\\n                    text-align: left;\\n                    align-items: center; /* vertically center input/text */\\n                }\\n                .trial-grid label {\\n                    font-weight: 600;\\n                }\\n                .trial-grid div,\\n                .trial-grid input {\\n                    width: 100%;\\n                    box-sizing: border-box; /* include padding in width */\\n                    padding: 4px 6px;\\n                }\\n            </style>\\n\\n            <div class=\\\"trial-grid\\\">\\n                <label>Organization Name:</label>\\n                <div>\".concat(orgName, \"</div>\\n\\n                <label>Account Owner Name:</label>\\n                <div>\").concat(userName, \"</div>\\n\\n                <label>Account Owner Email:</label>\\n                <div>\").concat(userEmail, \"</div>\\n\\n                <label>Subscription Type:</label>\\n                <div>Trial</div>\\n\\n                <label>Subscription Expiration:</label>\\n                <div>\").concat(formattedExpiryDate, \"</div>\\n\\n                <!-- DevOps Assist -->\\n                <label id=\\\"lblLicenses\\\">DevOps Assist AI Licenses:</label>\\n                <input id=\\\"licenses\\\" type=\\\"number\\\" value=\\\"5\\\" min=\\\"1\\\">\\n\\n                <!-- Timesheet -->\\n                <label id=\\\"lblTimesheet\\\">Timesheets Licenses:</label>\\n                <input id=\\\"perfectTimesheetLicenses\\\" type=\\\"number\\\" value=\\\"5\\\" min=\\\"1\\\">\\n\\n            </div>\\n\\n            <div style=\\\"margin-top: 15px; text-align: left; font-size: 13px;\\\">\\n                <label style=\\\"font-weight: normal; display: flex; align-items: flex-start; gap: 6px; cursor: pointer;\\\">\\n                    <input id=\\\"agreeToTerms\\\" type=\\\"checkbox\\\" style=\\\"margin-top: 3px;\\\">\\n                    <span>\\n                        I agree to the\\n                        <a href=\\\"javascript:void(0)\\\" id=\\\"lnkTerms\\\" style=\\\"color: #0078d4; text-decoration: underline;\\\">Terms of Service</a>,\\n                        <a href=\\\"javascript:void(0)\\\" id=\\\"lnkPrivacy\\\" style=\\\"color: #0078d4; text-decoration: underline;\\\">Privacy Policy</a>\\n                        and\\n                        <a href=\\\"javascript:void(0)\\\" id=\\\"lnkSsa\\\" style=\\\"color: #0078d4; text-decoration: underline;\\\">Software Subscription Agreement</a>.\\n                    </span>\\n                </label>\\n            </div>\\n        \"),\n                                showCancelButton: true,\n                                confirmButtonText: 'Start Trial',\n                                focusConfirm: false,\n                                didOpen: function () {\n                                    var _a, _b, _c;\n                                    var hide = function (labelId, inputId) {\n                                        var label = document.getElementById(labelId);\n                                        var input = document.getElementById(inputId);\n                                        if (label)\n                                            label.style.display = \"none\";\n                                        if (input)\n                                            input.style.display = \"none\";\n                                    };\n                                    if (isTimesheetOnlyMode) {\n                                        hide(\"lblLicenses\", \"licenses\");\n                                    }\n                                    else {\n                                        // DevOps Assist enabled — timesheet value mirrors DevOps Assist\n                                        hide(\"lblTimesheet\", \"perfectTimesheetLicenses\");\n                                    }\n                                    var confirmButton = sweetalert2_1.default.getConfirmButton();\n                                    var agreeCheckbox = document.getElementById(\"agreeToTerms\");\n                                    if (confirmButton) {\n                                        confirmButton.disabled = true;\n                                    }\n                                    if (agreeCheckbox && confirmButton) {\n                                        agreeCheckbox.addEventListener(\"change\", function () {\n                                            confirmButton.disabled = !agreeCheckbox.checked;\n                                        });\n                                    }\n                                    (_a = document.getElementById(\"lnkTerms\")) === null || _a === void 0 ? void 0 : _a.addEventListener(\"click\", function () { return (0, core_1.openInNewTab)(\"\".concat(docsBaseUrl, \"terms.html\")); });\n                                    (_b = document.getElementById(\"lnkPrivacy\")) === null || _b === void 0 ? void 0 : _b.addEventListener(\"click\", function () { return (0, core_1.openInNewTab)(\"\".concat(docsBaseUrl, \"privacy.html\")); });\n                                    (_c = document.getElementById(\"lnkSsa\")) === null || _c === void 0 ? void 0 : _c.addEventListener(\"click\", function () { return (0, core_1.openInNewTab)(\"\".concat(docsBaseUrl, \"ssa.html\")); });\n                                    // Remove automatic focus on first input\n                                    document.activeElement.blur();\n                                },\n                                preConfirm: function () {\n                                    var agreeCheckbox = document.getElementById('agreeToTerms');\n                                    if (!agreeCheckbox || !agreeCheckbox.checked) {\n                                        sweetalert2_1.default.showValidationMessage('You must agree to the Terms of Service, Privacy Policy and Software Subscription Agreement');\n                                        return false;\n                                    }\n                                    var licensesEl = document.getElementById('licenses');\n                                    var timesheetEl = document.getElementById('perfectTimesheetLicenses');\n                                    var licenses = 0;\n                                    var tokens = 0;\n                                    var codeReviewLicenses = 0;\n                                    var perfectTimesheetLicenses = 0;\n                                    if (isTimesheetOnlyMode) {\n                                        perfectTimesheetLicenses = parseInt(timesheetEl.value);\n                                        if (isNaN(perfectTimesheetLicenses)) {\n                                            sweetalert2_1.default.showValidationMessage('Timesheets Licenses is required');\n                                            timesheetEl.focus();\n                                            return false;\n                                        }\n                                        if (perfectTimesheetLicenses <= 0) {\n                                            sweetalert2_1.default.showValidationMessage('Timesheets Licenses must be greater than 0');\n                                            timesheetEl.focus();\n                                            return false;\n                                        }\n                                        // Timesheet only: other values stay 0\n                                        tokens = 1000000;\n                                        licenses = perfectTimesheetLicenses;\n                                        codeReviewLicenses = perfectTimesheetLicenses;\n                                    }\n                                    else {\n                                        // DevOps Assist enabled\n                                        licenses = parseInt(licensesEl.value);\n                                        if (isNaN(licenses)) {\n                                            sweetalert2_1.default.showValidationMessage('DevOps Assist AI Licenses is required');\n                                            licensesEl.focus();\n                                            return false;\n                                        }\n                                        if (licenses <= 0) {\n                                            sweetalert2_1.default.showValidationMessage('DevOps Assist AI Licenses must be greater than 0');\n                                            licensesEl.focus();\n                                            return false;\n                                        }\n                                        // All license types mirror DevOps Assist count\n                                        tokens = 1000000;\n                                        codeReviewLicenses = licenses;\n                                        perfectTimesheetLicenses = licenses;\n                                    }\n                                    return { licenses: licenses, tokens: tokens, perfectTimesheetLicenses: perfectTimesheetLicenses, codeReviewLicenses: codeReviewLicenses };\n                                }\n                            })];\n                    case 4:\n                        result = _d.sent();\n                        if (!result.isConfirmed) return [3 /*break*/, 6];\n                        _a = result.value, licenses = _a.licenses, tokens = _a.tokens, perfectTimesheetLicenses = _a.perfectTimesheetLicenses, codeReviewLicenses = _a.codeReviewLicenses;\n                        console.log(\"Creating trial license with values:\", { licenses: licenses, tokens: tokens, perfectTimesheetLicenses: perfectTimesheetLicenses, codeReviewLicenses: codeReviewLicenses });\n                        return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/License/CreateTrialLicense\") +\n                                \"?numberOfPerfectTimesheetLicenses=\".concat(perfectTimesheetLicenses) +\n                                \"&numberOfCodeReviewLicenses=\".concat(codeReviewLicenses) +\n                                \"&numberOfDeveloperAgentLicenses=\".concat(codeReviewLicenses) +\n                                \"&numberOfPrototypeAgentLicenses=\".concat(codeReviewLicenses) +\n                                \"&numberOfCleoLicenses=\".concat(codeReviewLicenses) +\n                                \"&numberOfLicenses=\".concat(licenses) +\n                                \"&numberOfTokens=\".concat(tokens) +\n                                \"&name=\".concat(encodeURIComponent(userName)) +\n                                \"&email=\".concat(encodeURIComponent(userEmail)) +\n                                \"&userId=\".concat(userId), {\n                                method: \"POST\",\n                                headers: {\n                                    \"Authorization\": azureAuthenticationHeader,\n                                    \"OrganizationName\": orgName,\n                                    \"OrganizationId\": (0, core_1.GetAccountId)()\n                                }\n                            })];\n                    case 5:\n                        _d.sent();\n                        window.location.reload();\n                        _d.label = 6;\n                    case 6: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function AutoCreateTrialLicense() {\n        return __awaiter(this, arguments, void 0, function (fromSettingsPage) {\n            var config, baseAPIUrl, azureAuthenticationHeader, orgName, userName, userEmail, userId, licenses, tokens, perfectTimesheetLicenses, codeReviewLicenses, developerAgentLicenses, prototypeAgentLicenses, cleoLicenses, response;\n            if (fromSettingsPage === void 0) { fromSettingsPage = false; }\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _a.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        return [4 /*yield*/, (0, core_1.GetAccessToken)()];\n                    case 2:\n                        azureAuthenticationHeader = _a.sent();\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 3:\n                        orgName = _a.sent();\n                        userName = (0, core_1.GetUserDisplayName)();\n                        userEmail = (0, core_1.GetUserEmail)();\n                        userId = (0, core_1.GetUserId)();\n                        licenses = 5;\n                        tokens = 500000;\n                        perfectTimesheetLicenses = 5;\n                        codeReviewLicenses = 5;\n                        developerAgentLicenses = 5;\n                        prototypeAgentLicenses = 5;\n                        cleoLicenses = 5;\n                        return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/License/CreateTrialLicense\") +\n                                \"?numberOfLicenses=\".concat(licenses) +\n                                \"&numberOfTokens=\".concat(tokens) +\n                                \"&numberOfPerfectTimesheetLicenses=\".concat(perfectTimesheetLicenses) +\n                                \"&numberOfCodeReviewLicenses=\".concat(codeReviewLicenses) +\n                                \"&numberOfDeveloperAgentLicenses=\".concat(developerAgentLicenses) +\n                                \"&numberOfPrototypeAgentLicenses=\".concat(prototypeAgentLicenses) +\n                                \"&numberOfCleoLicenses=\".concat(cleoLicenses) +\n                                \"&name=\".concat(encodeURIComponent(userName)) +\n                                \"&email=\".concat(encodeURIComponent(userEmail)) +\n                                \"&userId=\".concat(userId), {\n                                method: \"POST\",\n                                headers: {\n                                    \"Authorization\": azureAuthenticationHeader,\n                                    \"OrganizationName\": orgName,\n                                    \"OrganizationId\": (0, core_1.GetAccountId)()\n                                }\n                            })];\n                    case 4:\n                        response = _a.sent();\n                        if (response.ok) {\n                            window.location.reload();\n                        }\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function executeSummarizeLogic(workItemId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var targetWindow, config, baseAPIUrl, authToken, organizationName, organizationId, projectName, projectId, userEmail, configRes, configData, fieldsToFetch, workItem_2, workItemFields_2, generateRes, errorData, summaryData, error_11;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        targetWindow = window;\n                        try {\n                            // Try to access parent window (works if same origin)\n                            if (window.parent && window.parent !== window) {\n                                targetWindow = window.parent;\n                            }\n                        }\n                        catch (e) {\n                            // Cross-origin, use current window\n                            console.log(\"Cannot access parent window, using current window\");\n                        }\n                        (0, swal_1.showLoadingDialog)({\n                            title: \"Generating Summary...\",\n                            html: \"AI is analyzing the work item\",\n                            target: targetWindow.document.body\n                        });\n                        _a.label = 1;\n                    case 1:\n                        _a.trys.push([1, 15, , 17]);\n                        return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 2:\n                        config = _a.sent();\n                        baseAPIUrl = config.apiBaseUrl;\n                        return [4 /*yield*/, (0, core_1.GetAccessToken)()];\n                    case 3:\n                        authToken = _a.sent();\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 4:\n                        organizationName = _a.sent();\n                        organizationId = (0, core_1.GetAccountId)();\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectName)()];\n                    case 5:\n                        projectName = _a.sent();\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectId)()];\n                    case 6:\n                        projectId = _a.sent();\n                        userEmail = (0, core_1.GetUserEmail)();\n                        return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/Settings/GetSummarizeConfigurations\"), {\n                                method: 'GET',\n                                headers: {\n                                    'Authorization': authToken,\n                                    'OrganizationName': organizationName\n                                }\n                            })];\n                    case 7:\n                        configRes = _a.sent();\n                        if (!configRes.ok) {\n                            throw new Error('Failed to fetch summarization configuration');\n                        }\n                        return [4 /*yield*/, configRes.json()];\n                    case 8:\n                        configData = _a.sent();\n                        fieldsToFetch = configData.summarizeFields\n                            ? configData.summarizeFields.split(',').map(function (f) { return f.trim(); })\n                            : [\"System.Id\", \"System.Title\", \"System.Description\", \"System.State\"];\n                        return [4 /*yield*/, GetWorkItemWithFields(workItemId, fieldsToFetch)];\n                    case 9:\n                        workItem_2 = _a.sent();\n                        workItemFields_2 = {};\n                        fieldsToFetch.forEach(function (field) {\n                            workItemFields_2[field] = workItem_2.fields[field];\n                        });\n                        return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/WorkItemSummary/Generate\"), {\n                                method: 'POST',\n                                headers: {\n                                    'Content-Type': 'application/json',\n                                    'Authorization': authToken,\n                                    'OrganizationName': organizationName\n                                },\n                                body: JSON.stringify({\n                                    organizationId: organizationId,\n                                    devOpsProjectId: projectId,\n                                    devOpsProjectName: projectName,\n                                    workItemId: workItemId,\n                                    workItemFields: workItemFields_2,\n                                    createdBy: userEmail\n                                })\n                            })];\n                    case 10:\n                        generateRes = _a.sent();\n                        if (!!generateRes.ok) return [3 /*break*/, 12];\n                        return [4 /*yield*/, generateRes.text()];\n                    case 11:\n                        errorData = _a.sent();\n                        throw new Error(errorData || 'Failed to generate summary');\n                    case 12: return [4 /*yield*/, generateRes.json()];\n                    case 13:\n                        summaryData = _a.sent();\n                        // Display summary in popup with regenerate button\n                        return [4 /*yield*/, showSummaryPopupForTrigger(summaryData.summary, summaryData.lastUpdated, workItemId, baseAPIUrl, authToken, organizationName, organizationId, projectId, projectName, userEmail, fieldsToFetch)];\n                    case 14:\n                        // Display summary in popup with regenerate button\n                        _a.sent();\n                        return [3 /*break*/, 17];\n                    case 15:\n                        error_11 = _a.sent();\n                        console.error(\"Error generating summary:\", error_11);\n                        return [4 /*yield*/, (0, swal_1.showAlertDialog)({\n                                title: \"Error\",\n                                text: error_11.message || \"Failed to generate summary. Please try again.\",\n                                icon: \"error\",\n                                target: targetWindow.document.body\n                            })];\n                    case 16:\n                        _a.sent();\n                        return [3 /*break*/, 17];\n                    case 17: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function showSummaryPopupForTrigger(summary, lastUpdated, workItemId, baseAPIUrl, authToken, organizationName, organizationId, projectId, projectName, userEmail, fieldsToFetch) {\n        return __awaiter(this, void 0, void 0, function () {\n            var targetWindow, formattedDate, result, freshWorkItem_2, freshFields_2, regenerateRes, errorData, newSummaryData, error_12;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        targetWindow = window;\n                        try {\n                            if (window.parent && window.parent !== window) {\n                                targetWindow = window.parent;\n                            }\n                        }\n                        catch (e) {\n                            console.log(\"Cannot access parent window, using current window\");\n                        }\n                        formattedDate = new Date(lastUpdated).toLocaleString();\n                        return [4 /*yield*/, sweetalert2_1.default.fire({\n                                title: 'AI Summary',\n                                html: \"\\n            <div style=\\\"text-align: left; max-height: 500px; overflow-y: auto;\\\">\\n                <div style=\\\"margin-bottom: 15px; padding: 10px; background-color: #f5f5f5; border-radius: 4px;\\\">\\n                    <small style=\\\"color: #666;\\\"><strong>Last updated:</strong> \".concat(formattedDate, \"</small>\\n                </div>\\n                <div class=\\\"summary-content\\\" style=\\\"line-height: 1.6;\\\">\\n                    \").concat(DOMPurify.sanitize(marked_1.marked.parse(summary), { USE_PROFILES: { html: true } }), \"\\n                </div>\\n            </div>\\n        \"),\n                                width: 700,\n                                showCancelButton: true,\n                                confirmButtonText: 'Regenerate',\n                                confirmButtonColor: '#0078d4',\n                                cancelButtonText: 'Close',\n                                customClass: {\n                                    confirmButton: 'regenerate-summary-btn'\n                                },\n                                target: targetWindow.document.body\n                            })];\n                    case 1:\n                        result = _a.sent();\n                        if (!result.isConfirmed) return [3 /*break*/, 11];\n                        // User clicked \"Regenerate\" button - regenerate\n                        (0, swal_1.showLoadingDialog)({\n                            title: \"Regenerating Summary...\",\n                            html: \"AI is analyzing the work item\",\n                            target: targetWindow.document.body\n                        });\n                        _a.label = 2;\n                    case 2:\n                        _a.trys.push([2, 9, , 11]);\n                        return [4 /*yield*/, GetWorkItemWithFields(workItemId, fieldsToFetch)];\n                    case 3:\n                        freshWorkItem_2 = _a.sent();\n                        freshFields_2 = {};\n                        fieldsToFetch.forEach(function (field) {\n                            freshFields_2[field] = freshWorkItem_2.fields[field];\n                        });\n                        return [4 /*yield*/, fetch(\"\".concat(baseAPIUrl, \"/api/WorkItemSummary/Generate\"), {\n                                method: 'POST',\n                                headers: {\n                                    'Content-Type': 'application/json',\n                                    'Authorization': authToken,\n                                    'OrganizationName': organizationName\n                                },\n                                body: JSON.stringify({\n                                    organizationId: organizationId,\n                                    devOpsProjectId: projectId,\n                                    devOpsProjectName: projectName,\n                                    workItemId: workItemId,\n                                    workItemFields: freshFields_2,\n                                    createdBy: userEmail\n                                })\n                            })];\n                    case 4:\n                        regenerateRes = _a.sent();\n                        if (!!regenerateRes.ok) return [3 /*break*/, 6];\n                        return [4 /*yield*/, regenerateRes.text()];\n                    case 5:\n                        errorData = _a.sent();\n                        throw new Error(errorData || 'Failed to regenerate summary');\n                    case 6: return [4 /*yield*/, regenerateRes.json()];\n                    case 7:\n                        newSummaryData = _a.sent();\n                        // Show updated summary (recursive call)\n                        return [4 /*yield*/, showSummaryPopupForTrigger(newSummaryData.summary, newSummaryData.lastUpdated, workItemId, baseAPIUrl, authToken, organizationName, organizationId, projectId, projectName, userEmail, fieldsToFetch)];\n                    case 8:\n                        // Show updated summary (recursive call)\n                        _a.sent();\n                        return [3 /*break*/, 11];\n                    case 9:\n                        error_12 = _a.sent();\n                        console.error(\"Error regenerating summary:\", error_12);\n                        return [4 /*yield*/, (0, swal_1.showAlertDialog)({\n                                title: \"Error\",\n                                text: error_12.message || \"Failed to regenerate summary. Please try again.\",\n                                icon: \"error\",\n                                target: targetWindow.document.body\n                            })];\n                    case 10:\n                        _a.sent();\n                        return [3 /*break*/, 11];\n                    case 11: return [2 /*return*/];\n                }\n            });\n        });\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/index.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/modules/code-review.ts":
/*!***********************************************!*\
  !*** ./src/bundle-src/modules/code-review.ts ***!
  \***********************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! azure-devops-extension-sdk */ \"./node_modules/azure-devops-extension-sdk/SDK.min.js\"), __webpack_require__(/*! ../shared/core */ \"./src/bundle-src/shared/core.ts\"), __webpack_require__(/*! ../shared/api-requests */ \"./src/bundle-src/shared/api-requests.ts\"), __webpack_require__(/*! ../shared/toast */ \"./src/bundle-src/shared/toast.ts\"), __webpack_require__(/*! ../shared/sdk-lifecycle */ \"./src/bundle-src/shared/sdk-lifecycle.ts\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, SDK, core_1, api_requests_1, toast_1, sdk_lifecycle_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.GetPullRequestData = GetPullRequestData;\n    exports.QueueCodeReviewPR = QueueCodeReviewPR;\n    function GetPullRequestData() {\n        return __awaiter(this, void 0, void 0, function () {\n            var config;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        config = SDK.getConfiguration();\n                        return [2 /*return*/, config.pullRequest];\n                }\n            });\n        });\n    }\n    function QueueCodeReviewPR() {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, orchestratorApiBaseUrl, orchestratorApiKey, organizationName, pullRequestData, prUrl, reviewRequest, response, result, result, error_1;\n            var _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _b.sent();\n                        orchestratorApiBaseUrl = config.orchestratorApiBaseUrl;\n                        orchestratorApiKey = config.orchestratorApiKey;\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 2:\n                        organizationName = _b.sent();\n                        return [4 /*yield*/, GetPullRequestData()];\n                    case 3:\n                        pullRequestData = _b.sent();\n                        prUrl = \"\".concat(pullRequestData.repository.webUrl, \"/pullrequest/\").concat(pullRequestData.pullRequestId);\n                        _b.label = 4;\n                    case 4:\n                        _b.trys.push([4, 14, , 15]);\n                        (0, toast_1.ShowToast)(\"success\", \"Queueing AI code review...\");\n                        _a = {\n                            organizationId: (0, core_1.GetAccountId)(),\n                            organizationName: organizationName\n                        };\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectId)()];\n                    case 5:\n                        _a.projectId = _b.sent();\n                        return [4 /*yield*/, (0, core_1.GetCurrentProjectName)()];\n                    case 6:\n                        reviewRequest = (_a.projectName = _b.sent(),\n                            _a.pullRequestUrl = prUrl,\n                            _a.createdBy = (0, core_1.GetUserEmail)(),\n                            _a);\n                        return [4 /*yield*/, (0, api_requests_1.PostRequest)({\n                                baseAPIUrl: orchestratorApiBaseUrl,\n                                endpoint: \"/api/orchestrator/codereviewer\",\n                                xApiKey: orchestratorApiKey,\n                                body: reviewRequest\n                            })];\n                    case 7:\n                        response = _b.sent();\n                        if (!!response.ok) return [3 /*break*/, 11];\n                        if (!(response.status === 400)) return [3 /*break*/, 9];\n                        return [4 /*yield*/, response.json()];\n                    case 8:\n                        result = _b.sent();\n                        (0, toast_1.ShowToast)(\"warning\", \"\".concat(result.message));\n                        return [3 /*break*/, 10];\n                    case 9:\n                        (0, toast_1.ShowToast)(\"error\", \"API call failed: \".concat(response.status));\n                        _b.label = 10;\n                    case 10: return [2 /*return*/];\n                    case 11: return [4 /*yield*/, response.json()];\n                    case 12:\n                        result = _b.sent();\n                        (0, toast_1.ShowToast)(\"success\", \"\".concat(result.message));\n                        _b.label = 13;\n                    case 13: return [3 /*break*/, 15];\n                    case 14:\n                        error_1 = _b.sent();\n                        console.error(\"Queue Code Review Error:\", error_1);\n                        (0, toast_1.ShowToast)(\"error\", \"Failed to queue AI code review. Please try again.\");\n                        return [3 /*break*/, 15];\n                    case 15: return [2 /*return*/];\n                }\n            });\n        });\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/modules/code-review.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/modules/common.ts":
/*!******************************************!*\
  !*** ./src/bundle-src/modules/common.ts ***!
  \******************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ../shared/core */ \"./src/bundle-src/shared/core.ts\"), __webpack_require__(/*! ../shared/api-requests */ \"./src/bundle-src/shared/api-requests.ts\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, core_1, api_requests_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.GetUserLicensesType = GetUserLicensesType;\n    function GetUserLicensesType(Name_1) {\n        return __awaiter(this, arguments, void 0, function (Name, fromReportPage) {\n            var fieldName, orgName, response, userType;\n            if (fromReportPage === void 0) { fromReportPage = false; }\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        fieldName = Name;\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 1:\n                        orgName = _a.sent();\n                        return [4 /*yield*/, (0, api_requests_1.GetRequest)({\n                                endpoint: \"/api/License/GetUserLicenseType?organizationName=\".concat(orgName, \"&email=\").concat((0, core_1.GetUserEmail)(), \"&fieldName=\").concat(fieldName)\n                            })];\n                    case 2:\n                        response = _a.sent();\n                        return [4 /*yield*/, response.text()];\n                    case 3:\n                        userType = _a.sent();\n                        return [2 /*return*/, userType];\n                }\n            });\n        });\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/modules/common.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/api-requests.ts":
/*!***********************************************!*\
  !*** ./src/bundle-src/shared/api-requests.ts ***!
  \***********************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./core */ \"./src/bundle-src/shared/core.ts\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, core_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.GetRequest = GetRequest;\n    exports.PostRequest = PostRequest;\n    exports.PutRequest = PutRequest;\n    exports.PatchRequest = PatchRequest;\n    exports.DeleteRequest = DeleteRequest;\n    function buildUrl(baseAPIUrl, endpoint) {\n        var trimmedBase = baseAPIUrl.replace(/\\/+$/, \"\");\n        var normalizedEndpoint = endpoint.startsWith(\"/\") ? endpoint : \"/\".concat(endpoint);\n        return \"\".concat(trimmedBase).concat(normalizedEndpoint);\n    }\n    function sendRequest(method, options) {\n        return __awaiter(this, void 0, void 0, function () {\n            var config, baseAPIUrl, authorization, _a, organizationName, _b, organizationId, _c, xApiKey, defaultHeaders, isFormData, requestHeaders, requestInit;\n            return __generator(this, function (_d) {\n                switch (_d.label) {\n                    case 0: return [4 /*yield*/, (0, core_1.GetExtensionConfig)()];\n                    case 1:\n                        config = _d.sent();\n                        baseAPIUrl = options.baseAPIUrl || config.apiBaseUrl;\n                        _a = options.azureAuthenticationHeader;\n                        if (_a) return [3 /*break*/, 3];\n                        return [4 /*yield*/, (0, core_1.GetAccessToken)()];\n                    case 2:\n                        _a = (_d.sent());\n                        _d.label = 3;\n                    case 3:\n                        authorization = _a;\n                        _b = options.organizationName;\n                        if (_b) return [3 /*break*/, 5];\n                        return [4 /*yield*/, (0, core_1.GetAccountNameAsync)()];\n                    case 4:\n                        _b = (_d.sent());\n                        _d.label = 5;\n                    case 5:\n                        organizationName = _b;\n                        _c = options.organizationId;\n                        if (_c) return [3 /*break*/, 7];\n                        return [4 /*yield*/, (0, core_1.GetAccountIdAsync)()];\n                    case 6:\n                        _c = (_d.sent());\n                        _d.label = 7;\n                    case 7:\n                        organizationId = _c;\n                        xApiKey = options.xApiKey || config.orchestratorApiKey || \"\";\n                        defaultHeaders = {\n                            \"Authorization\": authorization,\n                            \"OrganizationName\": organizationName,\n                            \"OrganizationId\": organizationId\n                        };\n                        if (xApiKey) {\n                            defaultHeaders[\"X-API-Key\"] = xApiKey;\n                        }\n                        // When the API is served through an ngrok tunnel (local testing), skip ngrok's\n                        // browser-warning interstitial so responses come back as JSON, not the warning HTML.\n                        if (baseAPIUrl.includes(\"ngrok\")) {\n                            defaultHeaders[\"ngrok-skip-browser-warning\"] = \"true\";\n                        }\n                        isFormData = typeof FormData !== \"undefined\" && options.body instanceof FormData;\n                        if (options.body !== undefined && options.body !== null && !isFormData) {\n                            defaultHeaders[\"Content-Type\"] = \"application/json; charset=UTF-8\";\n                        }\n                        requestHeaders = __assign(__assign({}, defaultHeaders), (options.headers || {}));\n                        requestInit = {\n                            method: method,\n                            headers: requestHeaders,\n                            signal: options.signal\n                        };\n                        if (options.body !== undefined && options.body !== null) {\n                            if (isFormData || typeof options.body === \"string\") {\n                                requestInit.body = options.body;\n                            }\n                            else {\n                                requestInit.body = JSON.stringify(options.body);\n                            }\n                        }\n                        return [2 /*return*/, fetch(buildUrl(baseAPIUrl, options.endpoint), requestInit)];\n                }\n            });\n        });\n    }\n    function GetRequest(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                return [2 /*return*/, sendRequest(\"GET\", options)];\n            });\n        });\n    }\n    function PostRequest(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                return [2 /*return*/, sendRequest(\"POST\", options)];\n            });\n        });\n    }\n    function PutRequest(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                return [2 /*return*/, sendRequest(\"PUT\", options)];\n            });\n        });\n    }\n    function PatchRequest(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                return [2 /*return*/, sendRequest(\"PATCH\", options)];\n            });\n        });\n    }\n    function DeleteRequest(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                return [2 /*return*/, sendRequest(\"DELETE\", options)];\n            });\n        });\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/api-requests.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/chat-attachments.ts":
/*!***************************************************!*\
  !*** ./src/bundle-src/shared/chat-attachments.ts ***!
  \***************************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ./api-requests */ \"./src/bundle-src/shared/api-requests.ts\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, api_requests_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.ACCEPTED_ATTACHMENT_EXTENSIONS = exports.MAX_ATTACHMENTS_PER_MESSAGE = void 0;\n    exports.IsAcceptedAttachment = IsAcceptedAttachment;\n    exports.IsImageAttachment = IsImageAttachment;\n    exports.CompressImage = CompressImage;\n    exports.ValidateAttachmentSize = ValidateAttachmentSize;\n    exports.UploadAttachment = UploadAttachment;\n    exports.UploadAttachments = UploadAttachments;\n    exports.GetCachedAttachmentUrl = GetCachedAttachmentUrl;\n    exports.ClearAttachmentUrlCache = ClearAttachmentUrlCache;\n    exports.GetAttachmentUrl = GetAttachmentUrl;\n    /**\n     * Chat message attachments. Bytes go straight from the browser to Azure Blob Storage using a\n     * short-lived write URL issued by the API, so a 10 MB screenshot never occupies an API request.\n     */\n    exports.MAX_ATTACHMENTS_PER_MESSAGE = 3;\n    exports.ACCEPTED_ATTACHMENT_EXTENSIONS = [\".md\", \".png\", \".jpg\", \".jpeg\", \".gif\", \".webp\", \".bmp\"];\n    /** Long edge, in pixels. Vision models downsample beyond roughly this, so larger is paid-for and discarded. */\n    var MAX_IMAGE_DIMENSION = 1568;\n    var JPEG_QUALITY = 0.82;\n    /** Below this, re-encoding usually costs more bytes than it saves. */\n    var COMPRESSION_FLOOR_BYTES = 128 * 1024;\n    var MAX_FILE_BYTES = 10 * 1024 * 1024;\n    var MAX_MARKDOWN_BYTES = 1024 * 1024;\n    function extensionOf(fileName) {\n        var dot = (fileName || \"\").lastIndexOf(\".\");\n        return dot < 0 ? \"\" : fileName.slice(dot).toLowerCase();\n    }\n    function IsAcceptedAttachment(file) {\n        return exports.ACCEPTED_ATTACHMENT_EXTENSIONS.includes(extensionOf(file.name));\n    }\n    function IsImageAttachment(fileName) {\n        var ext = extensionOf(fileName);\n        return ext !== \"\" && ext !== \".md\";\n    }\n    function requestHeaders(ctx) {\n        return { \"UserEmail\": ctx.userEmail || \"\" };\n    }\n    /**\n     * Re-encodes an image down to something a vision model can actually use. GIFs are passed through\n     * untouched — drawing one to a canvas keeps only the first frame and silently destroys the animation.\n     */\n    function CompressImage(file) {\n        return __awaiter(this, void 0, void 0, function () {\n            var passthrough, bitmap, _a, longEdge, scale, width, height, canvas_1, context, encoded, baseName;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        passthrough = { blob: file, fileName: file.name };\n                        if (!IsImageAttachment(file.name) || extensionOf(file.name) === \".gif\") {\n                            return [2 /*return*/, passthrough];\n                        }\n                        _b.label = 1;\n                    case 1:\n                        _b.trys.push([1, 3, , 4]);\n                        return [4 /*yield*/, createImageBitmap(file)];\n                    case 2:\n                        bitmap = _b.sent();\n                        return [3 /*break*/, 4];\n                    case 3:\n                        _a = _b.sent();\n                        // Not decodable here (unusual colour profile, corrupt file). Let the server judge it.\n                        return [2 /*return*/, passthrough];\n                    case 4:\n                        _b.trys.push([4, , 6, 7]);\n                        longEdge = Math.max(bitmap.width, bitmap.height);\n                        scale = longEdge > MAX_IMAGE_DIMENSION ? MAX_IMAGE_DIMENSION / longEdge : 1;\n                        // Already small in both bytes and pixels: re-encoding would only lose quality.\n                        if (scale === 1 && file.size <= COMPRESSION_FLOOR_BYTES) {\n                            return [2 /*return*/, { blob: file, fileName: file.name, width: bitmap.width, height: bitmap.height }];\n                        }\n                        width = Math.max(1, Math.round(bitmap.width * scale));\n                        height = Math.max(1, Math.round(bitmap.height * scale));\n                        canvas_1 = document.createElement(\"canvas\");\n                        canvas_1.width = width;\n                        canvas_1.height = height;\n                        context = canvas_1.getContext(\"2d\");\n                        if (!context)\n                            return [2 /*return*/, passthrough];\n                        // PNGs of screenshots are usually flat colour on white; a white backdrop keeps transparent\n                        // regions from turning black once the alpha channel is dropped by JPEG.\n                        context.fillStyle = \"#ffffff\";\n                        context.fillRect(0, 0, width, height);\n                        context.drawImage(bitmap, 0, 0, width, height);\n                        return [4 /*yield*/, new Promise(function (resolve) {\n                                return canvas_1.toBlob(resolve, \"image/jpeg\", JPEG_QUALITY);\n                            })];\n                    case 5:\n                        encoded = _b.sent();\n                        if (!encoded || encoded.size >= file.size) {\n                            return [2 /*return*/, { blob: file, fileName: file.name, width: bitmap.width, height: bitmap.height }];\n                        }\n                        baseName = file.name.replace(/\\.[^.]+$/, \"\");\n                        return [2 /*return*/, { blob: encoded, fileName: \"\".concat(baseName, \".jpg\"), width: width, height: height }];\n                    case 6:\n                        bitmap.close();\n                        return [7 /*endfinally*/];\n                    case 7: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    /** Mirrors the server's limits so an oversized file is rejected before it is uploaded. */\n    function ValidateAttachmentSize(fileName, sizeBytes) {\n        if (sizeBytes <= 0)\n            return \"\".concat(fileName, \" is empty.\");\n        var limit = IsImageAttachment(fileName) ? MAX_FILE_BYTES : MAX_MARKDOWN_BYTES;\n        if (sizeBytes > limit) {\n            var limitMb = Math.round(limit / 1024 / 1024);\n            return \"\".concat(fileName, \" is larger than the \").concat(limitMb, \" MB limit.\");\n        }\n        return null;\n    }\n    function requestTicket(ctx, chatId, fileName, sizeBytes) {\n        return __awaiter(this, void 0, void 0, function () {\n            var response, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0: return [4 /*yield*/, (0, api_requests_1.PostRequest)({\n                            endpoint: \"/api/InChat/\".concat(chatId, \"/attachments/ticket\"),\n                            baseAPIUrl: ctx.baseAPIUrl,\n                            azureAuthenticationHeader: ctx.azureAuthenticationHeader,\n                            organizationName: ctx.organizationName,\n                            organizationId: ctx.organizationId,\n                            headers: requestHeaders(ctx),\n                            body: { fileName: fileName, sizeBytes: sizeBytes }\n                        })];\n                    case 1:\n                        response = _b.sent();\n                        if (!!response.ok) return [3 /*break*/, 3];\n                        _a = Error.bind;\n                        return [4 /*yield*/, readError(response, \"Could not prepare the upload.\")];\n                    case 2: throw new (_a.apply(Error, [void 0, _b.sent()]))();\n                    case 3: return [4 /*yield*/, response.json()];\n                    case 4: return [2 /*return*/, _b.sent()];\n                }\n            });\n        });\n    }\n    function readError(response, fallback) {\n        return __awaiter(this, void 0, void 0, function () {\n            var text, _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        _b.trys.push([0, 2, , 3]);\n                        return [4 /*yield*/, response.text()];\n                    case 1:\n                        text = _b.sent();\n                        return [2 /*return*/, text || fallback];\n                    case 2:\n                        _a = _b.sent();\n                        return [2 /*return*/, fallback];\n                    case 3: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    /**\n     * Compresses, then PUTs the bytes to the SAS URL. This deliberately uses a bare fetch rather than\n     * the shared request helper: those attach the caller's Azure DevOps bearer token, which must never\n     * be sent to a storage account.\n     */\n    function UploadAttachment(ctx, chatId, file) {\n        return __awaiter(this, void 0, void 0, function () {\n            var prepared, sizeError, ticket, response;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, CompressImage(file)];\n                    case 1:\n                        prepared = _a.sent();\n                        sizeError = ValidateAttachmentSize(prepared.fileName, prepared.blob.size);\n                        if (sizeError)\n                            throw new Error(sizeError);\n                        return [4 /*yield*/, requestTicket(ctx, chatId, prepared.fileName, prepared.blob.size)];\n                    case 2:\n                        ticket = _a.sent();\n                        return [4 /*yield*/, fetch(ticket.uploadUrl, {\n                                method: \"PUT\",\n                                headers: {\n                                    \"x-ms-blob-type\": \"BlockBlob\",\n                                    \"Content-Type\": ticket.contentType\n                                },\n                                body: prepared.blob\n                            })];\n                    case 3:\n                        response = _a.sent();\n                        if (!response.ok) {\n                            throw new Error(\"Uploading \".concat(prepared.fileName, \" failed (\").concat(response.status, \").\"));\n                        }\n                        return [2 /*return*/, {\n                                blobPath: ticket.blobPath,\n                                fileName: ticket.fileName,\n                                width: prepared.width,\n                                height: prepared.height\n                            }];\n                }\n            });\n        });\n    }\n    /** Uploads every staged file for one message; the first failure aborts the send. */\n    function UploadAttachments(ctx, chatId, files) {\n        return __awaiter(this, void 0, void 0, function () {\n            var uploaded, _i, files_1, file, _a, _b;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0:\n                        if (!files || files.length === 0)\n                            return [2 /*return*/, []];\n                        if (files.length > exports.MAX_ATTACHMENTS_PER_MESSAGE) {\n                            throw new Error(\"You can attach at most \".concat(exports.MAX_ATTACHMENTS_PER_MESSAGE, \" files to a message.\"));\n                        }\n                        uploaded = [];\n                        _i = 0, files_1 = files;\n                        _c.label = 1;\n                    case 1:\n                        if (!(_i < files_1.length)) return [3 /*break*/, 4];\n                        file = files_1[_i];\n                        _b = (_a = uploaded).push;\n                        return [4 /*yield*/, UploadAttachment(ctx, chatId, file)];\n                    case 2:\n                        _b.apply(_a, [_c.sent()]);\n                        _c.label = 3;\n                    case 3:\n                        _i++;\n                        return [3 /*break*/, 1];\n                    case 4: return [2 /*return*/, uploaded];\n                }\n            });\n        });\n    }\n    var urlCache = new Map();\n    var inflightUrls = new Map();\n    var URL_CACHE_TTL_MS = 100 * 60 * 1000;\n    function cacheKey(chatId, attachmentId) {\n        return \"\".concat(chatId, \":\").concat(attachmentId);\n    }\n    function GetCachedAttachmentUrl(chatId, attachmentId) {\n        var key = cacheKey(chatId, attachmentId);\n        var hit = urlCache.get(key);\n        if (!hit)\n            return null;\n        if (hit.expiresAt <= Date.now()) {\n            urlCache.delete(key);\n            return null;\n        }\n        return hit.url;\n    }\n    function ClearAttachmentUrlCache() {\n        urlCache.clear();\n        inflightUrls.clear();\n    }\n    function GetAttachmentUrl(ctx, chatId, attachmentId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var cached, key, pending, request;\n            var _this = this;\n            return __generator(this, function (_a) {\n                cached = GetCachedAttachmentUrl(chatId, attachmentId);\n                if (cached)\n                    return [2 /*return*/, cached];\n                key = cacheKey(chatId, attachmentId);\n                pending = inflightUrls.get(key);\n                if (pending)\n                    return [2 /*return*/, pending];\n                request = (function () { return __awaiter(_this, void 0, void 0, function () {\n                    var response, payload, url;\n                    var _a;\n                    return __generator(this, function (_b) {\n                        switch (_b.label) {\n                            case 0:\n                                _b.trys.push([0, , 3, 4]);\n                                return [4 /*yield*/, (0, api_requests_1.GetRequest)({\n                                        endpoint: \"/api/InChat/\".concat(chatId, \"/attachments/\").concat(attachmentId, \"/url\"),\n                                        baseAPIUrl: ctx.baseAPIUrl,\n                                        azureAuthenticationHeader: ctx.azureAuthenticationHeader,\n                                        organizationName: ctx.organizationName,\n                                        organizationId: ctx.organizationId,\n                                        headers: requestHeaders(ctx)\n                                    })];\n                            case 1:\n                                response = _b.sent();\n                                if (!response.ok)\n                                    return [2 /*return*/, null];\n                                return [4 /*yield*/, response.json()];\n                            case 2:\n                                payload = _b.sent();\n                                url = (_a = payload === null || payload === void 0 ? void 0 : payload.url) !== null && _a !== void 0 ? _a : null;\n                                if (url) {\n                                    urlCache.set(key, { url: url, expiresAt: Date.now() + URL_CACHE_TTL_MS });\n                                }\n                                return [2 /*return*/, url];\n                            case 3:\n                                inflightUrls.delete(key);\n                                return [7 /*endfinally*/];\n                            case 4: return [2 /*return*/];\n                        }\n                    });\n                }); })();\n                inflightUrls.set(key, request);\n                return [2 /*return*/, request];\n            });\n        });\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/chat-attachments.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/core.ts":
/*!***************************************!*\
  !*** ./src/bundle-src/shared/core.ts ***!
  \***************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! azure-devops-extension-sdk */ \"./node_modules/azure-devops-extension-sdk/SDK.min.js\"), __webpack_require__(/*! azure-devops-extension-api/WorkItemTracking */ \"./node_modules/azure-devops-extension-api/WorkItemTracking/index.js\"), __webpack_require__(/*! luxon */ \"./node_modules/luxon/build/node/luxon.js\"), __webpack_require__(/*! ./sdk-lifecycle */ \"./src/bundle-src/shared/sdk-lifecycle.ts\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, SDK, WorkItemTracking_1, luxon_1, sdk_lifecycle_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.NotifyLoad = NotifyLoad;\n    exports.ClosePanel = ClosePanel;\n    exports.GetAccountNameAsync = GetAccountNameAsync;\n    exports.GetAccountIdAsync = GetAccountIdAsync;\n    exports.GetAccountId = GetAccountId;\n    exports.GetAccountIdAfterInit = GetAccountIdAfterInit;\n    exports.GetUserEmail = GetUserEmail;\n    exports.GetUserDisplayName = GetUserDisplayName;\n    exports.GetUserId = GetUserId;\n    exports.GetCurrentProjectName = GetCurrentProjectName;\n    exports.GetCurrentProjectId = GetCurrentProjectId;\n    exports.GetCurrentProject = GetCurrentProject;\n    exports.GetAccessToken = GetAccessToken;\n    exports.GetExtensionConfig = GetExtensionConfig;\n    exports.escapeHtml = escapeHtml;\n    exports.sanitizeCssColor = sanitizeCssColor;\n    exports.buildQueuedByTooltipHtml = buildQueuedByTooltipHtml;\n    exports.buildReviewDetailsTooltipHtml = buildReviewDetailsTooltipHtml;\n    exports.getInitials = getInitials;\n    exports.formatHours = formatHours;\n    exports.openInNewTab = openInNewTab;\n    exports.NavigateToUrl = NavigateToUrl;\n    exports.Navigate = Navigate;\n    exports.changeTimeFormat = changeTimeFormat;\n    exports.convertUtcToLocal = convertUtcToLocal;\n    exports.convertLocalToUtc = convertLocalToUtc;\n    var extensionConfigCache = null;\n    var extensionConfigPromise = null;\n    function NotifyLoad() {\n        SDK.notifyLoadSucceeded();\n    }\n    function ClosePanel(closeArgs) {\n        var _a;\n        var panelConfig = SDK.getConfiguration();\n        (_a = panelConfig === null || panelConfig === void 0 ? void 0 : panelConfig.panel) === null || _a === void 0 ? void 0 : _a.close(closeArgs);\n    }\n    function GetAccountNameAsync() {\n        return __awaiter(this, void 0, void 0, function () {\n            var hostContext;\n            var _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _b.sent();\n                        hostContext = SDK.getHost();\n                        return [2 /*return*/, (_a = hostContext === null || hostContext === void 0 ? void 0 : hostContext.name) !== null && _a !== void 0 ? _a : \"\"];\n                }\n            });\n        });\n    }\n    function GetAccountIdAsync() {\n        return __awaiter(this, void 0, void 0, function () {\n            var hostContext;\n            var _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _b.sent();\n                        hostContext = SDK.getHost();\n                        return [2 /*return*/, (_a = hostContext === null || hostContext === void 0 ? void 0 : hostContext.id) !== null && _a !== void 0 ? _a : \"\"];\n                }\n            });\n        });\n    }\n    function GetAccountId() {\n        var _a;\n        var hostContext = SDK.getHost();\n        return (_a = hostContext === null || hostContext === void 0 ? void 0 : hostContext.id) !== null && _a !== void 0 ? _a : \"\";\n    }\n    function GetAccountIdAfterInit() {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [2 /*return*/, GetAccountId()];\n                }\n            });\n        });\n    }\n    function GetUserEmail() {\n        var user = SDK.getUser();\n        return (user === null || user === void 0 ? void 0 : user.name) || (user === null || user === void 0 ? void 0 : user.mailAddress) || \"\";\n    }\n    function GetUserDisplayName() {\n        var user = SDK.getUser();\n        return (user === null || user === void 0 ? void 0 : user.displayName) || (user === null || user === void 0 ? void 0 : user.name) || \"\";\n    }\n    function GetUserId() {\n        var user = SDK.getUser();\n        return (user === null || user === void 0 ? void 0 : user.id) || \"\";\n    }\n    function GetCurrentProjectName() {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, context;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [4 /*yield*/, SDK.getService(\"ms.vss-tfs-web.tfs-page-data-service\" /* CommonServiceIds.ProjectPageService */)];\n                    case 2:\n                        client = _a.sent();\n                        return [4 /*yield*/, client.getProject()];\n                    case 3:\n                        context = _a.sent();\n                        if (!context) {\n                            throw new Error(\"Project context is not available in the current page.\");\n                        }\n                        return [2 /*return*/, context.name];\n                }\n            });\n        });\n    }\n    function GetCurrentProjectId() {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, context;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [4 /*yield*/, SDK.getService(\"ms.vss-tfs-web.tfs-page-data-service\" /* CommonServiceIds.ProjectPageService */)];\n                    case 2:\n                        client = _a.sent();\n                        return [4 /*yield*/, client.getProject()];\n                    case 3:\n                        context = _a.sent();\n                        if (!context) {\n                            throw new Error(\"Project context is not available in the current page.\");\n                        }\n                        return [2 /*return*/, context.id];\n                }\n            });\n        });\n    }\n    function GetCurrentProject() {\n        return __awaiter(this, void 0, void 0, function () {\n            var client, context;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [4 /*yield*/, SDK.getService(\"ms.vss-tfs-web.tfs-page-data-service\" /* CommonServiceIds.ProjectPageService */)];\n                    case 2:\n                        client = _a.sent();\n                        return [4 /*yield*/, client.getProject()];\n                    case 3:\n                        context = _a.sent();\n                        if (!context) {\n                            throw new Error(\"Project context is not available in the current page.\");\n                        }\n                        return [2 /*return*/, { id: context.id, name: context.name }];\n                }\n            });\n        });\n    }\n    function GetAccessToken() {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [2 /*return*/, SDK.getAccessToken()];\n                }\n            });\n        });\n    }\n    var CONFIG_PATHS = [\n        \"../../config/config.json\",\n        \"../config/config.json\",\n        \"./config/config.json\",\n        \"../../../config/config.json\",\n    ];\n    function tryLoadConfigFromPath(configPath) {\n        return __awaiter(this, void 0, void 0, function () {\n            var response, _a, _b;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0:\n                        _c.trys.push([0, 5, , 6]);\n                        return [4 /*yield*/, fetch(configPath)];\n                    case 1:\n                        response = _c.sent();\n                        if (!response.ok) return [3 /*break*/, 3];\n                        return [4 /*yield*/, response.json()];\n                    case 2:\n                        _a = _c.sent();\n                        return [3 /*break*/, 4];\n                    case 3:\n                        _a = null;\n                        _c.label = 4;\n                    case 4: return [2 /*return*/, _a];\n                    case 5:\n                        _b = _c.sent();\n                        return [2 /*return*/, null];\n                    case 6: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function loadExtensionConfigFromKnownPaths() {\n        return __awaiter(this, void 0, void 0, function () {\n            var _i, CONFIG_PATHS_1, configPath, config;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        _i = 0, CONFIG_PATHS_1 = CONFIG_PATHS;\n                        _a.label = 1;\n                    case 1:\n                        if (!(_i < CONFIG_PATHS_1.length)) return [3 /*break*/, 4];\n                        configPath = CONFIG_PATHS_1[_i];\n                        return [4 /*yield*/, tryLoadConfigFromPath(configPath)];\n                    case 2:\n                        config = _a.sent();\n                        if (config) {\n                            return [2 /*return*/, config];\n                        }\n                        _a.label = 3;\n                    case 3:\n                        _i++;\n                        return [3 /*break*/, 1];\n                    case 4: throw new Error(\"Unable to load config.json from known paths.\");\n                }\n            });\n        });\n    }\n    function GetExtensionConfig() {\n        return __awaiter(this, arguments, void 0, function (forceRefresh) {\n            if (forceRefresh === void 0) { forceRefresh = false; }\n            return __generator(this, function (_a) {\n                if (forceRefresh) {\n                    extensionConfigCache = null;\n                    extensionConfigPromise = null;\n                }\n                if (extensionConfigCache) {\n                    return [2 /*return*/, extensionConfigCache];\n                }\n                if (!extensionConfigPromise) {\n                    extensionConfigPromise = (function () {\n                        return __awaiter(this, void 0, void 0, function () {\n                            var config;\n                            return __generator(this, function (_a) {\n                                switch (_a.label) {\n                                    case 0:\n                                        _a.trys.push([0, , 2, 3]);\n                                        return [4 /*yield*/, loadExtensionConfigFromKnownPaths()];\n                                    case 1:\n                                        config = _a.sent();\n                                        extensionConfigCache = config;\n                                        return [2 /*return*/, config];\n                                    case 2:\n                                        extensionConfigPromise = null;\n                                        return [7 /*endfinally*/];\n                                    case 3: return [2 /*return*/];\n                                }\n                            });\n                        });\n                    })();\n                }\n                return [2 /*return*/, extensionConfigPromise];\n            });\n        });\n    }\n    function escapeHtml(value) {\n        return (value !== null && value !== void 0 ? value : \"\")\n            .toString()\n            .replace(/&/g, \"&amp;\")\n            .replace(/</g, \"&lt;\")\n            .replace(/>/g, \"&gt;\")\n            .replace(/\"/g, \"&quot;\")\n            .replace(/'/g, \"&#39;\");\n    }\n    function sanitizeCssColor(value) {\n        var color = (value !== null && value !== void 0 ? value : \"\").toString().trim();\n        if (/^#[0-9a-f]{3,8}$/i.test(color)) {\n            return color;\n        }\n        if (/^(rgb|hsl)a?\\(\\s*[0-9.,%\\s/deg]+\\)$/i.test(color)) {\n            return color;\n        }\n        if (/^[a-z]{3,30}$/i.test(color)) {\n            return color;\n        }\n        return \"transparent\";\n    }\n    function buildQueuedByTooltipHtml(options) {\n        var safeDisplayName = escapeHtml(options.displayName || \"Unknown user\");\n        var safeEmail = escapeHtml(options.email || \"\");\n        var safeStatusCss = escapeHtml(options.statusCss || \"unknown\");\n        var safeStatusIcon = escapeHtml(options.statusIcon || \"bi-question-circle-fill\");\n        var tooltipBody = options.showEmail && safeEmail\n            ? \"<div class='queued-by-tooltip-name'><i class='bi bi-person-circle'></i><span>\".concat(safeDisplayName, \"</span></div><div class='queued-by-tooltip-email'>\").concat(safeEmail, \"</div>\")\n            : \"<div class='queued-by-tooltip-name'><i class='bi bi-person-circle'></i><span>\".concat(safeDisplayName, \"</span></div>\");\n        var tooltipStatusIcon = \"<i class='bi \".concat(safeStatusIcon, \" queued-by-tooltip-status-icon \").concat(safeStatusCss, \"'></i>\");\n        return \"<div class='queued-by-tooltip-content'><div class='queued-by-tooltip-header'><i class='bi bi-person-check-fill'></i><span>Queued by</span>\".concat(tooltipStatusIcon, \"</div>\").concat(tooltipBody, \"</div>\");\n    }\n    function buildReviewDetailsTooltipHtml(feedback) {\n        var rawText = (feedback !== null && feedback !== void 0 ? feedback : \"\").toString().trim();\n        var displayText = rawText || \"No review details available.\";\n        var safeText = escapeHtml(displayText).replace(/\\r?\\n/g, \"<br />\");\n        return \"<div class='review-details-tooltip-content'><div class='review-details-tooltip-header'><i class='bi bi-chat-left-text-fill'></i><span>Review details</span></div><div class='review-details-tooltip-body'>\".concat(safeText, \"</div></div>\");\n    }\n    function getInitials(email) {\n        if (!email || !email.trim()) {\n            return \"\";\n        }\n        var name = email.split(\"@\")[0];\n        return name\n            .split(/[.\\-_]/)\n            .map(function (word) { return word[0].toUpperCase(); })\n            .join(\"\");\n    }\n    function formatHours(decimalHours) {\n        var value = typeof decimalHours === \"string\" ? parseFloat(decimalHours) : decimalHours;\n        var safeValue = Number.isFinite(value) ? value : 0;\n        var hours = Math.floor(safeValue);\n        var minutes = Math.round((safeValue - hours) * 60);\n        return \"\".concat(hours, \" h\").concat(minutes > 0 ? \" \".concat(minutes, \" m\") : \"\");\n    }\n    function openInNewTab(url) {\n        return __awaiter(this, void 0, void 0, function () {\n            var resolvedUrl;\n            return __generator(this, function (_a) {\n                resolvedUrl = url;\n                if (!/^https?:\\/\\//i.test(resolvedUrl)) {\n                    resolvedUrl = \"https://\".concat(resolvedUrl);\n                }\n                window.open(resolvedUrl, \"_blank\", \"noopener,noreferrer\");\n                return [2 /*return*/];\n            });\n        });\n    }\n    function NavigateToUrl(newUrl) {\n        return __awaiter(this, void 0, void 0, function () {\n            var navService;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [4 /*yield*/, SDK.getService(\"ms.vss-features.host-navigation-service\" /* CommonServiceIds.HostNavigationService */)];\n                    case 2:\n                        navService = _a.sent();\n                        return [4 /*yield*/, navService.navigate(newUrl)];\n                    case 3:\n                        _a.sent();\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function Navigate(workItemId) {\n        return __awaiter(this, void 0, void 0, function () {\n            var dialogService;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, (0, sdk_lifecycle_1.ensureSdkReady)()];\n                    case 1:\n                        _a.sent();\n                        return [4 /*yield*/, SDK.getService(WorkItemTracking_1.WorkItemTrackingServiceIds.WorkItemFormNavigationService)];\n                    case 2:\n                        dialogService = _a.sent();\n                        dialogService.openWorkItem(workItemId);\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function changeTimeFormat(date) {\n        var hours = date.getHours();\n        var minutes = date.getMinutes();\n        var newformat = hours >= 12 ? \"PM\" : \"AM\";\n        hours = hours % 12;\n        hours = hours ? hours : 12;\n        minutes = minutes < 10 ? \"0\" + minutes : minutes;\n        return hours + \":\" + minutes + \" \" + newformat;\n    }\n    function convertUtcToLocal(utcInput) {\n        if (!utcInput)\n            return \"\";\n        var dt;\n        dt = luxon_1.DateTime.fromISO(utcInput, { zone: \"utc\" });\n        if (!dt.isValid) {\n            var possibleFormats = [\n                \"M/d/yyyy h:mm a\",\n                \"MM/dd/yyyy h:mm a\",\n                \"M/d/yyyy h:mm:ss a\",\n                \"MM/dd/yyyy h:mm:ss a\",\n                \"M/d/yyyy\",\n                \"MM/d/yyyy\",\n                \"MM/dd/yyyy\",\n                \"M/d/yyyy, HH:mm:ss\",\n                \"MM/dd/yyyy, HH:mm:ss\"\n            ];\n            for (var _i = 0, possibleFormats_1 = possibleFormats; _i < possibleFormats_1.length; _i++) {\n                var format = possibleFormats_1[_i];\n                dt = luxon_1.DateTime.fromFormat(utcInput, format, { zone: \"utc\" });\n                if (dt.isValid)\n                    break;\n            }\n        }\n        if (!dt || !dt.isValid) {\n            throw new Error(\"Invalid UTC date format\");\n        }\n        return dt.toLocal().toFormat(\"MM/dd/yyyy h:mm a\");\n    }\n    function convertLocalToUtc(localFormatted) {\n        var possibleFormats = [\n            \"M/d/yyyy h:mm a\",\n            \"MM/dd/yyyy h:mm a\",\n            \"M/d/yyyy hh:mm a\",\n            \"MM/dd/yyyy hh:mm a\",\n            \"M/d/yyyy h:mm:ss a\",\n            \"MM/dd/yyyy h:mm:ss a\",\n            \"M/d/yyyy hh:mm:ss a\",\n            \"MM/dd/yyyy hh:mm:ss a\",\n            \"M/d/yyyy\",\n            \"MM/d/yyyy\",\n            \"MM/dd/yyyy\",\n            \"M/d/yyyy, HH:mm:ss\",\n            \"MM/dd/yyyy, HH:mm:ss\"\n        ];\n        var dt;\n        for (var _i = 0, possibleFormats_2 = possibleFormats; _i < possibleFormats_2.length; _i++) {\n            var format = possibleFormats_2[_i];\n            dt = luxon_1.DateTime.fromFormat(localFormatted, format, { zone: \"local\" });\n            if (dt.isValid)\n                break;\n        }\n        if (!dt || !dt.isValid) {\n            throw new Error(\"Invalid date format\");\n        }\n        return dt.toUTC().toISO();\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/core.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/models.ts":
/*!*****************************************!*\
  !*** ./src/bundle-src/shared/models.ts ***!
  \*****************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.TimesheetReportingTemplate = exports.TimesheetReportingTemplateColumn = exports.WorkItemType = exports.WorkItemTypeState = void 0;\n    var WorkItemTypeState = /** @class */ (function () {\n        function WorkItemTypeState() {\n        }\n        return WorkItemTypeState;\n    }());\n    exports.WorkItemTypeState = WorkItemTypeState;\n    var WorkItemType = /** @class */ (function () {\n        function WorkItemType() {\n        }\n        return WorkItemType;\n    }());\n    exports.WorkItemType = WorkItemType;\n    var TimesheetReportingTemplateColumn = /** @class */ (function () {\n        function TimesheetReportingTemplateColumn() {\n        }\n        return TimesheetReportingTemplateColumn;\n    }());\n    exports.TimesheetReportingTemplateColumn = TimesheetReportingTemplateColumn;\n    var TimesheetReportingTemplate = /** @class */ (function () {\n        function TimesheetReportingTemplate() {\n        }\n        return TimesheetReportingTemplate;\n    }());\n    exports.TimesheetReportingTemplate = TimesheetReportingTemplate;\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/models.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/sdk-lifecycle.ts":
/*!************************************************!*\
  !*** ./src/bundle-src/shared/sdk-lifecycle.ts ***!
  \************************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! azure-devops-extension-sdk */ \"./node_modules/azure-devops-extension-sdk/SDK.min.js\"), __webpack_require__(/*! ./theme */ \"./src/bundle-src/shared/theme.ts\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, SDK, theme_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.initializeSdk = initializeSdk;\n    exports.ensureSdkReady = ensureSdkReady;\n    var sdkInitPromise = null;\n    function initializeSdk(options) {\n        if (!sdkInitPromise) {\n            // Subscribe before init() so the SDK's first applyTheme() is not missed.\n            (0, theme_1.watchTheme)();\n            sdkInitPromise = Promise.resolve(SDK.init(options));\n        }\n        return sdkInitPromise;\n    }\n    function ensureSdkReady() {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, initializeSdk()];\n                    case 1:\n                        _a.sent();\n                        return [4 /*yield*/, SDK.ready()];\n                    case 2:\n                        _a.sent();\n                        (0, theme_1.syncTheme)();\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/sdk-lifecycle.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/swal.ts":
/*!***************************************!*\
  !*** ./src/bundle-src/shared/swal.ts ***!
  \***************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! sweetalert2 */ \"./node_modules/sweetalert2/dist/sweetalert2.all.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, sweetalert2_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.showInputDialog = showInputDialog;\n    exports.showConfirmDialog = showConfirmDialog;\n    exports.showAlertDialog = showAlertDialog;\n    exports.showLoadingDialog = showLoadingDialog;\n    exports.showCustomDialog = showCustomDialog;\n    exports.showValidationMessage = showValidationMessage;\n    function showInputDialog(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            var value;\n            var _a, _b, _c;\n            return __generator(this, function (_d) {\n                switch (_d.label) {\n                    case 0: return [4 /*yield*/, sweetalert2_1.default.fire({\n                            title: options.title,\n                            input: \"text\",\n                            inputLabel: options.inputLabel,\n                            inputValue: (_a = options.inputValue) !== null && _a !== void 0 ? _a : \"\",\n                            showCancelButton: true,\n                            confirmButtonText: (_b = options.confirmButtonText) !== null && _b !== void 0 ? _b : \"Save\",\n                            cancelButtonText: (_c = options.cancelButtonText) !== null && _c !== void 0 ? _c : \"Cancel\",\n                            inputValidator: options.validator\n                                ? function (value) { return options.validator(value); }\n                                : undefined,\n                        })];\n                    case 1:\n                        value = (_d.sent()).value;\n                        return [2 /*return*/, value !== null && value !== void 0 ? value : null];\n                }\n            });\n        });\n    }\n    function showConfirmDialog(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            var result;\n            var _a, _b;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0: return [4 /*yield*/, sweetalert2_1.default.fire({\n                            title: \"\",\n                            text: options.text,\n                            showCancelButton: true,\n                            confirmButtonColor: \"#0078d4\",\n                            cancelButtonColor: \"#8f8f8f\",\n                            confirmButtonText: (_a = options.confirmButtonText) !== null && _a !== void 0 ? _a : \"Yes\",\n                            cancelButtonText: (_b = options.cancelButtonText) !== null && _b !== void 0 ? _b : \"No\",\n                        })];\n                    case 1:\n                        result = _c.sent();\n                        return [2 /*return*/, result.isConfirmed];\n                }\n            });\n        });\n    }\n    function showAlertDialog(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, sweetalert2_1.default.fire({\n                            title: options.title,\n                            text: options.text,\n                            icon: options.icon,\n                            target: options.target\n                        })];\n                    case 1:\n                        _a.sent();\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function showLoadingDialog(options) {\n        sweetalert2_1.default.fire({\n            title: options.title,\n            text: options.text,\n            html: options.html,\n            allowOutsideClick: false,\n            target: options.target,\n            didOpen: function () {\n                sweetalert2_1.default.showLoading();\n            }\n        });\n    }\n    function showCustomDialog(options) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                return [2 /*return*/, sweetalert2_1.default.fire(options)];\n            });\n        });\n    }\n    function showValidationMessage(message) {\n        sweetalert2_1.default.showValidationMessage(message);\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/swal.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/theme.ts":
/*!****************************************!*\
  !*** ./src/bundle-src/shared/theme.ts ***!
  \****************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Bridges the Azure DevOps host theme onto the extension's pages.\n *\n * The SDK's applyTheme() publishes the host palette as CSS variables on :root\n * and then forces `body { color: var(--text-primary-color) }`. It never touches\n * any background, so on the dark theme the text turns white while Bootstrap and\n * our own stylesheets keep painting light surfaces. Marking the document lets\n * theme.css swap those surfaces, and handing Bootstrap `data-bs-theme` gets us\n * color-scheme, form controls and close buttons for free.\n */\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.syncTheme = syncTheme;\n    exports.watchTheme = watchTheme;\n    function parseColor(value) {\n        var raw = value.trim();\n        if (!raw) {\n            return null;\n        }\n        var hex = raw.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);\n        if (hex) {\n            var digits = hex[1].length === 3\n                ? hex[1].replace(/./g, function (c) { return c + c; })\n                : hex[1];\n            return [\n                parseInt(digits.slice(0, 2), 16),\n                parseInt(digits.slice(2, 4), 16),\n                parseInt(digits.slice(4, 6), 16)\n            ];\n        }\n        // Covers rgb()/rgba() as well as the bare \"r, g, b\" triplets that the\n        // --palette-* variables are published as.\n        var parts = raw\n            .replace(/^rgba?\\(/i, \"\")\n            .replace(/\\)$/, \"\")\n            .split(/[,\\s/]+/)\n            .map(parseFloat)\n            .filter(function (n) { return !isNaN(n); });\n        return parts.length >= 3 ? [parts[0], parts[1], parts[2]] : null;\n    }\n    function isDarkColor(_a) {\n        var r = _a[0], g = _a[1], b = _a[2];\n        var channels = [r, g, b].map(function (c) {\n            var n = c / 255;\n            return n <= 0.03928 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4);\n        });\n        var luminance = 0.2126 * channels[0] + 0.7152 * channels[1] + 0.0722 * channels[2];\n        return luminance < 0.5;\n    }\n    function detectDark() {\n        var styles = getComputedStyle(document.documentElement);\n        var background = parseColor(styles.getPropertyValue(\"--background-color\"));\n        if (background) {\n            return isDarkColor(background);\n        }\n        // No background published yet - infer from the text colour the SDK forces\n        // onto body, which is the variable that causes the bug in the first place.\n        var text = parseColor(styles.getPropertyValue(\"--text-primary-color\"));\n        if (text) {\n            return !isDarkColor(text);\n        }\n        return null;\n    }\n    function syncTheme() {\n        var dark = detectDark();\n        if (dark === null) {\n            return;\n        }\n        var root = document.documentElement;\n        var theme = dark ? \"dark\" : \"light\";\n        root.setAttribute(\"data-da-theme\", theme);\n        root.setAttribute(\"data-bs-theme\", theme);\n    }\n    var watching = false;\n    function watchTheme() {\n        if (watching) {\n            return;\n        }\n        watching = true;\n        // Fired by the SDK after every applyTheme(), so it covers both the initial\n        // handshake and a theme switch made while the page is open.\n        window.addEventListener(\"themeApplied\", function () { return syncTheme(); });\n        syncTheme();\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/theme.ts?\n}");

/***/ }),

/***/ "./src/bundle-src/shared/toast.ts":
/*!****************************************!*\
  !*** ./src/bundle-src/shared/toast.ts ***!
  \****************************************/
/***/ (function(module, exports, __webpack_require__) {

eval("{var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __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 __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! sweetalert2 */ \"./node_modules/sweetalert2/dist/sweetalert2.all.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, sweetalert2_1) {\n    \"use strict\";\n    Object.defineProperty(exports, \"__esModule\", ({ value: true }));\n    exports.ShowToast = ShowToast;\n    function ShowToast(icon, message) {\n        return __awaiter(this, void 0, void 0, function () {\n            var iconColorByType, toast;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        iconColorByType = {\n                            success: \"#107c10\",\n                            warning: \"#d08000\",\n                            error: \"#a4262c\"\n                        };\n                        toast = sweetalert2_1.default.mixin({\n                            toast: true,\n                            position: \"top-end\",\n                            showConfirmButton: false,\n                            timer: 3200,\n                            timerProgressBar: true,\n                            width: 420,\n                            padding: \"0.6rem 0.85rem\",\n                            iconColor: iconColorByType[icon],\n                            backdrop: false,\n                            customClass: {\n                                popup: \"doa-toast-popup\",\n                                title: \"doa-toast-title\"\n                            },\n                            didOpen: function (el) {\n                                el.addEventListener(\"mouseenter\", sweetalert2_1.default.stopTimer);\n                                el.addEventListener(\"mouseleave\", sweetalert2_1.default.resumeTimer);\n                                // CSS variables so the toast follows the host theme instead of a\n                                // hardcoded light palette (theme.css forces .swal2-title's color,\n                                // so the background must track it or the text goes invisible).\n                                el.style.borderRadius = \"10px\";\n                                el.style.boxShadow = \"0 10px 24px rgba(0, 0, 0, 0.12)\";\n                                el.style.border = \"1px solid var(--da-border-strong, rgba(0, 0, 0, 0.08))\";\n                                el.style.background = \"var(--da-surface-raised, #ffffff)\";\n                                el.style.color = \"var(--da-text, #323130)\";\n                            }\n                        });\n                        return [4 /*yield*/, toast.fire({\n                                icon: icon,\n                                title: message\n                            })];\n                    case 1:\n                        _a.sent();\n                        return [2 /*return*/];\n                }\n            });\n        });\n    }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack://IndexLibrary/./src/bundle-src/shared/toast.ts?\n}");

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module is referenced by other modules so it can't be inlined
/******/ 	var __webpack_exports__ = __webpack_require__("./src/bundle-src/index.ts");
/******/ 	
/******/ 	return __webpack_exports__;
/******/ })()
;
});