mp-front-cli 2.0.0-canary.0 → 2.0.0-canary.3
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/dist/core/errors/error-catalog.d.ts +1 -15
- package/dist/core/errors/error-catalog.d.ts.map +1 -1
- package/dist/core/interfaces/api-response.d.ts +4 -4
- package/dist/core/interfaces/api-response.d.ts.map +1 -1
- package/dist/core/interfaces/message.d.ts +1 -1
- package/dist/core/interfaces/message.d.ts.map +1 -1
- package/dist/core/middleware/index.d.ts +1 -1
- package/dist/core/middleware/index.d.ts.map +1 -1
- package/dist/core/utils/api-request/fetch-service-be.d.ts +1 -1
- package/dist/core/utils/api-request/fetch-service-be.d.ts.map +1 -1
- package/dist/core/utils/api-request/fetch-service-fe.d.ts +1 -1
- package/dist/core/utils/api-request/fetch-service-fe.d.ts.map +1 -1
- package/dist/core/utils/custom-cache.d.ts.map +1 -1
- package/dist/{fetch-service-fe-Bn43l_lH.js → fetch-service-fe-I8dnti8N.js} +13 -6
- package/dist/{i18n-CniHhItS.js → i18n-1X2In6k5.js} +9 -5
- package/dist/lang/common/errors/es_MX/index.d.ts +4 -0
- package/dist/lang/common/errors/es_MX/index.d.ts.map +1 -1
- package/dist/mp-front-cli-all.es.js +2 -2
- package/dist/mp-front-cli-cache.es.js +1 -1
- package/dist/mp-front-cli-core.es.js +2 -2
- package/dist/mp-front-cli-encoder.es.js +1304 -1304
- package/dist/mp-front-cli-header.es.js +1 -1
- package/dist/mp-front-cli-locale.es.js +1 -1
- package/dist/mp-front-cli-logger.es.js +2 -2
- package/dist/mp-front-cli-services.es.js +1 -1
- package/dist/service-token-DceocCHP.js +806 -0
- package/package.json +13 -9
- package/dist/service-token-D8bum6H0.js +0 -811
|
@@ -0,0 +1,806 @@
|
|
|
1
|
+
var G = Object.defineProperty;
|
|
2
|
+
var J = (r, t, e) => t in r ? G(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var m = (r, t, e) => J(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { switchMap as B, of as H, catchError as V } from "rxjs";
|
|
5
|
+
import { CustomLogger as q } from "./mp-front-cli-logger.es.js";
|
|
6
|
+
var O = function(r, t) {
|
|
7
|
+
return O = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
8
|
+
e.__proto__ = n;
|
|
9
|
+
} || function(e, n) {
|
|
10
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
11
|
+
}, O(r, t);
|
|
12
|
+
};
|
|
13
|
+
function E(r, t) {
|
|
14
|
+
if (typeof t != "function" && t !== null)
|
|
15
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
16
|
+
O(r, t);
|
|
17
|
+
function e() {
|
|
18
|
+
this.constructor = r;
|
|
19
|
+
}
|
|
20
|
+
r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
21
|
+
}
|
|
22
|
+
var w = function() {
|
|
23
|
+
return w = Object.assign || function(t) {
|
|
24
|
+
for (var e, n = 1, i = arguments.length; n < i; n++) {
|
|
25
|
+
e = arguments[n];
|
|
26
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
}, w.apply(this, arguments);
|
|
30
|
+
};
|
|
31
|
+
function N(r, t) {
|
|
32
|
+
var e = {};
|
|
33
|
+
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && t.indexOf(n) < 0 && (e[n] = r[n]);
|
|
34
|
+
if (r != null && typeof Object.getOwnPropertySymbols == "function")
|
|
35
|
+
for (var i = 0, n = Object.getOwnPropertySymbols(r); i < n.length; i++)
|
|
36
|
+
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (e[n[i]] = r[n[i]]);
|
|
37
|
+
return e;
|
|
38
|
+
}
|
|
39
|
+
function W(r, t, e, n) {
|
|
40
|
+
function i(o) {
|
|
41
|
+
return o instanceof e ? o : new e(function(c) {
|
|
42
|
+
c(o);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return new (e || (e = Promise))(function(o, c) {
|
|
46
|
+
function s(l) {
|
|
47
|
+
try {
|
|
48
|
+
u(n.next(l));
|
|
49
|
+
} catch (p) {
|
|
50
|
+
c(p);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function a(l) {
|
|
54
|
+
try {
|
|
55
|
+
u(n.throw(l));
|
|
56
|
+
} catch (p) {
|
|
57
|
+
c(p);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function u(l) {
|
|
61
|
+
l.done ? o(l.value) : i(l.value).then(s, a);
|
|
62
|
+
}
|
|
63
|
+
u((n = n.apply(r, t || [])).next());
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function K(r, t) {
|
|
67
|
+
var e = { label: 0, sent: function() {
|
|
68
|
+
if (o[0] & 1) throw o[1];
|
|
69
|
+
return o[1];
|
|
70
|
+
}, trys: [], ops: [] }, n, i, o, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
71
|
+
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
72
|
+
return this;
|
|
73
|
+
}), c;
|
|
74
|
+
function s(u) {
|
|
75
|
+
return function(l) {
|
|
76
|
+
return a([u, l]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function a(u) {
|
|
80
|
+
if (n) throw new TypeError("Generator is already executing.");
|
|
81
|
+
for (; c && (c = 0, u[0] && (e = 0)), e; ) try {
|
|
82
|
+
if (n = 1, i && (o = u[0] & 2 ? i.return : u[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, u[1])).done) return o;
|
|
83
|
+
switch (i = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
|
|
84
|
+
case 0:
|
|
85
|
+
case 1:
|
|
86
|
+
o = u;
|
|
87
|
+
break;
|
|
88
|
+
case 4:
|
|
89
|
+
return e.label++, { value: u[1], done: !1 };
|
|
90
|
+
case 5:
|
|
91
|
+
e.label++, i = u[1], u = [0];
|
|
92
|
+
continue;
|
|
93
|
+
case 7:
|
|
94
|
+
u = e.ops.pop(), e.trys.pop();
|
|
95
|
+
continue;
|
|
96
|
+
default:
|
|
97
|
+
if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
98
|
+
e = 0;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
|
|
102
|
+
e.label = u[1];
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
if (u[0] === 6 && e.label < o[1]) {
|
|
106
|
+
e.label = o[1], o = u;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
if (o && e.label < o[2]) {
|
|
110
|
+
e.label = o[2], e.ops.push(u);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
o[2] && e.ops.pop(), e.trys.pop();
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
u = t.call(r, e);
|
|
117
|
+
} catch (l) {
|
|
118
|
+
u = [6, l], i = 0;
|
|
119
|
+
} finally {
|
|
120
|
+
n = o = 0;
|
|
121
|
+
}
|
|
122
|
+
if (u[0] & 5) throw u[1];
|
|
123
|
+
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function S(r) {
|
|
127
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
|
|
128
|
+
if (e) return e.call(r);
|
|
129
|
+
if (r && typeof r.length == "number") return {
|
|
130
|
+
next: function() {
|
|
131
|
+
return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
135
|
+
}
|
|
136
|
+
function T(r, t) {
|
|
137
|
+
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
|
138
|
+
if (!e) return r;
|
|
139
|
+
var n = e.call(r), i, o = [], c;
|
|
140
|
+
try {
|
|
141
|
+
for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) o.push(i.value);
|
|
142
|
+
} catch (s) {
|
|
143
|
+
c = { error: s };
|
|
144
|
+
} finally {
|
|
145
|
+
try {
|
|
146
|
+
i && !i.done && (e = n.return) && e.call(n);
|
|
147
|
+
} finally {
|
|
148
|
+
if (c) throw c.error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return o;
|
|
152
|
+
}
|
|
153
|
+
function P(r, t, e) {
|
|
154
|
+
if (e || arguments.length === 2) for (var n = 0, i = t.length, o; n < i; n++)
|
|
155
|
+
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
156
|
+
return r.concat(o || Array.prototype.slice.call(t));
|
|
157
|
+
}
|
|
158
|
+
function A(r) {
|
|
159
|
+
return this instanceof A ? (this.v = r, this) : new A(r);
|
|
160
|
+
}
|
|
161
|
+
function Q(r, t, e) {
|
|
162
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
163
|
+
var n = e.apply(r, t || []), i, o = [];
|
|
164
|
+
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", c), i[Symbol.asyncIterator] = function() {
|
|
165
|
+
return this;
|
|
166
|
+
}, i;
|
|
167
|
+
function c(f) {
|
|
168
|
+
return function(d) {
|
|
169
|
+
return Promise.resolve(d).then(f, p);
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function s(f, d) {
|
|
173
|
+
n[f] && (i[f] = function(h) {
|
|
174
|
+
return new Promise(function(Y, $) {
|
|
175
|
+
o.push([f, h, Y, $]) > 1 || a(f, h);
|
|
176
|
+
});
|
|
177
|
+
}, d && (i[f] = d(i[f])));
|
|
178
|
+
}
|
|
179
|
+
function a(f, d) {
|
|
180
|
+
try {
|
|
181
|
+
u(n[f](d));
|
|
182
|
+
} catch (h) {
|
|
183
|
+
v(o[0][3], h);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function u(f) {
|
|
187
|
+
f.value instanceof A ? Promise.resolve(f.value.v).then(l, p) : v(o[0][2], f);
|
|
188
|
+
}
|
|
189
|
+
function l(f) {
|
|
190
|
+
a("next", f);
|
|
191
|
+
}
|
|
192
|
+
function p(f) {
|
|
193
|
+
a("throw", f);
|
|
194
|
+
}
|
|
195
|
+
function v(f, d) {
|
|
196
|
+
f(d), o.shift(), o.length && a(o[0][0], o[0][1]);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function X(r) {
|
|
200
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
201
|
+
var t = r[Symbol.asyncIterator], e;
|
|
202
|
+
return t ? t.call(r) : (r = typeof S == "function" ? S(r) : r[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
|
|
203
|
+
return this;
|
|
204
|
+
}, e);
|
|
205
|
+
function n(o) {
|
|
206
|
+
e[o] = r[o] && function(c) {
|
|
207
|
+
return new Promise(function(s, a) {
|
|
208
|
+
c = r[o](c), i(s, a, c.done, c.value);
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function i(o, c, s, a) {
|
|
213
|
+
Promise.resolve(a).then(function(u) {
|
|
214
|
+
o({ value: u, done: s });
|
|
215
|
+
}, c);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function y(r) {
|
|
219
|
+
return typeof r == "function";
|
|
220
|
+
}
|
|
221
|
+
function Z(r) {
|
|
222
|
+
var t = function(n) {
|
|
223
|
+
Error.call(n), n.stack = new Error().stack;
|
|
224
|
+
}, e = r(t);
|
|
225
|
+
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
226
|
+
}
|
|
227
|
+
var g = Z(function(r) {
|
|
228
|
+
return function(e) {
|
|
229
|
+
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
230
|
+
` + e.map(function(n, i) {
|
|
231
|
+
return i + 1 + ") " + n.toString();
|
|
232
|
+
}).join(`
|
|
233
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
234
|
+
};
|
|
235
|
+
});
|
|
236
|
+
function j(r, t) {
|
|
237
|
+
if (r) {
|
|
238
|
+
var e = r.indexOf(t);
|
|
239
|
+
0 <= e && r.splice(e, 1);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
var x = function() {
|
|
243
|
+
function r(t) {
|
|
244
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
245
|
+
}
|
|
246
|
+
return r.prototype.unsubscribe = function() {
|
|
247
|
+
var t, e, n, i, o;
|
|
248
|
+
if (!this.closed) {
|
|
249
|
+
this.closed = !0;
|
|
250
|
+
var c = this._parentage;
|
|
251
|
+
if (c)
|
|
252
|
+
if (this._parentage = null, Array.isArray(c))
|
|
253
|
+
try {
|
|
254
|
+
for (var s = S(c), a = s.next(); !a.done; a = s.next()) {
|
|
255
|
+
var u = a.value;
|
|
256
|
+
u.remove(this);
|
|
257
|
+
}
|
|
258
|
+
} catch (h) {
|
|
259
|
+
t = { error: h };
|
|
260
|
+
} finally {
|
|
261
|
+
try {
|
|
262
|
+
a && !a.done && (e = s.return) && e.call(s);
|
|
263
|
+
} finally {
|
|
264
|
+
if (t) throw t.error;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else
|
|
268
|
+
c.remove(this);
|
|
269
|
+
var l = this.initialTeardown;
|
|
270
|
+
if (y(l))
|
|
271
|
+
try {
|
|
272
|
+
l();
|
|
273
|
+
} catch (h) {
|
|
274
|
+
o = h instanceof g ? h.errors : [h];
|
|
275
|
+
}
|
|
276
|
+
var p = this._finalizers;
|
|
277
|
+
if (p) {
|
|
278
|
+
this._finalizers = null;
|
|
279
|
+
try {
|
|
280
|
+
for (var v = S(p), f = v.next(); !f.done; f = v.next()) {
|
|
281
|
+
var d = f.value;
|
|
282
|
+
try {
|
|
283
|
+
L(d);
|
|
284
|
+
} catch (h) {
|
|
285
|
+
o = o ?? [], h instanceof g ? o = P(P([], T(o)), T(h.errors)) : o.push(h);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
} catch (h) {
|
|
289
|
+
n = { error: h };
|
|
290
|
+
} finally {
|
|
291
|
+
try {
|
|
292
|
+
f && !f.done && (i = v.return) && i.call(v);
|
|
293
|
+
} finally {
|
|
294
|
+
if (n) throw n.error;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (o)
|
|
299
|
+
throw new g(o);
|
|
300
|
+
}
|
|
301
|
+
}, r.prototype.add = function(t) {
|
|
302
|
+
var e;
|
|
303
|
+
if (t && t !== this)
|
|
304
|
+
if (this.closed)
|
|
305
|
+
L(t);
|
|
306
|
+
else {
|
|
307
|
+
if (t instanceof r) {
|
|
308
|
+
if (t.closed || t._hasParent(this))
|
|
309
|
+
return;
|
|
310
|
+
t._addParent(this);
|
|
311
|
+
}
|
|
312
|
+
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
|
313
|
+
}
|
|
314
|
+
}, r.prototype._hasParent = function(t) {
|
|
315
|
+
var e = this._parentage;
|
|
316
|
+
return e === t || Array.isArray(e) && e.includes(t);
|
|
317
|
+
}, r.prototype._addParent = function(t) {
|
|
318
|
+
var e = this._parentage;
|
|
319
|
+
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
320
|
+
}, r.prototype._removeParent = function(t) {
|
|
321
|
+
var e = this._parentage;
|
|
322
|
+
e === t ? this._parentage = null : Array.isArray(e) && j(e, t);
|
|
323
|
+
}, r.prototype.remove = function(t) {
|
|
324
|
+
var e = this._finalizers;
|
|
325
|
+
e && j(e, t), t instanceof r && t._removeParent(this);
|
|
326
|
+
}, r.EMPTY = function() {
|
|
327
|
+
var t = new r();
|
|
328
|
+
return t.closed = !0, t;
|
|
329
|
+
}(), r;
|
|
330
|
+
}();
|
|
331
|
+
x.EMPTY;
|
|
332
|
+
function D(r) {
|
|
333
|
+
return r instanceof x || r && "closed" in r && y(r.remove) && y(r.add) && y(r.unsubscribe);
|
|
334
|
+
}
|
|
335
|
+
function L(r) {
|
|
336
|
+
y(r) ? r() : r.unsubscribe();
|
|
337
|
+
}
|
|
338
|
+
var z = {
|
|
339
|
+
Promise: void 0
|
|
340
|
+
}, rr = {
|
|
341
|
+
setTimeout: function(r, t) {
|
|
342
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
343
|
+
e[n - 2] = arguments[n];
|
|
344
|
+
return setTimeout.apply(void 0, P([r, t], T(e)));
|
|
345
|
+
},
|
|
346
|
+
clearTimeout: function(r) {
|
|
347
|
+
return clearTimeout(r);
|
|
348
|
+
},
|
|
349
|
+
delegate: void 0
|
|
350
|
+
};
|
|
351
|
+
function F(r) {
|
|
352
|
+
rr.setTimeout(function() {
|
|
353
|
+
throw r;
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
function k() {
|
|
357
|
+
}
|
|
358
|
+
function er(r) {
|
|
359
|
+
r();
|
|
360
|
+
}
|
|
361
|
+
var U = function(r) {
|
|
362
|
+
E(t, r);
|
|
363
|
+
function t(e) {
|
|
364
|
+
var n = r.call(this) || this;
|
|
365
|
+
return n.isStopped = !1, e ? (n.destination = e, D(e) && e.add(n)) : n.destination = or, n;
|
|
366
|
+
}
|
|
367
|
+
return t.create = function(e, n, i) {
|
|
368
|
+
return new I(e, n, i);
|
|
369
|
+
}, t.prototype.next = function(e) {
|
|
370
|
+
this.isStopped || this._next(e);
|
|
371
|
+
}, t.prototype.error = function(e) {
|
|
372
|
+
this.isStopped || (this.isStopped = !0, this._error(e));
|
|
373
|
+
}, t.prototype.complete = function() {
|
|
374
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
|
375
|
+
}, t.prototype.unsubscribe = function() {
|
|
376
|
+
this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
|
|
377
|
+
}, t.prototype._next = function(e) {
|
|
378
|
+
this.destination.next(e);
|
|
379
|
+
}, t.prototype._error = function(e) {
|
|
380
|
+
try {
|
|
381
|
+
this.destination.error(e);
|
|
382
|
+
} finally {
|
|
383
|
+
this.unsubscribe();
|
|
384
|
+
}
|
|
385
|
+
}, t.prototype._complete = function() {
|
|
386
|
+
try {
|
|
387
|
+
this.destination.complete();
|
|
388
|
+
} finally {
|
|
389
|
+
this.unsubscribe();
|
|
390
|
+
}
|
|
391
|
+
}, t;
|
|
392
|
+
}(x), tr = function() {
|
|
393
|
+
function r(t) {
|
|
394
|
+
this.partialObserver = t;
|
|
395
|
+
}
|
|
396
|
+
return r.prototype.next = function(t) {
|
|
397
|
+
var e = this.partialObserver;
|
|
398
|
+
if (e.next)
|
|
399
|
+
try {
|
|
400
|
+
e.next(t);
|
|
401
|
+
} catch (n) {
|
|
402
|
+
_(n);
|
|
403
|
+
}
|
|
404
|
+
}, r.prototype.error = function(t) {
|
|
405
|
+
var e = this.partialObserver;
|
|
406
|
+
if (e.error)
|
|
407
|
+
try {
|
|
408
|
+
e.error(t);
|
|
409
|
+
} catch (n) {
|
|
410
|
+
_(n);
|
|
411
|
+
}
|
|
412
|
+
else
|
|
413
|
+
_(t);
|
|
414
|
+
}, r.prototype.complete = function() {
|
|
415
|
+
var t = this.partialObserver;
|
|
416
|
+
if (t.complete)
|
|
417
|
+
try {
|
|
418
|
+
t.complete();
|
|
419
|
+
} catch (e) {
|
|
420
|
+
_(e);
|
|
421
|
+
}
|
|
422
|
+
}, r;
|
|
423
|
+
}(), I = function(r) {
|
|
424
|
+
E(t, r);
|
|
425
|
+
function t(e, n, i) {
|
|
426
|
+
var o = r.call(this) || this, c;
|
|
427
|
+
return y(e) || !e ? c = {
|
|
428
|
+
next: e ?? void 0,
|
|
429
|
+
error: n ?? void 0,
|
|
430
|
+
complete: i ?? void 0
|
|
431
|
+
} : c = e, o.destination = new tr(c), o;
|
|
432
|
+
}
|
|
433
|
+
return t;
|
|
434
|
+
}(U);
|
|
435
|
+
function _(r) {
|
|
436
|
+
F(r);
|
|
437
|
+
}
|
|
438
|
+
function nr(r) {
|
|
439
|
+
throw r;
|
|
440
|
+
}
|
|
441
|
+
var or = {
|
|
442
|
+
closed: !0,
|
|
443
|
+
next: k,
|
|
444
|
+
error: nr,
|
|
445
|
+
complete: k
|
|
446
|
+
};
|
|
447
|
+
function ir(r, t, e, n, i) {
|
|
448
|
+
return new cr(r, t, e, n, i);
|
|
449
|
+
}
|
|
450
|
+
var cr = function(r) {
|
|
451
|
+
E(t, r);
|
|
452
|
+
function t(e, n, i, o, c, s) {
|
|
453
|
+
var a = r.call(this, e) || this;
|
|
454
|
+
return a.onFinalize = c, a.shouldUnsubscribe = s, a._next = n ? function(u) {
|
|
455
|
+
try {
|
|
456
|
+
n(u);
|
|
457
|
+
} catch (l) {
|
|
458
|
+
e.error(l);
|
|
459
|
+
}
|
|
460
|
+
} : r.prototype._next, a._error = o ? function(u) {
|
|
461
|
+
try {
|
|
462
|
+
o(u);
|
|
463
|
+
} catch (l) {
|
|
464
|
+
e.error(l);
|
|
465
|
+
} finally {
|
|
466
|
+
this.unsubscribe();
|
|
467
|
+
}
|
|
468
|
+
} : r.prototype._error, a._complete = i ? function() {
|
|
469
|
+
try {
|
|
470
|
+
i();
|
|
471
|
+
} catch (u) {
|
|
472
|
+
e.error(u);
|
|
473
|
+
} finally {
|
|
474
|
+
this.unsubscribe();
|
|
475
|
+
}
|
|
476
|
+
} : r.prototype._complete, a;
|
|
477
|
+
}
|
|
478
|
+
return t.prototype.unsubscribe = function() {
|
|
479
|
+
var e;
|
|
480
|
+
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
481
|
+
var n = this.closed;
|
|
482
|
+
r.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
483
|
+
}
|
|
484
|
+
}, t;
|
|
485
|
+
}(U), R = function() {
|
|
486
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
487
|
+
}();
|
|
488
|
+
function ur(r) {
|
|
489
|
+
return r;
|
|
490
|
+
}
|
|
491
|
+
function ar(r) {
|
|
492
|
+
return r.length === 0 ? ur : r.length === 1 ? r[0] : function(e) {
|
|
493
|
+
return r.reduce(function(n, i) {
|
|
494
|
+
return i(n);
|
|
495
|
+
}, e);
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
var b = function() {
|
|
499
|
+
function r(t) {
|
|
500
|
+
t && (this._subscribe = t);
|
|
501
|
+
}
|
|
502
|
+
return r.prototype.lift = function(t) {
|
|
503
|
+
var e = new r();
|
|
504
|
+
return e.source = this, e.operator = t, e;
|
|
505
|
+
}, r.prototype.subscribe = function(t, e, n) {
|
|
506
|
+
var i = this, o = fr(t) ? t : new I(t, e, n);
|
|
507
|
+
return er(function() {
|
|
508
|
+
var c = i, s = c.operator, a = c.source;
|
|
509
|
+
o.add(s ? s.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
|
|
510
|
+
}), o;
|
|
511
|
+
}, r.prototype._trySubscribe = function(t) {
|
|
512
|
+
try {
|
|
513
|
+
return this._subscribe(t);
|
|
514
|
+
} catch (e) {
|
|
515
|
+
t.error(e);
|
|
516
|
+
}
|
|
517
|
+
}, r.prototype.forEach = function(t, e) {
|
|
518
|
+
var n = this;
|
|
519
|
+
return e = C(e), new e(function(i, o) {
|
|
520
|
+
var c = new I({
|
|
521
|
+
next: function(s) {
|
|
522
|
+
try {
|
|
523
|
+
t(s);
|
|
524
|
+
} catch (a) {
|
|
525
|
+
o(a), c.unsubscribe();
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
error: o,
|
|
529
|
+
complete: i
|
|
530
|
+
});
|
|
531
|
+
n.subscribe(c);
|
|
532
|
+
});
|
|
533
|
+
}, r.prototype._subscribe = function(t) {
|
|
534
|
+
var e;
|
|
535
|
+
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
536
|
+
}, r.prototype[R] = function() {
|
|
537
|
+
return this;
|
|
538
|
+
}, r.prototype.pipe = function() {
|
|
539
|
+
for (var t = [], e = 0; e < arguments.length; e++)
|
|
540
|
+
t[e] = arguments[e];
|
|
541
|
+
return ar(t)(this);
|
|
542
|
+
}, r.prototype.toPromise = function(t) {
|
|
543
|
+
var e = this;
|
|
544
|
+
return t = C(t), new t(function(n, i) {
|
|
545
|
+
var o;
|
|
546
|
+
e.subscribe(function(c) {
|
|
547
|
+
return o = c;
|
|
548
|
+
}, function(c) {
|
|
549
|
+
return i(c);
|
|
550
|
+
}, function() {
|
|
551
|
+
return n(o);
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
}, r.create = function(t) {
|
|
555
|
+
return new r(t);
|
|
556
|
+
}, r;
|
|
557
|
+
}();
|
|
558
|
+
function C(r) {
|
|
559
|
+
var t;
|
|
560
|
+
return (t = r ?? z.Promise) !== null && t !== void 0 ? t : Promise;
|
|
561
|
+
}
|
|
562
|
+
function sr(r) {
|
|
563
|
+
return r && y(r.next) && y(r.error) && y(r.complete);
|
|
564
|
+
}
|
|
565
|
+
function fr(r) {
|
|
566
|
+
return r && r instanceof U || sr(r) && D(r);
|
|
567
|
+
}
|
|
568
|
+
var lr = function(r) {
|
|
569
|
+
return r && typeof r.length == "number" && typeof r != "function";
|
|
570
|
+
};
|
|
571
|
+
function hr(r) {
|
|
572
|
+
return y(r == null ? void 0 : r.then);
|
|
573
|
+
}
|
|
574
|
+
function yr(r) {
|
|
575
|
+
return y(r[R]);
|
|
576
|
+
}
|
|
577
|
+
function pr(r) {
|
|
578
|
+
return Symbol.asyncIterator && y(r == null ? void 0 : r[Symbol.asyncIterator]);
|
|
579
|
+
}
|
|
580
|
+
function vr(r) {
|
|
581
|
+
return new TypeError("You provided " + (r !== null && typeof r == "object" ? "an invalid object" : "'" + r + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
582
|
+
}
|
|
583
|
+
function dr() {
|
|
584
|
+
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
585
|
+
}
|
|
586
|
+
var br = dr();
|
|
587
|
+
function mr(r) {
|
|
588
|
+
return y(r == null ? void 0 : r[br]);
|
|
589
|
+
}
|
|
590
|
+
function Ar(r) {
|
|
591
|
+
return Q(this, arguments, function() {
|
|
592
|
+
var e, n, i, o;
|
|
593
|
+
return K(this, function(c) {
|
|
594
|
+
switch (c.label) {
|
|
595
|
+
case 0:
|
|
596
|
+
e = r.getReader(), c.label = 1;
|
|
597
|
+
case 1:
|
|
598
|
+
c.trys.push([1, , 9, 10]), c.label = 2;
|
|
599
|
+
case 2:
|
|
600
|
+
return [4, A(e.read())];
|
|
601
|
+
case 3:
|
|
602
|
+
return n = c.sent(), i = n.value, o = n.done, o ? [4, A(void 0)] : [3, 5];
|
|
603
|
+
case 4:
|
|
604
|
+
return [2, c.sent()];
|
|
605
|
+
case 5:
|
|
606
|
+
return [4, A(i)];
|
|
607
|
+
case 6:
|
|
608
|
+
return [4, c.sent()];
|
|
609
|
+
case 7:
|
|
610
|
+
return c.sent(), [3, 2];
|
|
611
|
+
case 8:
|
|
612
|
+
return [3, 10];
|
|
613
|
+
case 9:
|
|
614
|
+
return e.releaseLock(), [7];
|
|
615
|
+
case 10:
|
|
616
|
+
return [2];
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
function Sr(r) {
|
|
622
|
+
return y(r == null ? void 0 : r.getReader);
|
|
623
|
+
}
|
|
624
|
+
function _r(r) {
|
|
625
|
+
if (r instanceof b)
|
|
626
|
+
return r;
|
|
627
|
+
if (r != null) {
|
|
628
|
+
if (yr(r))
|
|
629
|
+
return wr(r);
|
|
630
|
+
if (lr(r))
|
|
631
|
+
return gr(r);
|
|
632
|
+
if (hr(r))
|
|
633
|
+
return Or(r);
|
|
634
|
+
if (pr(r))
|
|
635
|
+
return M(r);
|
|
636
|
+
if (mr(r))
|
|
637
|
+
return Tr(r);
|
|
638
|
+
if (Sr(r))
|
|
639
|
+
return Pr(r);
|
|
640
|
+
}
|
|
641
|
+
throw vr(r);
|
|
642
|
+
}
|
|
643
|
+
function wr(r) {
|
|
644
|
+
return new b(function(t) {
|
|
645
|
+
var e = r[R]();
|
|
646
|
+
if (y(e.subscribe))
|
|
647
|
+
return e.subscribe(t);
|
|
648
|
+
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
function gr(r) {
|
|
652
|
+
return new b(function(t) {
|
|
653
|
+
for (var e = 0; e < r.length && !t.closed; e++)
|
|
654
|
+
t.next(r[e]);
|
|
655
|
+
t.complete();
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
function Or(r) {
|
|
659
|
+
return new b(function(t) {
|
|
660
|
+
r.then(function(e) {
|
|
661
|
+
t.closed || (t.next(e), t.complete());
|
|
662
|
+
}, function(e) {
|
|
663
|
+
return t.error(e);
|
|
664
|
+
}).then(null, F);
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
function Tr(r) {
|
|
668
|
+
return new b(function(t) {
|
|
669
|
+
var e, n;
|
|
670
|
+
try {
|
|
671
|
+
for (var i = S(r), o = i.next(); !o.done; o = i.next()) {
|
|
672
|
+
var c = o.value;
|
|
673
|
+
if (t.next(c), t.closed)
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
} catch (s) {
|
|
677
|
+
e = { error: s };
|
|
678
|
+
} finally {
|
|
679
|
+
try {
|
|
680
|
+
o && !o.done && (n = i.return) && n.call(i);
|
|
681
|
+
} finally {
|
|
682
|
+
if (e) throw e.error;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
t.complete();
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
function M(r) {
|
|
689
|
+
return new b(function(t) {
|
|
690
|
+
Ir(r, t).catch(function(e) {
|
|
691
|
+
return t.error(e);
|
|
692
|
+
});
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
function Pr(r) {
|
|
696
|
+
return M(Ar(r));
|
|
697
|
+
}
|
|
698
|
+
function Ir(r, t) {
|
|
699
|
+
var e, n, i, o;
|
|
700
|
+
return W(this, void 0, void 0, function() {
|
|
701
|
+
var c, s;
|
|
702
|
+
return K(this, function(a) {
|
|
703
|
+
switch (a.label) {
|
|
704
|
+
case 0:
|
|
705
|
+
a.trys.push([0, 5, 6, 11]), e = X(r), a.label = 1;
|
|
706
|
+
case 1:
|
|
707
|
+
return [4, e.next()];
|
|
708
|
+
case 2:
|
|
709
|
+
if (n = a.sent(), !!n.done) return [3, 4];
|
|
710
|
+
if (c = n.value, t.next(c), t.closed)
|
|
711
|
+
return [2];
|
|
712
|
+
a.label = 3;
|
|
713
|
+
case 3:
|
|
714
|
+
return [3, 1];
|
|
715
|
+
case 4:
|
|
716
|
+
return [3, 11];
|
|
717
|
+
case 5:
|
|
718
|
+
return s = a.sent(), i = { error: s }, [3, 11];
|
|
719
|
+
case 6:
|
|
720
|
+
return a.trys.push([6, , 9, 10]), n && !n.done && (o = e.return) ? [4, o.call(e)] : [3, 8];
|
|
721
|
+
case 7:
|
|
722
|
+
a.sent(), a.label = 8;
|
|
723
|
+
case 8:
|
|
724
|
+
return [3, 10];
|
|
725
|
+
case 9:
|
|
726
|
+
if (i) throw i.error;
|
|
727
|
+
return [7];
|
|
728
|
+
case 10:
|
|
729
|
+
return [7];
|
|
730
|
+
case 11:
|
|
731
|
+
return t.complete(), [2];
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
function Er(r, t) {
|
|
737
|
+
t === void 0 && (t = {});
|
|
738
|
+
var e = t.selector, n = N(t, ["selector"]);
|
|
739
|
+
return new b(function(i) {
|
|
740
|
+
var o = new AbortController(), c = o.signal, s = !0, a = n.signal;
|
|
741
|
+
if (a)
|
|
742
|
+
if (a.aborted)
|
|
743
|
+
o.abort();
|
|
744
|
+
else {
|
|
745
|
+
var u = function() {
|
|
746
|
+
c.aborted || o.abort();
|
|
747
|
+
};
|
|
748
|
+
a.addEventListener("abort", u), i.add(function() {
|
|
749
|
+
return a.removeEventListener("abort", u);
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
var l = w(w({}, n), { signal: c }), p = function(v) {
|
|
753
|
+
s = !1, i.error(v);
|
|
754
|
+
};
|
|
755
|
+
return fetch(r, l).then(function(v) {
|
|
756
|
+
e ? _r(e(v)).subscribe(ir(i, void 0, function() {
|
|
757
|
+
s = !1, i.complete();
|
|
758
|
+
}, p)) : (s = !1, i.next(v), i.complete());
|
|
759
|
+
}).catch(p), function() {
|
|
760
|
+
s && o.abort();
|
|
761
|
+
};
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
class Br extends q {
|
|
765
|
+
constructor() {
|
|
766
|
+
super();
|
|
767
|
+
m(this, "API_AUTH_BACK_URL");
|
|
768
|
+
m(this, "API_AUTH_BACK_USERNAME_AUTH");
|
|
769
|
+
m(this, "API_AUTH_BACK_PASSWORD_AUTH");
|
|
770
|
+
m(this, "headers");
|
|
771
|
+
m(this, "ID", process.env.ID_FRONT ?? "NOT_AVAILABLE");
|
|
772
|
+
this.API_AUTH_BACK_URL = process.env.API_AUTH_BACK_URL, this.API_AUTH_BACK_USERNAME_AUTH = process.env.API_AUTH_BACK_USERNAME_AUTH, this.API_AUTH_BACK_PASSWORD_AUTH = process.env.API_AUTH_BACK_PASSWORD_AUTH, this.headers = {
|
|
773
|
+
Accept: "application/json",
|
|
774
|
+
"Content-Type": "application/vnd.api+json"
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
get() {
|
|
778
|
+
return this.logDebug("get ServiceToken"), Er(this.API_AUTH_BACK_URL, {
|
|
779
|
+
method: "POST",
|
|
780
|
+
headers: this.headers,
|
|
781
|
+
body: JSON.stringify({
|
|
782
|
+
data: {
|
|
783
|
+
id: this.ID,
|
|
784
|
+
type: "AuthUser",
|
|
785
|
+
attributes: {
|
|
786
|
+
username: this.API_AUTH_BACK_USERNAME_AUTH,
|
|
787
|
+
password: this.API_AUTH_BACK_PASSWORD_AUTH
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
})
|
|
791
|
+
}).pipe(
|
|
792
|
+
B((e) => e.json()),
|
|
793
|
+
B((e) => {
|
|
794
|
+
var n;
|
|
795
|
+
return this.logDebug(
|
|
796
|
+
`ServiceToken <URL>: \x1B[33m ${this.API_AUTH_BACK_URL} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(this.headers)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(e)} \x1B[37m`
|
|
797
|
+
), H(((n = e == null ? void 0 : e.data.attributes) == null ? void 0 : n.token) || "");
|
|
798
|
+
}),
|
|
799
|
+
V((e) => (this.logError(`ServiceToken ${e}`), H("")))
|
|
800
|
+
);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
export {
|
|
804
|
+
Br as S,
|
|
805
|
+
Er as f
|
|
806
|
+
};
|