assemblerjs 1.1.17 → 1.1.19

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.
Files changed (58) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index13.js +97 -82
  3. package/dist/index13.mjs +97 -82
  4. package/dist/index18.js +1 -1
  5. package/dist/index18.mjs +1 -1
  6. package/dist/index19.js +1 -1
  7. package/dist/index19.mjs +1 -1
  8. package/dist/index20.js +1 -1
  9. package/dist/index20.mjs +1 -1
  10. package/dist/index21.js +1 -1
  11. package/dist/index21.mjs +1 -1
  12. package/dist/index22.js +1 -1
  13. package/dist/index22.mjs +1 -1
  14. package/dist/index23.js +1 -1
  15. package/dist/index23.mjs +1 -1
  16. package/dist/index24.js +1 -1
  17. package/dist/index24.mjs +1 -1
  18. package/dist/index27.js +1 -1
  19. package/dist/index27.mjs +1 -1
  20. package/dist/index31.js +100 -35
  21. package/dist/index31.mjs +100 -34
  22. package/dist/index32.js +24 -101
  23. package/dist/index32.mjs +24 -101
  24. package/dist/index33.js +152 -22
  25. package/dist/index33.mjs +151 -22
  26. package/dist/index34.js +44 -16
  27. package/dist/index34.mjs +44 -16
  28. package/dist/index35.js +66 -145
  29. package/dist/index35.mjs +67 -145
  30. package/dist/index36.js +50 -45
  31. package/dist/index36.mjs +50 -45
  32. package/dist/index37.js +28 -76
  33. package/dist/index37.mjs +28 -76
  34. package/dist/index38.js +161 -50
  35. package/dist/index38.mjs +161 -50
  36. package/dist/index39.js +60 -28
  37. package/dist/index39.mjs +60 -28
  38. package/dist/index4.js +7 -7
  39. package/dist/index4.mjs +7 -7
  40. package/dist/index40.js +32 -158
  41. package/dist/index40.mjs +31 -158
  42. package/dist/index41.js +16 -57
  43. package/dist/index41.mjs +16 -57
  44. package/dist/index44.js +28 -941
  45. package/dist/index44.mjs +27 -941
  46. package/dist/index45.js +194 -2
  47. package/dist/index45.mjs +194 -2
  48. package/dist/index46.js +942 -2
  49. package/dist/index46.mjs +942 -2
  50. package/dist/index47.js +2 -29
  51. package/dist/index47.mjs +2 -28
  52. package/dist/index48.js +2 -194
  53. package/dist/index48.mjs +2 -194
  54. package/dist/index49.js +1 -1
  55. package/dist/index49.mjs +1 -1
  56. package/dist/index50.js +2 -2
  57. package/dist/index50.mjs +2 -2
  58. package/package.json +1 -1
package/dist/index44.mjs CHANGED
@@ -1,943 +1,29 @@
1
- import { commonjsGlobal } from './index45.mjs';
2
- import { __exports as _Reflect } from './index46.mjs';
3
-
4
- /*! *****************************************************************************
5
- Copyright (C) Microsoft. All rights reserved.
6
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
7
- this file except in compliance with the License. You may obtain a copy of the
8
- License at http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
11
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
12
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
13
- MERCHANTABLITY OR NON-INFRINGEMENT.
14
-
15
- See the Apache Version 2.0 License for specific language governing permissions
16
- and limitations under the License.
17
- ***************************************************************************** */
18
-
19
- var hasRequired_Reflect;
20
-
21
- function require_Reflect () {
22
- if (hasRequired_Reflect) return _Reflect;
23
- hasRequired_Reflect = 1;
24
- var e;
25
- (function(e) {
26
- (function(t) {
27
- var r = typeof globalThis === "object" ? globalThis : typeof commonjsGlobal === "object" ? commonjsGlobal : typeof self === "object" ? self : typeof this === "object" ? this : f();
28
- var n = i(e);
29
- if (typeof r.Reflect !== "undefined") {
30
- n = i(r.Reflect, n);
31
- }
32
- t(n, r);
33
- if (typeof r.Reflect === "undefined") {
34
- r.Reflect = e;
35
- }
36
- function i(e, t) {
37
- return function(r, n) {
38
- Object.defineProperty(e, r, {
39
- configurable: true,
40
- writable: true,
41
- value: n
42
- });
43
- if (t) t(r, n);
44
- };
45
- }
46
- function a() {
47
- try {
48
- return Function("return this;")();
49
- } catch (e) {}
50
- }
51
- function u() {
52
- try {
53
- return (0, eval)("(function() { return this; })()");
54
- } catch (e) {}
55
- }
56
- function f() {
57
- return a() || u();
58
- }
59
- })(function(e, t) {
60
- var r = Object.prototype.hasOwnProperty;
61
- var n = typeof Symbol === "function";
62
- var i = n && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
63
- var a = n && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
64
- var u = typeof Object.create === "function";
65
- var f = ({
66
- __proto__: []
67
- }) instanceof Array;
68
- var o = !u && !f;
69
- var s = {
70
- create: u ? function() {
71
- return el(Object.create(null));
72
- } : f ? function() {
73
- return el({
74
- __proto__: null
75
- });
76
- } : function() {
77
- return el({});
78
- },
79
- has: o ? function(e, t) {
80
- return r.call(e, t);
81
- } : function(e, t) {
82
- return t in e;
83
- },
84
- get: o ? function(e, t) {
85
- return r.call(e, t) ? e[t] : undefined;
86
- } : function(e, t) {
87
- return e[t];
88
- }
89
- };
90
- var c = Object.getPrototypeOf(Function);
91
- var l = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : eo();
92
- var d = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : es();
93
- var h = typeof WeakMap === "function" ? WeakMap : ec();
94
- var y = n ? Symbol.for("@reflect-metadata:registry") : undefined;
95
- var v = ei();
96
- var p = ea(v);
97
- function w(e, t, r, n) {
98
- if (!D(r)) {
99
- if (!B(e)) throw new TypeError();
100
- if (!G(t)) throw new TypeError();
101
- if (!G(n) && !D(n) && !C(n)) throw new TypeError();
102
- if (C(n)) n = undefined;
103
- r = q(r);
104
- return j(e, t, r, n);
105
- } else {
106
- if (!B(e)) throw new TypeError();
107
- if (!N(t)) throw new TypeError();
108
- return P(e, t);
109
- }
110
- }
111
- e("decorate", w);
112
- function _(e, t) {
113
- function r(r, n) {
114
- if (!G(r)) throw new TypeError();
115
- if (!D(n) && !Q(n)) throw new TypeError();
116
- A(e, t, r, n);
117
- }
118
- return r;
119
- }
120
- e("metadata", _);
121
- function g(e, t, r, n) {
122
- if (!G(r)) throw new TypeError();
123
- if (!D(n)) n = q(n);
124
- return A(e, t, r, n);
125
- }
126
- e("defineMetadata", g);
127
- function b(e, t, r) {
128
- if (!G(t)) throw new TypeError();
129
- if (!D(r)) r = q(r);
130
- return x(e, t, r);
131
- }
132
- e("hasMetadata", b);
133
- function O(e, t, r) {
134
- if (!G(t)) throw new TypeError();
135
- if (!D(r)) r = q(r);
136
- return R(e, t, r);
137
- }
138
- e("hasOwnMetadata", O);
139
- function k(e, t, r) {
140
- if (!G(t)) throw new TypeError();
141
- if (!D(r)) r = q(r);
142
- return S(e, t, r);
143
- }
144
- e("getMetadata", k);
145
- function M(e, t, r) {
146
- if (!G(t)) throw new TypeError();
147
- if (!D(r)) r = q(r);
148
- return K(e, t, r);
149
- }
150
- e("getOwnMetadata", M);
151
- function m(e, t) {
152
- if (!G(e)) throw new TypeError();
153
- if (!D(t)) t = q(t);
154
- return I(e, t);
155
- }
156
- e("getMetadataKeys", m);
157
- function E(e, t) {
158
- if (!G(e)) throw new TypeError();
159
- if (!D(t)) t = q(t);
160
- return F(e, t);
161
- }
162
- e("getOwnMetadataKeys", E);
163
- function T(e, t, r) {
164
- if (!G(t)) throw new TypeError();
165
- if (!D(r)) r = q(r);
166
- if (!G(t)) throw new TypeError();
167
- if (!D(r)) r = q(r);
168
- var n = ef(t, r, false);
169
- if (D(n)) return false;
170
- return n.OrdinaryDeleteMetadata(e, t, r);
171
- }
172
- e("deleteMetadata", T);
173
- function P(e, t) {
174
- for(var r = e.length - 1; r >= 0; --r){
175
- var n = e[r];
176
- var i = n(t);
177
- if (!D(i) && !C(i)) {
178
- if (!N(i)) throw new TypeError();
179
- t = i;
180
- }
181
- }
182
- return t;
183
- }
184
- function j(e, t, r, n) {
185
- for(var i = e.length - 1; i >= 0; --i){
186
- var a = e[i];
187
- var u = a(t, r, n);
188
- if (!D(u) && !C(u)) {
189
- if (!G(u)) throw new TypeError();
190
- n = u;
191
- }
192
- }
193
- return n;
194
- }
195
- function x(e, t, r) {
196
- var n = R(e, t, r);
197
- if (n) return true;
198
- var i = er(t);
199
- if (!C(i)) return x(e, i, r);
200
- return false;
201
- }
202
- function R(e, t, r) {
203
- var n = ef(t, r, false);
204
- if (D(n)) return false;
205
- return V(n.OrdinaryHasOwnMetadata(e, t, r));
206
- }
207
- function S(e, t, r) {
208
- var n = R(e, t, r);
209
- if (n) return K(e, t, r);
210
- var i = er(t);
211
- if (!C(i)) return S(e, i, r);
212
- return undefined;
213
- }
214
- function K(e, t, r) {
215
- var n = ef(t, r, false);
216
- if (D(n)) return;
217
- return n.OrdinaryGetOwnMetadata(e, t, r);
218
- }
219
- function A(e, t, r, n) {
220
- var i = ef(r, n, true);
221
- i.OrdinaryDefineOwnMetadata(e, t, r, n);
222
- }
223
- function I(e, t) {
224
- var r = F(e, t);
225
- var n = er(e);
226
- if (n === null) return r;
227
- var i = I(n, t);
228
- if (i.length <= 0) return r;
229
- if (r.length <= 0) return i;
230
- var a = new d();
231
- var u = [];
232
- for(var f = 0, o = r; f < o.length; f++){
233
- var s = o[f];
234
- var c = a.has(s);
235
- if (!c) {
236
- a.add(s);
237
- u.push(s);
238
- }
239
- }
240
- for(var l = 0, h = i; l < h.length; l++){
241
- var s = h[l];
242
- var c = a.has(s);
243
- if (!c) {
244
- a.add(s);
245
- u.push(s);
246
- }
247
- }
248
- return u;
249
- }
250
- function F(e, t) {
251
- var r = ef(e, t, false);
252
- if (!r) {
253
- return [];
254
- }
255
- return r.OrdinaryOwnMetadataKeys(e, t);
256
- }
257
- function z(e) {
258
- if (e === null) return 1;
259
- switch(typeof e){
260
- case "undefined":
261
- return 0;
262
- case "boolean":
263
- return 2;
264
- case "string":
265
- return 3;
266
- case "symbol":
267
- return 4;
268
- case "number":
269
- return 5;
270
- case "object":
271
- return e === null ? 1 : 6;
272
- default:
273
- return 6;
274
- }
275
- }
276
- function D(e) {
277
- return e === undefined;
278
- }
279
- function C(e) {
280
- return e === null;
281
- }
282
- function W(e) {
283
- return typeof e === "symbol";
284
- }
285
- function G(e) {
286
- return typeof e === "object" ? e !== null : typeof e === "function";
287
- }
288
- function H(e, t) {
289
- switch(z(e)){
290
- case 0:
291
- return e;
292
- case 1:
293
- return e;
294
- case 2:
295
- return e;
296
- case 3:
297
- return e;
298
- case 4:
299
- return e;
300
- case 5:
301
- return e;
302
- }
303
- var r = "string" ;
304
- var n = Y(e, i);
305
- if (n !== undefined) {
306
- var a = n.call(e, r);
307
- if (G(a)) throw new TypeError();
308
- return a;
309
- }
310
- return U(e);
311
- }
312
- function U(e, t) {
313
- var i, n, a; {
314
- var r = e.toString;
315
- if (J(r)) {
316
- var n = r.call(e);
317
- if (!G(n)) return n;
318
- }
319
- var i = e.valueOf;
320
- if (J(i)) {
321
- var n = i.call(e);
322
- if (!G(n)) return n;
323
- }
324
- }
325
- throw new TypeError();
326
- }
327
- function V(e) {
328
- return !!e;
329
- }
330
- function L(e) {
331
- return "" + e;
332
- }
333
- function q(e) {
334
- var t = H(e);
335
- if (W(t)) return t;
336
- return L(t);
337
- }
338
- function B(e) {
339
- return Array.isArray ? Array.isArray(e) : e instanceof Object ? e instanceof Array : Object.prototype.toString.call(e) === "[object Array]";
340
- }
341
- function J(e) {
342
- return typeof e === "function";
343
- }
344
- function N(e) {
345
- return typeof e === "function";
346
- }
347
- function Q(e) {
348
- switch(z(e)){
349
- case 3:
350
- return true;
351
- case 4:
352
- return true;
353
- default:
354
- return false;
355
- }
356
- }
357
- function X(e, t) {
358
- return e === t || e !== e && t !== t;
359
- }
360
- function Y(e, t) {
361
- var r = e[t];
362
- if (r === undefined || r === null) return undefined;
363
- if (!J(r)) throw new TypeError();
364
- return r;
365
- }
366
- function Z(e) {
367
- var t = Y(e, a);
368
- if (!J(t)) throw new TypeError();
369
- var r = t.call(e);
370
- if (!G(r)) throw new TypeError();
371
- return r;
372
- }
373
- function $(e) {
374
- return e.value;
375
- }
376
- function ee(e) {
377
- var t = e.next();
378
- return t.done ? false : t;
379
- }
380
- function et(e) {
381
- var t = e["return"];
382
- if (t) t.call(e);
383
- }
384
- function er(e) {
385
- var t = Object.getPrototypeOf(e);
386
- if (typeof e !== "function" || e === c) return t;
387
- if (t !== c) return t;
388
- var r = e.prototype;
389
- var n = r && Object.getPrototypeOf(r);
390
- if (n == null || n === Object.prototype) return t;
391
- var i = n.constructor;
392
- if (typeof i !== "function") return t;
393
- if (i === e) return t;
394
- return i;
395
- }
396
- function en() {
397
- var e;
398
- if (!D(y) && typeof t.Reflect !== "undefined" && !(y in t.Reflect) && typeof t.Reflect.defineMetadata === "function") {
399
- e = eu(t.Reflect);
400
- }
401
- var r;
402
- var n;
403
- var i;
404
- var a = new h();
405
- var u = {
406
- registerProvider: f,
407
- getProvider: s,
408
- setProvider: v
409
- };
410
- return u;
411
- function f(t) {
412
- if (!Object.isExtensible(u)) {
413
- throw new Error("Cannot add provider to a frozen registry.");
414
- }
415
- switch(true){
416
- case e === t:
417
- break;
418
- case D(r):
419
- r = t;
420
- break;
421
- case r === t:
422
- break;
423
- case D(n):
424
- n = t;
425
- break;
426
- case n === t:
427
- break;
428
- default:
429
- if (i === undefined) i = new d();
430
- i.add(t);
431
- break;
432
- }
433
- }
434
- function o(t, a) {
435
- if (!D(r)) {
436
- if (r.isProviderFor(t, a)) return r;
437
- if (!D(n)) {
438
- if (n.isProviderFor(t, a)) return r;
439
- if (!D(i)) {
440
- var u = Z(i);
441
- while(true){
442
- var f = ee(u);
443
- if (!f) {
444
- return undefined;
445
- }
446
- var o = $(f);
447
- if (o.isProviderFor(t, a)) {
448
- et(u);
449
- return o;
450
- }
451
- }
452
- }
453
- }
454
- }
455
- if (!D(e) && e.isProviderFor(t, a)) {
456
- return e;
457
- }
458
- return undefined;
459
- }
460
- function s(e, t) {
461
- var r = a.get(e);
462
- var n;
463
- if (!D(r)) {
464
- n = r.get(t);
465
- }
466
- if (!D(n)) {
467
- return n;
468
- }
469
- n = o(e, t);
470
- if (!D(n)) {
471
- if (D(r)) {
472
- r = new l();
473
- a.set(e, r);
474
- }
475
- r.set(t, n);
476
- }
477
- return n;
478
- }
479
- function c(e) {
480
- if (D(e)) throw new TypeError();
481
- return r === e || n === e || !D(i) && i.has(e);
482
- }
483
- function v(e, t, r) {
484
- if (!c(r)) {
485
- throw new Error("Metadata provider not registered.");
486
- }
487
- var n = s(e, t);
488
- if (n !== r) {
489
- if (!D(n)) {
490
- return false;
491
- }
492
- var i = a.get(e);
493
- if (D(i)) {
494
- i = new l();
495
- a.set(e, i);
496
- }
497
- i.set(t, r);
498
- }
499
- return true;
500
- }
501
- }
502
- function ei() {
503
- var e;
504
- if (!D(y) && G(t.Reflect) && Object.isExtensible(t.Reflect)) {
505
- e = t.Reflect[y];
506
- }
507
- if (D(e)) {
508
- e = en();
509
- }
510
- if (!D(y) && G(t.Reflect) && Object.isExtensible(t.Reflect)) {
511
- Object.defineProperty(t.Reflect, y, {
512
- enumerable: false,
513
- configurable: false,
514
- writable: false,
515
- value: e
516
- });
517
- }
518
- return e;
519
- }
520
- function ea(e) {
521
- var t = new h();
522
- var r = {
523
- isProviderFor: function(e, r) {
524
- var n = t.get(e);
525
- if (D(n)) return false;
526
- return n.has(r);
527
- },
528
- OrdinaryDefineOwnMetadata: u,
529
- OrdinaryHasOwnMetadata: i,
530
- OrdinaryGetOwnMetadata: a,
531
- OrdinaryOwnMetadataKeys: f,
532
- OrdinaryDeleteMetadata: o
533
- };
534
- v.registerProvider(r);
535
- return r;
536
- function n(n, i, a) {
537
- var u = t.get(n);
538
- var f = false;
539
- if (D(u)) {
540
- if (!a) return undefined;
541
- u = new l();
542
- t.set(n, u);
543
- f = true;
544
- }
545
- var o = u.get(i);
546
- if (D(o)) {
547
- if (!a) return undefined;
548
- o = new l();
549
- u.set(i, o);
550
- if (!e.setProvider(n, i, r)) {
551
- u.delete(i);
552
- if (f) {
553
- t.delete(n);
554
- }
555
- throw new Error("Wrong provider for target.");
556
- }
557
- }
558
- return o;
559
- }
560
- function i(e, t, r) {
561
- var i = n(t, r, false);
562
- if (D(i)) return false;
563
- return V(i.has(e));
564
- }
565
- function a(e, t, r) {
566
- var i = n(t, r, false);
567
- if (D(i)) return undefined;
568
- return i.get(e);
569
- }
570
- function u(e, t, r, i) {
571
- var a = n(r, i, true);
572
- a.set(e, t);
573
- }
574
- function f(e, t) {
575
- var r = [];
576
- var i = n(e, t, false);
577
- if (D(i)) return r;
578
- var a = i.keys();
579
- var u = Z(a);
580
- var f = 0;
581
- while(true){
582
- var o = ee(u);
583
- if (!o) {
584
- r.length = f;
585
- return r;
586
- }
587
- var s = $(o);
588
- try {
589
- r[f] = s;
590
- } catch (e) {
591
- try {
592
- et(u);
593
- } finally{
594
- throw e;
595
- }
596
- }
597
- f++;
598
- }
599
- }
600
- function o(e, r, i) {
601
- var a = n(r, i, false);
602
- if (D(a)) return false;
603
- if (!a.delete(e)) return false;
604
- if (a.size === 0) {
605
- var u = t.get(r);
606
- if (!D(u)) {
607
- u.delete(i);
608
- if (u.size === 0) {
609
- t.delete(u);
610
- }
611
- }
612
- }
613
- return true;
614
- }
615
- }
616
- function eu(e) {
617
- var t = e.defineMetadata, r = e.hasOwnMetadata, n = e.getOwnMetadata, i = e.getOwnMetadataKeys, a = e.deleteMetadata;
618
- var u = new h();
619
- var f = {
620
- isProviderFor: function(e, t) {
621
- var r = u.get(e);
622
- if (!D(r) && r.has(t)) {
623
- return true;
624
- }
625
- if (i(e, t).length) {
626
- if (D(r)) {
627
- r = new d();
628
- u.set(e, r);
629
- }
630
- r.add(t);
631
- return true;
632
- }
633
- return false;
634
- },
635
- OrdinaryDefineOwnMetadata: t,
636
- OrdinaryHasOwnMetadata: r,
637
- OrdinaryGetOwnMetadata: n,
638
- OrdinaryOwnMetadataKeys: i,
639
- OrdinaryDeleteMetadata: a
640
- };
641
- return f;
642
- }
643
- function ef(e, t, r) {
644
- var n = v.getProvider(e, t);
645
- if (!D(n)) {
646
- return n;
647
- }
648
- if (r) {
649
- if (v.setProvider(e, t, p)) {
650
- return p;
651
- }
652
- throw new Error("Illegal state.");
653
- }
654
- return undefined;
655
- }
656
- function eo() {
657
- var e = {};
658
- var t = [];
659
- var r = function() {
660
- function e(e, t, r) {
661
- this._index = 0;
662
- this._keys = e;
663
- this._values = t;
664
- this._selector = r;
665
- }
666
- e.prototype["@@iterator"] = function() {
667
- return this;
668
- };
669
- e.prototype[a] = function() {
670
- return this;
671
- };
672
- e.prototype.next = function() {
673
- var e = this._index;
674
- if (e >= 0 && e < this._keys.length) {
675
- var r = this._selector(this._keys[e], this._values[e]);
676
- if (e + 1 >= this._keys.length) {
677
- this._index = -1;
678
- this._keys = t;
679
- this._values = t;
680
- } else {
681
- this._index++;
682
- }
683
- return {
684
- value: r,
685
- done: false
686
- };
687
- }
688
- return {
689
- value: undefined,
690
- done: true
691
- };
692
- };
693
- e.prototype.throw = function(e) {
694
- if (this._index >= 0) {
695
- this._index = -1;
696
- this._keys = t;
697
- this._values = t;
698
- }
699
- throw e;
700
- };
701
- e.prototype.return = function(e) {
702
- if (this._index >= 0) {
703
- this._index = -1;
704
- this._keys = t;
705
- this._values = t;
706
- }
707
- return {
708
- value: e,
709
- done: true
710
- };
711
- };
712
- return e;
713
- }();
714
- var n = function() {
715
- function t() {
716
- this._keys = [];
717
- this._values = [];
718
- this._cacheKey = e;
719
- this._cacheIndex = -2;
720
- }
721
- Object.defineProperty(t.prototype, "size", {
722
- get: function() {
723
- return this._keys.length;
724
- },
725
- enumerable: true,
726
- configurable: true
727
- });
728
- t.prototype.has = function(e) {
729
- return this._find(e, false) >= 0;
730
- };
731
- t.prototype.get = function(e) {
732
- var t = this._find(e, false);
733
- return t >= 0 ? this._values[t] : undefined;
734
- };
735
- t.prototype.set = function(e, t) {
736
- var r = this._find(e, true);
737
- this._values[r] = t;
738
- return this;
739
- };
740
- t.prototype.delete = function(t) {
741
- var r = this._find(t, false);
742
- if (r >= 0) {
743
- var n = this._keys.length;
744
- for(var i = r + 1; i < n; i++){
745
- this._keys[i - 1] = this._keys[i];
746
- this._values[i - 1] = this._values[i];
747
- }
748
- this._keys.length--;
749
- this._values.length--;
750
- if (X(t, this._cacheKey)) {
751
- this._cacheKey = e;
752
- this._cacheIndex = -2;
753
- }
754
- return true;
755
- }
756
- return false;
757
- };
758
- t.prototype.clear = function() {
759
- this._keys.length = 0;
760
- this._values.length = 0;
761
- this._cacheKey = e;
762
- this._cacheIndex = -2;
763
- };
764
- t.prototype.keys = function() {
765
- return new r(this._keys, this._values, i);
766
- };
767
- t.prototype.values = function() {
768
- return new r(this._keys, this._values, u);
769
- };
770
- t.prototype.entries = function() {
771
- return new r(this._keys, this._values, f);
772
- };
773
- t.prototype["@@iterator"] = function() {
774
- return this.entries();
775
- };
776
- t.prototype[a] = function() {
777
- return this.entries();
778
- };
779
- t.prototype._find = function(e, t) {
780
- if (!X(this._cacheKey, e)) {
781
- this._cacheIndex = -1;
782
- for(var r = 0; r < this._keys.length; r++){
783
- if (X(this._keys[r], e)) {
784
- this._cacheIndex = r;
785
- break;
786
- }
787
- }
788
- }
789
- if (this._cacheIndex < 0 && t) {
790
- this._cacheIndex = this._keys.length;
791
- this._keys.push(e);
792
- this._values.push(undefined);
793
- }
794
- return this._cacheIndex;
795
- };
796
- return t;
797
- }();
798
- return n;
799
- function i(e, t) {
800
- return e;
801
- }
802
- function u(e, t) {
803
- return t;
804
- }
805
- function f(e, t) {
806
- return [
807
- e,
808
- t
809
- ];
810
- }
811
- }
812
- function es() {
813
- var e = function() {
814
- function e() {
815
- this._map = new l();
816
- }
817
- Object.defineProperty(e.prototype, "size", {
818
- get: function() {
819
- return this._map.size;
820
- },
821
- enumerable: true,
822
- configurable: true
823
- });
824
- e.prototype.has = function(e) {
825
- return this._map.has(e);
826
- };
827
- e.prototype.add = function(e) {
828
- return this._map.set(e, e), this;
829
- };
830
- e.prototype.delete = function(e) {
831
- return this._map.delete(e);
832
- };
833
- e.prototype.clear = function() {
834
- this._map.clear();
835
- };
836
- e.prototype.keys = function() {
837
- return this._map.keys();
838
- };
839
- e.prototype.values = function() {
840
- return this._map.keys();
841
- };
842
- e.prototype.entries = function() {
843
- return this._map.entries();
844
- };
845
- e.prototype["@@iterator"] = function() {
846
- return this.keys();
847
- };
848
- e.prototype[a] = function() {
849
- return this.keys();
850
- };
851
- return e;
852
- }();
853
- return e;
854
- }
855
- function ec() {
856
- var e = 16;
857
- var t = s.create();
858
- var n = i();
859
- return function() {
860
- function e() {
861
- this._key = i();
862
- }
863
- e.prototype.has = function(e) {
864
- var t = a(e, false);
865
- return t !== undefined ? s.has(t, this._key) : false;
866
- };
867
- e.prototype.get = function(e) {
868
- var t = a(e, false);
869
- return t !== undefined ? s.get(t, this._key) : undefined;
870
- };
871
- e.prototype.set = function(e, t) {
872
- var r = a(e, true);
873
- r[this._key] = t;
874
- return this;
875
- };
876
- e.prototype.delete = function(e) {
877
- var t = a(e, false);
878
- return t !== undefined ? delete t[this._key] : false;
879
- };
880
- e.prototype.clear = function() {
881
- this._key = i();
882
- };
883
- return e;
884
- }();
885
- function i() {
886
- var e;
887
- do e = "@@WeakMap@@" + o();
888
- while (s.has(t, e))
889
- t[e] = true;
890
- return e;
891
- }
892
- function a(e, t) {
893
- if (!r.call(e, n)) {
894
- if (!t) return undefined;
895
- Object.defineProperty(e, n, {
896
- value: s.create()
897
- });
898
- }
899
- return e[n];
900
- }
901
- function u(e, t) {
902
- for(var r = 0; r < t; ++r)e[r] = Math.random() * 0xff | 0;
903
- return e;
904
- }
905
- function f(e) {
906
- if (typeof Uint8Array === "function") {
907
- var t = new Uint8Array(e);
908
- if (typeof crypto !== "undefined") {
909
- crypto.getRandomValues(t);
910
- } else if (typeof msCrypto !== "undefined") {
911
- msCrypto.getRandomValues(t);
912
- } else {
913
- u(t, e);
914
- }
915
- return t;
916
- }
917
- return u(new Array(e), e);
918
- }
919
- function o() {
920
- var t = f(e);
921
- t[6] = t[6] & 0x4f | 0x40;
922
- t[8] = t[8] & 0xbf | 0x80;
923
- var r = "";
924
- for(var n = 0; n < e; ++n){
925
- var i = t[n];
926
- if (n === 4 || n === 6 || n === 8) r += "-";
927
- if (i < 16) r += "0";
928
- r += i.toString(16).toLowerCase();
929
- }
930
- return r;
931
- }
932
- }
933
- function el(e) {
934
- e.__ = undefined;
935
- delete e.__;
936
- return e;
937
- }
938
- });
939
- })(e || (e = {}));
940
- return _Reflect;
1
+ class SingletonStrategy {
2
+ resolve(t, e) {
3
+ const n = t.identifier;
4
+ if (this.cache.has(n)) {
5
+ return this.cache.get(n);
6
+ }
7
+ const o = t.build(e);
8
+ const r = e ? {
9
+ ...t.configuration,
10
+ ...e
11
+ } : t.configuration;
12
+ t.setSingletonInstance(o, r);
13
+ this.cache.set(n, o);
14
+ t.privateContext.prepareInitHook(o, t.configuration);
15
+ return o;
16
+ }
17
+ constructor(){
18
+ this.cache = new Map();
19
+ }
20
+ }
21
+ class TransientStrategy {
22
+ resolve(t, e) {
23
+ const n = t.build(e);
24
+ t.privateContext.prepareInitHook(n, t.configuration);
25
+ return n;
26
+ }
941
27
  }
942
28
 
943
- export { require_Reflect as __require };
29
+ export { SingletonStrategy, TransientStrategy };