@opra/angular 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/cjs/client.module.js +95 -0
- package/cjs/constants.js +4 -0
- package/cjs/index.js +6 -0
- package/cjs/interfaces/module-options.interface.js +2 -0
- package/cjs/package.json +3 -0
- package/esm/client.module.d.ts +8 -0
- package/esm/client.module.js +92 -0
- package/esm/constants.d.ts +1 -0
- package/esm/constants.js +1 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.js +3 -0
- package/esm/interfaces/module-options.interface.d.ts +16 -0
- package/esm/interfaces/module-options.interface.js +1 -0
- package/package.json +80 -0
- package/umd/opra-angular.umd.min.js +2 -0
- package/umd/opra-angular.umd.min.js.LICENSE.txt +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Panates
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var OpraClientModule_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OpraClientModule = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const http_1 = require("@angular/common/http");
|
|
7
|
+
const core_1 = require("@angular/core");
|
|
8
|
+
const client_1 = require("@opra/client");
|
|
9
|
+
const constants_js_1 = require("./constants.js");
|
|
10
|
+
let OpraClientModule = OpraClientModule_1 = class OpraClientModule {
|
|
11
|
+
static forRoot(options) {
|
|
12
|
+
const CLIENT_TOKEN = options.token || client_1.OpraHttpClient;
|
|
13
|
+
const client = new client_1.OpraHttpClient(options.serviceUrl, options);
|
|
14
|
+
return {
|
|
15
|
+
ngModule: OpraClientModule_1,
|
|
16
|
+
providers: [
|
|
17
|
+
{
|
|
18
|
+
provide: constants_js_1.OPRA_CLIENT_MODULE_OPTIONS,
|
|
19
|
+
useValue: options,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
provide: CLIENT_TOKEN,
|
|
23
|
+
useValue: client
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
provide: core_1.APP_INITIALIZER,
|
|
27
|
+
useFactory: () => {
|
|
28
|
+
return () => client.init();
|
|
29
|
+
},
|
|
30
|
+
multi: true
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static forRootAsync(options) {
|
|
36
|
+
const CLIENT_TOKEN = options.token || client_1.OpraHttpClient;
|
|
37
|
+
const asyncProviders = this.createAsyncProviders(options);
|
|
38
|
+
return {
|
|
39
|
+
ngModule: OpraClientModule_1,
|
|
40
|
+
providers: [
|
|
41
|
+
...asyncProviders,
|
|
42
|
+
{
|
|
43
|
+
provide: CLIENT_TOKEN,
|
|
44
|
+
deps: [http_1.HttpClient, constants_js_1.OPRA_CLIENT_MODULE_OPTIONS],
|
|
45
|
+
useFactory: (httpClient, opts) => new client_1.OpraHttpClient(opts.serviceUrl, opts)
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
provide: core_1.APP_INITIALIZER,
|
|
49
|
+
deps: [CLIENT_TOKEN],
|
|
50
|
+
useFactory: (client) => {
|
|
51
|
+
return () => client.init();
|
|
52
|
+
},
|
|
53
|
+
multi: true
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static createAsyncProviders(options) {
|
|
59
|
+
if (options.useExisting || options.useFactory)
|
|
60
|
+
return [this.createAsyncOptionsProvider(options)];
|
|
61
|
+
if (options.useClass)
|
|
62
|
+
return [
|
|
63
|
+
this.createAsyncOptionsProvider(options),
|
|
64
|
+
{
|
|
65
|
+
provide: options.useClass,
|
|
66
|
+
useClass: options.useClass
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
throw new Error('Invalid configuration. Must provide useFactory, useClass or useExisting');
|
|
70
|
+
}
|
|
71
|
+
static createAsyncOptionsProvider(options) {
|
|
72
|
+
if (options.useFactory) {
|
|
73
|
+
return {
|
|
74
|
+
provide: constants_js_1.OPRA_CLIENT_MODULE_OPTIONS,
|
|
75
|
+
useFactory: options.useFactory,
|
|
76
|
+
deps: options.deps || [],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const useClass = options.useClass || options.useExisting;
|
|
80
|
+
if (useClass) {
|
|
81
|
+
return {
|
|
82
|
+
provide: constants_js_1.OPRA_CLIENT_MODULE_OPTIONS,
|
|
83
|
+
useFactory: (o) => o,
|
|
84
|
+
deps: [useClass],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
throw new Error('Invalid configuration. Must provide useFactory, useClass or useExisting');
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
OpraClientModule = OpraClientModule_1 = tslib_1.__decorate([
|
|
91
|
+
(0, core_1.NgModule)({
|
|
92
|
+
imports: [http_1.HttpClientModule],
|
|
93
|
+
})
|
|
94
|
+
], OpraClientModule);
|
|
95
|
+
exports.OpraClientModule = OpraClientModule;
|
package/cjs/constants.js
ADDED
package/cjs/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./client.module.js"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./interfaces/module-options.interface.js"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./constants.js"), exports);
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { OpraClientModuleAsyncOptions, OpraClientModuleOptions } from './interfaces/module-options.interface.js';
|
|
3
|
+
export declare class OpraClientModule {
|
|
4
|
+
static forRoot(options: OpraClientModuleOptions): ModuleWithProviders<OpraClientModule>;
|
|
5
|
+
static forRootAsync(options: OpraClientModuleAsyncOptions): ModuleWithProviders<OpraClientModule>;
|
|
6
|
+
private static createAsyncProviders;
|
|
7
|
+
private static createAsyncOptionsProvider;
|
|
8
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var OpraClientModule_1;
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
4
|
+
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
5
|
+
import { OpraHttpClient } from '@opra/client';
|
|
6
|
+
import { OPRA_CLIENT_MODULE_OPTIONS } from './constants.js';
|
|
7
|
+
let OpraClientModule = OpraClientModule_1 = class OpraClientModule {
|
|
8
|
+
static forRoot(options) {
|
|
9
|
+
const CLIENT_TOKEN = options.token || OpraHttpClient;
|
|
10
|
+
const client = new OpraHttpClient(options.serviceUrl, options);
|
|
11
|
+
return {
|
|
12
|
+
ngModule: OpraClientModule_1,
|
|
13
|
+
providers: [
|
|
14
|
+
{
|
|
15
|
+
provide: OPRA_CLIENT_MODULE_OPTIONS,
|
|
16
|
+
useValue: options,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
provide: CLIENT_TOKEN,
|
|
20
|
+
useValue: client
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
provide: APP_INITIALIZER,
|
|
24
|
+
useFactory: () => {
|
|
25
|
+
return () => client.init();
|
|
26
|
+
},
|
|
27
|
+
multi: true
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static forRootAsync(options) {
|
|
33
|
+
const CLIENT_TOKEN = options.token || OpraHttpClient;
|
|
34
|
+
const asyncProviders = this.createAsyncProviders(options);
|
|
35
|
+
return {
|
|
36
|
+
ngModule: OpraClientModule_1,
|
|
37
|
+
providers: [
|
|
38
|
+
...asyncProviders,
|
|
39
|
+
{
|
|
40
|
+
provide: CLIENT_TOKEN,
|
|
41
|
+
deps: [HttpClient, OPRA_CLIENT_MODULE_OPTIONS],
|
|
42
|
+
useFactory: (httpClient, opts) => new OpraHttpClient(opts.serviceUrl, opts)
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
provide: APP_INITIALIZER,
|
|
46
|
+
deps: [CLIENT_TOKEN],
|
|
47
|
+
useFactory: (client) => {
|
|
48
|
+
return () => client.init();
|
|
49
|
+
},
|
|
50
|
+
multi: true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static createAsyncProviders(options) {
|
|
56
|
+
if (options.useExisting || options.useFactory)
|
|
57
|
+
return [this.createAsyncOptionsProvider(options)];
|
|
58
|
+
if (options.useClass)
|
|
59
|
+
return [
|
|
60
|
+
this.createAsyncOptionsProvider(options),
|
|
61
|
+
{
|
|
62
|
+
provide: options.useClass,
|
|
63
|
+
useClass: options.useClass
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
throw new Error('Invalid configuration. Must provide useFactory, useClass or useExisting');
|
|
67
|
+
}
|
|
68
|
+
static createAsyncOptionsProvider(options) {
|
|
69
|
+
if (options.useFactory) {
|
|
70
|
+
return {
|
|
71
|
+
provide: OPRA_CLIENT_MODULE_OPTIONS,
|
|
72
|
+
useFactory: options.useFactory,
|
|
73
|
+
deps: options.deps || [],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const useClass = options.useClass || options.useExisting;
|
|
77
|
+
if (useClass) {
|
|
78
|
+
return {
|
|
79
|
+
provide: OPRA_CLIENT_MODULE_OPTIONS,
|
|
80
|
+
useFactory: (o) => o,
|
|
81
|
+
deps: [useClass],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
throw new Error('Invalid configuration. Must provide useFactory, useClass or useExisting');
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
OpraClientModule = OpraClientModule_1 = __decorate([
|
|
88
|
+
NgModule({
|
|
89
|
+
imports: [HttpClientModule],
|
|
90
|
+
})
|
|
91
|
+
], OpraClientModule);
|
|
92
|
+
export { OpraClientModule };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OPRA_CLIENT_MODULE_OPTIONS = "OPRA_CLIENT_MODULE_OPTIONS";
|
package/esm/constants.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const OPRA_CLIENT_MODULE_OPTIONS = 'OPRA_CLIENT_MODULE_OPTIONS';
|
package/esm/index.d.ts
ADDED
package/esm/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InjectionToken, NgModule, Type } from '@angular/core';
|
|
2
|
+
import { OpraHttpClientOptions } from '@opra/client';
|
|
3
|
+
export declare type OpraClientModuleOptions = OpraHttpClientOptions & {
|
|
4
|
+
serviceUrl: string;
|
|
5
|
+
token?: string | InjectionToken<any>;
|
|
6
|
+
};
|
|
7
|
+
export interface OpraModuleOptionsFactory {
|
|
8
|
+
createOptions(): Promise<OpraClientModuleOptions> | OpraClientModuleOptions;
|
|
9
|
+
}
|
|
10
|
+
export interface OpraClientModuleAsyncOptions extends Pick<NgModule, 'imports' | 'providers'> {
|
|
11
|
+
token?: string | InjectionToken<any>;
|
|
12
|
+
useExisting?: Type<OpraModuleOptionsFactory>;
|
|
13
|
+
useClass?: Type<any>;
|
|
14
|
+
useFactory?: (...args: any[]) => Promise<OpraClientModuleOptions> | OpraClientModuleOptions;
|
|
15
|
+
deps?: any[];
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opra/angular",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Opra internationalization package",
|
|
5
|
+
"author": "Panates",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/panates/opra.git",
|
|
10
|
+
"directory": "packages/angular"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"compile": "tsc",
|
|
14
|
+
"prebuild": "npm run check && npm run lint && npm run clean",
|
|
15
|
+
"build": "npm run build:cjs && npm run build:esm && npm run bundle",
|
|
16
|
+
"build:cjs": "tsc -b tsconfig-build-cjs.json",
|
|
17
|
+
"build:esm": "tsc -b tsconfig-build-esm.json",
|
|
18
|
+
"postbuild": "cp README.md package.json ../../LICENSE ../../build/angular && cp ../../package.cjs.json ../../build/angular/cjs/package.json",
|
|
19
|
+
"lint": "eslint . --max-warnings=0",
|
|
20
|
+
"check": "madge --circular src/**",
|
|
21
|
+
"test": "jest --runInBand --detectOpenHandles",
|
|
22
|
+
"cover": "jest --collect-coverage",
|
|
23
|
+
"clean": "npm run clean:src && npm run clean:dist && npm run clean:cover",
|
|
24
|
+
"clean:src": "ts-cleanup -s src --all",
|
|
25
|
+
"clean:dist": "rimraf ../../build/angular",
|
|
26
|
+
"clean:cover": "rimraf ../../coverage/angular",
|
|
27
|
+
"bundle": "webpack"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@angular/common": "^14.2.12",
|
|
31
|
+
"@angular/core": "^14.2.12",
|
|
32
|
+
"@opra/client": "^0.6.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@angular-devkit/build-angular": "^14.2.10",
|
|
36
|
+
"@angular/compiler": "^14.2.12",
|
|
37
|
+
"@angular/platform-browser": "^14.2.12",
|
|
38
|
+
"@angular/platform-browser-dynamic": "^14.2.12",
|
|
39
|
+
"cross-fetch": "^3.1.5",
|
|
40
|
+
"core-js": "^3.26.1",
|
|
41
|
+
"express": "^4.18.2",
|
|
42
|
+
"zone.js": "^0.12.0"
|
|
43
|
+
},
|
|
44
|
+
"type": "module",
|
|
45
|
+
"types": "esm/index.d.ts",
|
|
46
|
+
"exports": {
|
|
47
|
+
".": {
|
|
48
|
+
"default": {
|
|
49
|
+
"default": "./esm/index.js",
|
|
50
|
+
"require": "./cjs/index.js"
|
|
51
|
+
},
|
|
52
|
+
"browser": {
|
|
53
|
+
"default": "./browser/opra-angular.min.mjs",
|
|
54
|
+
"require": "./browser/opra-angular.min.cjs"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"main": "./umd/opra-angular.umd.min.js",
|
|
59
|
+
"unpkg": "./umd/opra-angular.umd.min.js",
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=16.0",
|
|
62
|
+
"npm": ">=7.0.0"
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"bin/",
|
|
66
|
+
"cjs/",
|
|
67
|
+
"esm/",
|
|
68
|
+
"umd/",
|
|
69
|
+
"LICENSE",
|
|
70
|
+
"README.md"
|
|
71
|
+
],
|
|
72
|
+
"keywords": [
|
|
73
|
+
"opra",
|
|
74
|
+
"client",
|
|
75
|
+
"angular",
|
|
76
|
+
"request",
|
|
77
|
+
"axios",
|
|
78
|
+
"fetch"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see opra-angular.umd.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@opra/client"),require("@angular/common")):"function"==typeof define&&define.amd?define("OpraClient",["@angular/core","@opra/client","@angular/common"],t):"object"==typeof exports?exports.OpraClient=t(require("@angular/core"),require("@opra/client"),require("@angular/common")):e.OpraClient=t(e["@angular/core"],e["@opra/client"],e["@angular/common"])}(self,((e,t,r)=>(()=>{"use strict";var n,o,s={848:e=>{e.exports=r},900:t=>{t.exports=e},205:e=>{e.exports=t}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return s[e](r,r.exports,a),r.exports}o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);a.r(r);var s={};n=n||[null,o({}),o([]),o(o)];for(var i=2&t&&e;"object"==typeof i&&!~n.indexOf(i);i=o(i))Object.getOwnPropertyNames(i).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,a.d(r,s),r},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{a.r(c),a.d(c,{OPRA_CLIENT_MODULE_OPTIONS:()=>et,OpraClientModule:()=>rt});var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function r(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))}function n(e,t){var r,n,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function o(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}function i(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function u(e){return this instanceof u?(this.v=e,this):new u(e)}function l(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof u?Promise.resolve(r.value.v).then(c,l):p(s[0][2],r)}catch(e){p(s[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function p(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function p(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=o(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}Object.create;var d=a(848),h=a(900),f=a.t(h,2);function y(e){return"function"==typeof e}function m(e){return e[e.length-1]}function v(e){return(t=m(e))&&y(t.schedule)?e.pop():void 0;var t}var b=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function g(e){return y(null==e?void 0:e.then)}var w,x=((w=function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}((function(e){Error.call(e),e.stack=(new Error).stack}))).prototype=Object.create(Error.prototype),w.prototype.constructor=w,w);function T(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var I=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,n,a;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var u=o(c),l=u.next();!l.done;l=u.next()){l.value.remove(this)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else c.remove(this);var p=this.initialTeardown;if(y(p))try{p()}catch(e){a=e instanceof x?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var h=o(d),f=h.next();!f.done;f=h.next()){var m=f.value;try{O(m)}catch(e){a=null!=a?a:[],e instanceof x?a=i(i([],s(a)),s(e.errors)):a.push(e)}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}}if(a)throw new x(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)O(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&T(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&T(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();I.EMPTY;function E(e){return e instanceof I||e&&"closed"in e&&y(e.remove)&&y(e.add)&&y(e.unsubscribe)}function O(e){y(e)?e():e.unsubscribe()}var P={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},j={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=j.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,i([e,t],s(r))):setTimeout.apply(void 0,i([e,t],s(r)))},clearTimeout:function(e){var t=j.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function S(e){j.setTimeout((function(){var t=P.onUnhandledError;if(!t)throw e;t(e)}))}function C(){}var N=k("C",void 0,void 0);function k(e,t,r){return{kind:e,value:t,error:r}}var _=null;var F=function(e){function r(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,E(t)&&t.add(r)):r.destination=U,r}return t(r,e),r.create=function(e,t,r){return new R(e,t,r)},r.prototype.next=function(e){this.isStopped?L(function(e){return k("N",e,void 0)}(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?L(k("E",void 0,e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?L(N,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(I),D=Function.prototype.bind;function A(e,t){return D.call(e,t)}var M=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){V(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){V(e)}else V(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){V(e)}},e}(),R=function(e){function r(t,r,n){var o,s,i=e.call(this)||this;y(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i&&P.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return i.unsubscribe()},o={next:t.next&&A(t.next,s),error:t.error&&A(t.error,s),complete:t.complete&&A(t.complete,s)}):o=t;return i.destination=new M(o),i}return t(r,e),r}(F);function V(e){var t;P.useDeprecatedSynchronousErrorHandling?(t=e,P.useDeprecatedSynchronousErrorHandling&&_&&(_.errorThrown=!0,_.error=t)):S(e)}function L(e,t){var r=P.onStoppedNotification;r&&j.setTimeout((function(){return r(e,t)}))}var U={closed:!0,next:C,error:function(e){throw e},complete:C},z="function"==typeof Symbol&&Symbol.observable||"@@observable";function H(e){return e}function q(e){return 0===e.length?H:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var J=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,o=this,s=(n=e)&&n instanceof F||function(e){return e&&y(e.next)&&y(e.error)&&y(e.complete)}(n)&&E(n)?e:new R(e,t,r);return function(e){if(P.useDeprecatedSynchronousErrorHandling){var t=!_;if(t&&(_={errorThrown:!1,error:null}),e(),t){var r=_,n=r.errorThrown,o=r.error;if(_=null,n)throw o}}else e()}((function(){var e=o,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?o._subscribe(s):o._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=K(t))((function(t,n){var o=new R({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[z]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=K(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function K(e){var t;return null!==(t=null!=e?e:P.Promise)&&void 0!==t?t:Promise}function X(e){return y(e[z])}function B(e){return Symbol.asyncIterator&&y(null==e?void 0:e[Symbol.asyncIterator])}function $(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var W="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function G(e){return y(null==e?void 0:e[W])}function Y(e){return l(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,u(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,u(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,u(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Z(e){return y(null==e?void 0:e.getReader)}function Q(e){if(e instanceof J)return e;if(null!=e){if(X(e))return s=e,new J((function(e){var t=s[z]();if(y(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(b(e))return n=e,new J((function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()}));if(g(e))return r=e,new J((function(e){r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,S)}));if(B(e))return ee(e);if(G(e))return t=e,new J((function(e){var r,n;try{for(var s=o(t),i=s.next();!i.done;i=s.next()){var a=i.value;if(e.next(a),e.closed)return}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}e.complete()}));if(Z(e))return ee(Y(e))}var t,r,n,s;throw $(e)}function ee(e){return new J((function(t){(function(e,t){var o,s,i,a;return r(this,void 0,void 0,(function(){var r,c;return n(this,(function(n){switch(n.label){case 0:n.trys.push([0,5,6,11]),o=p(e),n.label=1;case 1:return[4,o.next()];case 2:if((s=n.sent()).done)return[3,4];if(r=s.value,t.next(r),t.closed)return[2];n.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=n.sent(),i={error:c},[3,11];case 6:return n.trys.push([6,,9,10]),s&&!s.done&&(a=o.return)?[4,a.call(o)]:[3,8];case 7:n.sent(),n.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function te(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var s=t.schedule((function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(s),!o)return s}function re(e){return function(t){if(function(e){return y(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function ne(e,t,r,n,o){return new oe(e,t,r,n,o)}var oe=function(e){function r(t,r,n,o,s,i){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=i,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return t(r,e),r.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},r}(F);function se(e,t){return void 0===t&&(t=0),re((function(r,n){r.subscribe(ne(n,(function(r){return te(n,e,(function(){return n.next(r)}),t)}),(function(){return te(n,e,(function(){return n.complete()}),t)}),(function(r){return te(n,e,(function(){return n.error(r)}),t)})))}))}function ie(e,t){return void 0===t&&(t=0),re((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}function ae(e,t){if(!e)throw new Error("Iterable cannot be null");return new J((function(r){te(r,t,(function(){var n=e[Symbol.asyncIterator]();te(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}function ce(e,t){if(null!=e){if(X(e))return function(e,t){return Q(e).pipe(ie(t),se(t))}(e,t);if(b(e))return function(e,t){return new J((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}(e,t);if(g(e))return function(e,t){return Q(e).pipe(ie(t),se(t))}(e,t);if(B(e))return ae(e,t);if(G(e))return function(e,t){return new J((function(r){var n;return te(r,t,(function(){n=e[W](),te(r,t,(function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)}),0,!0)})),function(){return y(null==n?void 0:n.return)&&n.return()}}))}(e,t);if(Z(e))return function(e,t){return ae(Y(e),t)}(e,t)}throw $(e)}function ue(e,t){return t?ce(e,t):Q(e)}function le(e,t){return re((function(r,n){var o=0;r.subscribe(ne(n,(function(r){n.next(e.call(t,r,o++))})))}))}function pe(e,t,r){return void 0===r&&(r=1/0),y(t)?pe((function(r,n){return le((function(e,o){return t(r,e,n,o)}))(Q(e(r,n)))}),r):("number"==typeof t&&(r=t),re((function(t,n){return function(e,t,r,n,o,s,i,a){var c=[],u=0,l=0,p=!1,d=function(){!p||c.length||u||t.complete()},h=function(e){return u<n?f(e):c.push(e)},f=function(e){s&&t.next(e),u++;var a=!1;Q(r(e,l++)).subscribe(ne(t,(function(e){null==o||o(e),s?h(e):t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{u--;for(var e=function(){var e=c.shift();i?te(t,i,(function(){return f(e)})):f(e)};c.length&&u<n;)e();d()}catch(e){t.error(e)}})))};return e.subscribe(ne(t,h,(function(){p=!0,d()}))),function(){null==a||a()}}(t,n,e,r)})))}class de{}class he{}class fe{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach((e=>{const t=e.indexOf(":");if(t>0){const r=e.slice(0,t),n=r.toLowerCase(),o=e.slice(t+1).trim();this.maybeSetNormalizedName(r,n),this.headers.has(n)?this.headers.get(n).push(o):this.headers.set(n,[o])}}))}:()=>{("undefined"==typeof ngDevMode||ngDevMode)&&function(e){for(const[t,r]of Object.entries(e))if("string"!=typeof r&&!Array.isArray(r))throw new Error(`Unexpected value of the \`${t}\` header provided. Expecting either a string or an array, but got: \`${r}\`.`)}(e),this.headers=new Map,Object.keys(e).forEach((t=>{let r=e[t];const n=t.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(this.headers.set(n,r),this.maybeSetNormalizedName(t,n))}))}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof fe?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((e=>this.applyUpdate(e))),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach((t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))}))}clone(e){const t=new fe;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof fe?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(e.name,t);const n=("a"===e.op?this.headers.get(t):void 0)||[];n.push(...r),this.headers.set(t,n);break;case"d":const o=e.value;if(o){let e=this.headers.get(t);if(!e)return;e=e.filter((e=>-1===o.indexOf(e))),0===e.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,e)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach((t=>e(this.normalizedNames.get(t),this.headers.get(t))))}}class ye{encodeKey(e){return be(e)}encodeValue(e){return be(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const me=/%(\d[a-f0-9])/gi,ve={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function be(e){return encodeURIComponent(e).replace(me,((e,t)=>ve[t]??e))}function ge(e){return`${e}`}class we{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new ye,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(e,t){const r=new Map;e.length>0&&e.replace(/^\?/,"").split("&").forEach((e=>{const n=e.indexOf("="),[o,s]=-1==n?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,n)),t.decodeValue(e.slice(n+1))],i=r.get(o)||[];i.push(s),r.set(o,i)}));return r}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach((t=>{const r=e.fromObject[t],n=Array.isArray(r)?r.map(ge):[ge(r)];this.map.set(t,n)}))):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){const t=[];return Object.keys(e).forEach((r=>{const n=e[r];Array.isArray(n)?n.forEach((e=>{t.push({param:r,value:e,op:"a"})})):t.push({param:r,value:n,op:"a"})})),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map((e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map((e=>t+"="+this.encoder.encodeValue(e))).join("&")})).filter((e=>""!==e)).join("&")}clone(e){const t=new we({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((e=>this.map.set(e,this.cloneFrom.map.get(e)))),this.updates.forEach((e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(ge(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let t=this.map.get(e.param)||[];const r=t.indexOf(ge(e.value));-1!==r&&t.splice(r,1),t.length>0?this.map.set(e.param,t):this.map.delete(e.param)}}})),this.cloneFrom=this.updates=null)}}class xe{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function Te(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function Ie(e){return"undefined"!=typeof Blob&&e instanceof Blob}function Ee(e){return"undefined"!=typeof FormData&&e instanceof FormData}class Oe{constructor(e,t,r,n){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||n?(this.body=void 0!==r?r:null,o=n):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new fe),this.context||(this.context=new xe),this.params){const e=this.params.toString();if(0===e.length)this.urlWithParams=t;else{const r=t.indexOf("?"),n=-1===r?"?":r<t.length-1?"&":"";this.urlWithParams=t+n+e}}else this.params=new we,this.urlWithParams=t}serializeBody(){return null===this.body?null:Te(this.body)||Ie(this.body)||Ee(this.body)||(e=this.body,"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams)||"string"==typeof this.body?this.body:this.body instanceof we?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString();var e}detectContentTypeHeader(){return null===this.body||Ee(this.body)?null:Ie(this.body)?this.body.type||null:Te(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof we?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(e={}){const t=e.method||this.method,r=e.url||this.url,n=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,s=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,i=void 0!==e.reportProgress?e.reportProgress:this.reportProgress;let a=e.headers||this.headers,c=e.params||this.params;const u=e.context??this.context;return void 0!==e.setHeaders&&(a=Object.keys(e.setHeaders).reduce(((t,r)=>t.set(r,e.setHeaders[r])),a)),e.setParams&&(c=Object.keys(e.setParams).reduce(((t,r)=>t.set(r,e.setParams[r])),c)),new Oe(t,r,o,{params:c,headers:a,context:u,reportProgress:i,responseType:n,withCredentials:s})}}var Pe;!function(e){e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User"}(Pe||(Pe={}));class je{constructor(e,t=200,r="OK"){this.headers=e.headers||new fe,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class Se extends je{constructor(e={}){super(e),this.type=Pe.ResponseHeader}clone(e={}){return new Se({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Ce extends je{constructor(e={}){super(e),this.type=Pe.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new Ce({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Ne extends je{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function ke(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}class _e{constructor(e){this.handler=e}request(e,t,r={}){let n;if(e instanceof Oe)n=e;else{let o,s;o=r.headers instanceof fe?r.headers:new fe(r.headers),r.params&&(s=r.params instanceof we?r.params:new we({fromObject:r.params})),n=new Oe(e,t,void 0!==r.body?r.body:null,{headers:o,context:r.context,params:s,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=v(e);return ue(e,r)}(n).pipe((s=e=>this.handler.handle(e),y(i)?pe(s,i,1):pe(s,1)));var s,i;if(e instanceof Oe||"events"===r.observe)return o;const a=o.pipe((c=e=>e instanceof Ce,re((function(e,t){var r=0;e.subscribe(ne(t,(function(e){return c.call(u,e,r++)&&t.next(e)})))}))));var c,u;switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return a.pipe(le((e=>{if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body})));case"blob":return a.pipe(le((e=>{if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body})));case"text":return a.pipe(le((e=>{if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body})));default:return a.pipe(le((e=>e.body)))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:(new we).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,r={}){return this.request("PATCH",e,ke(r,t))}post(e,t,r={}){return this.request("POST",e,ke(r,t))}put(e,t,r={}){return this.request("PUT",e,ke(r,t))}}_e.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:_e,deps:[{token:de}],target:h["ɵɵFactoryTarget"].Injectable}),_e.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:_e}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:_e,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:de}]}});class Fe{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}const De=new h.InjectionToken("HTTP_INTERCEPTORS");class Ae{intercept(e,t){return t.handle(e)}}Ae.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ae,deps:[],target:h["ɵɵFactoryTarget"].Injectable}),Ae.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ae}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ae,decorators:[{type:h.Injectable}]});let Me,Re=0;class Ve{}class Le{constructor(e,t){this.callbackMap=e,this.document=t,this.resolvedPromise=Promise.resolve()}nextCallback(){return"ng_jsonp_callback_"+Re++}handle(e){if("JSONP"!==e.method)throw new Error("JSONP requests must use JSONP request method.");if("json"!==e.responseType)throw new Error("JSONP requests must use Json response type.");if(e.headers.keys().length>0)throw new Error("JSONP requests do not support headers.");return new J((t=>{const r=this.nextCallback(),n=e.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/,`=${r}$1`),o=this.document.createElement("script");o.src=n;let s=null,i=!1;this.callbackMap[r]=e=>{delete this.callbackMap[r],s=e,i=!0};const a=()=>{o.parentNode&&o.parentNode.removeChild(o),delete this.callbackMap[r]};return o.addEventListener("load",(e=>{this.resolvedPromise.then((()=>{a(),i?(t.next(new Ce({body:s,status:200,statusText:"OK",url:n})),t.complete()):t.error(new Ne({url:n,status:0,statusText:"JSONP Error",error:new Error("JSONP injected script did not invoke callback.")}))}))})),o.addEventListener("error",(e=>{a(),t.error(new Ne({error:e,status:0,statusText:"JSONP Error",url:n}))})),this.document.body.appendChild(o),t.next({type:Pe.Sent}),()=>{i||this.removeListeners(o),a()}}))}removeListeners(e){Me||(Me=this.document.implementation.createHTMLDocument()),Me.adoptNode(e)}}Le.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Le,deps:[{token:Ve},{token:d.DOCUMENT}],target:h["ɵɵFactoryTarget"].Injectable}),Le.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Le}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Le,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:Ve},{type:void 0,decorators:[{type:h.Inject,args:[d.DOCUMENT]}]}]}});class Ue{constructor(e){this.jsonp=e}intercept(e,t){return"JSONP"===e.method?this.jsonp.handle(e):t.handle(e)}}Ue.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ue,deps:[{token:Le}],target:h["ɵɵFactoryTarget"].Injectable}),Ue.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ue}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ue,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:Le}]}});const ze=/^\)\]\}',?\n/;class He{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new J((t=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach(((e,t)=>r.setRequestHeader(e,t.join(",")))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const t=e.detectContentTypeHeader();null!==t&&r.setRequestHeader("Content-Type",t)}if(e.responseType){const t=e.responseType.toLowerCase();r.responseType="json"!==t?t:"text"}const n=e.serializeBody();let o=null;const s=()=>{if(null!==o)return o;const t=r.statusText||"OK",n=new fe(r.getAllResponseHeaders()),s=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(r)||e.url;return o=new Se({headers:n,status:r.status,statusText:t,url:s}),o},i=()=>{let{headers:n,status:o,statusText:i,url:a}=s(),c=null;204!==o&&(c=void 0===r.response?r.responseText:r.response),0===o&&(o=c?200:0);let u=o>=200&&o<300;if("json"===e.responseType&&"string"==typeof c){const e=c;c=c.replace(ze,"");try{c=""!==c?JSON.parse(c):null}catch(t){c=e,u&&(u=!1,c={error:t,text:c})}}u?(t.next(new Ce({body:c,headers:n,status:o,statusText:i,url:a||void 0})),t.complete()):t.error(new Ne({error:c,headers:n,status:o,statusText:i,url:a||void 0}))},a=e=>{const{url:n}=s(),o=new Ne({error:e,status:r.status||0,statusText:r.statusText||"Unknown Error",url:n||void 0});t.error(o)};let c=!1;const u=n=>{c||(t.next(s()),c=!0);let o={type:Pe.DownloadProgress,loaded:n.loaded};n.lengthComputable&&(o.total=n.total),"text"===e.responseType&&r.responseText&&(o.partialText=r.responseText),t.next(o)},l=e=>{let r={type:Pe.UploadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),t.next(r)};return r.addEventListener("load",i),r.addEventListener("error",a),r.addEventListener("timeout",a),r.addEventListener("abort",a),e.reportProgress&&(r.addEventListener("progress",u),null!==n&&r.upload&&r.upload.addEventListener("progress",l)),r.send(n),t.next({type:Pe.Sent}),()=>{r.removeEventListener("error",a),r.removeEventListener("abort",a),r.removeEventListener("load",i),r.removeEventListener("timeout",a),e.reportProgress&&(r.removeEventListener("progress",u),null!==n&&r.upload&&r.upload.removeEventListener("progress",l)),r.readyState!==r.DONE&&r.abort()}}))}}He.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:He,deps:[{token:d.XhrFactory}],target:h["ɵɵFactoryTarget"].Injectable}),He.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:He}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:He,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:d.XhrFactory}]}});const qe=new h.InjectionToken("XSRF_COOKIE_NAME"),Je=new h.InjectionToken("XSRF_HEADER_NAME");class Ke{}class Xe{constructor(e,t,r){this.doc=e,this.platform=t,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,d["ɵparseCookieValue"])(e,this.cookieName),this.lastCookieString=e),this.lastToken}}Xe.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Xe,deps:[{token:d.DOCUMENT},{token:h.PLATFORM_ID},{token:qe}],target:h["ɵɵFactoryTarget"].Injectable}),Xe.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Xe}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Xe,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:void 0,decorators:[{type:h.Inject,args:[d.DOCUMENT]}]},{type:void 0,decorators:[{type:h.Inject,args:[h.PLATFORM_ID]}]},{type:void 0,decorators:[{type:h.Inject,args:[qe]}]}]}});class Be{constructor(e,t){this.tokenService=e,this.headerName=t}intercept(e,t){const r=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||r.startsWith("http://")||r.startsWith("https://"))return t.handle(e);const n=this.tokenService.getToken();return null===n||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,n)})),t.handle(e)}}Be.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Be,deps:[{token:Ke},{token:Je}],target:h["ɵɵFactoryTarget"].Injectable}),Be.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Be}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Be,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:Ke},{type:void 0,decorators:[{type:h.Inject,args:[Je]}]}]}});class $e{constructor(e,t){this.backend=e,this.injector=t,this.chain=null}handle(e){if(null===this.chain){const e=this.injector.get(De,[]);this.chain=e.reduceRight(((e,t)=>new Fe(e,t)),this.backend)}return this.chain.handle(e)}}function We(){return"object"==typeof window?window:{}}$e.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:$e,deps:[{token:he},{token:h.Injector}],target:h["ɵɵFactoryTarget"].Injectable}),$e.ɵprov=h["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:$e}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:$e,decorators:[{type:h.Injectable}],ctorParameters:function(){return[{type:he},{type:h.Injector}]}});class Ge{static disable(){return{ngModule:Ge,providers:[{provide:Be,useClass:Ae}]}}static withOptions(e={}){return{ngModule:Ge,providers:[e.cookieName?{provide:qe,useValue:e.cookieName}:[],e.headerName?{provide:Je,useValue:e.headerName}:[]]}}}Ge.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ge,deps:[],target:h["ɵɵFactoryTarget"].NgModule}),Ge.ɵmod=h["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"14.2.12",ngImport:f,type:Ge}),Ge.ɵinj=h["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ge,providers:[Be,{provide:De,useExisting:Be,multi:!0},{provide:Ke,useClass:Xe},{provide:qe,useValue:"XSRF-TOKEN"},{provide:Je,useValue:"X-XSRF-TOKEN"}]}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ge,decorators:[{type:h.NgModule,args:[{providers:[Be,{provide:De,useExisting:Be,multi:!0},{provide:Ke,useClass:Xe},{provide:qe,useValue:"XSRF-TOKEN"},{provide:Je,useValue:"X-XSRF-TOKEN"}]}]}]});class Ye{}Ye.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ye,deps:[],target:h["ɵɵFactoryTarget"].NgModule}),Ye.ɵmod=h["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"14.2.12",ngImport:f,type:Ye,imports:[Ge]}),Ye.ɵinj=h["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ye,providers:[_e,{provide:de,useClass:$e},He,{provide:he,useExisting:He}],imports:[Ge.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ye,decorators:[{type:h.NgModule,args:[{imports:[Ge.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})],providers:[_e,{provide:de,useClass:$e},He,{provide:he,useExisting:He}]}]}]});class Ze{}Ze.ɵfac=h["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ze,deps:[],target:h["ɵɵFactoryTarget"].NgModule}),Ze.ɵmod=h["ɵɵngDeclareNgModule"]({minVersion:"14.0.0",version:"14.2.12",ngImport:f,type:Ze}),Ze.ɵinj=h["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ze,providers:[Le,{provide:Ve,useFactory:We},{provide:De,useClass:Ue,multi:!0}]}),h["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"14.2.12",ngImport:f,type:Ze,decorators:[{type:h.NgModule,args:[{providers:[Le,{provide:Ve,useFactory:We},{provide:De,useClass:Ue,multi:!0}]}]}]});var Qe=a(205);const et="OPRA_CLIENT_MODULE_OPTIONS";var tt;let rt=tt=class{static forRoot(e){const t=e.token||Qe.OpraHttpClient,r=new Qe.OpraHttpClient(e.serviceUrl,e);return{ngModule:tt,providers:[{provide:et,useValue:e},{provide:t,useValue:r},{provide:h.APP_INITIALIZER,useFactory:()=>()=>r.init(),multi:!0}]}}static forRootAsync(e){const t=e.token||Qe.OpraHttpClient,r=this.createAsyncProviders(e);return{ngModule:tt,providers:[...r,{provide:t,deps:[_e,et],useFactory:(e,t)=>new Qe.OpraHttpClient(t.serviceUrl,t)},{provide:h.APP_INITIALIZER,deps:[t],useFactory:e=>()=>e.init(),multi:!0}]}}static createAsyncProviders(e){if(e.useExisting||e.useFactory)return[this.createAsyncOptionsProvider(e)];if(e.useClass)return[this.createAsyncOptionsProvider(e),{provide:e.useClass,useClass:e.useClass}];throw new Error("Invalid configuration. Must provide useFactory, useClass or useExisting")}static createAsyncOptionsProvider(e){if(e.useFactory)return{provide:et,useFactory:e.useFactory,deps:e.deps||[]};const t=e.useClass||e.useExisting;if(t)return{provide:et,useFactory:e=>e,deps:[t]};throw new Error("Invalid configuration. Must provide useFactory, useClass or useExisting")}};rt=tt=function(e,t,r,n){var o,s=arguments.length,i=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i}([(0,h.NgModule)({imports:[Ye]})],rt)})(),c})()));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @license Angular v14.2.12
|
|
11
|
+
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
12
|
+
* License: MIT
|
|
13
|
+
*/
|