blob: e003d917a5e1f06928b55fe69f016cabbeb2e23d [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","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__read","o","n","m","Symbol","iterator","e","call","ar","next","done","push","value","error","HttpHeaders","headers","_this","normalizedNames","Map","lazyUpdate","lazyInit","split","forEach","line","index","indexOf","name_1","slice","toLowerCase","trim","maybeSetNormalizedName","has","get","set","keys","name","values","init","from","getAll","append","clone","op","delete","lcName","copyFrom","update","applyUpdate","other","concat","base","undefined","apply","__spread","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","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","params","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","Injectable","HttpInterceptorHandler","interceptor","intercept","HTTP_INTERCEPTORS","InjectionToken","NoopInterceptor","nextRequestId","JsonpCallbackContext","JsonpClientBackend","callbackMap","document","nextCallback","Observable","observer","callback","node","createElement","src","finished","cancelled","data","cleanup","parentNode","removeChild","onLoad","complete","onError","addEventListener","appendChild","Sent","removeEventListener","Inject","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","abort","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","doc","platform","cookieName","lastCookieString","lastToken","parseCount","getToken","cookieString","cookie","ɵparseCookieValue","PLATFORM_ID","String","HttpXsrfInterceptor","tokenService","headerName","lcUrl","startsWith","token","HttpInterceptingHandler","backend","injector","chain","interceptors","reduceRight","Injector","jsonpCallbackContext","window","HttpClientXsrfModule","HttpClientXsrfModule_1","disable","ngModule","providers","provide","useClass","withOptions","useValue","NgModule","useExisting","multi","HttpClientModule","imports","HttpClientJsonpModule","useFactory","ɵ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_g","ɵangular_packages_common_http_http_h","ɵangular_packages_common_http_http_e","ɵangular_packages_common_http_http_f","ɵHttpInterceptingHandler"],"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,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jH,EAC/CrN,EAAQuU,qCAAuCpB,EAC/CnT,EAAQwU,qCAAuCtF,EAC/ClP,EAAQyU,qCAAuChD,EAC/CzR,EAAQ0U,qCAAuCpC,EAC/CtS,EAAQ2U,qCAAuCrD,EAC/CtR,EAAQ4U,qCAAuCrD,EAC/CvR,EAAQc,YAAcA,EACtBd,EAAQa,YAAcA,EACtBb,EAAQ2L,WAAaA,EACrB3L,EAAQgE,YAAcA,EACtBhE,EAAQiN,kBAAoBA,EAC5BjN,EAAQsN,mBAAqBA,EAC7BtN,EAAQ+O,iBAAmBA,EAC3B/O,EAAQmU,sBAAwBA,EAChCnU,EAAQiU,iBAAmBA,EAC3BjU,EAAQqT,qBAAuBA,EAC/BrT,EAAQ6U,yBAA2BjC,EACnC5S,EAAQsH,WAAaA,EACrBtH,EAAQ4G,qBAAuBA,EAC/B5G,EAAQsJ,YAAcA,EACtBtJ,EAAQuL,kBAAoBA,EAC5BvL,EAAQ6K,mBAAqBA,EAC7B7K,EAAQqL,aAAeA,EACvBrL,EAAQ4K,iBAAmBA,EAC3B5K,EAAQqP,eAAiBA,EACzBrP,EAAQiP,WAAaA,EACrBjP,EAAQwR,uBAAyBA,EAEjCtQ,OAAOwB,eAAe1C,EAAS,aAAc,CAAE8D,OAAO","sourcesContent":["/**\n * @license Angular v8.1.1\n * (c) 2010-2019 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 Inc. 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 /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n /* global Reflect, Promise */\r\n\r\n var extendStatics = function(d, b) {\r\n 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 extendStatics(d, b);\r\n };\r\n\r\n function __extends(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\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n }\r\n\r\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n }\r\n\r\n function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n }\n\n /**\n * @license\n * Copyright Google Inc. 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 * `HttpHeaders` class represents the header configuration options for an HTTP request.\n * Instances should be assumed immutable with lazy parsing.\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_1 = line.slice(0, index);\n var key = name_1.toLowerCase();\n var value = line.slice(index + 1).trim();\n _this.maybeSetNormalizedName(name_1, 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 header by a given name.\n *\n * @param name The header name to check for existence.\n *\n * @returns Whether the header exits.\n */\n HttpHeaders.prototype.has = function (name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n };\n /**\n * Returns the first header value that matches a given name.\n *\n * @param name The header name to retrieve.\n *\n * @returns A 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 * Returns 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 * Returns a list of header values for a given header name.\n *\n * @param name The header name from which to retrieve the 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 header value to the existing set of\n * header values.\n *\n * @param name The header name for which to append the values.\n *\n * @returns A clone of the HTTP header object with the value appended.\n */\n HttpHeaders.prototype.append = function (name, value) {\n return this.clone({ name: name, value: value, op: 'a' });\n };\n /**\n * Sets a header value for a given name. If the header name already exists,\n * its value is replaced with the given value.\n *\n * @param name The header name.\n * @param value Provides the value to set or overide for a given name.\n *\n * @returns A clone of the HTTP header 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 all header values for a given name.\n *\n * @param name The header name.\n * @param value The header values to delete for a given name.\n *\n * @returns A clone of the HTTP header object.\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 Inc. 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 * A class that uses `encodeURIComponent` and `decodeURIComponent` to\n * serialize and parse URL parameter keys and values. If you pass URL query parameters\n * without encoding, the query parameters can get misinterpreted at the receiving end.\n * Use the `HttpParameterCodec` class to encode and decode the query-string values.\n *\n * @publicApi\n */\n var HttpUrlEncodingCodec = /** @class */ (function () {\n function HttpUrlEncodingCodec() {\n }\n HttpUrlEncodingCodec.prototype.encodeKey = function (key) { return standardEncoding(key); };\n HttpUrlEncodingCodec.prototype.encodeValue = function (value) { return standardEncoding(value); };\n HttpUrlEncodingCodec.prototype.decodeKey = function (key) { return decodeURIComponent(key); };\n HttpUrlEncodingCodec.prototype.decodeValue = function (value) { return decodeURIComponent(value); };\n return HttpUrlEncodingCodec;\n }());\n function paramParser(rawParams, codec) {\n var map = new Map();\n if (rawParams.length > 0) {\n var params = rawParams.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 * Check whether the body has one or more values for the given parameter name.\n */\n HttpParams.prototype.has = function (param) {\n this.init();\n return this.map.has(param);\n };\n /**\n * Get the first value for the given parameter name, or `null` if it's 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 * Get all values for the given parameter name, or `null` if it's not present.\n */\n HttpParams.prototype.getAll = function (param) {\n this.init();\n return this.map.get(param) || null;\n };\n /**\n * Get all the parameter names for this body.\n */\n HttpParams.prototype.keys = function () {\n this.init();\n return Array.from(this.map.keys());\n };\n /**\n * Construct a new body with an appended value for the given parameter name.\n */\n HttpParams.prototype.append = function (param, value) { return this.clone({ param: param, value: value, op: 'a' }); };\n /**\n * Construct a new body with a new value for the given parameter name.\n */\n HttpParams.prototype.set = function (param, value) { return this.clone({ param: param, value: value, op: 's' }); };\n /**\n * Construct a new body with either the given value for the given parameter\n * removed, if a value is given, or all values for the given parameter removed\n * if not.\n */\n HttpParams.prototype.delete = function (param, value) { return this.clone({ param: param, value: value, op: 'd' }); };\n /**\n * Serialize 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 return _this.map.get(key).map(function (value) { return eKey + '=' + _this.encoder.encodeValue(value); })\n .join('&');\n })\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 Inc. 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, and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n Array.isArray(this.body)) {\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, headers: headers, reportProgress: reportProgress, responseType: responseType, withCredentials: withCredentials,\n });\n };\n return HttpRequest;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 (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 =\n \"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 Inc. 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 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 *\n * `HttpClient` 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 *\n * @see [HTTP Guide](guide/http)\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 * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n * return this.httpClient.jsonp(this.heroesURL, callback);\n * }\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 * @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 HttpClient = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [HttpHandler])\n ], HttpClient);\n return HttpClient;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 which represents the array of `HttpInterceptor`s that\n * are registered.\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 NoopInterceptor = __decorate([\n core.Injectable()\n ], NoopInterceptor);\n return NoopInterceptor;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 * `HttpBackend` that only processes `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n *\n * @publicApi\n */\n var JsonpClientBackend = /** @class */ (function () {\n function JsonpClientBackend(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n JsonpClientBackend.prototype.nextCallback = function () { return \"ng_jsonp_callback_\" + nextRequestId++; };\n /**\n * Process a JSONP request and return an event stream of the results.\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 // 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', url: url,\n }));\n // Complete the stream, the response is over.\n observer.complete();\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', 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 JsonpClientBackend = __decorate([\n core.Injectable(),\n __param(1, core.Inject(common.DOCUMENT)),\n __metadata(\"design:paramtypes\", [JsonpCallbackContext, Object])\n ], JsonpClientBackend);\n return JsonpClientBackend;\n }());\n /**\n * An `HttpInterceptor` which identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @publicApi\n */\n var JsonpInterceptor = /** @class */ (function () {\n function JsonpInterceptor(jsonp) {\n this.jsonp = jsonp;\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 JsonpInterceptor = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [JsonpClientBackend])\n ], JsonpInterceptor);\n return JsonpInterceptor;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 @{link HttpXhrBackend} that uses the `XMLHttpRequest` browser API.\n *\n *\n */\n var BrowserXhr = /** @class */ (function () {\n function BrowserXhr() {\n }\n BrowserXhr.prototype.build = function () { return (new XMLHttpRequest()); };\n BrowserXhr = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [])\n ], BrowserXhr);\n return BrowserXhr;\n }());\n /**\n * An `HttpBackend` which uses the XMLHttpRequest API to send\n * requests to a backend server.\n *\n * @publicApi\n */\n var HttpXhrBackend = /** @class */ (function () {\n function HttpXhrBackend(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Process a request and return a stream of 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 JsonpClientModule\n if (req.method === 'JSONP') {\n throw new Error(\"Attempted to construct Jsonp request without JsonpClientModule 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 (http://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 // 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('load', onLoad);\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 xhr.abort();\n };\n });\n };\n HttpXhrBackend = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [XhrFactory])\n ], HttpXhrBackend);\n return HttpXhrBackend;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 HttpXsrfCookieExtractor = __decorate([\n core.Injectable(),\n __param(0, core.Inject(common.DOCUMENT)), __param(1, core.Inject(core.PLATFORM_ID)),\n __param(2, core.Inject(XSRF_COOKIE_NAME)),\n __metadata(\"design:paramtypes\", [Object, String, String])\n ], HttpXsrfCookieExtractor);\n return HttpXsrfCookieExtractor;\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 HttpXsrfInterceptor = __decorate([\n core.Injectable(),\n __param(1, core.Inject(XSRF_HEADER_NAME)),\n __metadata(\"design:paramtypes\", [HttpXsrfTokenExtractor, String])\n ], HttpXsrfInterceptor);\n return HttpXsrfInterceptor;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 HttpInterceptingHandler = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [HttpBackend, core.Injector])\n ], HttpInterceptingHandler);\n return HttpInterceptingHandler;\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 HttpClientXsrfModule_1 = HttpClientXsrfModule;\n /**\n * Disable the default XSRF protection.\n */\n HttpClientXsrfModule.disable = function () {\n return {\n ngModule: HttpClientXsrfModule_1,\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_1,\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 var HttpClientXsrfModule_1;\n HttpClientXsrfModule = HttpClientXsrfModule_1 = __decorate([\n core.NgModule({\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 ], HttpClientXsrfModule);\n return HttpClientXsrfModule;\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 HttpClientModule = __decorate([\n core.NgModule({\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 ], HttpClientModule);\n return HttpClientModule;\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 HttpClientJsonpModule = __decorate([\n core.NgModule({\n providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ],\n })\n ], HttpClientJsonpModule);\n return HttpClientJsonpModule;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 Inc. 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.ɵ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_g = HttpXsrfCookieExtractor;\n exports.ɵangular_packages_common_http_http_h = HttpXsrfInterceptor;\n exports.ɵangular_packages_common_http_http_e = XSRF_COOKIE_NAME;\n exports.ɵangular_packages_common_http_http_f = XSRF_HEADER_NAME;\n exports.HttpBackend = HttpBackend;\n exports.HttpHandler = HttpHandler;\n exports.HttpClient = HttpClient;\n exports.HttpHeaders = HttpHeaders;\n exports.HTTP_INTERCEPTORS = HTTP_INTERCEPTORS;\n exports.JsonpClientBackend = JsonpClientBackend;\n exports.JsonpInterceptor = JsonpInterceptor;\n exports.HttpClientJsonpModule = HttpClientJsonpModule;\n exports.HttpClientModule = HttpClientModule;\n exports.HttpClientXsrfModule = HttpClientXsrfModule;\n exports.ɵHttpInterceptingHandler = HttpInterceptingHandler;\n exports.HttpParams = HttpParams;\n exports.HttpUrlEncodingCodec = HttpUrlEncodingCodec;\n exports.HttpRequest = HttpRequest;\n exports.HttpErrorResponse = HttpErrorResponse;\n exports.HttpHeaderResponse = HttpHeaderResponse;\n exports.HttpResponse = HttpResponse;\n exports.HttpResponseBase = HttpResponseBase;\n exports.HttpXhrBackend = HttpXhrBackend;\n exports.XhrFactory = XhrFactory;\n exports.HttpXsrfTokenExtractor = HttpXsrfTokenExtractor;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=common-http.umd.js.map\n"]}