blob: 56b018654913865c9e475518ecffce098cfe8177 [file] [log] [blame]
{"version":3,"sources":["packages/common/common-http.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","common","http","core","rxjs","operators","this","HttpHandler","HttpBackend","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","prototype","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","HttpHeaders","headers","_this","normalizedNames","Map","lazyUpdate","lazyInit","split","forEach","line","index","indexOf","name","slice","key","toLowerCase","trim","maybeSetNormalizedName","has","get","set","keys","values","length","init","from","getAll","append","clone","op","delete","lcName","copyFrom","update","applyUpdate","other","concat","base","undefined","apply","__spread","arguments","toDelete_1","existing","filter","fn","HttpUrlEncodingCodec","encodeKey","standardEncoding","encodeValue","decodeKey","decodeURIComponent","decodeValue","v","encodeURIComponent","replace","HttpParams","options","updates","cloneFrom","encoder","fromString","fromObject","Error","map","paramParser","rawParams","codec","param","eqIdx","_a","val","list","isArray","res","appendAll","params","_value","toString","eKey","join","base_1","idx","splice","isArrayBuffer","ArrayBuffer","isBlob","Blob","isFormData","FormData","HttpEventType","HttpRequest","method","url","third","fourth","body","reportProgress","withCredentials","responseType","toUpperCase","mightHaveBody","urlWithParams","qIdx","serializeBody","JSON","stringify","detectContentTypeHeader","type","setHeaders","reduce","setParams","HttpResponseBase","HttpHeaderResponse","_super","ResponseHeader","status","statusText","defaultStatus","defaultStatusText","ok","HttpResponse","Response","HttpErrorResponse","message","addBody","observe","HttpClient","handler","request","first","req","events$","of","pipe","concatMap","handle","res$","event","head","jsonp","callbackParam","patch","post","put","decorators","Injectable","ctorParameters","HttpInterceptorHandler","interceptor","intercept","HTTP_INTERCEPTORS","InjectionToken","NoopInterceptor","nextRequestId","JsonpCallbackContext","JsonpClientBackend","callbackMap","document","resolvedPromise","Promise","resolve","nextCallback","Observable","observer","callback","node","createElement","src","finished","cancelled","data","cleanup","parentNode","removeChild","onLoad","then","complete","onError","addEventListener","appendChild","Sent","removeEventListener","Inject","args","DOCUMENT","JsonpInterceptor","XSSI_PREFIX","XhrFactory","BrowserXhr","build","XMLHttpRequest","HttpXhrBackend","xhrFactory","xhr","open","setRequestHeader","detectedType","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","getResponseUrl","responseURL","test","getResponseHeader","response","responseText","originalBody","parse","text","sentHeaders","onDownProgress","progressEvent","DownloadProgress","loaded","lengthComputable","total","partialText","onUpProgress","progress","UploadProgress","upload","send","readyState","DONE","abort","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","doc","platform","cookieName","lastCookieString","lastToken","parseCount","getToken","cookieString","cookie","ɵparseCookieValue","String","PLATFORM_ID","HttpXsrfInterceptor","tokenService","headerName","lcUrl","startsWith","token","HttpInterceptingHandler","backend","injector","chain","interceptors","reduceRight","jsonpCallbackContext","window","Injector","HttpClientModule","HttpClientJsonpModule","HttpClientXsrfModule","disable","ngModule","providers","provide","useClass","withOptions","useValue","NgModule","useExisting","multi","imports","useFactory","ɵHttpInterceptingHandler","ɵangular_packages_common_http_http_a","ɵangular_packages_common_http_http_b","ɵangular_packages_common_http_http_c","ɵangular_packages_common_http_http_d","ɵangular_packages_common_http_http_e","ɵangular_packages_common_http_http_f","ɵangular_packages_common_http_http_g","ɵangular_packages_common_http_http_h","defineProperty"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,QAASA,QAAQ,kBAAmBA,QAAQ,oBAC5I,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,uBAAwB,CAAC,UAAW,gBAAiB,OAAQ,iBAAkB,mBAAoBJ,GAC7HA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,OAAST,EAAOQ,GAAGC,QAAU,GAAIT,EAAOQ,GAAGC,OAAOC,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,qCAAuCnD,EAC/CjR,EAAQqU,qCAAuClD,EAC/CnR,EAAQsU,qCAAuCtC,EAE/C9Q,OAAOqT,eAAevU,EAAS,aAAc,CAAE2C,OAAO","sourcesContent":["/**\n * @license Angular v11.2.14\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :\n typeof define === 'function' && define.amd ? define('@angular/common/http', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.common = global.ng.common || {}, global.ng.common.http = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.ng.common));\n}(this, (function (exports, core, rxjs, operators, common) { 'use strict';\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * @publicApi\n */\n var HttpHandler = /** @class */ (function () {\n function HttpHandler() {\n }\n return HttpHandler;\n }());\n /**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * @publicApi\n */\n var HttpBackend = /** @class */ (function () {\n function HttpBackend() {\n }\n return HttpBackend;\n }());\n\n /*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */\n /* global Reflect, Promise */\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b)\n if (b.hasOwnProperty(p))\n d[p] = b[p]; };\n return extendStatics(d, b);\n };\n function __extends(d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n }\n var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n function __rest(s, e) {\n var t = {};\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n }\n function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n }\n function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(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 {\n step(generator.next(value));\n }\n catch (e) {\n reject(e);\n } }\n function rejected(value) { try {\n step(generator[\"throw\"](value));\n }\n catch (e) {\n reject(e);\n } }\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 }\n function __generator(thisArg, body) {\n var _ = { label: 0, sent: function () { if (t[0] & 1)\n throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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)\n throw new TypeError(\"Generator is already executing.\");\n while (_)\n 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)\n return t;\n if (y = 0, t)\n op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return { value: op[1], done: false };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2])\n _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n }\n catch (e) {\n op = [6, e];\n y = 0;\n }\n finally {\n f = t = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n var __createBinding = Object.create ? (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });\n }) : (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n o[k2] = m[k];\n });\n function __exportStar(m, exports) {\n for (var p in m)\n if (p !== \"default\" && !exports.hasOwnProperty(p))\n __createBinding(exports, m, p);\n }\n function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m)\n return m.call(o);\n if (o && typeof o.length === \"number\")\n return {\n next: function () {\n if (o && i >= o.length)\n o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m)\n return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done)\n ar.push(r.value);\n }\n catch (error) {\n e = { error: error };\n }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"]))\n m.call(i);\n }\n finally {\n if (e)\n throw e.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n }\n function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n }\n ;\n function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n])\n i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try {\n step(g[n](v));\n }\n catch (e) {\n settle(q[0][3], e);\n } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length)\n resume(q[0][0], q[0][1]); }\n }\n function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n }\n function __asyncValues(o) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n }\n else {\n cooked.raw = raw;\n }\n return cooked;\n }\n ;\n var __setModuleDefault = Object.create ? (function (o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n }) : function (o, v) {\n o[\"default\"] = v;\n };\n function __importStar(mod) {\n if (mod && mod.__esModule)\n return mod;\n var result = {};\n if (mod != null)\n for (var k in mod)\n if (Object.hasOwnProperty.call(mod, k))\n __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n }\n function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n }\n function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Represents the header configuration options for an HTTP request.\n * Instances are immutable. Modifying methods return a cloned\n * instance with the change. The original object is never changed.\n *\n * @publicApi\n */\n var HttpHeaders = /** @class */ (function () {\n /** Constructs a new HTTP header object with the given values.*/\n function HttpHeaders(headers) {\n var _this = this;\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\n this.normalizedNames = new Map();\n /**\n * Queued updates to be materialized the next initialization.\n */\n this.lazyUpdate = null;\n if (!headers) {\n this.headers = new Map();\n }\n else if (typeof headers === 'string') {\n this.lazyInit = function () {\n _this.headers = new Map();\n headers.split('\\n').forEach(function (line) {\n var index = line.indexOf(':');\n if (index > 0) {\n var name = line.slice(0, index);\n var key = name.toLowerCase();\n var value = line.slice(index + 1).trim();\n _this.maybeSetNormalizedName(name, key);\n if (_this.headers.has(key)) {\n _this.headers.get(key).push(value);\n }\n else {\n _this.headers.set(key, [value]);\n }\n }\n });\n };\n }\n else {\n this.lazyInit = function () {\n _this.headers = new Map();\n Object.keys(headers).forEach(function (name) {\n var values = headers[name];\n var key = name.toLowerCase();\n if (typeof values === 'string') {\n values = [values];\n }\n if (values.length > 0) {\n _this.headers.set(key, values);\n _this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n /**\n * Checks for existence of a given header.\n *\n * @param name The header name to check for existence.\n *\n * @returns True if the header exists, false otherwise.\n */\n HttpHeaders.prototype.has = function (name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n };\n /**\n * Retrieves the first value of a given header.\n *\n * @param name The header name.\n *\n * @returns The value string if the header exists, null otherwise\n */\n HttpHeaders.prototype.get = function (name) {\n this.init();\n var values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n };\n /**\n * Retrieves the names of the headers.\n *\n * @returns A list of header names.\n */\n HttpHeaders.prototype.keys = function () {\n this.init();\n return Array.from(this.normalizedNames.values());\n };\n /**\n * Retrieves a list of values for a given header.\n *\n * @param name The header name from which to retrieve values.\n *\n * @returns A string of values if the header exists, null otherwise.\n */\n HttpHeaders.prototype.getAll = function (name) {\n this.init();\n return this.headers.get(name.toLowerCase()) || null;\n };\n /**\n * Appends a new value to the existing set of values for a header\n * and returns them in a clone of the original instance.\n *\n * @param name The header name for which to append the values.\n * @param value The value to append.\n *\n * @returns A clone of the HTTP headers object with the value appended to the given header.\n */\n HttpHeaders.prototype.append = function (name, value) {\n return this.clone({ name: name, value: value, op: 'a' });\n };\n /**\n * Sets or modifies a value for a given header in a clone of the original instance.\n * If the header already exists, its value is replaced with the given value\n * in the returned object.\n *\n * @param name The header name.\n * @param value The value or values to set or overide for the given header.\n *\n * @returns A clone of the HTTP headers object with the newly set header value.\n */\n HttpHeaders.prototype.set = function (name, value) {\n return this.clone({ name: name, value: value, op: 's' });\n };\n /**\n * Deletes values for a given header in a clone of the original instance.\n *\n * @param name The header name.\n * @param value The value or values to delete for the given header.\n *\n * @returns A clone of the HTTP headers object with the given value deleted.\n */\n HttpHeaders.prototype.delete = function (name, value) {\n return this.clone({ name: name, value: value, op: 'd' });\n };\n HttpHeaders.prototype.maybeSetNormalizedName = function (name, lcName) {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n };\n HttpHeaders.prototype.init = function () {\n var _this = this;\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n }\n else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(function (update) { return _this.applyUpdate(update); });\n this.lazyUpdate = null;\n }\n }\n };\n HttpHeaders.prototype.copyFrom = function (other) {\n var _this = this;\n other.init();\n Array.from(other.headers.keys()).forEach(function (key) {\n _this.headers.set(key, other.headers.get(key));\n _this.normalizedNames.set(key, other.normalizedNames.get(key));\n });\n };\n HttpHeaders.prototype.clone = function (update) {\n var clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n };\n HttpHeaders.prototype.applyUpdate = function (update) {\n var key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n var value = update.value;\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n var base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push.apply(base, __spread(value));\n this.headers.set(key, base);\n break;\n case 'd':\n var toDelete_1 = update.value;\n if (!toDelete_1) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n var existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(function (value) { return toDelete_1.indexOf(value) === -1; });\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n };\n /**\n * @internal\n */\n HttpHeaders.prototype.forEach = function (fn) {\n var _this = this;\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(function (key) { return fn(_this.normalizedNames.get(key), _this.headers.get(key)); });\n };\n return HttpHeaders;\n }());\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Provides encoding and decoding of URL parameter and query-string values.\n *\n * Serializes and parses URL parameter keys and values to encode and decode them.\n * If you pass URL query parameters without encoding,\n * the query parameters can be misinterpreted at the receiving end.\n *\n *\n * @publicApi\n */\n var HttpUrlEncodingCodec = /** @class */ (function () {\n function HttpUrlEncodingCodec() {\n }\n /**\n * Encodes a key name for a URL parameter or query-string.\n * @param key The key name.\n * @returns The encoded key name.\n */\n HttpUrlEncodingCodec.prototype.encodeKey = function (key) {\n return standardEncoding(key);\n };\n /**\n * Encodes the value of a URL parameter or query-string.\n * @param value The value.\n * @returns The encoded value.\n */\n HttpUrlEncodingCodec.prototype.encodeValue = function (value) {\n return standardEncoding(value);\n };\n /**\n * Decodes an encoded URL parameter or query-string key.\n * @param key The encoded key name.\n * @returns The decoded key name.\n */\n HttpUrlEncodingCodec.prototype.decodeKey = function (key) {\n return decodeURIComponent(key);\n };\n /**\n * Decodes an encoded URL parameter or query-string value.\n * @param value The encoded value.\n * @returns The decoded value.\n */\n HttpUrlEncodingCodec.prototype.decodeValue = function (value) {\n return decodeURIComponent(value);\n };\n return HttpUrlEncodingCodec;\n }());\n function paramParser(rawParams, codec) {\n var map = new Map();\n if (rawParams.length > 0) {\n // The `window.location.search` can be used while creating an instance of the `HttpParams` class\n // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`\n // may start with the `?` char, so we strip it if it's present.\n var params = rawParams.replace(/^\\?/, '').split('&');\n params.forEach(function (param) {\n var eqIdx = param.indexOf('=');\n var _a = __read(eqIdx == -1 ?\n [codec.decodeKey(param), ''] :\n [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))], 2), key = _a[0], val = _a[1];\n var list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n }\n function standardEncoding(v) {\n return encodeURIComponent(v)\n .replace(/%40/gi, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/gi, '$')\n .replace(/%2C/gi, ',')\n .replace(/%3B/gi, ';')\n .replace(/%2B/gi, '+')\n .replace(/%3D/gi, '=')\n .replace(/%3F/gi, '?')\n .replace(/%2F/gi, '/');\n }\n /**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable; all mutation operations return a new instance.\n *\n * @publicApi\n */\n var HttpParams = /** @class */ (function () {\n function HttpParams(options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this.updates = null;\n this.cloneFrom = null;\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n if (!!options.fromString) {\n if (!!options.fromObject) {\n throw new Error(\"Cannot specify both fromString and fromObject.\");\n }\n this.map = paramParser(options.fromString, this.encoder);\n }\n else if (!!options.fromObject) {\n this.map = new Map();\n Object.keys(options.fromObject).forEach(function (key) {\n var value = options.fromObject[key];\n _this.map.set(key, Array.isArray(value) ? value : [value]);\n });\n }\n else {\n this.map = null;\n }\n }\n /**\n * Reports whether the body includes one or more values for a given parameter.\n * @param param The parameter name.\n * @returns True if the parameter has one or more values,\n * false if it has no value or is not present.\n */\n HttpParams.prototype.has = function (param) {\n this.init();\n return this.map.has(param);\n };\n /**\n * Retrieves the first value for a parameter.\n * @param param The parameter name.\n * @returns The first value of the given parameter,\n * or `null` if the parameter is not present.\n */\n HttpParams.prototype.get = function (param) {\n this.init();\n var res = this.map.get(param);\n return !!res ? res[0] : null;\n };\n /**\n * Retrieves all values for a parameter.\n * @param param The parameter name.\n * @returns All values in a string array,\n * or `null` if the parameter not present.\n */\n HttpParams.prototype.getAll = function (param) {\n this.init();\n return this.map.get(param) || null;\n };\n /**\n * Retrieves all the parameters for this body.\n * @returns The parameter names in a string array.\n */\n HttpParams.prototype.keys = function () {\n this.init();\n return Array.from(this.map.keys());\n };\n /**\n * Appends a new value to existing values for a parameter.\n * @param param The parameter name.\n * @param value The new value to add.\n * @return A new body with the appended value.\n */\n HttpParams.prototype.append = function (param, value) {\n return this.clone({ param: param, value: value, op: 'a' });\n };\n /**\n * Constructs a new body with appended values for the given parameter name.\n * @param params parameters and values\n * @return A new body with the new value.\n */\n HttpParams.prototype.appendAll = function (params) {\n var updates = [];\n Object.keys(params).forEach(function (param) {\n var value = params[param];\n if (Array.isArray(value)) {\n value.forEach(function (_value) {\n updates.push({ param: param, value: _value, op: 'a' });\n });\n }\n else {\n updates.push({ param: param, value: value, op: 'a' });\n }\n });\n return this.clone(updates);\n };\n /**\n * Replaces the value for a parameter.\n * @param param The parameter name.\n * @param value The new value.\n * @return A new body with the new value.\n */\n HttpParams.prototype.set = function (param, value) {\n return this.clone({ param: param, value: value, op: 's' });\n };\n /**\n * Removes a given value or all values from a parameter.\n * @param param The parameter name.\n * @param value The value to remove, if provided.\n * @return A new body with the given value removed, or with all values\n * removed if no value is specified.\n */\n HttpParams.prototype.delete = function (param, value) {\n return this.clone({ param: param, value: value, op: 'd' });\n };\n /**\n * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n HttpParams.prototype.toString = function () {\n var _this = this;\n this.init();\n return this.keys()\n .map(function (key) {\n var eKey = _this.encoder.encodeKey(key);\n // `a: ['1']` produces `'a=1'`\n // `b: []` produces `''`\n // `c: ['1', '2']` produces `'c=1&c=2'`\n return _this.map.get(key).map(function (value) { return eKey + '=' + _this.encoder.encodeValue(value); })\n .join('&');\n })\n // filter out empty values because `b: []` produces `''`\n // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't\n .filter(function (param) { return param !== ''; })\n .join('&');\n };\n HttpParams.prototype.clone = function (update) {\n var clone = new HttpParams({ encoder: this.encoder });\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat(update);\n return clone;\n };\n HttpParams.prototype.init = function () {\n var _this = this;\n if (this.map === null) {\n this.map = new Map();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach(function (key) { return _this.map.set(key, _this.cloneFrom.map.get(key)); });\n this.updates.forEach(function (update) {\n switch (update.op) {\n case 'a':\n case 's':\n var base = (update.op === 'a' ? _this.map.get(update.param) : undefined) || [];\n base.push(update.value);\n _this.map.set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n var base_1 = _this.map.get(update.param) || [];\n var idx = base_1.indexOf(update.value);\n if (idx !== -1) {\n base_1.splice(idx, 1);\n }\n if (base_1.length > 0) {\n _this.map.set(update.param, base_1);\n }\n else {\n _this.map.delete(update.param);\n }\n }\n else {\n _this.map.delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = this.updates = null;\n }\n };\n return HttpParams;\n }());\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Determine whether the given HTTP method may include a body.\n */\n function mightHaveBody(method) {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n }\n /**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\n function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n }\n /**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\n function isBlob(value) {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n }\n /**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\n function isFormData(value) {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n }\n /**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * @publicApi\n */\n var HttpRequest = /** @class */ (function () {\n function HttpRequest(method, url, third, fourth) {\n this.url = url;\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\n this.body = null;\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n */\n this.reportProgress = false;\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\n this.withCredentials = false;\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\n this.responseType = 'json';\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n var options;\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = (third !== undefined) ? third : null;\n options = fourth;\n }\n else {\n // No body required, options are the third argument. The body stays null.\n options = third;\n }\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n if (!!options.params) {\n this.params = options.params;\n }\n }\n // If no headers have been passed in, construct a new HttpHeaders instance.\n if (!this.headers) {\n this.headers = new HttpHeaders();\n }\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n }\n else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n var params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n }\n else {\n // Does the URL already have query parameters? Look for '?'.\n var qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n var sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n this.urlWithParams = url + sep + params;\n }\n }\n }\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n HttpRequest.prototype.serializeBody = function () {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n };\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n HttpRequest.prototype.detectContentTypeHeader = function () {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, boolean and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n typeof this.body === 'boolean') {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n };\n HttpRequest.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n var method = update.method || this.method;\n var url = update.url || this.url;\n var responseType = update.responseType || this.responseType;\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n var body = (update.body !== undefined) ? update.body : this.body;\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n var withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n var reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n var headers = update.headers || this.headers;\n var params = update.params || this.params;\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers =\n Object.keys(update.setHeaders)\n .reduce(function (headers, name) { return headers.set(name, update.setHeaders[name]); }, headers);\n }\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams)\n .reduce(function (params, param) { return params.set(param, update.setParams[param]); }, params);\n }\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(method, url, body, {\n params: params,\n headers: headers,\n reportProgress: reportProgress,\n responseType: responseType,\n withCredentials: withCredentials,\n });\n };\n return HttpRequest;\n }());\n\n (function (HttpEventType) {\n /**\n * The request was sent out over the wire.\n */\n HttpEventType[HttpEventType[\"Sent\"] = 0] = \"Sent\";\n /**\n * An upload progress event was received.\n */\n HttpEventType[HttpEventType[\"UploadProgress\"] = 1] = \"UploadProgress\";\n /**\n * The response status code and headers were received.\n */\n HttpEventType[HttpEventType[\"ResponseHeader\"] = 2] = \"ResponseHeader\";\n /**\n * A download progress event was received.\n */\n HttpEventType[HttpEventType[\"DownloadProgress\"] = 3] = \"DownloadProgress\";\n /**\n * The full response including the body was received.\n */\n HttpEventType[HttpEventType[\"Response\"] = 4] = \"Response\";\n /**\n * A custom event from an interceptor or a backend.\n */\n HttpEventType[HttpEventType[\"User\"] = 5] = \"User\";\n })(exports.HttpEventType || (exports.HttpEventType = {}));\n /**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * @publicApi\n */\n var HttpResponseBase = /** @class */ (function () {\n /**\n * Super-constructor for all responses.\n *\n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n */\n function HttpResponseBase(init, defaultStatus, defaultStatusText) {\n if (defaultStatus === void 0) { defaultStatus = 200; }\n if (defaultStatusText === void 0) { defaultStatusText = 'OK'; }\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n return HttpResponseBase;\n }());\n /**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * @publicApi\n */\n var HttpHeaderResponse = /** @class */ (function (_super) {\n __extends(HttpHeaderResponse, _super);\n /**\n * Create a new `HttpHeaderResponse` with the given parameters.\n */\n function HttpHeaderResponse(init) {\n if (init === void 0) { init = {}; }\n var _this = _super.call(this, init) || this;\n _this.type = exports.HttpEventType.ResponseHeader;\n return _this;\n }\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n HttpHeaderResponse.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n };\n return HttpHeaderResponse;\n }(HttpResponseBase));\n /**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * @publicApi\n */\n var HttpResponse = /** @class */ (function (_super) {\n __extends(HttpResponse, _super);\n /**\n * Construct a new `HttpResponse`.\n */\n function HttpResponse(init) {\n if (init === void 0) { init = {}; }\n var _this = _super.call(this, init) || this;\n _this.type = exports.HttpEventType.Response;\n _this.body = init.body !== undefined ? init.body : null;\n return _this;\n }\n HttpResponse.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n return new HttpResponse({\n body: (update.body !== undefined) ? update.body : this.body,\n headers: update.headers || this.headers,\n status: (update.status !== undefined) ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n };\n return HttpResponse;\n }(HttpResponseBase));\n /**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * @publicApi\n */\n var HttpErrorResponse = /** @class */ (function (_super) {\n __extends(HttpErrorResponse, _super);\n function HttpErrorResponse(init) {\n var _this = \n // Initialize with a default status of 0 / Unknown Error.\n _super.call(this, init, 0, 'Unknown Error') || this;\n _this.name = 'HttpErrorResponse';\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\n _this.ok = false;\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (_this.status >= 200 && _this.status < 300) {\n _this.message = \"Http failure during parsing for \" + (init.url || '(unknown url)');\n }\n else {\n _this.message = \"Http failure response for \" + (init.url || '(unknown url)') + \": \" + init.status + \" \" + init.statusText;\n }\n _this.error = init.error || null;\n return _this;\n }\n return HttpErrorResponse;\n }(HttpResponseBase));\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. This function clones the object and adds the body.\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n *\n */\n function addBody(options, body) {\n return {\n body: body,\n headers: options.headers,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n };\n }\n /**\n * Performs HTTP requests.\n * This service is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies based on\n * the signature that is called (mainly the values of `observe` and `responseType`).\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n\n *\n * @usageNotes\n * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application.\n *\n * ### HTTP Request Example\n *\n * ```\n * // GET heroes whose name contains search term\n * searchHeroes(term: string): observable<Hero[]>{\n *\n * const params = new HttpParams({fromString: 'name=term'});\n * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});\n * }\n * ```\n *\n * Alternatively, the parameter string can be used without invoking HttpParams\n * by directly joining to the URL.\n * ```\n * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});\n * ```\n *\n *\n * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n * return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```\n * // PATCH one of the heroes' name\n * patchHero (id: number, heroName: string): Observable<{}> {\n * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42\n * return this.httpClient.patch(url, {name: heroName}, httpOptions)\n * .pipe(catchError(this.handleError('patchHero')));\n * }\n * ```\n *\n * @see [HTTP Guide](guide/http)\n * @see [HTTP Request](api/common/http/HttpRequest)\n *\n * @publicApi\n */\n var HttpClient = /** @class */ (function () {\n function HttpClient(handler) {\n this.handler = handler;\n }\n /**\n * Constructs an observable for a generic HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * You can pass an `HttpRequest` directly as the only parameter. In this case,\n * the call returns an observable of the raw `HttpEvent` stream.\n *\n * Alternatively you can pass an HTTP method as the first parameter,\n * a URL string as the second, and an options hash containing the request body as the third.\n * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the\n * type of returned observable.\n * * The `responseType` value determines how a successful response body is parsed.\n * * If `responseType` is the default `json`, you can pass a type interface for the resulting\n * object as a type parameter to the call.\n *\n * The `observe` value determines the return type, according to what you are interested in\n * observing.\n * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including\n * progress events by default.\n * * An `observe` value of response returns an observable of `HttpResponse<T>`,\n * where the `T` parameter depends on the `responseType` and any optionally provided type\n * parameter.\n * * An `observe` value of body returns an observable of `<T>` with the same `T` body type.\n *\n */\n HttpClient.prototype.request = function (first, url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var req;\n // First, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = first;\n }\n else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming `GET` unless a method is\n // provided.\n // Figure out the headers.\n var headers = undefined;\n if (options.headers instanceof HttpHeaders) {\n headers = options.headers;\n }\n else {\n headers = new HttpHeaders(options.headers);\n }\n // Sort out parameters.\n var params = undefined;\n if (!!options.params) {\n if (options.params instanceof HttpParams) {\n params = options.params;\n }\n else {\n params = new HttpParams({ fromObject: options.params });\n }\n }\n // Construct the request.\n req = new HttpRequest(first, url, (options.body !== undefined ? options.body : null), {\n headers: headers,\n params: params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n });\n }\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n var events$ = rxjs.of(req).pipe(operators.concatMap(function (req) { return _this.handler.handle(req); }));\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n var res$ = events$.pipe(operators.filter(function (event) { return event instanceof HttpResponse; }));\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return res$.pipe(operators.map(function (res) {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n }));\n case 'blob':\n return res$.pipe(operators.map(function (res) {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n }));\n case 'text':\n return res$.pipe(operators.map(function (res) {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n }));\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return res$.pipe(operators.map(function (res) { return res.body; }));\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(\"Unreachable: unhandled observe type \" + options.observe + \"}\");\n }\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `DELETE` request to execute on the server. See the individual overloads for\n * details on the return type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n */\n HttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('DELETE', url, options);\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `GET` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('GET', url, options);\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `HEAD` request to execute on the server. The `HEAD` method returns\n * meta information about the resource without transferring the\n * resource itself. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.head = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('HEAD', url, options);\n };\n /**\n * Constructs an `Observable` that, when subscribed, causes a request with the special method\n * `JSONP` to be dispatched via the interceptor pipeline.\n * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain\n * API endpoints that don't support newer,\n * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.\n * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the\n * requests even if the API endpoint is not located on the same domain (origin) as the client-side\n * application making the request.\n * The endpoint API must support JSONP callback for JSONP requests to work.\n * The resource API returns the JSON response wrapped in a callback function.\n * You can pass the callback function name as one of the query parameters.\n * Note that JSONP requests can only be used with `GET` requests.\n *\n * @param url The resource URL.\n * @param callbackParam The callback function name.\n *\n */\n HttpClient.prototype.jsonp = function (url, callbackParam) {\n return this.request('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n };\n /**\n * Constructs an `Observable` that, when subscribed, causes the configured\n * `OPTIONS` request to execute on the server. This method allows the client\n * to determine the supported HTTP methods and other capabilites of an endpoint,\n * without implying a resource action. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.options = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('OPTIONS', url, options);\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PATCH` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.patch = function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('PATCH', url, addBody(options, body));\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `POST` request to execute on the server. The server responds with the location of\n * the replaced resource. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.post = function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('POST', url, addBody(options, body));\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PUT` request to execute on the server. The `PUT` method replaces an existing resource\n * with a new set of values.\n * See the individual overloads for details on the return type.\n */\n HttpClient.prototype.put = function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('PUT', url, addBody(options, body));\n };\n return HttpClient;\n }());\n HttpClient.decorators = [\n { type: core.Injectable }\n ];\n HttpClient.ctorParameters = function () { return [\n { type: HttpHandler }\n ]; };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\n *\n *\n */\n var HttpInterceptorHandler = /** @class */ (function () {\n function HttpInterceptorHandler(next, interceptor) {\n this.next = next;\n this.interceptor = interceptor;\n }\n HttpInterceptorHandler.prototype.handle = function (req) {\n return this.interceptor.intercept(req, this.next);\n };\n return HttpInterceptorHandler;\n }());\n /**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\n var HTTP_INTERCEPTORS = new core.InjectionToken('HTTP_INTERCEPTORS');\n var NoopInterceptor = /** @class */ (function () {\n function NoopInterceptor() {\n }\n NoopInterceptor.prototype.intercept = function (req, next) {\n return next.handle(req);\n };\n return NoopInterceptor;\n }());\n NoopInterceptor.decorators = [\n { type: core.Injectable }\n ];\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // Every request made through JSONP needs a callback name that's unique across the\n // whole page. Each request is assigned an id and the callback name is constructed\n // from that. The next id to be assigned is tracked in a global variable here that\n // is shared among all applications on the page.\n var nextRequestId = 0;\n // Error text given when a JSONP script is injected, but doesn't invoke the callback\n // passed in its URL.\n var JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n // Error text given when a request is passed to the JsonpClientBackend that doesn't\n // have a request method JSONP.\n var JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\n var JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n /**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n *\n */\n var JsonpCallbackContext = /** @class */ (function () {\n function JsonpCallbackContext() {\n }\n return JsonpCallbackContext;\n }());\n /**\n * Processes an `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * @see `HttpHandler`\n * @see `HttpXhrBackend`\n *\n * @publicApi\n */\n var JsonpClientBackend = /** @class */ (function () {\n function JsonpClientBackend(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n /**\n * A resolved promise that can be used to schedule microtasks in the event handlers.\n */\n this.resolvedPromise = Promise.resolve();\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n JsonpClientBackend.prototype.nextCallback = function () {\n return \"ng_jsonp_callback_\" + nextRequestId++;\n };\n /**\n * Processes a JSONP request and returns an event stream of the results.\n * @param req The request object.\n * @returns An observable of the response events.\n *\n */\n JsonpClientBackend.prototype.handle = function (req) {\n var _this = this;\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n }\n else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n // Everything else happens inside the Observable boundary.\n return new rxjs.Observable(function (observer) {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n var callback = _this.nextCallback();\n var url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, \"=\" + callback + \"$1\");\n // Construct the <script> tag and point it at the URL.\n var node = _this.document.createElement('script');\n node.src = url;\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n // The response object, if one has been received, or null otherwise.\n var body = null;\n // Whether the response callback has been called.\n var finished = false;\n // Whether the request has been cancelled (and thus any other callbacks)\n // should be ignored.\n var cancelled = false;\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n _this.callbackMap[callback] = function (data) {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete _this.callbackMap[callback];\n // Next, make sure the request wasn't cancelled in the meantime.\n if (cancelled) {\n return;\n }\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n var cleanup = function () {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete _this.callbackMap[callback];\n };\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n var onLoad = function (event) {\n // Do nothing if the request has been cancelled.\n if (cancelled) {\n return;\n }\n // We wrap it in an extra Promise, to ensure the microtask\n // is scheduled after the loaded endpoint has executed any potential microtask itself,\n // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496\n _this.resolvedPromise.then(function () {\n // Cleanup the page.\n cleanup();\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url: url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body: body,\n status: 200,\n statusText: 'OK',\n url: url,\n }));\n // Complete the stream, the response is over.\n observer.complete();\n });\n };\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n var onError = function (error) {\n // If the request was already cancelled, no need to emit anything.\n if (cancelled) {\n return;\n }\n cleanup();\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error: error,\n status: 0,\n statusText: 'JSONP Error',\n url: url,\n }));\n };\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n _this.document.body.appendChild(node);\n // The request has now been successfully sent.\n observer.next({ type: exports.HttpEventType.Sent });\n // Cancellation handler.\n return function () {\n // Track the cancellation so event listeners won't do anything even if already scheduled.\n cancelled = true;\n // Remove the event listeners so they won't run if the events later fire.\n node.removeEventListener('load', onLoad);\n node.removeEventListener('error', onError);\n // And finally, clean up the page.\n cleanup();\n };\n });\n };\n return JsonpClientBackend;\n }());\n JsonpClientBackend.decorators = [\n { type: core.Injectable }\n ];\n JsonpClientBackend.ctorParameters = function () { return [\n { type: JsonpCallbackContext },\n { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }\n ]; };\n /**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see `HttpInterceptor`\n *\n * @publicApi\n */\n var JsonpInterceptor = /** @class */ (function () {\n function JsonpInterceptor(jsonp) {\n this.jsonp = jsonp;\n }\n /**\n * Identifies and handles a given JSONP request.\n * @param req The outgoing request object to handle.\n * @param next The next interceptor in the chain, or the backend\n * if no interceptors remain in the chain.\n * @returns An observable of the event stream.\n */\n JsonpInterceptor.prototype.intercept = function (req, next) {\n if (req.method === 'JSONP') {\n return this.jsonp.handle(req);\n }\n // Fall through for normal HTTP requests.\n return next.handle(req);\n };\n return JsonpInterceptor;\n }());\n JsonpInterceptor.decorators = [\n { type: core.Injectable }\n ];\n JsonpInterceptor.ctorParameters = function () { return [\n { type: JsonpClientBackend }\n ]; };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n /**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\n function getResponseUrl(xhr) {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n }\n /**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\n var XhrFactory = /** @class */ (function () {\n function XhrFactory() {\n }\n return XhrFactory;\n }());\n /**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n *\n */\n var BrowserXhr = /** @class */ (function () {\n function BrowserXhr() {\n }\n BrowserXhr.prototype.build = function () {\n return (new XMLHttpRequest());\n };\n return BrowserXhr;\n }());\n BrowserXhr.decorators = [\n { type: core.Injectable }\n ];\n BrowserXhr.ctorParameters = function () { return []; };\n /**\n * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see `HttpHandler`\n * @see `JsonpClientBackend`\n *\n * @publicApi\n */\n var HttpXhrBackend = /** @class */ (function () {\n function HttpXhrBackend(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Processes a request and returns a stream of response events.\n * @param req The request object.\n * @returns An observable of the response events.\n */\n HttpXhrBackend.prototype.handle = function (req) {\n var _this = this;\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the HttpClientJsonpModule\n if (req.method === 'JSONP') {\n throw new Error(\"Attempted to construct Jsonp request without HttpClientJsonpModule installed.\");\n }\n // Everything happens on Observable subscription.\n return new rxjs.Observable(function (observer) {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n var xhr = _this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n // Add all the requested headers.\n req.headers.forEach(function (name, values) { return xhr.setRequestHeader(name, values.join(',')); });\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n var detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n // Set the responseType if one was requested.\n if (req.responseType) {\n var responseType = req.responseType.toLowerCase();\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = ((responseType !== 'json') ? responseType : 'text');\n }\n // Serialize the request body if one is present. If not, this will be set to null.\n var reqBody = req.serializeBody();\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n var headerResponse = null;\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n var partialFromXhr = function () {\n if (headerResponse !== null) {\n return headerResponse;\n }\n // Read status and normalize an IE9 bug (https://bugs.jquery.com/ticket/1450).\n var status = xhr.status === 1223 ? 204 : xhr.status;\n var statusText = xhr.statusText || 'OK';\n // Parse headers from XMLHttpRequest - this step is lazy.\n var headers = new HttpHeaders(xhr.getAllResponseHeaders());\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n var url = getResponseUrl(xhr) || req.url;\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({ headers: headers, status: status, statusText: statusText, url: url });\n return headerResponse;\n };\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n // First up is the load event, which represents a response being fully available.\n var onLoad = function () {\n // Read response state from the memoized partial data.\n var _a = partialFromXhr(), headers = _a.headers, status = _a.status, statusText = _a.statusText, url = _a.url;\n // The body will be read out if present.\n var body = null;\n if (status !== 204) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 : 0;\n }\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n var ok = status >= 200 && status < 300;\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n var originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body !== '' ? JSON.parse(body) : null;\n }\n catch (error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n // JSON response. Restore the original body (including any XSSI prefix) to deliver\n // a better error response.\n body = originalBody;\n // If this was an error request to begin with, leave it as a string, it probably\n // just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = { error: error, text: body };\n }\n }\n }\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body: body,\n headers: headers,\n status: status,\n statusText: statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n }\n else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers: headers,\n status: status,\n statusText: statusText,\n url: url || undefined,\n }));\n }\n };\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n var onError = function (error) {\n var url = partialFromXhr().url;\n var res = new HttpErrorResponse({\n error: error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n url: url || undefined,\n });\n observer.error(res);\n };\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progerss event.\n var sentHeaders = false;\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n var onDownProgress = function (event) {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n // Start building the download progress event to deliver on the response\n // event stream.\n var progressEvent = {\n type: exports.HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n var onUpProgress = function (event) {\n // Upload progress events are simpler. Begin building the progress\n // event.\n var progress = {\n type: exports.HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n // Send the event.\n observer.next(progress);\n };\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n xhr.addEventListener('timeout', onError);\n xhr.addEventListener('abort', onError);\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({ type: exports.HttpEventType.Sent });\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return function () {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('abort', onError);\n xhr.removeEventListener('load', onLoad);\n xhr.removeEventListener('timeout', onError);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n // Finally, abort the in-flight request.\n if (xhr.readyState !== xhr.DONE) {\n xhr.abort();\n }\n };\n });\n };\n return HttpXhrBackend;\n }());\n HttpXhrBackend.decorators = [\n { type: core.Injectable }\n ];\n HttpXhrBackend.ctorParameters = function () { return [\n { type: XhrFactory }\n ]; };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var XSRF_COOKIE_NAME = new core.InjectionToken('XSRF_COOKIE_NAME');\n var XSRF_HEADER_NAME = new core.InjectionToken('XSRF_HEADER_NAME');\n /**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\n var HttpXsrfTokenExtractor = /** @class */ (function () {\n function HttpXsrfTokenExtractor() {\n }\n return HttpXsrfTokenExtractor;\n }());\n /**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\n var HttpXsrfCookieExtractor = /** @class */ (function () {\n function HttpXsrfCookieExtractor(doc, platform, cookieName) {\n this.doc = doc;\n this.platform = platform;\n this.cookieName = cookieName;\n this.lastCookieString = '';\n this.lastToken = null;\n /**\n * @internal for testing\n */\n this.parseCount = 0;\n }\n HttpXsrfCookieExtractor.prototype.getToken = function () {\n if (this.platform === 'server') {\n return null;\n }\n var cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = common.ɵparseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n };\n return HttpXsrfCookieExtractor;\n }());\n HttpXsrfCookieExtractor.decorators = [\n { type: core.Injectable }\n ];\n HttpXsrfCookieExtractor.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },\n { type: String, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] },\n { type: String, decorators: [{ type: core.Inject, args: [XSRF_COOKIE_NAME,] }] }\n ]; };\n /**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\n var HttpXsrfInterceptor = /** @class */ (function () {\n function HttpXsrfInterceptor(tokenService, headerName) {\n this.tokenService = tokenService;\n this.headerName = headerName;\n }\n HttpXsrfInterceptor.prototype.intercept = function (req, next) {\n var lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||\n lcUrl.startsWith('https://')) {\n return next.handle(req);\n }\n var token = this.tokenService.getToken();\n // Be careful not to overwrite an existing header of the same name.\n if (token !== null && !req.headers.has(this.headerName)) {\n req = req.clone({ headers: req.headers.set(this.headerName, token) });\n }\n return next.handle(req);\n };\n return HttpXsrfInterceptor;\n }());\n HttpXsrfInterceptor.decorators = [\n { type: core.Injectable }\n ];\n HttpXsrfInterceptor.ctorParameters = function () { return [\n { type: HttpXsrfTokenExtractor },\n { type: String, decorators: [{ type: core.Inject, args: [XSRF_HEADER_NAME,] }] }\n ]; };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * An injectable `HttpHandler` that applies multiple interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * The interceptors are loaded lazily from the injector, to allow\n * interceptors to themselves inject classes depending indirectly\n * on `HttpInterceptingHandler` itself.\n * @see `HttpInterceptor`\n */\n var HttpInterceptingHandler = /** @class */ (function () {\n function HttpInterceptingHandler(backend, injector) {\n this.backend = backend;\n this.injector = injector;\n this.chain = null;\n }\n HttpInterceptingHandler.prototype.handle = function (req) {\n if (this.chain === null) {\n var interceptors = this.injector.get(HTTP_INTERCEPTORS, []);\n this.chain = interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, this.backend);\n }\n return this.chain.handle(req);\n };\n return HttpInterceptingHandler;\n }());\n HttpInterceptingHandler.decorators = [\n { type: core.Injectable }\n ];\n HttpInterceptingHandler.ctorParameters = function () { return [\n { type: HttpBackend },\n { type: core.Injector }\n ]; };\n /**\n * Constructs an `HttpHandler` that applies interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * Use as a factory function within `HttpClientModule`.\n *\n *\n */\n function interceptingHandler(backend, interceptors) {\n if (interceptors === void 0) { interceptors = []; }\n if (!interceptors) {\n return backend;\n }\n return interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, backend);\n }\n /**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n *\n */\n function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n }\n /**\n * Configures XSRF protection support for outgoing requests.\n *\n * For a server that supports a cookie-based XSRF protection system,\n * use directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no names are supplied, the default cookie name is `XSRF-TOKEN`\n * and the default header name is `X-XSRF-TOKEN`.\n *\n * @publicApi\n */\n var HttpClientXsrfModule = /** @class */ (function () {\n function HttpClientXsrfModule() {\n }\n /**\n * Disable the default XSRF protection.\n */\n HttpClientXsrfModule.disable = function () {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },\n ],\n };\n };\n /**\n * Configure XSRF protection.\n * @param options An object that can specify either or both\n * cookie name or header name.\n * - Cookie name default is `XSRF-TOKEN`.\n * - Header name default is `X-XSRF-TOKEN`.\n *\n */\n HttpClientXsrfModule.withOptions = function (options) {\n if (options === void 0) { options = {}; }\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],\n options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],\n ],\n };\n };\n return HttpClientXsrfModule;\n }());\n HttpClientXsrfModule.decorators = [\n { type: core.NgModule, args: [{\n providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },\n { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },\n ],\n },] }\n ];\n /**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for XSRF. Automatically imported by `HttpClientModule`.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\n var HttpClientModule = /** @class */ (function () {\n function HttpClientModule() {\n }\n return HttpClientModule;\n }());\n HttpClientModule.decorators = [\n { type: core.NgModule, args: [{\n /**\n * Optional configuration for XSRF protection.\n */\n imports: [\n HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN',\n }),\n ],\n /**\n * Configures the [dependency injector](guide/glossary#injector) where it is imported\n * with supporting services for HTTP communications.\n */\n providers: [\n HttpClient,\n { provide: HttpHandler, useClass: HttpInterceptingHandler },\n HttpXhrBackend,\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n BrowserXhr,\n { provide: XhrFactory, useExisting: BrowserXhr },\n ],\n },] }\n ];\n /**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\n var HttpClientJsonpModule = /** @class */ (function () {\n function HttpClientJsonpModule() {\n }\n return HttpClientJsonpModule;\n }());\n HttpClientJsonpModule.decorators = [\n { type: core.NgModule, args: [{\n providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ],\n },] }\n ];\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.HTTP_INTERCEPTORS = HTTP_INTERCEPTORS;\n exports.HttpBackend = HttpBackend;\n exports.HttpClient = HttpClient;\n exports.HttpClientJsonpModule = HttpClientJsonpModule;\n exports.HttpClientModule = HttpClientModule;\n exports.HttpClientXsrfModule = HttpClientXsrfModule;\n exports.HttpErrorResponse = HttpErrorResponse;\n exports.HttpHandler = HttpHandler;\n exports.HttpHeaderResponse = HttpHeaderResponse;\n exports.HttpHeaders = HttpHeaders;\n exports.HttpParams = HttpParams;\n exports.HttpRequest = HttpRequest;\n exports.HttpResponse = HttpResponse;\n exports.HttpResponseBase = HttpResponseBase;\n exports.HttpUrlEncodingCodec = HttpUrlEncodingCodec;\n exports.HttpXhrBackend = HttpXhrBackend;\n exports.HttpXsrfTokenExtractor = HttpXsrfTokenExtractor;\n exports.JsonpClientBackend = JsonpClientBackend;\n exports.JsonpInterceptor = JsonpInterceptor;\n exports.XhrFactory = XhrFactory;\n exports.ɵHttpInterceptingHandler = HttpInterceptingHandler;\n exports.ɵangular_packages_common_http_http_a = NoopInterceptor;\n exports.ɵangular_packages_common_http_http_b = JsonpCallbackContext;\n exports.ɵangular_packages_common_http_http_c = jsonpCallbackContext;\n exports.ɵangular_packages_common_http_http_d = BrowserXhr;\n exports.ɵangular_packages_common_http_http_e = XSRF_COOKIE_NAME;\n exports.ɵangular_packages_common_http_http_f = XSRF_HEADER_NAME;\n exports.ɵangular_packages_common_http_http_g = HttpXsrfCookieExtractor;\n exports.ɵangular_packages_common_http_http_h = HttpXsrfInterceptor;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=common-http.umd.js.map\n"]}