@leancodepl/force-update 9.7.4 → 10.0.1

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/index.js CHANGED
@@ -1,61 +1,62 @@
1
- import { useEffect as Ne } from "react";
2
- var Y = function(e, n) {
3
- return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
4
- t.__proto__ = r;
5
- } || function(t, r) {
6
- for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
7
- }, Y(e, n);
1
+ import { useEffect as Ae } from "react";
2
+ import { interval as Oe, of as Pe } from "rxjs";
3
+ var B = function(e, r) {
4
+ return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
5
+ t.__proto__ = n;
6
+ } || function(t, n) {
7
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
8
+ }, B(e, r);
8
9
  };
9
- function U(e, n) {
10
- if (typeof n != "function" && n !== null)
11
- throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
12
- Y(e, n);
10
+ function N(e, r) {
11
+ if (typeof r != "function" && r !== null)
12
+ throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
13
+ B(e, r);
13
14
  function t() {
14
15
  this.constructor = e;
15
16
  }
16
- e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
17
+ e.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t());
17
18
  }
18
- var C = function() {
19
- return C = Object.assign || function(n) {
20
- for (var t, r = 1, o = arguments.length; r < o; r++) {
21
- t = arguments[r];
22
- for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (n[i] = t[i]);
19
+ var U = function() {
20
+ return U = Object.assign || function(r) {
21
+ for (var t, n = 1, i = arguments.length; n < i; n++) {
22
+ t = arguments[n];
23
+ for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (r[o] = t[o]);
23
24
  }
24
- return n;
25
- }, C.apply(this, arguments);
25
+ return r;
26
+ }, U.apply(this, arguments);
26
27
  };
27
- function Ge(e, n, t, r) {
28
- function o(i) {
29
- return i instanceof t ? i : new t(function(u) {
30
- u(i);
28
+ function Ie(e, r, t, n) {
29
+ function i(o) {
30
+ return o instanceof t ? o : new t(function(u) {
31
+ u(o);
31
32
  });
32
33
  }
33
- return new (t || (t = Promise))(function(i, u) {
34
+ return new (t || (t = Promise))(function(o, u) {
34
35
  function s(f) {
35
36
  try {
36
- c(r.next(f));
37
- } catch (h) {
38
- u(h);
37
+ c(n.next(f));
38
+ } catch (d) {
39
+ u(d);
39
40
  }
40
41
  }
41
42
  function a(f) {
42
43
  try {
43
- c(r.throw(f));
44
- } catch (h) {
45
- u(h);
44
+ c(n.throw(f));
45
+ } catch (d) {
46
+ u(d);
46
47
  }
47
48
  }
48
49
  function c(f) {
49
- f.done ? i(f.value) : o(f.value).then(s, a);
50
+ f.done ? o(f.value) : i(f.value).then(s, a);
50
51
  }
51
- c((r = r.apply(e, n || [])).next());
52
+ c((n = n.apply(e, r || [])).next());
52
53
  });
53
54
  }
54
- function ye(e, n) {
55
+ function he(e, r) {
55
56
  var t = { label: 0, sent: function() {
56
- if (i[0] & 1) throw i[1];
57
- return i[1];
58
- }, trys: [], ops: [] }, r, o, i, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
57
+ if (o[0] & 1) throw o[1];
58
+ return o[1];
59
+ }, trys: [], ops: [] }, n, i, o, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
59
60
  return u.next = s(0), u.throw = s(1), u.return = s(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
60
61
  return this;
61
62
  }), u;
@@ -65,656 +66,772 @@ function ye(e, n) {
65
66
  };
66
67
  }
67
68
  function a(c) {
68
- if (r) throw new TypeError("Generator is already executing.");
69
+ if (n) throw new TypeError("Generator is already executing.");
69
70
  for (; u && (u = 0, c[0] && (t = 0)), t; ) try {
70
- if (r = 1, o && (i = c[0] & 2 ? o.return : c[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, c[1])).done) return i;
71
- switch (o = 0, i && (c = [c[0] & 2, i.value]), c[0]) {
71
+ if (n = 1, i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, c[1])).done) return o;
72
+ switch (i = 0, o && (c = [c[0] & 2, o.value]), c[0]) {
72
73
  case 0:
73
74
  case 1:
74
- i = c;
75
+ o = c;
75
76
  break;
76
77
  case 4:
77
78
  return t.label++, { value: c[1], done: !1 };
78
79
  case 5:
79
- t.label++, o = c[1], c = [0];
80
+ t.label++, i = c[1], c = [0];
80
81
  continue;
81
82
  case 7:
82
83
  c = t.ops.pop(), t.trys.pop();
83
84
  continue;
84
85
  default:
85
- if (i = t.trys, !(i = i.length > 0 && i[i.length - 1]) && (c[0] === 6 || c[0] === 2)) {
86
+ if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
86
87
  t = 0;
87
88
  continue;
88
89
  }
89
- if (c[0] === 3 && (!i || c[1] > i[0] && c[1] < i[3])) {
90
+ if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
90
91
  t.label = c[1];
91
92
  break;
92
93
  }
93
- if (c[0] === 6 && t.label < i[1]) {
94
- t.label = i[1], i = c;
94
+ if (c[0] === 6 && t.label < o[1]) {
95
+ t.label = o[1], o = c;
95
96
  break;
96
97
  }
97
- if (i && t.label < i[2]) {
98
- t.label = i[2], t.ops.push(c);
98
+ if (o && t.label < o[2]) {
99
+ t.label = o[2], t.ops.push(c);
99
100
  break;
100
101
  }
101
- i[2] && t.ops.pop(), t.trys.pop();
102
+ o[2] && t.ops.pop(), t.trys.pop();
102
103
  continue;
103
104
  }
104
- c = n.call(e, t);
105
+ c = r.call(e, t);
105
106
  } catch (f) {
106
- c = [6, f], o = 0;
107
+ c = [6, f], i = 0;
107
108
  } finally {
108
- r = i = 0;
109
+ n = o = 0;
109
110
  }
110
111
  if (c[0] & 5) throw c[1];
111
112
  return { value: c[0] ? c[1] : void 0, done: !0 };
112
113
  }
113
114
  }
114
- function _(e) {
115
- var n = typeof Symbol == "function" && Symbol.iterator, t = n && e[n], r = 0;
115
+ function k(e) {
116
+ var r = typeof Symbol == "function" && Symbol.iterator, t = r && e[r], n = 0;
116
117
  if (t) return t.call(e);
117
118
  if (e && typeof e.length == "number") return {
118
119
  next: function() {
119
- return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
120
+ return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e };
120
121
  }
121
122
  };
122
- throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
123
+ throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
123
124
  }
124
- function F(e, n) {
125
+ function V(e, r) {
125
126
  var t = typeof Symbol == "function" && e[Symbol.iterator];
126
127
  if (!t) return e;
127
- var r = t.call(e), o, i = [], u;
128
+ var n = t.call(e), i, o = [], u;
128
129
  try {
129
- for (; (n === void 0 || n-- > 0) && !(o = r.next()).done; ) i.push(o.value);
130
+ for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; ) o.push(i.value);
130
131
  } catch (s) {
131
132
  u = { error: s };
132
133
  } finally {
133
134
  try {
134
- o && !o.done && (t = r.return) && t.call(r);
135
+ i && !i.done && (t = n.return) && t.call(n);
135
136
  } finally {
136
137
  if (u) throw u.error;
137
138
  }
138
139
  }
139
- return i;
140
+ return o;
140
141
  }
141
- function H(e, n, t) {
142
- if (t || arguments.length === 2) for (var r = 0, o = n.length, i; r < o; r++)
143
- (i || !(r in n)) && (i || (i = Array.prototype.slice.call(n, 0, r)), i[r] = n[r]);
144
- return e.concat(i || Array.prototype.slice.call(n));
142
+ function G(e, r, t) {
143
+ if (t || arguments.length === 2) for (var n = 0, i = r.length, o; n < i; n++)
144
+ (o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
145
+ return e.concat(o || Array.prototype.slice.call(r));
145
146
  }
146
- function k(e) {
147
- return this instanceof k ? (this.v = e, this) : new k(e);
147
+ function L(e) {
148
+ return this instanceof L ? (this.v = e, this) : new L(e);
148
149
  }
149
- function Me(e, n, t) {
150
+ function je(e, r, t) {
150
151
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
151
- var r = t.apply(e, n || []), o, i = [];
152
- return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", u), o[Symbol.asyncIterator] = function() {
152
+ var n = t.apply(e, r || []), i, o = [];
153
+ return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", u), i[Symbol.asyncIterator] = function() {
153
154
  return this;
154
- }, o;
155
+ }, i;
155
156
  function u(l) {
156
157
  return function(x) {
157
- return Promise.resolve(x).then(l, h);
158
+ return Promise.resolve(x).then(l, d);
158
159
  };
159
160
  }
160
161
  function s(l, x) {
161
- r[l] && (o[l] = function(d) {
162
- return new Promise(function(T, P) {
163
- i.push([l, d, T, P]) > 1 || a(l, d);
162
+ n[l] && (i[l] = function(h) {
163
+ return new Promise(function(P, A) {
164
+ o.push([l, h, P, A]) > 1 || a(l, h);
164
165
  });
165
- }, x && (o[l] = x(o[l])));
166
+ }, x && (i[l] = x(i[l])));
166
167
  }
167
168
  function a(l, x) {
168
169
  try {
169
- c(r[l](x));
170
- } catch (d) {
171
- p(i[0][3], d);
170
+ c(n[l](x));
171
+ } catch (h) {
172
+ p(o[0][3], h);
172
173
  }
173
174
  }
174
175
  function c(l) {
175
- l.value instanceof k ? Promise.resolve(l.value.v).then(f, h) : p(i[0][2], l);
176
+ l.value instanceof L ? Promise.resolve(l.value.v).then(f, d) : p(o[0][2], l);
176
177
  }
177
178
  function f(l) {
178
179
  a("next", l);
179
180
  }
180
- function h(l) {
181
+ function d(l) {
181
182
  a("throw", l);
182
183
  }
183
184
  function p(l, x) {
184
- l(x), i.shift(), i.length && a(i[0][0], i[0][1]);
185
+ l(x), o.shift(), o.length && a(o[0][0], o[0][1]);
185
186
  }
186
187
  }
187
- function Xe(e) {
188
+ function Re(e) {
188
189
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
189
- var n = e[Symbol.asyncIterator], t;
190
- return n ? n.call(e) : (e = typeof _ == "function" ? _(e) : e[Symbol.iterator](), t = {}, r("next"), r("throw"), r("return"), t[Symbol.asyncIterator] = function() {
190
+ var r = e[Symbol.asyncIterator], t;
191
+ return r ? r.call(e) : (e = typeof k == "function" ? k(e) : e[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
191
192
  return this;
192
193
  }, t);
193
- function r(i) {
194
- t[i] = e[i] && function(u) {
194
+ function n(o) {
195
+ t[o] = e[o] && function(u) {
195
196
  return new Promise(function(s, a) {
196
- u = e[i](u), o(s, a, u.done, u.value);
197
+ u = e[o](u), i(s, a, u.done, u.value);
197
198
  });
198
199
  };
199
200
  }
200
- function o(i, u, s, a) {
201
+ function i(o, u, s, a) {
201
202
  Promise.resolve(a).then(function(c) {
202
- i({ value: c, done: s });
203
+ o({ value: c, done: s });
203
204
  }, u);
204
205
  }
205
206
  }
206
- function b(e) {
207
+ function w(e) {
207
208
  return typeof e == "function";
208
209
  }
209
- function z(e) {
210
- var n = function(r) {
211
- Error.call(r), r.stack = new Error().stack;
212
- }, t = e(n);
210
+ function Le(e) {
211
+ return w(e?.lift);
212
+ }
213
+ function T(e) {
214
+ return function(r) {
215
+ if (Le(r))
216
+ return r.lift(function(t) {
217
+ try {
218
+ return e(t, this);
219
+ } catch (n) {
220
+ this.error(n);
221
+ }
222
+ });
223
+ throw new TypeError("Unable to lift unknown Observable type");
224
+ };
225
+ }
226
+ function X(e) {
227
+ var r = function(n) {
228
+ Error.call(n), n.stack = new Error().stack;
229
+ }, t = e(r);
213
230
  return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
214
231
  }
215
- var G = z(function(e) {
232
+ var C = X(function(e) {
216
233
  return function(t) {
217
234
  e(this), this.message = t ? t.length + ` errors occurred during unsubscription:
218
- ` + t.map(function(r, o) {
219
- return o + 1 + ") " + r.toString();
235
+ ` + t.map(function(n, i) {
236
+ return i + 1 + ") " + n.toString();
220
237
  }).join(`
221
238
  `) : "", this.name = "UnsubscriptionError", this.errors = t;
222
239
  };
223
240
  });
224
- function J(e, n) {
241
+ function ae(e, r) {
225
242
  if (e) {
226
- var t = e.indexOf(n);
243
+ var t = e.indexOf(r);
227
244
  0 <= t && e.splice(t, 1);
228
245
  }
229
246
  }
230
- var B = (function() {
231
- function e(n) {
232
- this.initialTeardown = n, this.closed = !1, this._parentage = null, this._finalizers = null;
247
+ var Y = (function() {
248
+ function e(r) {
249
+ this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
233
250
  }
234
251
  return e.prototype.unsubscribe = function() {
235
- var n, t, r, o, i;
252
+ var r, t, n, i, o;
236
253
  if (!this.closed) {
237
254
  this.closed = !0;
238
255
  var u = this._parentage;
239
256
  if (u)
240
257
  if (this._parentage = null, Array.isArray(u))
241
258
  try {
242
- for (var s = _(u), a = s.next(); !a.done; a = s.next()) {
259
+ for (var s = k(u), a = s.next(); !a.done; a = s.next()) {
243
260
  var c = a.value;
244
261
  c.remove(this);
245
262
  }
246
- } catch (d) {
247
- n = { error: d };
263
+ } catch (h) {
264
+ r = { error: h };
248
265
  } finally {
249
266
  try {
250
267
  a && !a.done && (t = s.return) && t.call(s);
251
268
  } finally {
252
- if (n) throw n.error;
269
+ if (r) throw r.error;
253
270
  }
254
271
  }
255
272
  else
256
273
  u.remove(this);
257
274
  var f = this.initialTeardown;
258
- if (b(f))
275
+ if (w(f))
259
276
  try {
260
277
  f();
261
- } catch (d) {
262
- i = d instanceof G ? d.errors : [d];
278
+ } catch (h) {
279
+ o = h instanceof C ? h.errors : [h];
263
280
  }
264
- var h = this._finalizers;
265
- if (h) {
281
+ var d = this._finalizers;
282
+ if (d) {
266
283
  this._finalizers = null;
267
284
  try {
268
- for (var p = _(h), l = p.next(); !l.done; l = p.next()) {
285
+ for (var p = k(d), l = p.next(); !l.done; l = p.next()) {
269
286
  var x = l.value;
270
287
  try {
271
- se(x);
272
- } catch (d) {
273
- i = i ?? [], d instanceof G ? i = H(H([], F(i)), F(d.errors)) : i.push(d);
288
+ ce(x);
289
+ } catch (h) {
290
+ o = o ?? [], h instanceof C ? o = G(G([], V(o)), V(h.errors)) : o.push(h);
274
291
  }
275
292
  }
276
- } catch (d) {
277
- r = { error: d };
293
+ } catch (h) {
294
+ n = { error: h };
278
295
  } finally {
279
296
  try {
280
- l && !l.done && (o = p.return) && o.call(p);
297
+ l && !l.done && (i = p.return) && i.call(p);
281
298
  } finally {
282
- if (r) throw r.error;
299
+ if (n) throw n.error;
283
300
  }
284
301
  }
285
302
  }
286
- if (i)
287
- throw new G(i);
303
+ if (o)
304
+ throw new C(o);
288
305
  }
289
- }, e.prototype.add = function(n) {
306
+ }, e.prototype.add = function(r) {
290
307
  var t;
291
- if (n && n !== this)
308
+ if (r && r !== this)
292
309
  if (this.closed)
293
- se(n);
310
+ ce(r);
294
311
  else {
295
- if (n instanceof e) {
296
- if (n.closed || n._hasParent(this))
312
+ if (r instanceof e) {
313
+ if (r.closed || r._hasParent(this))
297
314
  return;
298
- n._addParent(this);
315
+ r._addParent(this);
299
316
  }
300
- (this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(n);
317
+ (this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(r);
301
318
  }
302
- }, e.prototype._hasParent = function(n) {
319
+ }, e.prototype._hasParent = function(r) {
303
320
  var t = this._parentage;
304
- return t === n || Array.isArray(t) && t.includes(n);
305
- }, e.prototype._addParent = function(n) {
321
+ return t === r || Array.isArray(t) && t.includes(r);
322
+ }, e.prototype._addParent = function(r) {
306
323
  var t = this._parentage;
307
- this._parentage = Array.isArray(t) ? (t.push(n), t) : t ? [t, n] : n;
308
- }, e.prototype._removeParent = function(n) {
324
+ this._parentage = Array.isArray(t) ? (t.push(r), t) : t ? [t, r] : r;
325
+ }, e.prototype._removeParent = function(r) {
309
326
  var t = this._parentage;
310
- t === n ? this._parentage = null : Array.isArray(t) && J(t, n);
311
- }, e.prototype.remove = function(n) {
327
+ t === r ? this._parentage = null : Array.isArray(t) && ae(t, r);
328
+ }, e.prototype.remove = function(r) {
312
329
  var t = this._finalizers;
313
- t && J(t, n), n instanceof e && n._removeParent(this);
330
+ t && ae(t, r), r instanceof e && r._removeParent(this);
314
331
  }, e.EMPTY = (function() {
315
- var n = new e();
316
- return n.closed = !0, n;
332
+ var r = new e();
333
+ return r.closed = !0, r;
317
334
  })(), e;
318
335
  })();
319
- B.EMPTY;
320
- function me(e) {
321
- return e instanceof B || e && "closed" in e && b(e.remove) && b(e.add) && b(e.unsubscribe);
336
+ Y.EMPTY;
337
+ function ve(e) {
338
+ return e instanceof Y || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
322
339
  }
323
- function se(e) {
324
- b(e) ? e() : e.unsubscribe();
340
+ function ce(e) {
341
+ w(e) ? e() : e.unsubscribe();
325
342
  }
326
- var Ye = {
343
+ var Ue = {
327
344
  Promise: void 0
328
- }, Je = {
329
- setTimeout: function(e, n) {
330
- for (var t = [], r = 2; r < arguments.length; r++)
331
- t[r - 2] = arguments[r];
332
- return setTimeout.apply(void 0, H([e, n], F(t)));
345
+ }, ke = {
346
+ setTimeout: function(e, r) {
347
+ for (var t = [], n = 2; n < arguments.length; n++)
348
+ t[n - 2] = arguments[n];
349
+ return setTimeout.apply(void 0, G([e, r], V(t)));
333
350
  },
334
351
  clearTimeout: function(e) {
335
352
  return clearTimeout(e);
336
353
  },
337
354
  delegate: void 0
338
355
  };
339
- function we(e) {
340
- Je.setTimeout(function() {
356
+ function pe(e) {
357
+ ke.setTimeout(function() {
341
358
  throw e;
342
359
  });
343
360
  }
344
- function fe() {
361
+ function se() {
345
362
  }
346
- function $e(e) {
363
+ function De(e) {
347
364
  e();
348
365
  }
349
- var W = (function(e) {
350
- U(n, e);
351
- function n(t) {
352
- var r = e.call(this) || this;
353
- return r.isStopped = !1, t ? (r.destination = t, me(t) && t.add(r)) : r.destination = Ke, r;
366
+ var J = (function(e) {
367
+ N(r, e);
368
+ function r(t) {
369
+ var n = e.call(this) || this;
370
+ return n.isStopped = !1, t ? (n.destination = t, ve(t) && t.add(n)) : n.destination = Ce, n;
354
371
  }
355
- return n.create = function(t, r, o) {
356
- return new $(t, r, o);
357
- }, n.prototype.next = function(t) {
372
+ return r.create = function(t, n, i) {
373
+ return new M(t, n, i);
374
+ }, r.prototype.next = function(t) {
358
375
  this.isStopped || this._next(t);
359
- }, n.prototype.error = function(t) {
376
+ }, r.prototype.error = function(t) {
360
377
  this.isStopped || (this.isStopped = !0, this._error(t));
361
- }, n.prototype.complete = function() {
378
+ }, r.prototype.complete = function() {
362
379
  this.isStopped || (this.isStopped = !0, this._complete());
363
- }, n.prototype.unsubscribe = function() {
380
+ }, r.prototype.unsubscribe = function() {
364
381
  this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
365
- }, n.prototype._next = function(t) {
382
+ }, r.prototype._next = function(t) {
366
383
  this.destination.next(t);
367
- }, n.prototype._error = function(t) {
384
+ }, r.prototype._error = function(t) {
368
385
  try {
369
386
  this.destination.error(t);
370
387
  } finally {
371
388
  this.unsubscribe();
372
389
  }
373
- }, n.prototype._complete = function() {
390
+ }, r.prototype._complete = function() {
374
391
  try {
375
392
  this.destination.complete();
376
393
  } finally {
377
394
  this.unsubscribe();
378
395
  }
379
- }, n;
380
- })(B), ze = (function() {
381
- function e(n) {
382
- this.partialObserver = n;
396
+ }, r;
397
+ })(Y), Fe = (function() {
398
+ function e(r) {
399
+ this.partialObserver = r;
383
400
  }
384
- return e.prototype.next = function(n) {
401
+ return e.prototype.next = function(r) {
385
402
  var t = this.partialObserver;
386
403
  if (t.next)
387
404
  try {
388
- t.next(n);
389
- } catch (r) {
390
- q(r);
405
+ t.next(r);
406
+ } catch (n) {
407
+ D(n);
391
408
  }
392
- }, e.prototype.error = function(n) {
409
+ }, e.prototype.error = function(r) {
393
410
  var t = this.partialObserver;
394
411
  if (t.error)
395
412
  try {
396
- t.error(n);
397
- } catch (r) {
398
- q(r);
413
+ t.error(r);
414
+ } catch (n) {
415
+ D(n);
399
416
  }
400
417
  else
401
- q(n);
418
+ D(r);
402
419
  }, e.prototype.complete = function() {
403
- var n = this.partialObserver;
404
- if (n.complete)
420
+ var r = this.partialObserver;
421
+ if (r.complete)
405
422
  try {
406
- n.complete();
423
+ r.complete();
407
424
  } catch (t) {
408
- q(t);
425
+ D(t);
409
426
  }
410
427
  }, e;
411
- })(), $ = (function(e) {
412
- U(n, e);
413
- function n(t, r, o) {
414
- var i = e.call(this) || this, u;
415
- return b(t) || !t ? u = {
428
+ })(), M = (function(e) {
429
+ N(r, e);
430
+ function r(t, n, i) {
431
+ var o = e.call(this) || this, u;
432
+ return w(t) || !t ? u = {
416
433
  next: t ?? void 0,
417
- error: r ?? void 0,
418
- complete: o ?? void 0
419
- } : u = t, i.destination = new ze(u), i;
434
+ error: n ?? void 0,
435
+ complete: i ?? void 0
436
+ } : u = t, o.destination = new Fe(u), o;
420
437
  }
421
- return n;
422
- })(W);
423
- function q(e) {
424
- we(e);
438
+ return r;
439
+ })(J);
440
+ function D(e) {
441
+ pe(e);
425
442
  }
426
- function We(e) {
443
+ function He(e) {
427
444
  throw e;
428
445
  }
429
- var Ke = {
446
+ var Ce = {
430
447
  closed: !0,
431
- next: fe,
432
- error: We,
433
- complete: fe
434
- }, K = (function() {
448
+ next: se,
449
+ error: He,
450
+ complete: se
451
+ };
452
+ function g(e, r, t, n, i) {
453
+ return new _e(e, r, t, n, i);
454
+ }
455
+ var _e = (function(e) {
456
+ N(r, e);
457
+ function r(t, n, i, o, u, s) {
458
+ var a = e.call(this, t) || this;
459
+ return a.onFinalize = u, a.shouldUnsubscribe = s, a._next = n ? function(c) {
460
+ try {
461
+ n(c);
462
+ } catch (f) {
463
+ t.error(f);
464
+ }
465
+ } : e.prototype._next, a._error = o ? function(c) {
466
+ try {
467
+ o(c);
468
+ } catch (f) {
469
+ t.error(f);
470
+ } finally {
471
+ this.unsubscribe();
472
+ }
473
+ } : e.prototype._error, a._complete = i ? function() {
474
+ try {
475
+ i();
476
+ } catch (c) {
477
+ t.error(c);
478
+ } finally {
479
+ this.unsubscribe();
480
+ }
481
+ } : e.prototype._complete, a;
482
+ }
483
+ return r.prototype.unsubscribe = function() {
484
+ var t;
485
+ if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
486
+ var n = this.closed;
487
+ e.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
488
+ }
489
+ }, r;
490
+ })(J);
491
+ function $(e, r) {
492
+ return T(function(t, n) {
493
+ var i = 0;
494
+ t.subscribe(g(n, function(o) {
495
+ n.next(e.call(r, o, i++));
496
+ }));
497
+ });
498
+ }
499
+ var z = (function() {
435
500
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
436
501
  })();
437
- function be(e) {
502
+ function ye(e) {
438
503
  return e;
439
504
  }
440
- function Qe(e) {
441
- return e.length === 0 ? be : e.length === 1 ? e[0] : function(t) {
442
- return e.reduce(function(r, o) {
443
- return o(r);
505
+ function qe(e) {
506
+ return e.length === 0 ? ye : e.length === 1 ? e[0] : function(t) {
507
+ return e.reduce(function(n, i) {
508
+ return i(n);
444
509
  }, t);
445
510
  };
446
511
  }
447
- var S = (function() {
448
- function e(n) {
449
- n && (this._subscribe = n);
512
+ var O = (function() {
513
+ function e(r) {
514
+ r && (this._subscribe = r);
450
515
  }
451
- return e.prototype.lift = function(n) {
516
+ return e.prototype.lift = function(r) {
452
517
  var t = new e();
453
- return t.source = this, t.operator = n, t;
454
- }, e.prototype.subscribe = function(n, t, r) {
455
- var o = this, i = et(n) ? n : new $(n, t, r);
456
- return $e(function() {
457
- var u = o, s = u.operator, a = u.source;
458
- i.add(s ? s.call(i, a) : a ? o._subscribe(i) : o._trySubscribe(i));
459
- }), i;
460
- }, e.prototype._trySubscribe = function(n) {
518
+ return t.source = this, t.operator = r, t;
519
+ }, e.prototype.subscribe = function(r, t, n) {
520
+ var i = this, o = Ve(r) ? r : new M(r, t, n);
521
+ return De(function() {
522
+ var u = i, s = u.operator, a = u.source;
523
+ o.add(s ? s.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
524
+ }), o;
525
+ }, e.prototype._trySubscribe = function(r) {
461
526
  try {
462
- return this._subscribe(n);
527
+ return this._subscribe(r);
463
528
  } catch (t) {
464
- n.error(t);
529
+ r.error(t);
465
530
  }
466
- }, e.prototype.forEach = function(n, t) {
467
- var r = this;
468
- return t = le(t), new t(function(o, i) {
469
- var u = new $({
531
+ }, e.prototype.forEach = function(r, t) {
532
+ var n = this;
533
+ return t = fe(t), new t(function(i, o) {
534
+ var u = new M({
470
535
  next: function(s) {
471
536
  try {
472
- n(s);
537
+ r(s);
473
538
  } catch (a) {
474
- i(a), u.unsubscribe();
539
+ o(a), u.unsubscribe();
475
540
  }
476
541
  },
477
- error: i,
478
- complete: o
542
+ error: o,
543
+ complete: i
479
544
  });
480
- r.subscribe(u);
545
+ n.subscribe(u);
481
546
  });
482
- }, e.prototype._subscribe = function(n) {
547
+ }, e.prototype._subscribe = function(r) {
483
548
  var t;
484
- return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(n);
485
- }, e.prototype[K] = function() {
549
+ return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(r);
550
+ }, e.prototype[z] = function() {
486
551
  return this;
487
552
  }, e.prototype.pipe = function() {
488
- for (var n = [], t = 0; t < arguments.length; t++)
489
- n[t] = arguments[t];
490
- return Qe(n)(this);
491
- }, e.prototype.toPromise = function(n) {
553
+ for (var r = [], t = 0; t < arguments.length; t++)
554
+ r[t] = arguments[t];
555
+ return qe(r)(this);
556
+ }, e.prototype.toPromise = function(r) {
492
557
  var t = this;
493
- return n = le(n), new n(function(r, o) {
494
- var i;
558
+ return r = fe(r), new r(function(n, i) {
559
+ var o;
495
560
  t.subscribe(function(u) {
496
- return i = u;
561
+ return o = u;
497
562
  }, function(u) {
498
- return o(u);
563
+ return i(u);
499
564
  }, function() {
500
- return r(i);
565
+ return n(o);
501
566
  });
502
567
  });
503
- }, e.create = function(n) {
504
- return new e(n);
568
+ }, e.create = function(r) {
569
+ return new e(r);
505
570
  }, e;
506
571
  })();
507
- function le(e) {
508
- var n;
509
- return (n = e ?? Ye.Promise) !== null && n !== void 0 ? n : Promise;
510
- }
511
- function Ze(e) {
512
- return e && b(e.next) && b(e.error) && b(e.complete);
572
+ function fe(e) {
573
+ var r;
574
+ return (r = e ?? Ue.Promise) !== null && r !== void 0 ? r : Promise;
513
575
  }
514
- function et(e) {
515
- return e && e instanceof W || Ze(e) && me(e);
576
+ function Be(e) {
577
+ return e && w(e.next) && w(e.error) && w(e.complete);
516
578
  }
517
- function tt(e) {
518
- return b(e?.lift);
579
+ function Ve(e) {
580
+ return e && e instanceof J || Be(e) && ve(e);
519
581
  }
520
- function I(e) {
521
- return function(n) {
522
- if (tt(n))
523
- return n.lift(function(t) {
524
- try {
525
- return e(t, this);
526
- } catch (r) {
527
- this.error(r);
528
- }
529
- });
530
- throw new TypeError("Unable to lift unknown Observable type");
531
- };
532
- }
533
- function E(e, n, t, r, o) {
534
- return new nt(e, n, t, r, o);
535
- }
536
- var nt = (function(e) {
537
- U(n, e);
538
- function n(t, r, o, i, u, s) {
539
- var a = e.call(this, t) || this;
540
- return a.onFinalize = u, a.shouldUnsubscribe = s, a._next = r ? function(c) {
541
- try {
542
- r(c);
543
- } catch (f) {
544
- t.error(f);
545
- }
546
- } : e.prototype._next, a._error = i ? function(c) {
547
- try {
548
- i(c);
549
- } catch (f) {
550
- t.error(f);
551
- } finally {
552
- this.unsubscribe();
553
- }
554
- } : e.prototype._error, a._complete = o ? function() {
555
- try {
556
- o();
557
- } catch (c) {
558
- t.error(c);
559
- } finally {
560
- this.unsubscribe();
561
- }
562
- } : e.prototype._complete, a;
563
- }
564
- return n.prototype.unsubscribe = function() {
565
- var t;
566
- if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
567
- var r = this.closed;
568
- e.prototype.unsubscribe.call(this), !r && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
582
+ function me(e) {
583
+ switch (e.responseType) {
584
+ case "json": {
585
+ if ("response" in e)
586
+ return e.response;
587
+ var r = e;
588
+ return JSON.parse(r.responseText);
589
+ }
590
+ case "document":
591
+ return e.responseXML;
592
+ default: {
593
+ if ("response" in e)
594
+ return e.response;
595
+ var r = e;
596
+ return r.responseText;
569
597
  }
570
- }, n;
571
- })(W), rt = {
572
- now: function() {
573
- return Date.now();
574
- }
575
- }, ot = (function(e) {
576
- U(n, e);
577
- function n(t, r) {
578
- return e.call(this) || this;
579
598
  }
580
- return n.prototype.schedule = function(t, r) {
581
- return this;
582
- }, n;
583
- })(B), he = {
584
- setInterval: function(e, n) {
585
- for (var t = [], r = 2; r < arguments.length; r++)
586
- t[r - 2] = arguments[r];
587
- return setInterval.apply(void 0, H([e, n], F(t)));
588
- },
589
- clearInterval: function(e) {
590
- return clearInterval(e);
591
- },
592
- delegate: void 0
593
- }, it = (function(e) {
594
- U(n, e);
595
- function n(t, r) {
596
- var o = e.call(this, t, r) || this;
597
- return o.scheduler = t, o.work = r, o.pending = !1, o;
599
+ }
600
+ var Ge = /* @__PURE__ */ (function() {
601
+ function e(r, t, n, i) {
602
+ i === void 0 && (i = "download_load"), this.originalEvent = r, this.xhr = t, this.request = n, this.type = i;
603
+ var o = t.status, u = t.responseType;
604
+ this.status = o ?? 0, this.responseType = u ?? "";
605
+ var s = t.getAllResponseHeaders();
606
+ this.responseHeaders = s ? s.split(`
607
+ `).reduce(function(f, d) {
608
+ var p = d.indexOf(": ");
609
+ return f[d.slice(0, p)] = d.slice(p + 2), f;
610
+ }, {}) : {}, this.response = me(t);
611
+ var a = r.loaded, c = r.total;
612
+ this.loaded = a, this.total = c;
598
613
  }
599
- return n.prototype.schedule = function(t, r) {
614
+ return e;
615
+ })(), F = X(function(e) {
616
+ return function(t, n, i) {
617
+ this.message = t, this.name = "AjaxError", this.xhr = n, this.request = i, this.status = n.status, this.responseType = n.responseType;
600
618
  var o;
601
- if (r === void 0 && (r = 0), this.closed)
602
- return this;
603
- this.state = t;
604
- var i = this.id, u = this.scheduler;
605
- return i != null && (this.id = this.recycleAsyncId(u, i, r)), this.pending = !0, this.delay = r, this.id = (o = this.id) !== null && o !== void 0 ? o : this.requestAsyncId(u, this.id, r), this;
606
- }, n.prototype.requestAsyncId = function(t, r, o) {
607
- return o === void 0 && (o = 0), he.setInterval(t.flush.bind(t, this), o);
608
- }, n.prototype.recycleAsyncId = function(t, r, o) {
609
- if (o === void 0 && (o = 0), o != null && this.delay === o && this.pending === !1)
610
- return r;
611
- r != null && he.clearInterval(r);
612
- }, n.prototype.execute = function(t, r) {
613
- if (this.closed)
614
- return new Error("executing a cancelled action");
615
- this.pending = !1;
616
- var o = this._execute(t, r);
617
- if (o)
618
- return o;
619
- this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
620
- }, n.prototype._execute = function(t, r) {
621
- var o = !1, i;
622
619
  try {
623
- this.work(t);
624
- } catch (u) {
625
- o = !0, i = u || new Error("Scheduled action threw falsy error");
626
- }
627
- if (o)
628
- return this.unsubscribe(), i;
629
- }, n.prototype.unsubscribe = function() {
630
- if (!this.closed) {
631
- var t = this, r = t.id, o = t.scheduler, i = o.actions;
632
- this.work = this.state = this.scheduler = null, this.pending = !1, J(i, this), r != null && (this.id = this.recycleAsyncId(o, r, null)), this.delay = null, e.prototype.unsubscribe.call(this);
620
+ o = me(n);
621
+ } catch {
622
+ o = n.responseText;
633
623
  }
634
- }, n;
635
- })(ot), de = (function() {
636
- function e(n, t) {
637
- t === void 0 && (t = e.now), this.schedulerActionCtor = n, this.now = t;
638
- }
639
- return e.prototype.schedule = function(n, t, r) {
640
- return t === void 0 && (t = 0), new this.schedulerActionCtor(this, n).schedule(r, t);
641
- }, e.now = rt.now, e;
642
- })(), ut = (function(e) {
643
- U(n, e);
644
- function n(t, r) {
645
- r === void 0 && (r = de.now);
646
- var o = e.call(this, t, r) || this;
647
- return o.actions = [], o._active = !1, o;
624
+ this.response = o;
625
+ };
626
+ }), Me = (function() {
627
+ function e(r, t) {
628
+ return F.call(this, "ajax timeout", r, t), this.name = "AjaxTimeoutError", this;
648
629
  }
649
- return n.prototype.flush = function(t) {
650
- var r = this.actions;
651
- if (this._active) {
652
- r.push(t);
653
- return;
630
+ return e.prototype = Object.create(F.prototype), e;
631
+ })();
632
+ function Ne(e, r) {
633
+ return R({ method: "GET", url: e, headers: r });
634
+ }
635
+ function Xe(e, r, t) {
636
+ return R({ method: "POST", url: e, body: r, headers: t });
637
+ }
638
+ function Ye(e, r) {
639
+ return R({ method: "DELETE", url: e, headers: r });
640
+ }
641
+ function Je(e, r, t) {
642
+ return R({ method: "PUT", url: e, body: r, headers: t });
643
+ }
644
+ function $e(e, r, t) {
645
+ return R({ method: "PATCH", url: e, body: r, headers: t });
646
+ }
647
+ var ze = $(function(e) {
648
+ return e.response;
649
+ });
650
+ function We(e, r) {
651
+ return ze(R({
652
+ method: "GET",
653
+ url: e,
654
+ headers: r
655
+ }));
656
+ }
657
+ var R = (function() {
658
+ var e = function(r) {
659
+ var t = typeof r == "string" ? {
660
+ url: r
661
+ } : r;
662
+ return Qe(t);
663
+ };
664
+ return e.get = Ne, e.post = Xe, e.delete = Ye, e.put = Je, e.patch = $e, e.getJSON = We, e;
665
+ })(), Ke = "upload", le = "download", _ = "loadstart", q = "progress", de = "load";
666
+ function Qe(e) {
667
+ return new O(function(r) {
668
+ var t, n, i = U({ async: !0, crossDomain: !1, withCredentials: !1, method: "GET", timeout: 0, responseType: "json" }, e), o = i.queryParams, u = i.body, s = i.headers, a = i.url;
669
+ if (!a)
670
+ throw new TypeError("url is required");
671
+ if (o) {
672
+ var c;
673
+ if (a.includes("?")) {
674
+ var f = a.split("?");
675
+ if (2 < f.length)
676
+ throw new TypeError("invalid url");
677
+ c = new URLSearchParams(f[1]), new URLSearchParams(o).forEach(function(m, b) {
678
+ return c.set(b, m);
679
+ }), a = f[0] + "?" + c;
680
+ } else
681
+ c = new URLSearchParams(o), a = a + "?" + c;
654
682
  }
655
- var o;
656
- this._active = !0;
657
- do
658
- if (o = t.execute(t.state, t.delay))
659
- break;
660
- while (t = r.shift());
661
- if (this._active = !1, o) {
662
- for (; t = r.shift(); )
663
- t.unsubscribe();
664
- throw o;
683
+ var d = {};
684
+ if (s)
685
+ for (var p in s)
686
+ s.hasOwnProperty(p) && (d[p.toLowerCase()] = s[p]);
687
+ var l = i.crossDomain;
688
+ !l && !("x-requested-with" in d) && (d["x-requested-with"] = "XMLHttpRequest");
689
+ var x = i.withCredentials, h = i.xsrfCookieName, P = i.xsrfHeaderName;
690
+ if ((x || !l) && h && P) {
691
+ var A = (n = (t = document?.cookie.match(new RegExp("(^|;\\s*)(" + h + ")=([^;]*)"))) === null || t === void 0 ? void 0 : t.pop()) !== null && n !== void 0 ? n : "";
692
+ A && (d[P] = A);
665
693
  }
666
- }, n;
667
- })(de), xe = new ut(it), at = xe, ct = new S(function(e) {
668
- return e.complete();
669
- });
670
- function ge(e) {
671
- return e && b(e.schedule);
694
+ var I = Ze(u, d), S = U(U({}, i), {
695
+ url: a,
696
+ headers: d,
697
+ body: I
698
+ }), v;
699
+ v = e.createXHR ? e.createXHR() : new XMLHttpRequest();
700
+ {
701
+ var y = e.progressSubscriber, Q = e.includeDownloadProgress, Se = Q === void 0 ? !1 : Q, Z = e.includeUploadProgress, ge = Z === void 0 ? !1 : Z, ee = function(m, b) {
702
+ v.addEventListener(m, function() {
703
+ var E, j = b();
704
+ (E = y?.error) === null || E === void 0 || E.call(y, j), r.error(j);
705
+ });
706
+ };
707
+ ee("timeout", function() {
708
+ return new Me(v, S);
709
+ }), ee("abort", function() {
710
+ return new F("aborted", v, S);
711
+ });
712
+ var te = function(m, b) {
713
+ return new Ge(b, v, S, m + "_" + b.type);
714
+ }, re = function(m, b, E) {
715
+ m.addEventListener(b, function(j) {
716
+ r.next(te(E, j));
717
+ });
718
+ };
719
+ ge && [_, q, de].forEach(function(m) {
720
+ return re(v.upload, m, Ke);
721
+ }), y && [_, q].forEach(function(m) {
722
+ return v.upload.addEventListener(m, function(b) {
723
+ var E;
724
+ return (E = y?.next) === null || E === void 0 ? void 0 : E.call(y, b);
725
+ });
726
+ }), Se && [_, q].forEach(function(m) {
727
+ return re(v, m, le);
728
+ });
729
+ var ne = function(m) {
730
+ var b = "ajax error" + (m ? " " + m : "");
731
+ r.error(new F(b, v, S));
732
+ };
733
+ v.addEventListener("error", function(m) {
734
+ var b;
735
+ (b = y?.error) === null || b === void 0 || b.call(y, m), ne();
736
+ }), v.addEventListener(de, function(m) {
737
+ var b, E, j = v.status;
738
+ if (j < 400) {
739
+ (b = y?.complete) === null || b === void 0 || b.call(y);
740
+ var ue = void 0;
741
+ try {
742
+ ue = te(le, m);
743
+ } catch (Te) {
744
+ r.error(Te);
745
+ return;
746
+ }
747
+ r.next(ue), r.complete();
748
+ } else
749
+ (E = y?.error) === null || E === void 0 || E.call(y, m), ne(j);
750
+ });
751
+ }
752
+ var oe = S.user, ie = S.method, H = S.async;
753
+ oe ? v.open(ie, a, H, oe, S.password) : v.open(ie, a, H), H && (v.timeout = S.timeout, v.responseType = S.responseType), "withCredentials" in v && (v.withCredentials = S.withCredentials);
754
+ for (var p in d)
755
+ d.hasOwnProperty(p) && v.setRequestHeader(p, d[p]);
756
+ return I ? v.send(I) : v.send(), function() {
757
+ v && v.readyState !== 4 && v.abort();
758
+ };
759
+ });
672
760
  }
673
- function st(e) {
674
- return e[e.length - 1];
761
+ function Ze(e, r) {
762
+ var t;
763
+ if (!e || typeof e == "string" || it(e) || ut(e) || tt(e) || rt(e) || nt(e) || at(e))
764
+ return e;
765
+ if (ot(e))
766
+ return e.buffer;
767
+ if (typeof e == "object")
768
+ return r["content-type"] = (t = r["content-type"]) !== null && t !== void 0 ? t : "application/json;charset=utf-8", JSON.stringify(e);
769
+ throw new TypeError("Unknown body type");
675
770
  }
676
- function ft(e) {
677
- return ge(st(e)) ? e.pop() : void 0;
771
+ var et = Object.prototype.toString;
772
+ function W(e, r) {
773
+ return et.call(e) === "[object " + r + "]";
774
+ }
775
+ function tt(e) {
776
+ return W(e, "ArrayBuffer");
777
+ }
778
+ function rt(e) {
779
+ return W(e, "File");
780
+ }
781
+ function nt(e) {
782
+ return W(e, "Blob");
678
783
  }
679
- var Se = (function(e) {
784
+ function ot(e) {
785
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView(e);
786
+ }
787
+ function it(e) {
788
+ return typeof FormData < "u" && e instanceof FormData;
789
+ }
790
+ function ut(e) {
791
+ return typeof URLSearchParams < "u" && e instanceof URLSearchParams;
792
+ }
793
+ function at(e) {
794
+ return typeof ReadableStream < "u" && e instanceof ReadableStream;
795
+ }
796
+ var ct = (function(e) {
680
797
  return e && typeof e.length == "number" && typeof e != "function";
681
798
  });
682
- function Ae(e) {
683
- return b(e?.then);
799
+ function st(e) {
800
+ return w(e?.then);
684
801
  }
685
- function Ee(e) {
686
- return b(e[K]);
802
+ function ft(e) {
803
+ return w(e[z]);
687
804
  }
688
- function Ie(e) {
689
- return Symbol.asyncIterator && b(e?.[Symbol.asyncIterator]);
805
+ function lt(e) {
806
+ return Symbol.asyncIterator && w(e?.[Symbol.asyncIterator]);
690
807
  }
691
- function Pe(e) {
808
+ function dt(e) {
692
809
  return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
693
810
  }
694
- function lt() {
811
+ function ht() {
695
812
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
696
813
  }
697
- var Te = lt();
698
- function Oe(e) {
699
- return b(e?.[Te]);
814
+ var vt = ht();
815
+ function pt(e) {
816
+ return w(e?.[vt]);
700
817
  }
701
- function Re(e) {
702
- return Me(this, arguments, function() {
703
- var t, r, o, i;
704
- return ye(this, function(u) {
818
+ function yt(e) {
819
+ return je(this, arguments, function() {
820
+ var t, n, i, o;
821
+ return he(this, function(u) {
705
822
  switch (u.label) {
706
823
  case 0:
707
824
  t = e.getReader(), u.label = 1;
708
825
  case 1:
709
826
  u.trys.push([1, , 9, 10]), u.label = 2;
710
827
  case 2:
711
- return [4, k(t.read())];
828
+ return [4, L(t.read())];
712
829
  case 3:
713
- return r = u.sent(), o = r.value, i = r.done, i ? [4, k(void 0)] : [3, 5];
830
+ return n = u.sent(), i = n.value, o = n.done, o ? [4, L(void 0)] : [3, 5];
714
831
  case 4:
715
832
  return [2, u.sent()];
716
833
  case 5:
717
- return [4, k(o)];
834
+ return [4, L(i)];
718
835
  case 6:
719
836
  return [4, u.sent()];
720
837
  case 7:
@@ -729,96 +846,96 @@ function Re(e) {
729
846
  });
730
847
  });
731
848
  }
732
- function je(e) {
733
- return b(e?.getReader);
849
+ function mt(e) {
850
+ return w(e?.getReader);
734
851
  }
735
- function D(e) {
736
- if (e instanceof S)
852
+ function K(e) {
853
+ if (e instanceof O)
737
854
  return e;
738
855
  if (e != null) {
739
- if (Ee(e))
740
- return ht(e);
741
- if (Se(e))
742
- return dt(e);
743
- if (Ae(e))
744
- return vt(e);
745
- if (Ie(e))
746
- return Le(e);
747
- if (Oe(e))
748
- return pt(e);
749
- if (je(e))
750
- return yt(e);
856
+ if (ft(e))
857
+ return bt(e);
858
+ if (ct(e))
859
+ return wt(e);
860
+ if (st(e))
861
+ return xt(e);
862
+ if (lt(e))
863
+ return be(e);
864
+ if (pt(e))
865
+ return Et(e);
866
+ if (mt(e))
867
+ return St(e);
751
868
  }
752
- throw Pe(e);
869
+ throw dt(e);
753
870
  }
754
- function ht(e) {
755
- return new S(function(n) {
756
- var t = e[K]();
757
- if (b(t.subscribe))
758
- return t.subscribe(n);
871
+ function bt(e) {
872
+ return new O(function(r) {
873
+ var t = e[z]();
874
+ if (w(t.subscribe))
875
+ return t.subscribe(r);
759
876
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
760
877
  });
761
878
  }
762
- function dt(e) {
763
- return new S(function(n) {
764
- for (var t = 0; t < e.length && !n.closed; t++)
765
- n.next(e[t]);
766
- n.complete();
879
+ function wt(e) {
880
+ return new O(function(r) {
881
+ for (var t = 0; t < e.length && !r.closed; t++)
882
+ r.next(e[t]);
883
+ r.complete();
767
884
  });
768
885
  }
769
- function vt(e) {
770
- return new S(function(n) {
886
+ function xt(e) {
887
+ return new O(function(r) {
771
888
  e.then(function(t) {
772
- n.closed || (n.next(t), n.complete());
889
+ r.closed || (r.next(t), r.complete());
773
890
  }, function(t) {
774
- return n.error(t);
775
- }).then(null, we);
891
+ return r.error(t);
892
+ }).then(null, pe);
776
893
  });
777
894
  }
778
- function pt(e) {
779
- return new S(function(n) {
780
- var t, r;
895
+ function Et(e) {
896
+ return new O(function(r) {
897
+ var t, n;
781
898
  try {
782
- for (var o = _(e), i = o.next(); !i.done; i = o.next()) {
783
- var u = i.value;
784
- if (n.next(u), n.closed)
899
+ for (var i = k(e), o = i.next(); !o.done; o = i.next()) {
900
+ var u = o.value;
901
+ if (r.next(u), r.closed)
785
902
  return;
786
903
  }
787
904
  } catch (s) {
788
905
  t = { error: s };
789
906
  } finally {
790
907
  try {
791
- i && !i.done && (r = o.return) && r.call(o);
908
+ o && !o.done && (n = i.return) && n.call(i);
792
909
  } finally {
793
910
  if (t) throw t.error;
794
911
  }
795
912
  }
796
- n.complete();
913
+ r.complete();
797
914
  });
798
915
  }
799
- function Le(e) {
800
- return new S(function(n) {
801
- mt(e, n).catch(function(t) {
802
- return n.error(t);
916
+ function be(e) {
917
+ return new O(function(r) {
918
+ gt(e, r).catch(function(t) {
919
+ return r.error(t);
803
920
  });
804
921
  });
805
922
  }
806
- function yt(e) {
807
- return Le(Re(e));
923
+ function St(e) {
924
+ return be(yt(e));
808
925
  }
809
- function mt(e, n) {
810
- var t, r, o, i;
811
- return Ge(this, void 0, void 0, function() {
926
+ function gt(e, r) {
927
+ var t, n, i, o;
928
+ return Ie(this, void 0, void 0, function() {
812
929
  var u, s;
813
- return ye(this, function(a) {
930
+ return he(this, function(a) {
814
931
  switch (a.label) {
815
932
  case 0:
816
- a.trys.push([0, 5, 6, 11]), t = Xe(e), a.label = 1;
933
+ a.trys.push([0, 5, 6, 11]), t = Re(e), a.label = 1;
817
934
  case 1:
818
935
  return [4, t.next()];
819
936
  case 2:
820
- if (r = a.sent(), !!r.done) return [3, 4];
821
- if (u = r.value, n.next(u), n.closed)
937
+ if (n = a.sent(), !!n.done) return [3, 4];
938
+ if (u = n.value, r.next(u), r.closed)
822
939
  return [2];
823
940
  a.label = 3;
824
941
  case 3:
@@ -826,541 +943,196 @@ function mt(e, n) {
826
943
  case 4:
827
944
  return [3, 11];
828
945
  case 5:
829
- return s = a.sent(), o = { error: s }, [3, 11];
946
+ return s = a.sent(), i = { error: s }, [3, 11];
830
947
  case 6:
831
- return a.trys.push([6, , 9, 10]), r && !r.done && (i = t.return) ? [4, i.call(t)] : [3, 8];
948
+ return a.trys.push([6, , 9, 10]), n && !n.done && (o = t.return) ? [4, o.call(t)] : [3, 8];
832
949
  case 7:
833
950
  a.sent(), a.label = 8;
834
951
  case 8:
835
952
  return [3, 10];
836
953
  case 9:
837
- if (o) throw o.error;
954
+ if (i) throw i.error;
838
955
  return [7];
839
956
  case 10:
840
957
  return [7];
841
958
  case 11:
842
- return n.complete(), [2];
959
+ return r.complete(), [2];
843
960
  }
844
961
  });
845
962
  });
846
963
  }
847
- function j(e, n, t, r, o) {
848
- r === void 0 && (r = 0), o === void 0 && (o = !1);
849
- var i = n.schedule(function() {
850
- t(), o ? e.add(this.schedule(null, r)) : this.unsubscribe();
851
- }, r);
852
- if (e.add(i), !o)
853
- return i;
854
- }
855
- function ke(e, n) {
856
- return n === void 0 && (n = 0), I(function(t, r) {
857
- t.subscribe(E(r, function(o) {
858
- return j(r, e, function() {
859
- return r.next(o);
860
- }, n);
861
- }, function() {
862
- return j(r, e, function() {
863
- return r.complete();
864
- }, n);
865
- }, function(o) {
866
- return j(r, e, function() {
867
- return r.error(o);
868
- }, n);
869
- }));
870
- });
871
- }
872
- function Ue(e, n) {
873
- return n === void 0 && (n = 0), I(function(t, r) {
874
- r.add(e.schedule(function() {
875
- return t.subscribe(r);
876
- }, n));
877
- });
878
- }
879
- function wt(e, n) {
880
- return D(e).pipe(Ue(n), ke(n));
881
- }
882
- function bt(e, n) {
883
- return D(e).pipe(Ue(n), ke(n));
884
- }
885
- function xt(e, n) {
886
- return new S(function(t) {
887
- var r = 0;
888
- return n.schedule(function() {
889
- r === e.length ? t.complete() : (t.next(e[r++]), t.closed || this.schedule());
890
- });
891
- });
892
- }
893
- function gt(e, n) {
894
- return new S(function(t) {
895
- var r;
896
- return j(t, n, function() {
897
- r = e[Te](), j(t, n, function() {
898
- var o, i, u;
899
- try {
900
- o = r.next(), i = o.value, u = o.done;
901
- } catch (s) {
902
- t.error(s);
903
- return;
904
- }
905
- u ? t.complete() : t.next(i);
906
- }, 0, !0);
907
- }), function() {
908
- return b(r?.return) && r.return();
909
- };
910
- });
911
- }
912
- function De(e, n) {
913
- if (!e)
914
- throw new Error("Iterable cannot be null");
915
- return new S(function(t) {
916
- j(t, n, function() {
917
- var r = e[Symbol.asyncIterator]();
918
- j(t, n, function() {
919
- r.next().then(function(o) {
920
- o.done ? t.complete() : t.next(o.value);
921
- });
922
- }, 0, !0);
923
- });
924
- });
925
- }
926
- function St(e, n) {
927
- return De(Re(e), n);
928
- }
929
- function At(e, n) {
930
- if (e != null) {
931
- if (Ee(e))
932
- return wt(e, n);
933
- if (Se(e))
934
- return xt(e, n);
935
- if (Ae(e))
936
- return bt(e, n);
937
- if (Ie(e))
938
- return De(e, n);
939
- if (Oe(e))
940
- return gt(e, n);
941
- if (je(e))
942
- return St(e, n);
943
- }
944
- throw Pe(e);
945
- }
946
- function Et(e, n) {
947
- return n ? At(e, n) : D(e);
948
- }
949
- function It() {
950
- for (var e = [], n = 0; n < arguments.length; n++)
951
- e[n] = arguments[n];
952
- var t = ft(e);
953
- return Et(e, t);
954
- }
955
- var Ce = z(function(e) {
956
- return function() {
957
- e(this), this.name = "EmptyError", this.message = "no elements in sequence";
958
- };
959
- });
960
- function Pt(e) {
961
- return e instanceof Date && !isNaN(e);
962
- }
963
- function Q(e, n) {
964
- return I(function(t, r) {
965
- var o = 0;
966
- t.subscribe(E(r, function(i) {
967
- r.next(e.call(n, i, o++));
968
- }));
964
+ function we(e) {
965
+ return T(function(r, t) {
966
+ var n = null, i = !1, o;
967
+ n = r.subscribe(g(t, void 0, void 0, function(u) {
968
+ o = K(e(u, we(e)(r))), n ? (n.unsubscribe(), n = null, o.subscribe(t)) : i = !0;
969
+ })), i && (n.unsubscribe(), n = null, o.subscribe(t));
969
970
  });
970
971
  }
971
- function Tt(e, n, t, r, o, i, u, s) {
972
- var a = [], c = 0, f = 0, h = !1, p = function() {
973
- h && !a.length && !c && n.complete();
974
- }, l = function(d) {
975
- return c < r ? x(d) : a.push(d);
976
- }, x = function(d) {
972
+ function Tt(e, r, t, n, i, o, u, s) {
973
+ var a = [], c = 0, f = 0, d = !1, p = function() {
974
+ d && !a.length && !c && r.complete();
975
+ }, l = function(h) {
976
+ return c < n ? x(h) : a.push(h);
977
+ }, x = function(h) {
977
978
  c++;
978
- var T = !1;
979
- D(t(d, f++)).subscribe(E(n, function(P) {
980
- n.next(P);
979
+ var P = !1;
980
+ K(t(h, f++)).subscribe(g(r, function(A) {
981
+ r.next(A);
981
982
  }, function() {
982
- T = !0;
983
+ P = !0;
983
984
  }, void 0, function() {
984
- if (T)
985
+ if (P)
985
986
  try {
986
987
  c--;
987
- for (var P = function() {
988
- var O = a.shift();
989
- u || x(O);
990
- }; a.length && c < r; )
991
- P();
988
+ for (var A = function() {
989
+ var I = a.shift();
990
+ u || x(I);
991
+ }; a.length && c < n; )
992
+ A();
992
993
  p();
993
- } catch (O) {
994
- n.error(O);
994
+ } catch (I) {
995
+ r.error(I);
995
996
  }
996
997
  }));
997
998
  };
998
- return e.subscribe(E(n, l, function() {
999
- h = !0, p();
999
+ return e.subscribe(g(r, l, function() {
1000
+ d = !0, p();
1000
1001
  })), function() {
1001
1002
  };
1002
1003
  }
1003
- function _e(e, n, t) {
1004
- return t === void 0 && (t = 1 / 0), b(n) ? _e(function(r, o) {
1005
- return Q(function(i, u) {
1006
- return n(r, i, o, u);
1007
- })(D(e(r, o)));
1008
- }, t) : (typeof n == "number" && (t = n), I(function(r, o) {
1009
- return Tt(r, o, e, t);
1004
+ function xe(e, r, t) {
1005
+ return t === void 0 && (t = 1 / 0), w(r) ? xe(function(n, i) {
1006
+ return $(function(o, u) {
1007
+ return r(n, o, i, u);
1008
+ })(K(e(n, i)));
1009
+ }, t) : (typeof r == "number" && (t = r), T(function(n, i) {
1010
+ return Tt(n, i, e, t);
1010
1011
  }));
1011
1012
  }
1012
- function Ot(e, n, t) {
1013
- e === void 0 && (e = 0), t === void 0 && (t = at);
1014
- var r = -1;
1015
- return n != null && (ge(n) ? t = n : r = n), new S(function(o) {
1016
- var i = Pt(e) ? +e - t.now() : e;
1017
- i < 0 && (i = 0);
1018
- var u = 0;
1019
- return t.schedule(function() {
1020
- o.closed || (o.next(u++), 0 <= r ? this.schedule(void 0, r) : o.complete());
1021
- }, i);
1022
- });
1023
- }
1024
- function Rt(e, n) {
1025
- return e === void 0 && (e = 0), n === void 0 && (n = xe), e < 0 && (e = 0), Ot(e, e, n);
1026
- }
1027
- function jt(e, n) {
1028
- return I(function(t, r) {
1029
- var o = 0;
1030
- t.subscribe(E(r, function(i) {
1031
- return e.call(n, i, o++) && r.next(i);
1032
- }));
1033
- });
1034
- }
1035
- function qe(e) {
1036
- return I(function(n, t) {
1037
- var r = null, o = !1, i;
1038
- r = n.subscribe(E(t, void 0, void 0, function(u) {
1039
- i = D(e(u, qe(e)(n))), r ? (r.unsubscribe(), r = null, i.subscribe(t)) : o = !0;
1040
- })), o && (r.unsubscribe(), r = null, i.subscribe(t));
1041
- });
1042
- }
1043
- function Lt(e, n, t, r, o) {
1044
- return function(i, u) {
1045
- var s = t, a = n, c = 0;
1046
- i.subscribe(E(u, function(f) {
1047
- var h = c++;
1048
- a = s ? e(a, f, h) : (s = !0, f), u.next(a);
1049
- }, o));
1013
+ function At(e, r, t, n, i) {
1014
+ return function(o, u) {
1015
+ var s = t, a = r, c = 0;
1016
+ o.subscribe(g(u, function(f) {
1017
+ var d = c++;
1018
+ a = s ? e(a, f, d) : (s = !0, f), u.next(a);
1019
+ }, i));
1050
1020
  };
1051
1021
  }
1052
- function kt(e) {
1053
- return I(function(n, t) {
1054
- var r = !1;
1055
- n.subscribe(E(t, function(o) {
1056
- r = !0, t.next(o);
1022
+ function Ot(e) {
1023
+ return T(function(r, t) {
1024
+ var n = !1;
1025
+ r.subscribe(g(t, function(i) {
1026
+ n = !0, t.next(i);
1057
1027
  }, function() {
1058
- r || t.next(e), t.complete();
1028
+ n || t.next(e), t.complete();
1059
1029
  }));
1060
1030
  });
1061
1031
  }
1062
- function Ut(e) {
1032
+ var Pt = new O(function(e) {
1033
+ return e.complete();
1034
+ });
1035
+ function It(e) {
1063
1036
  return e <= 0 ? function() {
1064
- return ct;
1065
- } : I(function(n, t) {
1066
- var r = 0;
1067
- n.subscribe(E(t, function(o) {
1068
- ++r <= e && (t.next(o), e <= r && t.complete());
1037
+ return Pt;
1038
+ } : T(function(r, t) {
1039
+ var n = 0;
1040
+ r.subscribe(g(t, function(i) {
1041
+ ++n <= e && (t.next(i), e <= n && t.complete());
1069
1042
  }));
1070
1043
  });
1071
1044
  }
1072
- function Dt(e) {
1073
- return e === void 0 && (e = Ct), I(function(n, t) {
1074
- var r = !1;
1075
- n.subscribe(E(t, function(o) {
1076
- r = !0, t.next(o);
1077
- }, function() {
1078
- return r ? t.complete() : t.error(e());
1045
+ function jt(e, r) {
1046
+ return T(function(t, n) {
1047
+ var i = 0;
1048
+ t.subscribe(g(n, function(o) {
1049
+ return e.call(r, o, i++) && n.next(o);
1079
1050
  }));
1080
1051
  });
1081
1052
  }
1082
- function Ct() {
1083
- return new Ce();
1084
- }
1085
- function _t(e, n) {
1086
- var t = arguments.length >= 2;
1087
- return function(r) {
1088
- return r.pipe(e ? jt(function(o, i) {
1089
- return e(o, i, r);
1090
- }) : be, Ut(1), t ? kt(n) : Dt(function() {
1091
- return new Ce();
1092
- }));
1053
+ var Ee = X(function(e) {
1054
+ return function() {
1055
+ e(this), this.name = "EmptyError", this.message = "no elements in sequence";
1093
1056
  };
1094
- }
1095
- function qt() {
1096
- return I(function(e, n) {
1097
- var t, r = !1;
1098
- e.subscribe(E(n, function(o) {
1099
- var i = t;
1100
- t = o, r && n.next([i, o]), r = !0;
1057
+ });
1058
+ function Rt(e) {
1059
+ return e === void 0 && (e = Lt), T(function(r, t) {
1060
+ var n = !1;
1061
+ r.subscribe(g(t, function(i) {
1062
+ n = !0, t.next(i);
1063
+ }, function() {
1064
+ return n ? t.complete() : t.error(e());
1101
1065
  }));
1102
1066
  });
1103
1067
  }
1104
- function Ft(e, n) {
1105
- return I(Lt(e, n, arguments.length >= 2, !0));
1106
- }
1107
- function Fe(e) {
1108
- switch (e.responseType) {
1109
- case "json": {
1110
- if ("response" in e)
1111
- return e.response;
1112
- var n = e;
1113
- return JSON.parse(n.responseText);
1114
- }
1115
- case "document":
1116
- return e.responseXML;
1117
- default: {
1118
- if ("response" in e)
1119
- return e.response;
1120
- var n = e;
1121
- return n.responseText;
1122
- }
1123
- }
1068
+ function Lt() {
1069
+ return new Ee();
1124
1070
  }
1125
- var Ht = /* @__PURE__ */ (function() {
1126
- function e(n, t, r, o) {
1127
- o === void 0 && (o = "download_load"), this.originalEvent = n, this.xhr = t, this.request = r, this.type = o;
1128
- var i = t.status, u = t.responseType;
1129
- this.status = i ?? 0, this.responseType = u ?? "";
1130
- var s = t.getAllResponseHeaders();
1131
- this.responseHeaders = s ? s.split(`
1132
- `).reduce(function(f, h) {
1133
- var p = h.indexOf(": ");
1134
- return f[h.slice(0, p)] = h.slice(p + 2), f;
1135
- }, {}) : {}, this.response = Fe(t);
1136
- var a = n.loaded, c = n.total;
1137
- this.loaded = a, this.total = c;
1138
- }
1139
- return e;
1140
- })(), V = z(function(e) {
1141
- return function(t, r, o) {
1142
- this.message = t, this.name = "AjaxError", this.xhr = r, this.request = o, this.status = r.status, this.responseType = r.responseType;
1143
- var i;
1144
- try {
1145
- i = Fe(r);
1146
- } catch {
1147
- i = r.responseText;
1148
- }
1149
- this.response = i;
1071
+ function Ut(e, r) {
1072
+ var t = arguments.length >= 2;
1073
+ return function(n) {
1074
+ return n.pipe(e ? jt(function(i, o) {
1075
+ return e(i, o, n);
1076
+ }) : ye, It(1), t ? Ot(r) : Rt(function() {
1077
+ return new Ee();
1078
+ }));
1150
1079
  };
1151
- }), Vt = (function() {
1152
- function e(n, t) {
1153
- return V.call(this, "ajax timeout", n, t), this.name = "AjaxTimeoutError", this;
1154
- }
1155
- return e.prototype = Object.create(V.prototype), e;
1156
- })();
1157
- function Bt(e, n) {
1158
- return L({ method: "GET", url: e, headers: n });
1159
- }
1160
- function Nt(e, n, t) {
1161
- return L({ method: "POST", url: e, body: n, headers: t });
1162
- }
1163
- function Gt(e, n) {
1164
- return L({ method: "DELETE", url: e, headers: n });
1165
1080
  }
1166
- function Mt(e, n, t) {
1167
- return L({ method: "PUT", url: e, body: n, headers: t });
1168
- }
1169
- function Xt(e, n, t) {
1170
- return L({ method: "PATCH", url: e, body: n, headers: t });
1171
- }
1172
- var Yt = Q(function(e) {
1173
- return e.response;
1174
- });
1175
- function Jt(e, n) {
1176
- return Yt(L({
1177
- method: "GET",
1178
- url: e,
1179
- headers: n
1180
- }));
1181
- }
1182
- var L = (function() {
1183
- var e = function(n) {
1184
- var t = typeof n == "string" ? {
1185
- url: n
1186
- } : n;
1187
- return zt(t);
1188
- };
1189
- return e.get = Bt, e.post = Nt, e.delete = Gt, e.put = Mt, e.patch = Xt, e.getJSON = Jt, e;
1190
- })(), $t = "upload", ve = "download", M = "loadstart", X = "progress", pe = "load";
1191
- function zt(e) {
1192
- return new S(function(n) {
1193
- var t, r, o = C({ async: !0, crossDomain: !1, withCredentials: !1, method: "GET", timeout: 0, responseType: "json" }, e), i = o.queryParams, u = o.body, s = o.headers, a = o.url;
1194
- if (!a)
1195
- throw new TypeError("url is required");
1196
- if (i) {
1197
- var c;
1198
- if (a.includes("?")) {
1199
- var f = a.split("?");
1200
- if (2 < f.length)
1201
- throw new TypeError("invalid url");
1202
- c = new URLSearchParams(f[1]), new URLSearchParams(i).forEach(function(m, w) {
1203
- return c.set(w, m);
1204
- }), a = f[0] + "?" + c;
1205
- } else
1206
- c = new URLSearchParams(i), a = a + "?" + c;
1207
- }
1208
- var h = {};
1209
- if (s)
1210
- for (var p in s)
1211
- s.hasOwnProperty(p) && (h[p.toLowerCase()] = s[p]);
1212
- var l = o.crossDomain;
1213
- !l && !("x-requested-with" in h) && (h["x-requested-with"] = "XMLHttpRequest");
1214
- var x = o.withCredentials, d = o.xsrfCookieName, T = o.xsrfHeaderName;
1215
- if ((x || !l) && d && T) {
1216
- var P = (r = (t = document?.cookie.match(new RegExp("(^|;\\s*)(" + d + ")=([^;]*)"))) === null || t === void 0 ? void 0 : t.pop()) !== null && r !== void 0 ? r : "";
1217
- P && (h[T] = P);
1218
- }
1219
- var O = Wt(u, h), A = C(C({}, o), {
1220
- url: a,
1221
- headers: h,
1222
- body: O
1223
- }), v;
1224
- v = e.createXHR ? e.createXHR() : new XMLHttpRequest();
1225
- {
1226
- var y = e.progressSubscriber, ee = e.includeDownloadProgress, He = ee === void 0 ? !1 : ee, te = e.includeUploadProgress, Ve = te === void 0 ? !1 : te, ne = function(m, w) {
1227
- v.addEventListener(m, function() {
1228
- var g, R = w();
1229
- (g = y?.error) === null || g === void 0 || g.call(y, R), n.error(R);
1230
- });
1231
- };
1232
- ne("timeout", function() {
1233
- return new Vt(v, A);
1234
- }), ne("abort", function() {
1235
- return new V("aborted", v, A);
1236
- });
1237
- var re = function(m, w) {
1238
- return new Ht(w, v, A, m + "_" + w.type);
1239
- }, oe = function(m, w, g) {
1240
- m.addEventListener(w, function(R) {
1241
- n.next(re(g, R));
1242
- });
1243
- };
1244
- Ve && [M, X, pe].forEach(function(m) {
1245
- return oe(v.upload, m, $t);
1246
- }), y && [M, X].forEach(function(m) {
1247
- return v.upload.addEventListener(m, function(w) {
1248
- var g;
1249
- return (g = y?.next) === null || g === void 0 ? void 0 : g.call(y, w);
1250
- });
1251
- }), He && [M, X].forEach(function(m) {
1252
- return oe(v, m, ve);
1253
- });
1254
- var ie = function(m) {
1255
- var w = "ajax error" + (m ? " " + m : "");
1256
- n.error(new V(w, v, A));
1257
- };
1258
- v.addEventListener("error", function(m) {
1259
- var w;
1260
- (w = y?.error) === null || w === void 0 || w.call(y, m), ie();
1261
- }), v.addEventListener(pe, function(m) {
1262
- var w, g, R = v.status;
1263
- if (R < 400) {
1264
- (w = y?.complete) === null || w === void 0 || w.call(y);
1265
- var ce = void 0;
1266
- try {
1267
- ce = re(ve, m);
1268
- } catch (Be) {
1269
- n.error(Be);
1270
- return;
1271
- }
1272
- n.next(ce), n.complete();
1273
- } else
1274
- (g = y?.error) === null || g === void 0 || g.call(y, m), ie(R);
1275
- });
1276
- }
1277
- var ue = A.user, ae = A.method, N = A.async;
1278
- ue ? v.open(ae, a, N, ue, A.password) : v.open(ae, a, N), N && (v.timeout = A.timeout, v.responseType = A.responseType), "withCredentials" in v && (v.withCredentials = A.withCredentials);
1279
- for (var p in h)
1280
- h.hasOwnProperty(p) && v.setRequestHeader(p, h[p]);
1281
- return O ? v.send(O) : v.send(), function() {
1282
- v && v.readyState !== 4 && v.abort();
1283
- };
1081
+ function kt() {
1082
+ return T(function(e, r) {
1083
+ var t, n = !1;
1084
+ e.subscribe(g(r, function(i) {
1085
+ var o = t;
1086
+ t = i, n && r.next([o, i]), n = !0;
1087
+ }));
1284
1088
  });
1285
1089
  }
1286
- function Wt(e, n) {
1287
- var t;
1288
- if (!e || typeof e == "string" || nn(e) || rn(e) || Qt(e) || Zt(e) || en(e) || on(e))
1289
- return e;
1290
- if (tn(e))
1291
- return e.buffer;
1292
- if (typeof e == "object")
1293
- return n["content-type"] = (t = n["content-type"]) !== null && t !== void 0 ? t : "application/json;charset=utf-8", JSON.stringify(e);
1294
- throw new TypeError("Unknown body type");
1295
- }
1296
- var Kt = Object.prototype.toString;
1297
- function Z(e, n) {
1298
- return Kt.call(e) === "[object " + n + "]";
1299
- }
1300
- function Qt(e) {
1301
- return Z(e, "ArrayBuffer");
1302
- }
1303
- function Zt(e) {
1304
- return Z(e, "File");
1305
- }
1306
- function en(e) {
1307
- return Z(e, "Blob");
1308
- }
1309
- function tn(e) {
1310
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView(e);
1311
- }
1312
- function nn(e) {
1313
- return typeof FormData < "u" && e instanceof FormData;
1314
- }
1315
- function rn(e) {
1316
- return typeof URLSearchParams < "u" && e instanceof URLSearchParams;
1317
- }
1318
- function on(e) {
1319
- return typeof ReadableStream < "u" && e instanceof ReadableStream;
1090
+ function Dt(e, r) {
1091
+ return T(At(e, r, arguments.length >= 2, !0));
1320
1092
  }
1321
- const un = 180 * 1e3, an = ({
1322
- versionCheckIntervalPeriod: e = un,
1323
- onNewVersionAvailable: n
1093
+ const Ft = 180 * 1e3, Ht = ({
1094
+ versionCheckIntervalPeriod: e = Ft,
1095
+ onNewVersionAvailable: r
1324
1096
  }) => {
1325
- const t = () => L({
1097
+ const t = () => R({
1326
1098
  url: "/version",
1327
1099
  responseType: "text",
1328
1100
  headers: {
1329
1101
  "Cache-Control": "no-store"
1330
1102
  }
1331
1103
  }).pipe(
1332
- Q((o) => {
1333
- const i = o.response;
1334
- return typeof i == "string" ? i.trim() : null;
1104
+ $((i) => {
1105
+ const o = i.response;
1106
+ return typeof o == "string" ? o.trim() : null;
1335
1107
  }),
1336
- qe(() => It(null))
1337
- ), r = Rt(e).pipe(
1338
- _e(t),
1339
- Ft((o, i) => i ?? o),
1340
- qt(),
1341
- _t(([o, i]) => !!o && o !== i)
1108
+ we(() => Pe(null))
1109
+ ), n = Oe(e).pipe(
1110
+ xe(t),
1111
+ Dt((i, o) => o ?? i),
1112
+ kt(),
1113
+ Ut(([i, o]) => !!i && i !== o)
1342
1114
  ).subscribe(() => {
1343
- n(), r.unsubscribe();
1115
+ r(), n.unsubscribe();
1344
1116
  });
1345
- return () => r.unsubscribe();
1117
+ return () => n.unsubscribe();
1346
1118
  };
1347
- function sn({
1119
+ function qt({
1348
1120
  message: e = "A new version of the app is available. Please reload the page to access latest features."
1349
1121
  }) {
1350
- return Ne(() => an({
1122
+ return Ae(() => Ht({
1351
1123
  onNewVersionAvailable: () => {
1352
1124
  globalThis.confirm(e) && globalThis.location.reload();
1353
1125
  }
1354
1126
  }), [e]), null;
1355
1127
  }
1356
- function fn(e = {}) {
1357
- const { envVarName: n = "APP_VERSION" } = e;
1128
+ function Bt(e = {}) {
1129
+ const { envVarName: r = "APP_VERSION" } = e;
1358
1130
  return {
1359
1131
  name: "vite-plugin-force-update",
1360
1132
  generateBundle() {
1361
- const t = process.env[n];
1133
+ const t = process.env[r];
1362
1134
  if (!t) {
1363
- console.warn(`Environment variable ${n} is not set.`);
1135
+ console.warn(`Environment variable ${r} is not set.`);
1364
1136
  return;
1365
1137
  }
1366
1138
  this.emitFile({
@@ -1372,7 +1144,7 @@ function fn(e = {}) {
1372
1144
  };
1373
1145
  }
1374
1146
  export {
1375
- sn as ForceUpdateNotification,
1376
- an as listenOnForceUpdate,
1377
- fn as vitePluginForceUpdate
1147
+ qt as ForceUpdateNotification,
1148
+ Ht as listenOnForceUpdate,
1149
+ Bt as vitePluginForceUpdate
1378
1150
  };