@ahoo-wang/fetcher-react 2.6.13 → 2.6.15
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.es.js +383 -368
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRef as pt, useCallback as g, useEffect as z, useState as C, useMemo as F, useSyncExternalStore as
|
|
2
|
-
import { fetcherRegistrar as
|
|
1
|
+
import { useRef as pt, useCallback as g, useEffect as z, useState as C, useMemo as F, useSyncExternalStore as ke } from "react";
|
|
2
|
+
import { fetcherRegistrar as Ce, getFetcher as Kt, CONTENT_TYPE_HEADER as je, ContentTypeValues as ot, FetcherError as De, HttpMethod as Ge, combineURLs as qe, JsonResultExtractor as He, mergeRecordToMap as St, mergeRequest as Ue } from "@ahoo-wang/fetcher";
|
|
3
3
|
function bt() {
|
|
4
4
|
const t = pt(!1), e = g(() => t.current, []);
|
|
5
5
|
return z(() => (t.current = !0, () => {
|
|
@@ -10,8 +10,8 @@ function Z(t) {
|
|
|
10
10
|
const e = pt(t);
|
|
11
11
|
return e.current = t, e;
|
|
12
12
|
}
|
|
13
|
-
var
|
|
14
|
-
function
|
|
13
|
+
var $e = /* @__PURE__ */ ((t) => (t.IDLE = "idle", t.LOADING = "loading", t.SUCCESS = "success", t.ERROR = "error", t))($e || {});
|
|
14
|
+
function te(t) {
|
|
15
15
|
const [e, r] = C(
|
|
16
16
|
t?.initialStatus ?? "idle"
|
|
17
17
|
/* IDLE */
|
|
@@ -29,8 +29,8 @@ function Zt(t) {
|
|
|
29
29
|
), f(void 0);
|
|
30
30
|
try {
|
|
31
31
|
await m.current?.onSuccess?.(b);
|
|
32
|
-
} catch (
|
|
33
|
-
console.warn("PromiseState onSuccess callback error:",
|
|
32
|
+
} catch (R) {
|
|
33
|
+
console.warn("PromiseState onSuccess callback error:", R);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
},
|
|
@@ -44,8 +44,8 @@ function Zt(t) {
|
|
|
44
44
|
), s(void 0);
|
|
45
45
|
try {
|
|
46
46
|
await m.current?.onError?.(b);
|
|
47
|
-
} catch (
|
|
48
|
-
console.warn("PromiseState onError callback error:",
|
|
47
|
+
} catch (R) {
|
|
48
|
+
console.warn("PromiseState onError callback error:", R);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
},
|
|
@@ -70,7 +70,7 @@ function Zt(t) {
|
|
|
70
70
|
[e, a, u, S, M, _, A]
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ee() {
|
|
74
74
|
const t = pt(0), e = g(() => ++t.current, []), r = g(() => t.current, []), a = g((f) => f === t.current, []), s = g(() => {
|
|
75
75
|
t.current++;
|
|
76
76
|
}, []), u = g(() => {
|
|
@@ -85,7 +85,7 @@ function Kt() {
|
|
|
85
85
|
}), [e, r, a, s, u]);
|
|
86
86
|
}
|
|
87
87
|
function it(t) {
|
|
88
|
-
const e =
|
|
88
|
+
const e = te(t), r = bt(), a = ee(), s = g(
|
|
89
89
|
async (f) => {
|
|
90
90
|
if (!r())
|
|
91
91
|
throw new Error("Component is unmounted");
|
|
@@ -116,20 +116,20 @@ function it(t) {
|
|
|
116
116
|
[e.loading, e.result, e.error, s, u, e.status]
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Pr(t) {
|
|
120
120
|
const e = g(
|
|
121
121
|
(u) => t.addListener(u),
|
|
122
122
|
[t]
|
|
123
|
-
), r = g(() => t.get(), [t]), a =
|
|
123
|
+
), r = g(() => t.get(), [t]), a = ke(e, r, r), s = g(
|
|
124
124
|
(u) => t.set(u),
|
|
125
125
|
[t]
|
|
126
126
|
);
|
|
127
127
|
return [a, s];
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
const { fetcher: e =
|
|
129
|
+
function Ir(t) {
|
|
130
|
+
const { fetcher: e = Ce.default } = t || {}, r = te(t), [a, s] = C(
|
|
131
131
|
void 0
|
|
132
|
-
), u = bt(), f = pt(), y =
|
|
132
|
+
), u = bt(), f = pt(), y = ee(), m = Z(t), S = Kt(e), M = g(
|
|
133
133
|
async (_) => {
|
|
134
134
|
f.current && f.current.abort(), f.current = _.abortController ?? new AbortController(), _.abortController = f.current;
|
|
135
135
|
const A = y.generate();
|
|
@@ -140,8 +140,8 @@ function Ar(t) {
|
|
|
140
140
|
m.current
|
|
141
141
|
);
|
|
142
142
|
u() && y.isLatest(A) && s(b);
|
|
143
|
-
const
|
|
144
|
-
u() && y.isLatest(A) && await r.setSuccess(
|
|
143
|
+
const R = await b.extractResult();
|
|
144
|
+
u() && y.isLatest(A) && await r.setSuccess(R);
|
|
145
145
|
} catch (b) {
|
|
146
146
|
if (b instanceof Error && b.name === "AbortError") {
|
|
147
147
|
u() && r.setIdle();
|
|
@@ -165,7 +165,7 @@ function Ar(t) {
|
|
|
165
165
|
[r, a, M]
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
|
-
let
|
|
168
|
+
let We = class {
|
|
169
169
|
constructor() {
|
|
170
170
|
this.buffer = "";
|
|
171
171
|
}
|
|
@@ -200,16 +200,16 @@ let Ue = class {
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
|
-
class
|
|
203
|
+
class Fe extends TransformStream {
|
|
204
204
|
constructor() {
|
|
205
|
-
super(new
|
|
205
|
+
super(new We());
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
const at = class {
|
|
209
209
|
};
|
|
210
210
|
at.ID = "id", at.RETRY = "retry", at.EVENT = "event", at.DATA = "data";
|
|
211
211
|
let dt = at;
|
|
212
|
-
function
|
|
212
|
+
function Qe(t, e, r) {
|
|
213
213
|
switch (t) {
|
|
214
214
|
case dt.EVENT:
|
|
215
215
|
r.event = e;
|
|
@@ -228,7 +228,7 @@ function We(t, e, r) {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
const tt = "message";
|
|
231
|
-
let
|
|
231
|
+
let Ve = class {
|
|
232
232
|
constructor() {
|
|
233
233
|
this.currentEvent = {
|
|
234
234
|
event: tt,
|
|
@@ -260,7 +260,7 @@ let Fe = class {
|
|
|
260
260
|
return;
|
|
261
261
|
const s = e.indexOf(":");
|
|
262
262
|
let u, f;
|
|
263
|
-
s === -1 ? (u = e.toLowerCase(), f = "") : (u = e.substring(0, s).toLowerCase(), f = e.substring(s + 1), f.startsWith(" ") && (f = f.substring(1))), u = u.trim(), f = f.trim(),
|
|
263
|
+
s === -1 ? (u = e.toLowerCase(), f = "") : (u = e.substring(0, s).toLowerCase(), f = e.substring(s + 1), f.startsWith(" ") && (f = f.substring(1))), u = u.trim(), f = f.trim(), Qe(u, f, a);
|
|
264
264
|
} catch (s) {
|
|
265
265
|
r.error(
|
|
266
266
|
s instanceof Error ? s : new Error(String(s))
|
|
@@ -290,13 +290,12 @@ let Fe = class {
|
|
|
290
290
|
r.event = tt, r.id = void 0, r.retry = void 0, r.data = [];
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
}
|
|
294
|
-
class Qe extends TransformStream {
|
|
293
|
+
}, Ye = class extends TransformStream {
|
|
295
294
|
constructor() {
|
|
296
|
-
super(new
|
|
295
|
+
super(new Ve());
|
|
297
296
|
}
|
|
298
|
-
}
|
|
299
|
-
class st extends
|
|
297
|
+
};
|
|
298
|
+
class st extends De {
|
|
300
299
|
/**
|
|
301
300
|
* Creates a new EventStreamConvertError instance.
|
|
302
301
|
* @param response - The Response object associated with the error
|
|
@@ -307,12 +306,12 @@ class st extends Ce {
|
|
|
307
306
|
super(r, a), this.response = e, this.name = "EventStreamConvertError", Object.setPrototypeOf(this, st.prototype);
|
|
308
307
|
}
|
|
309
308
|
}
|
|
310
|
-
function
|
|
309
|
+
function Be(t) {
|
|
311
310
|
if (!t.body)
|
|
312
311
|
throw new st(t, "Response body is null");
|
|
313
|
-
return t.body.pipeThrough(new TextDecoderStream("utf-8")).pipeThrough(new
|
|
312
|
+
return t.body.pipeThrough(new TextDecoderStream("utf-8")).pipeThrough(new Fe()).pipeThrough(new Ye());
|
|
314
313
|
}
|
|
315
|
-
|
|
314
|
+
class Xe {
|
|
316
315
|
transform(e, r) {
|
|
317
316
|
const a = JSON.parse(e.data);
|
|
318
317
|
r.enqueue({
|
|
@@ -322,32 +321,45 @@ let Ye = class {
|
|
|
322
321
|
retry: e.retry
|
|
323
322
|
});
|
|
324
323
|
}
|
|
325
|
-
}
|
|
324
|
+
}
|
|
325
|
+
class Je extends TransformStream {
|
|
326
326
|
constructor() {
|
|
327
|
-
super(new
|
|
327
|
+
super(new Xe());
|
|
328
328
|
}
|
|
329
|
-
}
|
|
330
|
-
function
|
|
329
|
+
}
|
|
330
|
+
function ze(t) {
|
|
331
331
|
return t.pipeThrough(
|
|
332
|
-
new
|
|
332
|
+
new Je()
|
|
333
333
|
);
|
|
334
334
|
}
|
|
335
|
-
const yt = (t) => t.requiredResponse.requiredJsonEventStream();
|
|
336
|
-
Object.
|
|
335
|
+
const yt = (t) => t.requiredResponse.requiredJsonEventStream(), Yt = "contentType";
|
|
336
|
+
Object.prototype.hasOwnProperty.call(
|
|
337
|
+
Response.prototype,
|
|
338
|
+
Yt
|
|
339
|
+
) || Object.defineProperty(Response.prototype, Yt, {
|
|
337
340
|
get() {
|
|
338
|
-
return this.headers.get(
|
|
339
|
-
}
|
|
341
|
+
return this.headers.get(je);
|
|
342
|
+
},
|
|
343
|
+
configurable: !0
|
|
340
344
|
});
|
|
341
|
-
|
|
345
|
+
const Bt = "isEventStream";
|
|
346
|
+
Object.prototype.hasOwnProperty.call(
|
|
347
|
+
Response.prototype,
|
|
348
|
+
Bt
|
|
349
|
+
) || Object.defineProperty(Response.prototype, Bt, {
|
|
342
350
|
get() {
|
|
343
351
|
const t = this.contentType;
|
|
344
352
|
return t ? t.includes(ot.TEXT_EVENT_STREAM) : !1;
|
|
345
|
-
}
|
|
353
|
+
},
|
|
354
|
+
configurable: !0
|
|
346
355
|
});
|
|
347
|
-
Response.prototype.eventStream = function() {
|
|
348
|
-
return this.isEventStream ?
|
|
349
|
-
};
|
|
350
|
-
|
|
356
|
+
Object.prototype.hasOwnProperty.call(Response.prototype, "eventStream") || (Response.prototype.eventStream = function() {
|
|
357
|
+
return this.isEventStream ? Be(this) : null;
|
|
358
|
+
});
|
|
359
|
+
Object.prototype.hasOwnProperty.call(
|
|
360
|
+
Response.prototype,
|
|
361
|
+
"requiredEventStream"
|
|
362
|
+
) || (Response.prototype.requiredEventStream = function() {
|
|
351
363
|
const t = this.eventStream();
|
|
352
364
|
if (!t)
|
|
353
365
|
throw new st(
|
|
@@ -355,12 +367,15 @@ Response.prototype.requiredEventStream = function() {
|
|
|
355
367
|
`Event stream is not available. Response content-type: [${this.contentType}]`
|
|
356
368
|
);
|
|
357
369
|
return t;
|
|
358
|
-
};
|
|
359
|
-
Response.prototype.jsonEventStream = function() {
|
|
370
|
+
});
|
|
371
|
+
Object.prototype.hasOwnProperty.call(Response.prototype, "jsonEventStream") || (Response.prototype.jsonEventStream = function() {
|
|
360
372
|
const t = this.eventStream();
|
|
361
|
-
return t ?
|
|
362
|
-
};
|
|
363
|
-
|
|
373
|
+
return t ? ze(t) : null;
|
|
374
|
+
});
|
|
375
|
+
Object.prototype.hasOwnProperty.call(
|
|
376
|
+
Response.prototype,
|
|
377
|
+
"requiredJsonEventStream"
|
|
378
|
+
) || (Response.prototype.requiredJsonEventStream = function() {
|
|
364
379
|
const t = this.jsonEventStream();
|
|
365
380
|
if (!t)
|
|
366
381
|
throw new st(
|
|
@@ -368,8 +383,8 @@ Response.prototype.requiredJsonEventStream = function() {
|
|
|
368
383
|
`Event stream is not available. Response content-type: [${this.contentType}]`
|
|
369
384
|
);
|
|
370
385
|
return t;
|
|
371
|
-
};
|
|
372
|
-
class
|
|
386
|
+
});
|
|
387
|
+
class Ze {
|
|
373
388
|
/**
|
|
374
389
|
* Creates a new ReadableStreamAsyncIterable instance.
|
|
375
390
|
* @param stream - The ReadableStream to wrap.
|
|
@@ -444,11 +459,11 @@ class Je {
|
|
|
444
459
|
return console.debug("Throwing error:", e), this.releaseLock(), { done: !0, value: void 0 };
|
|
445
460
|
}
|
|
446
461
|
}
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
return new
|
|
462
|
+
const Ke = typeof ReadableStream.prototype[Symbol.asyncIterator] == "function";
|
|
463
|
+
Ke || (ReadableStream.prototype[Symbol.asyncIterator] = function() {
|
|
464
|
+
return new Ze(this);
|
|
450
465
|
});
|
|
451
|
-
var
|
|
466
|
+
var Xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Jt = {};
|
|
452
467
|
/*! *****************************************************************************
|
|
453
468
|
Copyright (C) Microsoft. All rights reserved.
|
|
454
469
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -463,14 +478,14 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
463
478
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
464
479
|
and limitations under the License.
|
|
465
480
|
***************************************************************************** */
|
|
466
|
-
var
|
|
467
|
-
function
|
|
468
|
-
if (
|
|
469
|
-
|
|
481
|
+
var zt;
|
|
482
|
+
function tr() {
|
|
483
|
+
if (zt) return Jt;
|
|
484
|
+
zt = 1;
|
|
470
485
|
var t;
|
|
471
486
|
return (function(e) {
|
|
472
487
|
(function(r) {
|
|
473
|
-
var a = typeof globalThis == "object" ? globalThis : typeof
|
|
488
|
+
var a = typeof globalThis == "object" ? globalThis : typeof Xt == "object" ? Xt : typeof self == "object" ? self : typeof this == "object" ? this : m(), s = u(e);
|
|
474
489
|
typeof a.Reflect < "u" && (s = u(a.Reflect, s)), r(s, a), typeof a.Reflect > "u" && (a.Reflect = e);
|
|
475
490
|
function u(S, M) {
|
|
476
491
|
return function(_, A) {
|
|
@@ -512,14 +527,14 @@ function Ze() {
|
|
|
512
527
|
} : function(n, o) {
|
|
513
528
|
return n[o];
|
|
514
529
|
}
|
|
515
|
-
}, A = Object.getPrototypeOf(Function), b = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map :
|
|
516
|
-
function
|
|
530
|
+
}, A = Object.getPrototypeOf(Function), b = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Pe(), R = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Ie(), X = typeof WeakMap == "function" ? WeakMap : Ne(), G = u ? Symbol.for("@reflect-metadata:registry") : void 0, ct = Re(), It = Me(ct);
|
|
531
|
+
function ue(n, o, i, c) {
|
|
517
532
|
if (v(i)) {
|
|
518
533
|
if (!qt(n))
|
|
519
534
|
throw new TypeError();
|
|
520
535
|
if (!Ht(o))
|
|
521
536
|
throw new TypeError();
|
|
522
|
-
return
|
|
537
|
+
return we(n, o);
|
|
523
538
|
} else {
|
|
524
539
|
if (!qt(n))
|
|
525
540
|
throw new TypeError();
|
|
@@ -527,64 +542,64 @@ function Ze() {
|
|
|
527
542
|
throw new TypeError();
|
|
528
543
|
if (!N(c) && !v(c) && !K(c))
|
|
529
544
|
throw new TypeError();
|
|
530
|
-
return K(c) && (c = void 0), i = W(i),
|
|
545
|
+
return K(c) && (c = void 0), i = W(i), Te(n, o, i, c);
|
|
531
546
|
}
|
|
532
547
|
}
|
|
533
|
-
r("decorate",
|
|
534
|
-
function
|
|
548
|
+
r("decorate", ue);
|
|
549
|
+
function ce(n, o) {
|
|
535
550
|
function i(c, E) {
|
|
536
551
|
if (!N(c))
|
|
537
552
|
throw new TypeError();
|
|
538
|
-
if (!v(E) && !
|
|
553
|
+
if (!v(E) && !ge(E))
|
|
539
554
|
throw new TypeError();
|
|
540
555
|
kt(n, o, c, E);
|
|
541
556
|
}
|
|
542
557
|
return i;
|
|
543
558
|
}
|
|
544
|
-
r("metadata",
|
|
545
|
-
function
|
|
559
|
+
r("metadata", ce);
|
|
560
|
+
function fe(n, o, i, c) {
|
|
546
561
|
if (!N(i))
|
|
547
562
|
throw new TypeError();
|
|
548
563
|
return v(c) || (c = W(c)), kt(n, o, i, c);
|
|
549
564
|
}
|
|
550
|
-
r("defineMetadata",
|
|
551
|
-
function
|
|
565
|
+
r("defineMetadata", fe);
|
|
566
|
+
function de(n, o, i) {
|
|
552
567
|
if (!N(o))
|
|
553
568
|
throw new TypeError();
|
|
554
569
|
return v(i) || (i = W(i)), Nt(n, o, i);
|
|
555
570
|
}
|
|
556
|
-
r("hasMetadata",
|
|
557
|
-
function
|
|
571
|
+
r("hasMetadata", de);
|
|
572
|
+
function le(n, o, i) {
|
|
558
573
|
if (!N(o))
|
|
559
574
|
throw new TypeError();
|
|
560
575
|
return v(i) || (i = W(i)), vt(n, o, i);
|
|
561
576
|
}
|
|
562
|
-
r("hasOwnMetadata",
|
|
563
|
-
function
|
|
577
|
+
r("hasOwnMetadata", le);
|
|
578
|
+
function he(n, o, i) {
|
|
564
579
|
if (!N(o))
|
|
565
580
|
throw new TypeError();
|
|
566
581
|
return v(i) || (i = W(i)), Lt(n, o, i);
|
|
567
582
|
}
|
|
568
|
-
r("getMetadata",
|
|
569
|
-
function
|
|
583
|
+
r("getMetadata", he);
|
|
584
|
+
function pe(n, o, i) {
|
|
570
585
|
if (!N(o))
|
|
571
586
|
throw new TypeError();
|
|
572
587
|
return v(i) || (i = W(i)), xt(n, o, i);
|
|
573
588
|
}
|
|
574
|
-
r("getOwnMetadata",
|
|
575
|
-
function
|
|
589
|
+
r("getOwnMetadata", pe);
|
|
590
|
+
function ye(n, o) {
|
|
576
591
|
if (!N(n))
|
|
577
592
|
throw new TypeError();
|
|
578
593
|
return v(o) || (o = W(o)), Ct(n, o);
|
|
579
594
|
}
|
|
580
|
-
r("getMetadataKeys",
|
|
581
|
-
function
|
|
595
|
+
r("getMetadataKeys", ye);
|
|
596
|
+
function Ee(n, o) {
|
|
582
597
|
if (!N(n))
|
|
583
598
|
throw new TypeError();
|
|
584
|
-
return v(o) || (o = W(o)),
|
|
599
|
+
return v(o) || (o = W(o)), jt(n, o);
|
|
585
600
|
}
|
|
586
|
-
r("getOwnMetadataKeys",
|
|
587
|
-
function
|
|
601
|
+
r("getOwnMetadataKeys", Ee);
|
|
602
|
+
function ve(n, o, i) {
|
|
588
603
|
if (!N(o))
|
|
589
604
|
throw new TypeError();
|
|
590
605
|
if (v(i) || (i = W(i)), !N(o))
|
|
@@ -598,8 +613,8 @@ function Ze() {
|
|
|
598
613
|
);
|
|
599
614
|
return v(c) ? !1 : c.OrdinaryDeleteMetadata(n, o, i);
|
|
600
615
|
}
|
|
601
|
-
r("deleteMetadata",
|
|
602
|
-
function
|
|
616
|
+
r("deleteMetadata", ve);
|
|
617
|
+
function we(n, o) {
|
|
603
618
|
for (var i = n.length - 1; i >= 0; --i) {
|
|
604
619
|
var c = n[i], E = c(o);
|
|
605
620
|
if (!v(E) && !K(E)) {
|
|
@@ -610,9 +625,9 @@ function Ze() {
|
|
|
610
625
|
}
|
|
611
626
|
return o;
|
|
612
627
|
}
|
|
613
|
-
function
|
|
628
|
+
function Te(n, o, i, c) {
|
|
614
629
|
for (var E = n.length - 1; E >= 0; --E) {
|
|
615
|
-
var
|
|
630
|
+
var P = n[E], L = P(o, i, c);
|
|
616
631
|
if (!v(L) && !K(L)) {
|
|
617
632
|
if (!N(L))
|
|
618
633
|
throw new TypeError();
|
|
@@ -625,7 +640,7 @@ function Ze() {
|
|
|
625
640
|
var c = vt(n, o, i);
|
|
626
641
|
if (c)
|
|
627
642
|
return !0;
|
|
628
|
-
var E =
|
|
643
|
+
var E = Tt(o);
|
|
629
644
|
return K(E) ? !1 : Nt(n, E, i);
|
|
630
645
|
}
|
|
631
646
|
function vt(n, o, i) {
|
|
@@ -641,7 +656,7 @@ function Ze() {
|
|
|
641
656
|
var c = vt(n, o, i);
|
|
642
657
|
if (c)
|
|
643
658
|
return xt(n, o, i);
|
|
644
|
-
var E =
|
|
659
|
+
var E = Tt(o);
|
|
645
660
|
if (!K(E))
|
|
646
661
|
return Lt(n, E, i);
|
|
647
662
|
}
|
|
@@ -665,7 +680,7 @@ function Ze() {
|
|
|
665
680
|
E.OrdinaryDefineOwnMetadata(n, o, i, c);
|
|
666
681
|
}
|
|
667
682
|
function Ct(n, o) {
|
|
668
|
-
var i =
|
|
683
|
+
var i = jt(n, o), c = Tt(n);
|
|
669
684
|
if (c === null)
|
|
670
685
|
return i;
|
|
671
686
|
var E = Ct(c, o);
|
|
@@ -673,17 +688,17 @@ function Ze() {
|
|
|
673
688
|
return i;
|
|
674
689
|
if (i.length <= 0)
|
|
675
690
|
return E;
|
|
676
|
-
for (var
|
|
677
|
-
var l = d[
|
|
678
|
-
h || (
|
|
691
|
+
for (var P = new R(), L = [], w = 0, d = i; w < d.length; w++) {
|
|
692
|
+
var l = d[w], h = P.has(l);
|
|
693
|
+
h || (P.add(l), L.push(l));
|
|
679
694
|
}
|
|
680
|
-
for (var p = 0,
|
|
681
|
-
var l =
|
|
682
|
-
h || (
|
|
695
|
+
for (var p = 0, T = E; p < T.length; p++) {
|
|
696
|
+
var l = T[p], h = P.has(l);
|
|
697
|
+
h || (P.add(l), L.push(l));
|
|
683
698
|
}
|
|
684
699
|
return L;
|
|
685
700
|
}
|
|
686
|
-
function
|
|
701
|
+
function jt(n, o) {
|
|
687
702
|
var i = rt(
|
|
688
703
|
n,
|
|
689
704
|
o,
|
|
@@ -692,7 +707,7 @@ function Ze() {
|
|
|
692
707
|
);
|
|
693
708
|
return i ? i.OrdinaryOwnMetadataKeys(n, o) : [];
|
|
694
709
|
}
|
|
695
|
-
function
|
|
710
|
+
function Dt(n) {
|
|
696
711
|
if (n === null)
|
|
697
712
|
return 1;
|
|
698
713
|
switch (typeof n) {
|
|
@@ -718,14 +733,14 @@ function Ze() {
|
|
|
718
733
|
function K(n) {
|
|
719
734
|
return n === null;
|
|
720
735
|
}
|
|
721
|
-
function
|
|
736
|
+
function me(n) {
|
|
722
737
|
return typeof n == "symbol";
|
|
723
738
|
}
|
|
724
739
|
function N(n) {
|
|
725
740
|
return typeof n == "object" ? n !== null : typeof n == "function";
|
|
726
741
|
}
|
|
727
|
-
function
|
|
728
|
-
switch (
|
|
742
|
+
function Se(n, o) {
|
|
743
|
+
switch (Dt(n)) {
|
|
729
744
|
case 0:
|
|
730
745
|
return n;
|
|
731
746
|
case 1:
|
|
@@ -746,14 +761,14 @@ function Ze() {
|
|
|
746
761
|
throw new TypeError();
|
|
747
762
|
return E;
|
|
748
763
|
}
|
|
749
|
-
return
|
|
764
|
+
return _e(n);
|
|
750
765
|
}
|
|
751
|
-
function
|
|
766
|
+
function _e(n, o) {
|
|
752
767
|
var i, c, E;
|
|
753
768
|
{
|
|
754
|
-
var
|
|
755
|
-
if (ft(
|
|
756
|
-
var c =
|
|
769
|
+
var P = n.toString;
|
|
770
|
+
if (ft(P)) {
|
|
771
|
+
var c = P.call(n);
|
|
757
772
|
if (!N(c))
|
|
758
773
|
return c;
|
|
759
774
|
}
|
|
@@ -769,12 +784,12 @@ function Ze() {
|
|
|
769
784
|
function Gt(n) {
|
|
770
785
|
return !!n;
|
|
771
786
|
}
|
|
772
|
-
function
|
|
787
|
+
function be(n) {
|
|
773
788
|
return "" + n;
|
|
774
789
|
}
|
|
775
790
|
function W(n) {
|
|
776
|
-
var o =
|
|
777
|
-
return
|
|
791
|
+
var o = Se(n);
|
|
792
|
+
return me(o) ? o : be(o);
|
|
778
793
|
}
|
|
779
794
|
function qt(n) {
|
|
780
795
|
return Array.isArray ? Array.isArray(n) : n instanceof Object ? n instanceof Array : Object.prototype.toString.call(n) === "[object Array]";
|
|
@@ -785,8 +800,8 @@ function Ze() {
|
|
|
785
800
|
function Ht(n) {
|
|
786
801
|
return typeof n == "function";
|
|
787
802
|
}
|
|
788
|
-
function
|
|
789
|
-
switch (
|
|
803
|
+
function ge(n) {
|
|
804
|
+
switch (Dt(n)) {
|
|
790
805
|
case 3:
|
|
791
806
|
return !0;
|
|
792
807
|
case 4:
|
|
@@ -795,7 +810,7 @@ function Ze() {
|
|
|
795
810
|
return !1;
|
|
796
811
|
}
|
|
797
812
|
}
|
|
798
|
-
function
|
|
813
|
+
function wt(n, o) {
|
|
799
814
|
return n === o || n !== n && o !== o;
|
|
800
815
|
}
|
|
801
816
|
function Ut(n, o) {
|
|
@@ -826,7 +841,7 @@ function Ze() {
|
|
|
826
841
|
var o = n.return;
|
|
827
842
|
o && o.call(n);
|
|
828
843
|
}
|
|
829
|
-
function
|
|
844
|
+
function Tt(n) {
|
|
830
845
|
var o = Object.getPrototypeOf(n);
|
|
831
846
|
if (typeof n != "function" || n === A || o !== A)
|
|
832
847
|
return o;
|
|
@@ -836,17 +851,17 @@ function Ze() {
|
|
|
836
851
|
var E = c.constructor;
|
|
837
852
|
return typeof E != "function" || E === n ? o : E;
|
|
838
853
|
}
|
|
839
|
-
function
|
|
854
|
+
function Oe() {
|
|
840
855
|
var n;
|
|
841
|
-
!v(G) && typeof a.Reflect < "u" && !(G in a.Reflect) && typeof a.Reflect.defineMetadata == "function" && (n =
|
|
842
|
-
var o, i, c, E = new X(),
|
|
856
|
+
!v(G) && typeof a.Reflect < "u" && !(G in a.Reflect) && typeof a.Reflect.defineMetadata == "function" && (n = Ae(a.Reflect));
|
|
857
|
+
var o, i, c, E = new X(), P = {
|
|
843
858
|
registerProvider: L,
|
|
844
859
|
getProvider: d,
|
|
845
860
|
setProvider: h
|
|
846
861
|
};
|
|
847
|
-
return
|
|
862
|
+
return P;
|
|
848
863
|
function L(p) {
|
|
849
|
-
if (!Object.isExtensible(
|
|
864
|
+
if (!Object.isExtensible(P))
|
|
850
865
|
throw new Error("Cannot add provider to a frozen registry.");
|
|
851
866
|
switch (!0) {
|
|
852
867
|
case n === p:
|
|
@@ -862,63 +877,63 @@ function Ze() {
|
|
|
862
877
|
case i === p:
|
|
863
878
|
break;
|
|
864
879
|
default:
|
|
865
|
-
c === void 0 && (c = new
|
|
880
|
+
c === void 0 && (c = new R()), c.add(p);
|
|
866
881
|
break;
|
|
867
882
|
}
|
|
868
883
|
}
|
|
869
|
-
function
|
|
884
|
+
function w(p, T) {
|
|
870
885
|
if (!v(o)) {
|
|
871
|
-
if (o.isProviderFor(p,
|
|
886
|
+
if (o.isProviderFor(p, T))
|
|
872
887
|
return o;
|
|
873
888
|
if (!v(i)) {
|
|
874
|
-
if (i.isProviderFor(p,
|
|
889
|
+
if (i.isProviderFor(p, T))
|
|
875
890
|
return o;
|
|
876
891
|
if (!v(c))
|
|
877
|
-
for (var
|
|
878
|
-
var
|
|
879
|
-
if (!
|
|
892
|
+
for (var O = $t(c); ; ) {
|
|
893
|
+
var I = Ft(O);
|
|
894
|
+
if (!I)
|
|
880
895
|
return;
|
|
881
|
-
var U = Wt(
|
|
882
|
-
if (U.isProviderFor(p,
|
|
883
|
-
return Qt(
|
|
896
|
+
var U = Wt(I);
|
|
897
|
+
if (U.isProviderFor(p, T))
|
|
898
|
+
return Qt(O), U;
|
|
884
899
|
}
|
|
885
900
|
}
|
|
886
901
|
}
|
|
887
|
-
if (!v(n) && n.isProviderFor(p,
|
|
902
|
+
if (!v(n) && n.isProviderFor(p, T))
|
|
888
903
|
return n;
|
|
889
904
|
}
|
|
890
|
-
function d(p,
|
|
891
|
-
var
|
|
892
|
-
return v(
|
|
905
|
+
function d(p, T) {
|
|
906
|
+
var O = E.get(p), I;
|
|
907
|
+
return v(O) || (I = O.get(T)), v(I) && (I = w(p, T), v(I) || (v(O) && (O = new b(), E.set(p, O)), O.set(T, I))), I;
|
|
893
908
|
}
|
|
894
909
|
function l(p) {
|
|
895
910
|
if (v(p))
|
|
896
911
|
throw new TypeError();
|
|
897
912
|
return o === p || i === p || !v(c) && c.has(p);
|
|
898
913
|
}
|
|
899
|
-
function h(p,
|
|
900
|
-
if (!l(
|
|
914
|
+
function h(p, T, O) {
|
|
915
|
+
if (!l(O))
|
|
901
916
|
throw new Error("Metadata provider not registered.");
|
|
902
|
-
var
|
|
903
|
-
if (
|
|
904
|
-
if (!v(
|
|
917
|
+
var I = d(p, T);
|
|
918
|
+
if (I !== O) {
|
|
919
|
+
if (!v(I))
|
|
905
920
|
return !1;
|
|
906
921
|
var U = E.get(p);
|
|
907
|
-
v(U) && (U = new b(), E.set(p, U)), U.set(
|
|
922
|
+
v(U) && (U = new b(), E.set(p, U)), U.set(T, O);
|
|
908
923
|
}
|
|
909
924
|
return !0;
|
|
910
925
|
}
|
|
911
926
|
}
|
|
912
|
-
function
|
|
927
|
+
function Re() {
|
|
913
928
|
var n;
|
|
914
|
-
return !v(G) && N(a.Reflect) && Object.isExtensible(a.Reflect) && (n = a.Reflect[G]), v(n) && (n =
|
|
929
|
+
return !v(G) && N(a.Reflect) && Object.isExtensible(a.Reflect) && (n = a.Reflect[G]), v(n) && (n = Oe()), !v(G) && N(a.Reflect) && Object.isExtensible(a.Reflect) && Object.defineProperty(a.Reflect, G, {
|
|
915
930
|
enumerable: !1,
|
|
916
931
|
configurable: !1,
|
|
917
932
|
writable: !1,
|
|
918
933
|
value: n
|
|
919
934
|
}), n;
|
|
920
935
|
}
|
|
921
|
-
function
|
|
936
|
+
function Me(n) {
|
|
922
937
|
var o = new X(), i = {
|
|
923
938
|
isProviderFor: function(l, h) {
|
|
924
939
|
var p = o.get(l);
|
|
@@ -926,178 +941,178 @@ function Ze() {
|
|
|
926
941
|
},
|
|
927
942
|
OrdinaryDefineOwnMetadata: L,
|
|
928
943
|
OrdinaryHasOwnMetadata: E,
|
|
929
|
-
OrdinaryGetOwnMetadata:
|
|
930
|
-
OrdinaryOwnMetadataKeys:
|
|
944
|
+
OrdinaryGetOwnMetadata: P,
|
|
945
|
+
OrdinaryOwnMetadataKeys: w,
|
|
931
946
|
OrdinaryDeleteMetadata: d
|
|
932
947
|
};
|
|
933
948
|
return ct.registerProvider(i), i;
|
|
934
949
|
function c(l, h, p) {
|
|
935
|
-
var
|
|
936
|
-
if (v(
|
|
950
|
+
var T = o.get(l), O = !1;
|
|
951
|
+
if (v(T)) {
|
|
937
952
|
if (!p)
|
|
938
953
|
return;
|
|
939
|
-
|
|
954
|
+
T = new b(), o.set(l, T), O = !0;
|
|
940
955
|
}
|
|
941
|
-
var
|
|
942
|
-
if (v(
|
|
956
|
+
var I = T.get(h);
|
|
957
|
+
if (v(I)) {
|
|
943
958
|
if (!p)
|
|
944
959
|
return;
|
|
945
|
-
if (
|
|
946
|
-
throw
|
|
960
|
+
if (I = new b(), T.set(h, I), !n.setProvider(l, h, i))
|
|
961
|
+
throw T.delete(h), O && o.delete(l), new Error("Wrong provider for target.");
|
|
947
962
|
}
|
|
948
|
-
return
|
|
963
|
+
return I;
|
|
949
964
|
}
|
|
950
965
|
function E(l, h, p) {
|
|
951
|
-
var
|
|
966
|
+
var T = c(
|
|
952
967
|
h,
|
|
953
968
|
p,
|
|
954
969
|
/*Create*/
|
|
955
970
|
!1
|
|
956
971
|
);
|
|
957
|
-
return v(
|
|
972
|
+
return v(T) ? !1 : Gt(T.has(l));
|
|
958
973
|
}
|
|
959
|
-
function
|
|
960
|
-
var
|
|
974
|
+
function P(l, h, p) {
|
|
975
|
+
var T = c(
|
|
961
976
|
h,
|
|
962
977
|
p,
|
|
963
978
|
/*Create*/
|
|
964
979
|
!1
|
|
965
980
|
);
|
|
966
|
-
if (!v(
|
|
967
|
-
return
|
|
981
|
+
if (!v(T))
|
|
982
|
+
return T.get(l);
|
|
968
983
|
}
|
|
969
|
-
function L(l, h, p,
|
|
970
|
-
var
|
|
984
|
+
function L(l, h, p, T) {
|
|
985
|
+
var O = c(
|
|
971
986
|
p,
|
|
972
|
-
|
|
987
|
+
T,
|
|
973
988
|
/*Create*/
|
|
974
989
|
!0
|
|
975
990
|
);
|
|
976
|
-
|
|
991
|
+
O.set(l, h);
|
|
977
992
|
}
|
|
978
|
-
function
|
|
979
|
-
var p = [],
|
|
993
|
+
function w(l, h) {
|
|
994
|
+
var p = [], T = c(
|
|
980
995
|
l,
|
|
981
996
|
h,
|
|
982
997
|
/*Create*/
|
|
983
998
|
!1
|
|
984
999
|
);
|
|
985
|
-
if (v(
|
|
1000
|
+
if (v(T))
|
|
986
1001
|
return p;
|
|
987
|
-
for (var
|
|
988
|
-
var Vt = Ft(
|
|
1002
|
+
for (var O = T.keys(), I = $t(O), U = 0; ; ) {
|
|
1003
|
+
var Vt = Ft(I);
|
|
989
1004
|
if (!Vt)
|
|
990
1005
|
return p.length = U, p;
|
|
991
|
-
var
|
|
1006
|
+
var Le = Wt(Vt);
|
|
992
1007
|
try {
|
|
993
|
-
p[U] =
|
|
994
|
-
} catch (
|
|
1008
|
+
p[U] = Le;
|
|
1009
|
+
} catch (xe) {
|
|
995
1010
|
try {
|
|
996
|
-
Qt(
|
|
1011
|
+
Qt(I);
|
|
997
1012
|
} finally {
|
|
998
|
-
throw
|
|
1013
|
+
throw xe;
|
|
999
1014
|
}
|
|
1000
1015
|
}
|
|
1001
1016
|
U++;
|
|
1002
1017
|
}
|
|
1003
1018
|
}
|
|
1004
1019
|
function d(l, h, p) {
|
|
1005
|
-
var
|
|
1020
|
+
var T = c(
|
|
1006
1021
|
h,
|
|
1007
1022
|
p,
|
|
1008
1023
|
/*Create*/
|
|
1009
1024
|
!1
|
|
1010
1025
|
);
|
|
1011
|
-
if (v(
|
|
1026
|
+
if (v(T) || !T.delete(l))
|
|
1012
1027
|
return !1;
|
|
1013
|
-
if (
|
|
1014
|
-
var
|
|
1015
|
-
v(
|
|
1028
|
+
if (T.size === 0) {
|
|
1029
|
+
var O = o.get(h);
|
|
1030
|
+
v(O) || (O.delete(p), O.size === 0 && o.delete(O));
|
|
1016
1031
|
}
|
|
1017
1032
|
return !0;
|
|
1018
1033
|
}
|
|
1019
1034
|
}
|
|
1020
|
-
function
|
|
1021
|
-
var o = n.defineMetadata, i = n.hasOwnMetadata, c = n.getOwnMetadata, E = n.getOwnMetadataKeys,
|
|
1035
|
+
function Ae(n) {
|
|
1036
|
+
var o = n.defineMetadata, i = n.hasOwnMetadata, c = n.getOwnMetadata, E = n.getOwnMetadataKeys, P = n.deleteMetadata, L = new X(), w = {
|
|
1022
1037
|
isProviderFor: function(d, l) {
|
|
1023
1038
|
var h = L.get(d);
|
|
1024
|
-
return !v(h) && h.has(l) ? !0 : E(d, l).length ? (v(h) && (h = new
|
|
1039
|
+
return !v(h) && h.has(l) ? !0 : E(d, l).length ? (v(h) && (h = new R(), L.set(d, h)), h.add(l), !0) : !1;
|
|
1025
1040
|
},
|
|
1026
1041
|
OrdinaryDefineOwnMetadata: o,
|
|
1027
1042
|
OrdinaryHasOwnMetadata: i,
|
|
1028
1043
|
OrdinaryGetOwnMetadata: c,
|
|
1029
1044
|
OrdinaryOwnMetadataKeys: E,
|
|
1030
|
-
OrdinaryDeleteMetadata:
|
|
1045
|
+
OrdinaryDeleteMetadata: P
|
|
1031
1046
|
};
|
|
1032
|
-
return
|
|
1047
|
+
return w;
|
|
1033
1048
|
}
|
|
1034
1049
|
function rt(n, o, i) {
|
|
1035
1050
|
var c = ct.getProvider(n, o);
|
|
1036
1051
|
if (!v(c))
|
|
1037
1052
|
return c;
|
|
1038
1053
|
if (i) {
|
|
1039
|
-
if (ct.setProvider(n, o,
|
|
1040
|
-
return
|
|
1054
|
+
if (ct.setProvider(n, o, It))
|
|
1055
|
+
return It;
|
|
1041
1056
|
throw new Error("Illegal state.");
|
|
1042
1057
|
}
|
|
1043
1058
|
}
|
|
1044
|
-
function
|
|
1059
|
+
function Pe() {
|
|
1045
1060
|
var n = {}, o = [], i = (
|
|
1046
1061
|
/** @class */
|
|
1047
1062
|
(function() {
|
|
1048
|
-
function
|
|
1063
|
+
function w(d, l, h) {
|
|
1049
1064
|
this._index = 0, this._keys = d, this._values = l, this._selector = h;
|
|
1050
1065
|
}
|
|
1051
|
-
return
|
|
1066
|
+
return w.prototype["@@iterator"] = function() {
|
|
1052
1067
|
return this;
|
|
1053
|
-
},
|
|
1068
|
+
}, w.prototype[y] = function() {
|
|
1054
1069
|
return this;
|
|
1055
|
-
},
|
|
1070
|
+
}, w.prototype.next = function() {
|
|
1056
1071
|
var d = this._index;
|
|
1057
1072
|
if (d >= 0 && d < this._keys.length) {
|
|
1058
1073
|
var l = this._selector(this._keys[d], this._values[d]);
|
|
1059
1074
|
return d + 1 >= this._keys.length ? (this._index = -1, this._keys = o, this._values = o) : this._index++, { value: l, done: !1 };
|
|
1060
1075
|
}
|
|
1061
1076
|
return { value: void 0, done: !0 };
|
|
1062
|
-
},
|
|
1077
|
+
}, w.prototype.throw = function(d) {
|
|
1063
1078
|
throw this._index >= 0 && (this._index = -1, this._keys = o, this._values = o), d;
|
|
1064
|
-
},
|
|
1079
|
+
}, w.prototype.return = function(d) {
|
|
1065
1080
|
return this._index >= 0 && (this._index = -1, this._keys = o, this._values = o), { value: d, done: !0 };
|
|
1066
|
-
},
|
|
1081
|
+
}, w;
|
|
1067
1082
|
})()
|
|
1068
1083
|
), c = (
|
|
1069
1084
|
/** @class */
|
|
1070
1085
|
(function() {
|
|
1071
|
-
function
|
|
1086
|
+
function w() {
|
|
1072
1087
|
this._keys = [], this._values = [], this._cacheKey = n, this._cacheIndex = -2;
|
|
1073
1088
|
}
|
|
1074
|
-
return Object.defineProperty(
|
|
1089
|
+
return Object.defineProperty(w.prototype, "size", {
|
|
1075
1090
|
get: function() {
|
|
1076
1091
|
return this._keys.length;
|
|
1077
1092
|
},
|
|
1078
1093
|
enumerable: !0,
|
|
1079
1094
|
configurable: !0
|
|
1080
|
-
}),
|
|
1095
|
+
}), w.prototype.has = function(d) {
|
|
1081
1096
|
return this._find(
|
|
1082
1097
|
d,
|
|
1083
1098
|
/*insert*/
|
|
1084
1099
|
!1
|
|
1085
1100
|
) >= 0;
|
|
1086
|
-
},
|
|
1101
|
+
}, w.prototype.get = function(d) {
|
|
1087
1102
|
var l = this._find(
|
|
1088
1103
|
d,
|
|
1089
1104
|
/*insert*/
|
|
1090
1105
|
!1
|
|
1091
1106
|
);
|
|
1092
1107
|
return l >= 0 ? this._values[l] : void 0;
|
|
1093
|
-
},
|
|
1108
|
+
}, w.prototype.set = function(d, l) {
|
|
1094
1109
|
var h = this._find(
|
|
1095
1110
|
d,
|
|
1096
1111
|
/*insert*/
|
|
1097
1112
|
!0
|
|
1098
1113
|
);
|
|
1099
1114
|
return this._values[h] = l, this;
|
|
1100
|
-
},
|
|
1115
|
+
}, w.prototype.delete = function(d) {
|
|
1101
1116
|
var l = this._find(
|
|
1102
1117
|
d,
|
|
1103
1118
|
/*insert*/
|
|
@@ -1106,46 +1121,46 @@ function Ze() {
|
|
|
1106
1121
|
if (l >= 0) {
|
|
1107
1122
|
for (var h = this._keys.length, p = l + 1; p < h; p++)
|
|
1108
1123
|
this._keys[p - 1] = this._keys[p], this._values[p - 1] = this._values[p];
|
|
1109
|
-
return this._keys.length--, this._values.length--,
|
|
1124
|
+
return this._keys.length--, this._values.length--, wt(d, this._cacheKey) && (this._cacheKey = n, this._cacheIndex = -2), !0;
|
|
1110
1125
|
}
|
|
1111
1126
|
return !1;
|
|
1112
|
-
},
|
|
1127
|
+
}, w.prototype.clear = function() {
|
|
1113
1128
|
this._keys.length = 0, this._values.length = 0, this._cacheKey = n, this._cacheIndex = -2;
|
|
1114
|
-
},
|
|
1129
|
+
}, w.prototype.keys = function() {
|
|
1115
1130
|
return new i(this._keys, this._values, E);
|
|
1116
|
-
},
|
|
1117
|
-
return new i(this._keys, this._values,
|
|
1118
|
-
},
|
|
1131
|
+
}, w.prototype.values = function() {
|
|
1132
|
+
return new i(this._keys, this._values, P);
|
|
1133
|
+
}, w.prototype.entries = function() {
|
|
1119
1134
|
return new i(this._keys, this._values, L);
|
|
1120
|
-
},
|
|
1135
|
+
}, w.prototype["@@iterator"] = function() {
|
|
1121
1136
|
return this.entries();
|
|
1122
|
-
},
|
|
1137
|
+
}, w.prototype[y] = function() {
|
|
1123
1138
|
return this.entries();
|
|
1124
|
-
},
|
|
1125
|
-
if (!
|
|
1139
|
+
}, w.prototype._find = function(d, l) {
|
|
1140
|
+
if (!wt(this._cacheKey, d)) {
|
|
1126
1141
|
this._cacheIndex = -1;
|
|
1127
1142
|
for (var h = 0; h < this._keys.length; h++)
|
|
1128
|
-
if (
|
|
1143
|
+
if (wt(this._keys[h], d)) {
|
|
1129
1144
|
this._cacheIndex = h;
|
|
1130
1145
|
break;
|
|
1131
1146
|
}
|
|
1132
1147
|
}
|
|
1133
1148
|
return this._cacheIndex < 0 && l && (this._cacheIndex = this._keys.length, this._keys.push(d), this._values.push(void 0)), this._cacheIndex;
|
|
1134
|
-
},
|
|
1149
|
+
}, w;
|
|
1135
1150
|
})()
|
|
1136
1151
|
);
|
|
1137
1152
|
return c;
|
|
1138
|
-
function E(
|
|
1139
|
-
return
|
|
1153
|
+
function E(w, d) {
|
|
1154
|
+
return w;
|
|
1140
1155
|
}
|
|
1141
|
-
function
|
|
1156
|
+
function P(w, d) {
|
|
1142
1157
|
return d;
|
|
1143
1158
|
}
|
|
1144
|
-
function L(
|
|
1145
|
-
return [
|
|
1159
|
+
function L(w, d) {
|
|
1160
|
+
return [w, d];
|
|
1146
1161
|
}
|
|
1147
1162
|
}
|
|
1148
|
-
function
|
|
1163
|
+
function Ie() {
|
|
1149
1164
|
var n = (
|
|
1150
1165
|
/** @class */
|
|
1151
1166
|
(function() {
|
|
@@ -1181,7 +1196,7 @@ function Ze() {
|
|
|
1181
1196
|
);
|
|
1182
1197
|
return n;
|
|
1183
1198
|
}
|
|
1184
|
-
function
|
|
1199
|
+
function Ne() {
|
|
1185
1200
|
var n = 16, o = _.create(), i = c();
|
|
1186
1201
|
return (
|
|
1187
1202
|
/** @class */
|
|
@@ -1225,7 +1240,7 @@ function Ze() {
|
|
|
1225
1240
|
function c() {
|
|
1226
1241
|
var d;
|
|
1227
1242
|
do
|
|
1228
|
-
d = "@@WeakMap@@" +
|
|
1243
|
+
d = "@@WeakMap@@" + w();
|
|
1229
1244
|
while (_.has(o, d));
|
|
1230
1245
|
return o[d] = !0, d;
|
|
1231
1246
|
}
|
|
@@ -1237,7 +1252,7 @@ function Ze() {
|
|
|
1237
1252
|
}
|
|
1238
1253
|
return d[i];
|
|
1239
1254
|
}
|
|
1240
|
-
function
|
|
1255
|
+
function P(d, l) {
|
|
1241
1256
|
for (var h = 0; h < l; ++h)
|
|
1242
1257
|
d[h] = Math.random() * 255 | 0;
|
|
1243
1258
|
return d;
|
|
@@ -1245,11 +1260,11 @@ function Ze() {
|
|
|
1245
1260
|
function L(d) {
|
|
1246
1261
|
if (typeof Uint8Array == "function") {
|
|
1247
1262
|
var l = new Uint8Array(d);
|
|
1248
|
-
return typeof crypto < "u" ? crypto.getRandomValues(l) : typeof msCrypto < "u" ? msCrypto.getRandomValues(l) :
|
|
1263
|
+
return typeof crypto < "u" ? crypto.getRandomValues(l) : typeof msCrypto < "u" ? msCrypto.getRandomValues(l) : P(l, d), l;
|
|
1249
1264
|
}
|
|
1250
|
-
return
|
|
1265
|
+
return P(new Array(d), d);
|
|
1251
1266
|
}
|
|
1252
|
-
function
|
|
1267
|
+
function w() {
|
|
1253
1268
|
var d = L(n);
|
|
1254
1269
|
d[6] = d[6] & 79 | 64, d[8] = d[8] & 191 | 128;
|
|
1255
1270
|
for (var l = "", h = 0; h < n; ++h) {
|
|
@@ -1263,10 +1278,10 @@ function Ze() {
|
|
|
1263
1278
|
return n.__ = void 0, delete n.__, n;
|
|
1264
1279
|
}
|
|
1265
1280
|
});
|
|
1266
|
-
})(t || (t = {})),
|
|
1281
|
+
})(t || (t = {})), Jt;
|
|
1267
1282
|
}
|
|
1268
|
-
|
|
1269
|
-
const
|
|
1283
|
+
tr();
|
|
1284
|
+
const re = Symbol("endpoint:metadata");
|
|
1270
1285
|
function gt(t, e, r = {}) {
|
|
1271
1286
|
return function(a, s) {
|
|
1272
1287
|
const u = {
|
|
@@ -1275,7 +1290,7 @@ function gt(t, e, r = {}) {
|
|
|
1275
1290
|
...r
|
|
1276
1291
|
};
|
|
1277
1292
|
Reflect.defineMetadata(
|
|
1278
|
-
|
|
1293
|
+
re,
|
|
1279
1294
|
u,
|
|
1280
1295
|
a,
|
|
1281
1296
|
s
|
|
@@ -1283,11 +1298,11 @@ function gt(t, e, r = {}) {
|
|
|
1283
1298
|
};
|
|
1284
1299
|
}
|
|
1285
1300
|
function q(t = "", e = {}) {
|
|
1286
|
-
return gt(
|
|
1301
|
+
return gt(Ge.POST, t, e);
|
|
1287
1302
|
}
|
|
1288
|
-
var
|
|
1289
|
-
const
|
|
1290
|
-
let
|
|
1303
|
+
var Ot = /* @__PURE__ */ ((t) => (t.EXCHANGE = "Exchange", t.RESULT = "Result", t))(Ot || {});
|
|
1304
|
+
const er = "__decorator_target__", rr = "__decorator_metadata__";
|
|
1305
|
+
let nr = class {
|
|
1291
1306
|
/**
|
|
1292
1307
|
* Creates a new RequestExecutor instance.
|
|
1293
1308
|
* @param target - The target object that the method is called on.
|
|
@@ -1335,63 +1350,63 @@ let er = class {
|
|
|
1335
1350
|
*/
|
|
1336
1351
|
async execute(e) {
|
|
1337
1352
|
const r = this.metadata.fetcher, a = this.metadata.resolveExchangeInit(e);
|
|
1338
|
-
a.attributes?.set(
|
|
1339
|
-
|
|
1353
|
+
a.attributes?.set(er, this.target), a.attributes?.set(
|
|
1354
|
+
rr,
|
|
1340
1355
|
this.metadata
|
|
1341
1356
|
);
|
|
1342
1357
|
const s = this.metadata.resolveResultExtractor(), u = this.metadata.resolveEndpointReturnType(), f = await r.exchange(a.request, {
|
|
1343
1358
|
resultExtractor: s,
|
|
1344
1359
|
attributes: a.attributes
|
|
1345
1360
|
});
|
|
1346
|
-
return u ===
|
|
1361
|
+
return u === Ot.EXCHANGE ? f : await f.extractResult();
|
|
1347
1362
|
}
|
|
1348
1363
|
};
|
|
1349
1364
|
const nt = /* @__PURE__ */ new WeakMap();
|
|
1350
|
-
function
|
|
1365
|
+
function ar(t) {
|
|
1351
1366
|
if (typeof t != "function")
|
|
1352
1367
|
throw new TypeError("Expected a function");
|
|
1353
1368
|
if (nt.has(t))
|
|
1354
1369
|
return nt.get(t);
|
|
1355
1370
|
try {
|
|
1356
|
-
const e = t.toString().trim(), r =
|
|
1357
|
-
if (!
|
|
1371
|
+
const e = t.toString().trim(), r = sr(e);
|
|
1372
|
+
if (!ir(r)) {
|
|
1358
1373
|
const s = [];
|
|
1359
1374
|
return nt.set(t, s), s;
|
|
1360
1375
|
}
|
|
1361
|
-
const a =
|
|
1376
|
+
const a = ur(r);
|
|
1362
1377
|
return nt.set(t, a), a;
|
|
1363
1378
|
} catch {
|
|
1364
1379
|
const e = [];
|
|
1365
1380
|
return nt.set(t, e), e;
|
|
1366
1381
|
}
|
|
1367
1382
|
}
|
|
1368
|
-
function
|
|
1383
|
+
function or(t, e, r, a) {
|
|
1369
1384
|
if (a)
|
|
1370
1385
|
return a;
|
|
1371
1386
|
try {
|
|
1372
1387
|
const s = t[e];
|
|
1373
1388
|
if (s && typeof s == "function") {
|
|
1374
|
-
const u =
|
|
1389
|
+
const u = ar(s);
|
|
1375
1390
|
if (r < u.length)
|
|
1376
1391
|
return u[r];
|
|
1377
1392
|
}
|
|
1378
1393
|
} catch {
|
|
1379
1394
|
}
|
|
1380
1395
|
}
|
|
1381
|
-
function
|
|
1396
|
+
function ir(t) {
|
|
1382
1397
|
return t != null && t.trim() !== "";
|
|
1383
1398
|
}
|
|
1384
|
-
function
|
|
1399
|
+
function sr(t) {
|
|
1385
1400
|
if (t.startsWith("(")) {
|
|
1386
|
-
const a =
|
|
1401
|
+
const a = Zt(t, 0);
|
|
1387
1402
|
return a === -1 ? "" : t.substring(1, a);
|
|
1388
1403
|
}
|
|
1389
1404
|
const e = t.indexOf("(");
|
|
1390
1405
|
if (e === -1) return "";
|
|
1391
|
-
const r =
|
|
1406
|
+
const r = Zt(t, e);
|
|
1392
1407
|
return r === -1 ? "" : t.substring(e + 1, r);
|
|
1393
1408
|
}
|
|
1394
|
-
function
|
|
1409
|
+
function Zt(t, e) {
|
|
1395
1410
|
let r = 1;
|
|
1396
1411
|
for (let a = e + 1; a < t.length; a++) {
|
|
1397
1412
|
const s = t[a];
|
|
@@ -1402,32 +1417,32 @@ function Jt(t, e) {
|
|
|
1402
1417
|
}
|
|
1403
1418
|
return -1;
|
|
1404
1419
|
}
|
|
1405
|
-
function
|
|
1406
|
-
return t.split(",").map(
|
|
1420
|
+
function ur(t) {
|
|
1421
|
+
return t.split(",").map(cr).filter(fr).map(dr);
|
|
1407
1422
|
}
|
|
1408
|
-
function
|
|
1423
|
+
function cr(t) {
|
|
1409
1424
|
return t.trim();
|
|
1410
1425
|
}
|
|
1411
|
-
function
|
|
1426
|
+
function fr(t) {
|
|
1412
1427
|
return t.length > 0;
|
|
1413
1428
|
}
|
|
1414
|
-
function
|
|
1415
|
-
let e =
|
|
1416
|
-
return e =
|
|
1429
|
+
function dr(t) {
|
|
1430
|
+
let e = lr(t);
|
|
1431
|
+
return e = hr(e), e.trim();
|
|
1417
1432
|
}
|
|
1418
|
-
function
|
|
1433
|
+
function lr(t) {
|
|
1419
1434
|
const e = t.indexOf("=");
|
|
1420
1435
|
return e !== -1 ? t.substring(0, e) : t;
|
|
1421
1436
|
}
|
|
1422
|
-
function
|
|
1437
|
+
function hr(t) {
|
|
1423
1438
|
const e = t.indexOf(":");
|
|
1424
1439
|
return e !== -1 ? t.substring(0, e) : t;
|
|
1425
1440
|
}
|
|
1426
1441
|
var J = /* @__PURE__ */ ((t) => (t.PATH = "path", t.QUERY = "query", t.HEADER = "header", t.BODY = "body", t.REQUEST = "request", t.ATTRIBUTE = "attribute", t))(J || {});
|
|
1427
1442
|
const _t = Symbol("parameter:metadata");
|
|
1428
|
-
function
|
|
1443
|
+
function Rt(t, e = "") {
|
|
1429
1444
|
return function(r, a, s) {
|
|
1430
|
-
const u =
|
|
1445
|
+
const u = or(
|
|
1431
1446
|
r,
|
|
1432
1447
|
a,
|
|
1433
1448
|
s,
|
|
@@ -1446,21 +1461,21 @@ function Ot(t, e = "") {
|
|
|
1446
1461
|
};
|
|
1447
1462
|
}
|
|
1448
1463
|
function H() {
|
|
1449
|
-
return
|
|
1464
|
+
return Rt(
|
|
1450
1465
|
"body"
|
|
1451
1466
|
/* BODY */
|
|
1452
1467
|
);
|
|
1453
1468
|
}
|
|
1454
|
-
function
|
|
1455
|
-
return
|
|
1469
|
+
function ne() {
|
|
1470
|
+
return Rt(
|
|
1456
1471
|
"request"
|
|
1457
1472
|
/* REQUEST */
|
|
1458
1473
|
);
|
|
1459
1474
|
}
|
|
1460
|
-
function
|
|
1461
|
-
return
|
|
1475
|
+
function D(t = "") {
|
|
1476
|
+
return Rt("attribute", t);
|
|
1462
1477
|
}
|
|
1463
|
-
let
|
|
1478
|
+
let ae = class {
|
|
1464
1479
|
/**
|
|
1465
1480
|
* Creates a new FunctionMetadata instance.
|
|
1466
1481
|
*
|
|
@@ -1481,7 +1496,7 @@ let re = class {
|
|
|
1481
1496
|
* @returns The fetcher instance
|
|
1482
1497
|
*/
|
|
1483
1498
|
get fetcher() {
|
|
1484
|
-
return
|
|
1499
|
+
return Kt(this.endpoint.fetcher ?? this.api.fetcher);
|
|
1485
1500
|
}
|
|
1486
1501
|
/**
|
|
1487
1502
|
* Resolves the complete path by combining base path and endpoint path
|
|
@@ -1491,7 +1506,7 @@ let re = class {
|
|
|
1491
1506
|
*/
|
|
1492
1507
|
resolvePath(e) {
|
|
1493
1508
|
const r = this.endpoint.basePath || this.api.basePath || "", a = e || this.endpoint.path || "";
|
|
1494
|
-
return
|
|
1509
|
+
return qe(r, a);
|
|
1495
1510
|
}
|
|
1496
1511
|
/**
|
|
1497
1512
|
* Resolves the timeout for the request.
|
|
@@ -1505,14 +1520,14 @@ let re = class {
|
|
|
1505
1520
|
return this.endpoint.timeout || this.api.timeout;
|
|
1506
1521
|
}
|
|
1507
1522
|
resolveResultExtractor() {
|
|
1508
|
-
return this.endpoint.resultExtractor || this.api.resultExtractor ||
|
|
1523
|
+
return this.endpoint.resultExtractor || this.api.resultExtractor || He;
|
|
1509
1524
|
}
|
|
1510
1525
|
resolveAttributes() {
|
|
1511
1526
|
const e = St(this.api.attributes);
|
|
1512
1527
|
return St(this.endpoint.attributes, e);
|
|
1513
1528
|
}
|
|
1514
1529
|
resolveEndpointReturnType() {
|
|
1515
|
-
return this.endpoint.returnType || this.api.returnType ||
|
|
1530
|
+
return this.endpoint.returnType || this.api.returnType || Ot.RESULT;
|
|
1516
1531
|
}
|
|
1517
1532
|
/**
|
|
1518
1533
|
* Resolves the request configuration from the method arguments.
|
|
@@ -1567,35 +1582,35 @@ let re = class {
|
|
|
1567
1582
|
};
|
|
1568
1583
|
let u, f, y, m = {};
|
|
1569
1584
|
const S = this.resolveAttributes();
|
|
1570
|
-
e.forEach((
|
|
1571
|
-
if (
|
|
1572
|
-
f =
|
|
1585
|
+
e.forEach((R, X) => {
|
|
1586
|
+
if (R instanceof AbortSignal) {
|
|
1587
|
+
f = R;
|
|
1573
1588
|
return;
|
|
1574
1589
|
}
|
|
1575
|
-
if (
|
|
1576
|
-
y =
|
|
1590
|
+
if (R instanceof AbortController) {
|
|
1591
|
+
y = R;
|
|
1577
1592
|
return;
|
|
1578
1593
|
}
|
|
1579
1594
|
const G = this.parameters.get(X);
|
|
1580
1595
|
if (G)
|
|
1581
1596
|
switch (G.type) {
|
|
1582
1597
|
case J.PATH:
|
|
1583
|
-
this.processPathParam(G,
|
|
1598
|
+
this.processPathParam(G, R, r);
|
|
1584
1599
|
break;
|
|
1585
1600
|
case J.QUERY:
|
|
1586
|
-
this.processQueryParam(G,
|
|
1601
|
+
this.processQueryParam(G, R, a);
|
|
1587
1602
|
break;
|
|
1588
1603
|
case J.HEADER:
|
|
1589
|
-
this.processHeaderParam(G,
|
|
1604
|
+
this.processHeaderParam(G, R, s);
|
|
1590
1605
|
break;
|
|
1591
1606
|
case J.BODY:
|
|
1592
|
-
u =
|
|
1607
|
+
u = R;
|
|
1593
1608
|
break;
|
|
1594
1609
|
case J.REQUEST:
|
|
1595
|
-
m = this.processRequestParam(
|
|
1610
|
+
m = this.processRequestParam(R);
|
|
1596
1611
|
break;
|
|
1597
1612
|
case J.ATTRIBUTE:
|
|
1598
|
-
this.processAttributeParam(G,
|
|
1613
|
+
this.processAttributeParam(G, R, S);
|
|
1599
1614
|
break;
|
|
1600
1615
|
}
|
|
1601
1616
|
});
|
|
@@ -1610,7 +1625,7 @@ let re = class {
|
|
|
1610
1625
|
timeout: this.resolveTimeout(),
|
|
1611
1626
|
signal: f,
|
|
1612
1627
|
abortController: y
|
|
1613
|
-
}, A =
|
|
1628
|
+
}, A = Ue(
|
|
1614
1629
|
_,
|
|
1615
1630
|
m
|
|
1616
1631
|
), b = m.path;
|
|
@@ -1682,13 +1697,13 @@ let re = class {
|
|
|
1682
1697
|
e.name && r !== void 0 && a.set(e.name, r);
|
|
1683
1698
|
}
|
|
1684
1699
|
};
|
|
1685
|
-
const
|
|
1686
|
-
function
|
|
1700
|
+
const pr = Symbol("api:metadata");
|
|
1701
|
+
function yr(t, e, r) {
|
|
1687
1702
|
const a = t.prototype[e];
|
|
1688
1703
|
if (e === "constructor" || typeof a != "function")
|
|
1689
1704
|
return;
|
|
1690
1705
|
const s = Reflect.getMetadata(
|
|
1691
|
-
|
|
1706
|
+
re,
|
|
1692
1707
|
t.prototype,
|
|
1693
1708
|
e
|
|
1694
1709
|
);
|
|
@@ -1698,20 +1713,20 @@ function hr(t, e, r) {
|
|
|
1698
1713
|
_t,
|
|
1699
1714
|
t.prototype,
|
|
1700
1715
|
e
|
|
1701
|
-
) || /* @__PURE__ */ new Map(), f = new
|
|
1716
|
+
) || /* @__PURE__ */ new Map(), f = new ae(
|
|
1702
1717
|
e,
|
|
1703
1718
|
r,
|
|
1704
1719
|
s,
|
|
1705
1720
|
u
|
|
1706
1721
|
);
|
|
1707
1722
|
t.prototype[e] = async function(...y) {
|
|
1708
|
-
return await
|
|
1723
|
+
return await Er(
|
|
1709
1724
|
this,
|
|
1710
1725
|
f
|
|
1711
1726
|
).execute(y);
|
|
1712
1727
|
};
|
|
1713
1728
|
}
|
|
1714
|
-
function
|
|
1729
|
+
function Er(t, e) {
|
|
1715
1730
|
let r = t.requestExecutors;
|
|
1716
1731
|
r || (r = /* @__PURE__ */ new Map(), t.requestExecutors = r);
|
|
1717
1732
|
let a = r.get(e.name);
|
|
@@ -1721,9 +1736,9 @@ function pr(t, e) {
|
|
|
1721
1736
|
...e.api,
|
|
1722
1737
|
...s
|
|
1723
1738
|
};
|
|
1724
|
-
return a = new
|
|
1739
|
+
return a = new nr(
|
|
1725
1740
|
t,
|
|
1726
|
-
new
|
|
1741
|
+
new ae(
|
|
1727
1742
|
e.name,
|
|
1728
1743
|
u,
|
|
1729
1744
|
e.endpoint,
|
|
@@ -1737,61 +1752,61 @@ function Mt(t = "", e = {}) {
|
|
|
1737
1752
|
basePath: t,
|
|
1738
1753
|
...e
|
|
1739
1754
|
};
|
|
1740
|
-
return Reflect.defineMetadata(
|
|
1741
|
-
|
|
1755
|
+
return Reflect.defineMetadata(pr, a, r), Object.getOwnPropertyNames(r.prototype).forEach((s) => {
|
|
1756
|
+
yr(r, s, a);
|
|
1742
1757
|
}), r;
|
|
1743
1758
|
};
|
|
1744
1759
|
}
|
|
1745
|
-
let
|
|
1760
|
+
let vr = class extends Error {
|
|
1746
1761
|
constructor() {
|
|
1747
1762
|
super("Implementation will be generated automatically."), this.name = "AutoGenerated";
|
|
1748
1763
|
}
|
|
1749
1764
|
};
|
|
1750
|
-
const
|
|
1751
|
-
var
|
|
1752
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
1765
|
+
const j = (...t) => new vr();
|
|
1766
|
+
var wr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, At = (t, e, r, a) => {
|
|
1767
|
+
for (var s = a > 1 ? void 0 : a ? Tr(e, r) : e, u = t.length - 1, f; u >= 0; u--)
|
|
1753
1768
|
(f = t[u]) && (s = (a ? f(e, r, s) : f(s)) || s);
|
|
1754
|
-
return a && s &&
|
|
1769
|
+
return a && s && wr(e, r, s), s;
|
|
1755
1770
|
}, lt = (t, e) => (r, a) => e(r, a, t);
|
|
1756
1771
|
let ht = class {
|
|
1757
1772
|
constructor(t) {
|
|
1758
1773
|
this.apiMetadata = t;
|
|
1759
1774
|
}
|
|
1760
1775
|
send(t, e) {
|
|
1761
|
-
throw
|
|
1776
|
+
throw j(t, e);
|
|
1762
1777
|
}
|
|
1763
1778
|
sendAndWaitStream(t, e) {
|
|
1764
|
-
throw
|
|
1779
|
+
throw j(t, e);
|
|
1765
1780
|
}
|
|
1766
1781
|
};
|
|
1767
1782
|
At([
|
|
1768
1783
|
gt(),
|
|
1769
|
-
lt(0,
|
|
1770
|
-
lt(1,
|
|
1784
|
+
lt(0, ne()),
|
|
1785
|
+
lt(1, D())
|
|
1771
1786
|
], ht.prototype, "send", 1);
|
|
1772
1787
|
At([
|
|
1773
1788
|
gt(void 0, void 0, {
|
|
1774
1789
|
headers: { Accept: ot.TEXT_EVENT_STREAM },
|
|
1775
1790
|
resultExtractor: yt
|
|
1776
1791
|
}),
|
|
1777
|
-
lt(0,
|
|
1778
|
-
lt(1,
|
|
1792
|
+
lt(0, ne()),
|
|
1793
|
+
lt(1, D())
|
|
1779
1794
|
], ht.prototype, "sendAndWaitStream", 1);
|
|
1780
1795
|
ht = At([
|
|
1781
1796
|
Mt()
|
|
1782
1797
|
], ht);
|
|
1783
|
-
var
|
|
1784
|
-
function
|
|
1798
|
+
var oe = /* @__PURE__ */ ((t) => (t.AND = "AND", t.OR = "OR", t.NOR = "NOR", t.ID = "ID", t.IDS = "IDS", t.AGGREGATE_ID = "AGGREGATE_ID", t.AGGREGATE_IDS = "AGGREGATE_IDS", t.TENANT_ID = "TENANT_ID", t.OWNER_ID = "OWNER_ID", t.DELETED = "DELETED", t.ALL = "ALL", t.EQ = "EQ", t.NE = "NE", t.GT = "GT", t.LT = "LT", t.GTE = "GTE", t.LTE = "LTE", t.CONTAINS = "CONTAINS", t.IN = "IN", t.NOT_IN = "NOT_IN", t.BETWEEN = "BETWEEN", t.ALL_IN = "ALL_IN", t.STARTS_WITH = "STARTS_WITH", t.ENDS_WITH = "ENDS_WITH", t.ELEM_MATCH = "ELEM_MATCH", t.NULL = "NULL", t.NOT_NULL = "NOT_NULL", t.TRUE = "TRUE", t.FALSE = "FALSE", t.EXISTS = "EXISTS", t.TODAY = "TODAY", t.BEFORE_TODAY = "BEFORE_TODAY", t.TOMORROW = "TOMORROW", t.THIS_WEEK = "THIS_WEEK", t.NEXT_WEEK = "NEXT_WEEK", t.LAST_WEEK = "LAST_WEEK", t.THIS_MONTH = "THIS_MONTH", t.LAST_MONTH = "LAST_MONTH", t.RECENT_DAYS = "RECENT_DAYS", t.EARLIER_DAYS = "EARLIER_DAYS", t.RAW = "RAW", t))(oe || {});
|
|
1799
|
+
function Pt() {
|
|
1785
1800
|
return {
|
|
1786
|
-
operator:
|
|
1801
|
+
operator: oe.ALL
|
|
1787
1802
|
};
|
|
1788
1803
|
}
|
|
1789
|
-
const
|
|
1804
|
+
const ie = {
|
|
1790
1805
|
index: 1,
|
|
1791
1806
|
size: 10
|
|
1792
1807
|
};
|
|
1793
|
-
function
|
|
1794
|
-
condition: t =
|
|
1808
|
+
function mr({
|
|
1809
|
+
condition: t = Pt(),
|
|
1795
1810
|
projection: e,
|
|
1796
1811
|
sort: r
|
|
1797
1812
|
} = {}) {
|
|
@@ -1801,11 +1816,11 @@ function Tr({
|
|
|
1801
1816
|
sort: r
|
|
1802
1817
|
};
|
|
1803
1818
|
}
|
|
1804
|
-
function
|
|
1805
|
-
condition: t =
|
|
1819
|
+
function Sr({
|
|
1820
|
+
condition: t = Pt(),
|
|
1806
1821
|
projection: e,
|
|
1807
1822
|
sort: r,
|
|
1808
|
-
limit: a =
|
|
1823
|
+
limit: a = ie.size
|
|
1809
1824
|
} = {}) {
|
|
1810
1825
|
return {
|
|
1811
1826
|
condition: t,
|
|
@@ -1814,11 +1829,11 @@ function wr({
|
|
|
1814
1829
|
limit: a
|
|
1815
1830
|
};
|
|
1816
1831
|
}
|
|
1817
|
-
function
|
|
1818
|
-
condition: t =
|
|
1832
|
+
function _r({
|
|
1833
|
+
condition: t = Pt(),
|
|
1819
1834
|
projection: e,
|
|
1820
1835
|
sort: r,
|
|
1821
|
-
pagination: a =
|
|
1836
|
+
pagination: a = ie
|
|
1822
1837
|
} = {}) {
|
|
1823
1838
|
return {
|
|
1824
1839
|
condition: t,
|
|
@@ -1831,10 +1846,10 @@ const Y = class {
|
|
|
1831
1846
|
};
|
|
1832
1847
|
Y.EVENT_STREAM_RESOURCE_NAME = "event", Y.COUNT = `${Y.EVENT_STREAM_RESOURCE_NAME}/count`, Y.LIST = `${Y.EVENT_STREAM_RESOURCE_NAME}/list`, Y.PAGED = `${Y.EVENT_STREAM_RESOURCE_NAME}/paged`;
|
|
1833
1848
|
let Et = Y;
|
|
1834
|
-
var
|
|
1835
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
1849
|
+
var br = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, ut = (t, e, r, a) => {
|
|
1850
|
+
for (var s = a > 1 ? void 0 : a ? gr(e, r) : e, u = t.length - 1, f; u >= 0; u--)
|
|
1836
1851
|
(f = t[u]) && (s = (a ? f(e, r, s) : f(s)) || s);
|
|
1837
|
-
return a && s &&
|
|
1852
|
+
return a && s && br(e, r, s), s;
|
|
1838
1853
|
}, B = (t, e) => (r, a) => e(r, a, t);
|
|
1839
1854
|
let et = class {
|
|
1840
1855
|
/**
|
|
@@ -1844,27 +1859,27 @@ let et = class {
|
|
|
1844
1859
|
this.apiMetadata = t;
|
|
1845
1860
|
}
|
|
1846
1861
|
count(t, e) {
|
|
1847
|
-
throw
|
|
1862
|
+
throw j(t, e);
|
|
1848
1863
|
}
|
|
1849
1864
|
list(t, e) {
|
|
1850
|
-
throw
|
|
1865
|
+
throw j(t, e);
|
|
1851
1866
|
}
|
|
1852
1867
|
listStream(t, e) {
|
|
1853
|
-
throw
|
|
1868
|
+
throw j(t, e);
|
|
1854
1869
|
}
|
|
1855
1870
|
paged(t, e) {
|
|
1856
|
-
throw
|
|
1871
|
+
throw j(t, e);
|
|
1857
1872
|
}
|
|
1858
1873
|
};
|
|
1859
1874
|
ut([
|
|
1860
1875
|
q(Et.COUNT),
|
|
1861
1876
|
B(0, H()),
|
|
1862
|
-
B(1,
|
|
1877
|
+
B(1, D())
|
|
1863
1878
|
], et.prototype, "count", 1);
|
|
1864
1879
|
ut([
|
|
1865
1880
|
q(Et.LIST),
|
|
1866
1881
|
B(0, H()),
|
|
1867
|
-
B(1,
|
|
1882
|
+
B(1, D())
|
|
1868
1883
|
], et.prototype, "list", 1);
|
|
1869
1884
|
ut([
|
|
1870
1885
|
q(Et.LIST, {
|
|
@@ -1872,12 +1887,12 @@ ut([
|
|
|
1872
1887
|
resultExtractor: yt
|
|
1873
1888
|
}),
|
|
1874
1889
|
B(0, H()),
|
|
1875
|
-
B(1,
|
|
1890
|
+
B(1, D())
|
|
1876
1891
|
], et.prototype, "listStream", 1);
|
|
1877
1892
|
ut([
|
|
1878
1893
|
q(Et.PAGED),
|
|
1879
1894
|
B(0, H()),
|
|
1880
|
-
B(1,
|
|
1895
|
+
B(1, D())
|
|
1881
1896
|
], et.prototype, "paged", 1);
|
|
1882
1897
|
et = ut([
|
|
1883
1898
|
Mt()
|
|
@@ -1886,10 +1901,10 @@ const k = class {
|
|
|
1886
1901
|
};
|
|
1887
1902
|
k.SNAPSHOT_RESOURCE_NAME = "snapshot", k.COUNT = `${k.SNAPSHOT_RESOURCE_NAME}/count`, k.LIST = `${k.SNAPSHOT_RESOURCE_NAME}/list`, k.LIST_STATE = `${k.LIST}/state`, k.PAGED = `${k.SNAPSHOT_RESOURCE_NAME}/paged`, k.PAGED_STATE = `${k.PAGED}/state`, k.SINGLE = `${k.SNAPSHOT_RESOURCE_NAME}/single`, k.SINGLE_STATE = `${k.SINGLE}/state`;
|
|
1888
1903
|
let V = k;
|
|
1889
|
-
var
|
|
1890
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
1904
|
+
var Or = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Q = (t, e, r, a) => {
|
|
1905
|
+
for (var s = a > 1 ? void 0 : a ? Rr(e, r) : e, u = t.length - 1, f; u >= 0; u--)
|
|
1891
1906
|
(f = t[u]) && (s = (a ? f(e, r, s) : f(s)) || s);
|
|
1892
|
-
return a && s &&
|
|
1907
|
+
return a && s && Or(e, r, s), s;
|
|
1893
1908
|
}, x = (t, e) => (r, a) => e(r, a, t);
|
|
1894
1909
|
let $ = class {
|
|
1895
1910
|
/**
|
|
@@ -1899,42 +1914,42 @@ let $ = class {
|
|
|
1899
1914
|
this.apiMetadata = t;
|
|
1900
1915
|
}
|
|
1901
1916
|
count(t, e) {
|
|
1902
|
-
throw
|
|
1917
|
+
throw j(t, e);
|
|
1903
1918
|
}
|
|
1904
1919
|
list(t, e) {
|
|
1905
|
-
throw
|
|
1920
|
+
throw j(t, e);
|
|
1906
1921
|
}
|
|
1907
1922
|
listStream(t, e) {
|
|
1908
|
-
throw
|
|
1923
|
+
throw j(t, e);
|
|
1909
1924
|
}
|
|
1910
1925
|
listState(t, e) {
|
|
1911
|
-
throw
|
|
1926
|
+
throw j(t, e);
|
|
1912
1927
|
}
|
|
1913
1928
|
listStateStream(t, e) {
|
|
1914
|
-
throw
|
|
1929
|
+
throw j(t, e);
|
|
1915
1930
|
}
|
|
1916
1931
|
paged(t, e) {
|
|
1917
|
-
throw
|
|
1932
|
+
throw j(t, e);
|
|
1918
1933
|
}
|
|
1919
1934
|
pagedState(t, e) {
|
|
1920
|
-
throw
|
|
1935
|
+
throw j(t, e);
|
|
1921
1936
|
}
|
|
1922
1937
|
single(t, e) {
|
|
1923
|
-
throw
|
|
1938
|
+
throw j(t, e);
|
|
1924
1939
|
}
|
|
1925
1940
|
singleState(t, e) {
|
|
1926
|
-
throw
|
|
1941
|
+
throw j(t, e);
|
|
1927
1942
|
}
|
|
1928
1943
|
};
|
|
1929
1944
|
Q([
|
|
1930
1945
|
q(V.COUNT),
|
|
1931
1946
|
x(0, H()),
|
|
1932
|
-
x(1,
|
|
1947
|
+
x(1, D())
|
|
1933
1948
|
], $.prototype, "count", 1);
|
|
1934
1949
|
Q([
|
|
1935
1950
|
q(V.LIST),
|
|
1936
1951
|
x(0, H()),
|
|
1937
|
-
x(1,
|
|
1952
|
+
x(1, D())
|
|
1938
1953
|
], $.prototype, "list", 1);
|
|
1939
1954
|
Q([
|
|
1940
1955
|
q(V.LIST, {
|
|
@@ -1942,12 +1957,12 @@ Q([
|
|
|
1942
1957
|
resultExtractor: yt
|
|
1943
1958
|
}),
|
|
1944
1959
|
x(0, H()),
|
|
1945
|
-
x(1,
|
|
1960
|
+
x(1, D())
|
|
1946
1961
|
], $.prototype, "listStream", 1);
|
|
1947
1962
|
Q([
|
|
1948
1963
|
q(V.LIST_STATE),
|
|
1949
1964
|
x(0, H()),
|
|
1950
|
-
x(1,
|
|
1965
|
+
x(1, D())
|
|
1951
1966
|
], $.prototype, "listState", 1);
|
|
1952
1967
|
Q([
|
|
1953
1968
|
q(V.LIST_STATE, {
|
|
@@ -1955,34 +1970,34 @@ Q([
|
|
|
1955
1970
|
resultExtractor: yt
|
|
1956
1971
|
}),
|
|
1957
1972
|
x(0, H()),
|
|
1958
|
-
x(1,
|
|
1973
|
+
x(1, D())
|
|
1959
1974
|
], $.prototype, "listStateStream", 1);
|
|
1960
1975
|
Q([
|
|
1961
1976
|
q(V.PAGED),
|
|
1962
1977
|
x(0, H()),
|
|
1963
|
-
x(1,
|
|
1978
|
+
x(1, D())
|
|
1964
1979
|
], $.prototype, "paged", 1);
|
|
1965
1980
|
Q([
|
|
1966
1981
|
q(V.PAGED_STATE),
|
|
1967
1982
|
x(0, H()),
|
|
1968
|
-
x(1,
|
|
1983
|
+
x(1, D())
|
|
1969
1984
|
], $.prototype, "pagedState", 1);
|
|
1970
1985
|
Q([
|
|
1971
1986
|
q(V.SINGLE),
|
|
1972
1987
|
x(0, H()),
|
|
1973
|
-
x(1,
|
|
1988
|
+
x(1, D())
|
|
1974
1989
|
], $.prototype, "single", 1);
|
|
1975
1990
|
Q([
|
|
1976
1991
|
q(V.SINGLE_STATE),
|
|
1977
1992
|
x(0, H()),
|
|
1978
|
-
x(1,
|
|
1993
|
+
x(1, D())
|
|
1979
1994
|
], $.prototype, "singleState", 1);
|
|
1980
1995
|
$ = Q([
|
|
1981
1996
|
Mt()
|
|
1982
1997
|
], $);
|
|
1983
|
-
function
|
|
1998
|
+
function Hr(t) {
|
|
1984
1999
|
const { initialQuery: e } = t, r = it(t), [a, s] = C(e.condition), [u, f] = C(e.pagination), [y, m] = C(e.projection), [S, M] = C(e.sort), _ = Z(t), A = g(async () => {
|
|
1985
|
-
const X =
|
|
2000
|
+
const X = _r({
|
|
1986
2001
|
condition: a,
|
|
1987
2002
|
pagination: u,
|
|
1988
2003
|
projection: y,
|
|
@@ -1992,10 +2007,10 @@ function qr(t) {
|
|
|
1992
2007
|
X,
|
|
1993
2008
|
_.current.attributes
|
|
1994
2009
|
);
|
|
1995
|
-
}, [a, y, u, S, _]), b = g(() => r.execute(A), [r, A]), { autoExecute:
|
|
2010
|
+
}, [a, y, u, S, _]), b = g(() => r.execute(A), [r, A]), { autoExecute: R } = t;
|
|
1996
2011
|
return z(() => {
|
|
1997
|
-
|
|
1998
|
-
}, [
|
|
2012
|
+
R && b();
|
|
2013
|
+
}, [R, b]), F(
|
|
1999
2014
|
() => ({
|
|
2000
2015
|
...r,
|
|
2001
2016
|
execute: b,
|
|
@@ -2014,9 +2029,9 @@ function qr(t) {
|
|
|
2014
2029
|
]
|
|
2015
2030
|
);
|
|
2016
2031
|
}
|
|
2017
|
-
function
|
|
2032
|
+
function Ur(t) {
|
|
2018
2033
|
const { initialQuery: e } = t, r = it(t), [a, s] = C(e.condition), [u, f] = C(e.projection), [y, m] = C(e.sort), S = Z(t), M = g(async () => {
|
|
2019
|
-
const b =
|
|
2034
|
+
const b = mr({
|
|
2020
2035
|
condition: a,
|
|
2021
2036
|
projection: u,
|
|
2022
2037
|
sort: y
|
|
@@ -2039,7 +2054,7 @@ function Hr(t) {
|
|
|
2039
2054
|
[r, _, s, f, m]
|
|
2040
2055
|
);
|
|
2041
2056
|
}
|
|
2042
|
-
function
|
|
2057
|
+
function $r(t) {
|
|
2043
2058
|
const { initialCondition: e } = t, r = it(t), [a, s] = C(e), u = Z(t), f = g(async () => u.current.count(
|
|
2044
2059
|
a,
|
|
2045
2060
|
u.current.attributes
|
|
@@ -2055,8 +2070,8 @@ function Ur(t) {
|
|
|
2055
2070
|
[r, y, s]
|
|
2056
2071
|
);
|
|
2057
2072
|
}
|
|
2058
|
-
function
|
|
2059
|
-
const { initialQuery: e } = t, [r, a] = C(e.condition), [s, u] = C(e.projection), [f, y] = C(e.sort), [m, S] = C(e.limit), M = g(() =>
|
|
2073
|
+
function se(t) {
|
|
2074
|
+
const { initialQuery: e } = t, [r, a] = C(e.condition), [s, u] = C(e.projection), [f, y] = C(e.sort), [m, S] = C(e.limit), M = g(() => Sr({
|
|
2060
2075
|
condition: r,
|
|
2061
2076
|
projection: s,
|
|
2062
2077
|
sort: f,
|
|
@@ -2087,8 +2102,8 @@ function oe(t) {
|
|
|
2087
2102
|
]
|
|
2088
2103
|
);
|
|
2089
2104
|
}
|
|
2090
|
-
function
|
|
2091
|
-
const e = it(t), r =
|
|
2105
|
+
function Wr(t) {
|
|
2106
|
+
const e = it(t), r = se({ initialQuery: t.initialQuery }), a = Z(t), s = g(async () => {
|
|
2092
2107
|
const y = r.buildQuery();
|
|
2093
2108
|
return a.current.list(
|
|
2094
2109
|
y,
|
|
@@ -2116,8 +2131,8 @@ function $r(t) {
|
|
|
2116
2131
|
]
|
|
2117
2132
|
);
|
|
2118
2133
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const e = it(t), r =
|
|
2134
|
+
function Fr(t) {
|
|
2135
|
+
const e = it(t), r = se({ initialQuery: t.initialQuery }), a = Z(t), s = g(async () => {
|
|
2121
2136
|
const y = r.buildQuery();
|
|
2122
2137
|
return a.current.listStream(
|
|
2123
2138
|
y,
|
|
@@ -2146,18 +2161,18 @@ function Wr(t) {
|
|
|
2146
2161
|
);
|
|
2147
2162
|
}
|
|
2148
2163
|
export {
|
|
2149
|
-
|
|
2150
|
-
|
|
2164
|
+
$e as PromiseStatus,
|
|
2165
|
+
$r as useCountQuery,
|
|
2151
2166
|
it as useExecutePromise,
|
|
2152
|
-
|
|
2153
|
-
|
|
2167
|
+
Ir as useFetcher,
|
|
2168
|
+
Pr as useKeyStorage,
|
|
2154
2169
|
Z as useLatest,
|
|
2155
|
-
|
|
2156
|
-
|
|
2170
|
+
Wr as useListQuery,
|
|
2171
|
+
Fr as useListStreamQuery,
|
|
2157
2172
|
bt as useMounted,
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2173
|
+
Hr as usePagedQuery,
|
|
2174
|
+
te as usePromiseState,
|
|
2175
|
+
ee as useRequestId,
|
|
2176
|
+
Ur as useSingleQuery
|
|
2162
2177
|
};
|
|
2163
2178
|
//# sourceMappingURL=index.es.js.map
|