@flemist/test-variants 2.0.5 → 3.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/bundle/browser.js +605 -524
- package/dist/lib/index.cjs +2 -1
- package/dist/lib/index.d.ts +2 -1
- package/dist/lib/index.mjs +1 -1
- package/dist/lib/test-variants/createTestVariants.cjs +7 -2
- package/dist/lib/test-variants/createTestVariants.mjs +7 -2
- package/dist/lib/test-variants/createTestVariants.perf.cjs +1 -1
- package/dist/lib/test-variants/createTestVariants.perf.mjs +1 -1
- package/dist/lib/test-variants/testVariantsIterable.cjs +3 -0
- package/dist/lib/test-variants/testVariantsIterable.d.ts +3 -0
- package/dist/lib/test-variants/testVariantsIterable.mjs +3 -0
- package/dist/lib/test-variants/testVariantsIterator.cjs +357 -0
- package/dist/lib/test-variants/testVariantsIterator.d.ts +67 -0
- package/dist/lib/test-variants/testVariantsIterator.mjs +353 -0
- package/dist/lib/test-variants/testVariantsRun.cjs +155 -191
- package/dist/lib/test-variants/testVariantsRun.d.ts +13 -15
- package/dist/lib/test-variants/testVariantsRun.mjs +155 -191
- package/dist/lib/test-variants/types.d.ts +2 -0
- package/package.json +20 -19
package/dist/bundle/browser.js
CHANGED
|
@@ -1,568 +1,649 @@
|
|
|
1
|
-
!function(t,
|
|
2
|
-
if(
|
|
3
|
-
;var
|
|
4
|
-
;return
|
|
1
|
+
!function(e,t,n){"use strict";function r(e){
|
|
2
|
+
if(e&&e.__esModule)return e
|
|
3
|
+
;var t=Object.create(null)
|
|
4
|
+
;return e&&Object.keys(e).forEach(function(n){
|
|
5
5
|
if("default"!==n){
|
|
6
|
-
var r=Object.getOwnPropertyDescriptor(
|
|
7
|
-
;Object.defineProperty(
|
|
8
|
-
get:function(){return
|
|
9
|
-
}),
|
|
10
|
-
var
|
|
11
|
-
return o=Object.assign||function(
|
|
12
|
-
for(var
|
|
13
|
-
;return
|
|
14
|
-
;function
|
|
15
|
-
return new(n||(n=Promise))(function(s
|
|
16
|
-
function o(
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
;
|
|
20
|
-
t
|
|
21
|
-
}function
|
|
22
|
-
sent:function(){if(1&
|
|
23
|
-
trys:[],ops:[]};return
|
|
24
|
-
return:
|
|
25
|
-
},"function"==typeof Symbol&&(
|
|
26
|
-
return this}),
|
|
27
|
-
return function(
|
|
6
|
+
var r=Object.getOwnPropertyDescriptor(e,n)
|
|
7
|
+
;Object.defineProperty(t,n,r.get?r:{enumerable:!0,
|
|
8
|
+
get:function(){return e[n]}})}
|
|
9
|
+
}),t.default=e,Object.freeze(t)}
|
|
10
|
+
var i=r(t),s=r(n),o=function(){
|
|
11
|
+
return o=Object.assign||function(e){
|
|
12
|
+
for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])
|
|
13
|
+
;return e},o.apply(this,arguments)}
|
|
14
|
+
;function l(e,t,n,r){
|
|
15
|
+
return new(n||(n=Promise))(function(i,s){
|
|
16
|
+
function o(e){try{a(r.next(e))}catch(e){s(e)}}
|
|
17
|
+
function l(e){try{a(r.throw(e))}catch(e){s(e)}}
|
|
18
|
+
function a(e){var t
|
|
19
|
+
;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){
|
|
20
|
+
e(t)})).then(o,l)}a((r=r.apply(e,t||[])).next())})
|
|
21
|
+
}function a(e,t){var n,r,i,s,o={label:0,
|
|
22
|
+
sent:function(){if(1&i[0])throw i[1];return i[1]},
|
|
23
|
+
trys:[],ops:[]};return s={next:l(0),throw:l(1),
|
|
24
|
+
return:l(2)
|
|
25
|
+
},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){
|
|
26
|
+
return this}),s;function l(l){return function(a){
|
|
27
|
+
return function(l){
|
|
28
28
|
if(n)throw new TypeError("Generator is already executing.")
|
|
29
|
-
;for(;
|
|
30
|
-
if(n=1,r&&(
|
|
31
|
-
0):r.next)&&!(
|
|
32
|
-
;switch(r=0,
|
|
33
|
-
case 1:
|
|
34
|
-
value:
|
|
35
|
-
;continue;case 7:
|
|
29
|
+
;for(;s&&(s=0,l[0]&&(o=0)),o;)try{
|
|
30
|
+
if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),
|
|
31
|
+
0):r.next)&&!(i=i.call(r,l[1])).done)return i
|
|
32
|
+
;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:
|
|
33
|
+
case 1:i=l;break;case 4:return o.label++,{
|
|
34
|
+
value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0]
|
|
35
|
+
;continue;case 7:l=o.ops.pop(),o.trys.pop()
|
|
36
36
|
;continue;default:
|
|
37
|
-
if(!(
|
|
37
|
+
if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){
|
|
38
38
|
o=0;continue}
|
|
39
|
-
if(3===
|
|
40
|
-
o.label=
|
|
41
|
-
o.label=
|
|
42
|
-
o.label=
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if(5&
|
|
46
|
-
value:
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
;return
|
|
50
|
-
|
|
39
|
+
if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){
|
|
40
|
+
o.label=l[1];break}if(6===l[0]&&o.label<i[1]){
|
|
41
|
+
o.label=i[1],i=l;break}if(i&&o.label<i[2]){
|
|
42
|
+
o.label=i[2],o.ops.push(l);break}
|
|
43
|
+
i[2]&&o.ops.pop(),o.trys.pop();continue}
|
|
44
|
+
l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=i=0}
|
|
45
|
+
if(5&l[0])throw l[1];return{
|
|
46
|
+
value:l[0]?l[1]:void 0,done:!0}}([l,a])}}}
|
|
47
|
+
function c(e){
|
|
48
|
+
var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0
|
|
49
|
+
;if(n)return n.call(e)
|
|
50
|
+
;if(e&&"number"==typeof e.length)return{
|
|
51
|
+
next:function(){
|
|
52
|
+
return e&&r>=e.length&&(e=void 0),{
|
|
53
|
+
value:e&&e[r++],done:!e}}}
|
|
54
|
+
;throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")
|
|
55
|
+
}function u(e){
|
|
56
|
+
return l(this,void 0,void 0,function(){var t,n
|
|
57
|
+
;return a(this,function(r){switch(r.label){case 0:
|
|
58
|
+
return[4,i.promises.stat(e).catch(function(){
|
|
51
59
|
return null})];case 1:
|
|
52
|
-
if(null==(
|
|
53
|
-
;if(!
|
|
54
|
-
;return[4,
|
|
55
|
-
return n=r.sent(),[2,n.filter(function(
|
|
56
|
-
return
|
|
57
|
-
return t
|
|
58
|
-
return
|
|
59
|
-
return
|
|
60
|
-
;return
|
|
61
|
-
return[4,
|
|
62
|
-
n=
|
|
63
|
-
throw new Error("[saveErrorVariants] invalid JSON in file: ".concat(
|
|
64
|
-
}if(
|
|
65
|
-
throw new Error("[saveErrorVariants] jsonToArgs failed for file: ".concat(
|
|
66
|
-
}return[2,r]}})})}function
|
|
67
|
-
return
|
|
68
|
-
}function
|
|
69
|
-
return
|
|
70
|
-
;return
|
|
71
|
-
return n?(o=n(
|
|
72
|
-
[4,
|
|
60
|
+
if(null==(t=r.sent()))return[2,[]]
|
|
61
|
+
;if(!t.isDirectory())throw new Error("[saveErrorVariants] path is not a directory: ".concat(e))
|
|
62
|
+
;return[4,i.promises.readdir(e)];case 2:
|
|
63
|
+
return n=r.sent(),[2,n.filter(function(e){
|
|
64
|
+
return e.endsWith(".json")}).sort(function(e,t){
|
|
65
|
+
return e>t?-1:e<t?1:0}).map(function(t){
|
|
66
|
+
return s.join(e,t)})]}})})}function h(e,t){
|
|
67
|
+
return l(this,void 0,void 0,function(){var n,r
|
|
68
|
+
;return a(this,function(s){switch(s.label){case 0:
|
|
69
|
+
return[4,i.promises.readFile(e,"utf-8")];case 1:
|
|
70
|
+
n=s.sent();try{r=JSON.parse(n)}catch(t){
|
|
71
|
+
throw new Error("[saveErrorVariants] invalid JSON in file: ".concat(e))
|
|
72
|
+
}if(t)try{return[2,t(r)]}catch(t){
|
|
73
|
+
throw new Error("[saveErrorVariants] jsonToArgs failed for file: ".concat(e))
|
|
74
|
+
}return[2,r]}})})}function f(e){
|
|
75
|
+
return e.sessionDate.toISOString().substring(0,19).replace("T","_").replaceAll(":","-")+".json"
|
|
76
|
+
}function d(e,t,n){
|
|
77
|
+
return l(this,void 0,void 0,function(){var r,o
|
|
78
|
+
;return a(this,function(l){switch(l.label){case 0:
|
|
79
|
+
return n?(o=n(e),r="string"==typeof o?o:JSON.stringify(o,null,2)):r=JSON.stringify(e,null,2),
|
|
80
|
+
[4,i.promises.mkdir(s.dirname(t),{recursive:!0})]
|
|
73
81
|
;case 1:
|
|
74
|
-
return
|
|
75
|
-
;case 2:return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
;return"function"==typeof n&&(n=n(s)),n}
|
|
81
|
-
for(var c=[],l=[],a=0;a<r;a++)c[a]=-1,l[a]=[]
|
|
82
|
-
;return l[0]=i(0),{next:function(){
|
|
83
|
-
return function(){for(var e=r-1;e>=0;e--){
|
|
84
|
-
var n=c[e]+1;if(n<l[e].length){
|
|
85
|
-
var o=t[e],a=l[e][n]
|
|
86
|
-
;for(c[e]=n,s[o]=a,e++;e<r;e++){var u=i(e)
|
|
87
|
-
;if(0===u.length)break;c[e]=0,l[e]=u
|
|
88
|
-
;var h=t[e],f=u[0];s[h]=f}if(e>=r)return!0}}
|
|
89
|
-
return!1}()?{done:!1,value:o({},s)}:{done:!0,
|
|
90
|
-
value:null}}}},e}function v(t,e){return t<e}
|
|
91
|
-
class _{
|
|
92
|
-
constructor({objectPool:t,lessThanFunc:e}={}){
|
|
93
|
-
this._size=0,this._root=null,this.merge=y,
|
|
94
|
-
this.collapse=b,this._objectPool=t,this._lessThanFunc=e||v
|
|
82
|
+
return l.sent(),[4,i.promises.writeFile(t,r,"utf-8")]
|
|
83
|
+
;case 2:return l.sent(),[2]}})})}function v(e,t){
|
|
84
|
+
return e<t}class g{
|
|
85
|
+
constructor({objectPool:e,lessThanFunc:t}={}){
|
|
86
|
+
this._size=0,this._root=null,this.merge=_,
|
|
87
|
+
this.collapse=y,this._objectPool=e,this._lessThanFunc=t||v
|
|
95
88
|
}clear(){this._root=null,this._size=0}get size(){
|
|
96
|
-
return this._size}add(
|
|
97
|
-
let
|
|
98
|
-
;return null==
|
|
99
|
-
item:
|
|
100
|
-
}:
|
|
101
|
-
}getMin(){const{_root:
|
|
102
|
-
;return null==
|
|
103
|
-
return this._root}deleteMin(){const{_root:
|
|
104
|
-
;if(null==
|
|
105
|
-
;return this.delete(
|
|
106
|
-
;if(
|
|
107
|
-
if(null==
|
|
89
|
+
return this._size}add(e){
|
|
90
|
+
let t=null!=this._objectPool?this._objectPool.get():null
|
|
91
|
+
;return null==t?t={child:null,next:null,prev:null,
|
|
92
|
+
item:e
|
|
93
|
+
}:t.item=e,this._size++,this._root=_(this._root,t,this._lessThanFunc),t
|
|
94
|
+
}getMin(){const{_root:e}=this
|
|
95
|
+
;return null==e?void 0:e.item}getMinNode(){
|
|
96
|
+
return this._root}deleteMin(){const{_root:e}=this
|
|
97
|
+
;if(null==e)return;const t=e.item
|
|
98
|
+
;return this.delete(e),t}delete(e){var t
|
|
99
|
+
;if(e===this._root)this._root=y(e.child,this._lessThanFunc);else{
|
|
100
|
+
if(null==e.prev){
|
|
108
101
|
if(this._objectPool)throw new Error("The node is already deleted. Don't use the objectPool to prevent this error.")
|
|
109
102
|
;return}
|
|
110
|
-
|
|
111
|
-
this._root=
|
|
103
|
+
e.prev.child===e?e.prev.child=e.next:e.prev.next=e.next,null!=e.next&&(e.next.prev=e.prev),
|
|
104
|
+
this._root=_(this._root,y(e.child,this._lessThanFunc),this._lessThanFunc)
|
|
112
105
|
}
|
|
113
|
-
|
|
114
|
-
this._size--}decreaseKey(
|
|
115
|
-
|
|
116
|
-
null!=
|
|
117
|
-
this._root=
|
|
106
|
+
e.child=null,e.prev=null,e.next=null,e.item=void 0,null===(t=this._objectPool)||void 0===t||t.release(e),
|
|
107
|
+
this._size--}decreaseKey(e){
|
|
108
|
+
e!==this._root&&(e.prev.child===e?e.prev.child=e.next:e.prev.next=e.next,
|
|
109
|
+
null!=e.next&&(e.next.prev=e.prev),
|
|
110
|
+
this._root=_(this._root,e,this._lessThanFunc))}
|
|
118
111
|
get isEmpty(){return null==this._root}
|
|
119
112
|
[Symbol.iterator](){return this._iterate(!1)}
|
|
120
113
|
nodes(){return{
|
|
121
114
|
[Symbol.iterator]:()=>this._iterate(!0)}}
|
|
122
|
-
_iterate(
|
|
115
|
+
_iterate(e){const t=this._lessThanFunc
|
|
123
116
|
;return function*n(r){
|
|
124
|
-
r&&(
|
|
117
|
+
r&&(e?yield r:yield r.item,r.child&&(null!=r.child.next&&(r.child=y(r.child,t),
|
|
125
118
|
r.child.prev=r),yield*n(r.child)))}(this._root)}}
|
|
126
|
-
function
|
|
127
|
-
;return null==t
|
|
128
|
-
|
|
129
|
-
null!=r.child&&(r.child.prev=
|
|
130
|
-
r.next=null,r.prev=null,r)}function
|
|
131
|
-
let n,r,s,
|
|
132
|
-
;for(
|
|
133
|
-
if(r=i
|
|
134
|
-
i
|
|
135
|
-
for(o=null;null!=n;)
|
|
136
|
-
;return o}function p(t
|
|
137
|
-
then(
|
|
138
|
-
return null!=
|
|
139
|
-
}let m,
|
|
140
|
-
|
|
141
|
-
return
|
|
142
|
-
for(;
|
|
143
|
-
;
|
|
144
|
-
console.error("Unhandled promise rejection",
|
|
145
|
-
m=null})}())}function
|
|
146
|
-
const r=
|
|
147
|
-
n._reject(
|
|
148
|
-
const r=e
|
|
149
|
-
}else n._reject(
|
|
150
|
-
constructor(
|
|
119
|
+
function _(e,t,n){let r,i
|
|
120
|
+
;return null==e?t:null==t||e===t?e:(n(t.item,e.item)?(r=t,
|
|
121
|
+
i=e):(r=e,i=t),i.next=r.child,
|
|
122
|
+
null!=r.child&&(r.child.prev=i),i.prev=r,r.child=i,
|
|
123
|
+
r.next=null,r.prev=null,r)}function y(e,t){
|
|
124
|
+
let n,r,i,s,o;if(null==e)return null
|
|
125
|
+
;for(s=e,n=null;null!=s;){
|
|
126
|
+
if(r=s,i=r.next,null==i){r.prev=n,n=r;break}
|
|
127
|
+
s=i.next,o=_(r,i,t),o.prev=n,n=o}
|
|
128
|
+
for(o=null;null!=n;)s=n.prev,o=_(o,n,t),n=s
|
|
129
|
+
;return o}function p(e,t){e(function(e){return{
|
|
130
|
+
then(t,n){n(e)}}}(t))}function b(e){
|
|
131
|
+
return null!=e&&"object"==typeof e&&"function"==typeof e.then
|
|
132
|
+
}let m,x=[];function w(e){
|
|
133
|
+
x.push(e),m||(m=function(){
|
|
134
|
+
return l(this,void 0,void 0,function*(){
|
|
135
|
+
for(;x.length>0;){yield 0;const e=x
|
|
136
|
+
;x=[],e.forEach(e=>{try{e()}catch(e){
|
|
137
|
+
console.error("Unhandled promise rejection",e)}})}
|
|
138
|
+
m=null})}())}function j(e,t,n){w(()=>{try{
|
|
139
|
+
const r=t?t(e):e;n._resolve(r)}catch(e){
|
|
140
|
+
n._reject(e)}})}function E(e,t,n){w(()=>{if(t)try{
|
|
141
|
+
const r=t(e);n._resolve(r)}catch(e){n._reject(e)
|
|
142
|
+
}else n._reject(e)})}const S=function(){};class A{
|
|
143
|
+
constructor(e){
|
|
151
144
|
this.status="pending",this.value=void 0,this.reason=void 0,this._handlers=null
|
|
152
|
-
;const
|
|
153
|
-
;this._resolve=function(
|
|
154
|
-
},this._reject=function(
|
|
155
|
-
},this._resolveAsync=function(
|
|
156
|
-
},this._rejectAsync=function(
|
|
157
|
-
},
|
|
145
|
+
;const t=this._resolve,n=this._reject,r=this._resolveAsync,i=this._rejectAsync,s=this
|
|
146
|
+
;this._resolve=function(e){t.call(s,e)
|
|
147
|
+
},this._reject=function(e){n.call(s,e)
|
|
148
|
+
},this._resolveAsync=function(e){r.call(s,e)
|
|
149
|
+
},this._rejectAsync=function(e){i.call(s,e)
|
|
150
|
+
},e(this._resolve,this._reject)}_resolve(e){
|
|
158
151
|
"pending"===this.status&&(this.status="fulfilled",
|
|
159
|
-
this._resolveAsync(
|
|
160
|
-
|
|
161
|
-
}_resolveSync(
|
|
162
|
-
;if(this.value=
|
|
163
|
-
;for(let n=0,r=
|
|
164
|
-
;
|
|
165
|
-
"pending"===this.status&&this._rejectAsync(
|
|
166
|
-
_rejectAsync(
|
|
167
|
-
this.status="rejected",
|
|
168
|
-
}_rejectSync(
|
|
169
|
-
;if(this.reason=
|
|
170
|
-
;for(let n=0,r=
|
|
171
|
-
;
|
|
152
|
+
this._resolveAsync(e))}_resolveAsync(e){
|
|
153
|
+
b(e)?e.then(this._resolveAsync,this._rejectAsync):this._resolveSync(e)
|
|
154
|
+
}_resolveSync(e){const t=this._handlers
|
|
155
|
+
;if(this.value=e,null!=t){this._handlers=null
|
|
156
|
+
;for(let n=0,r=t.length;n<r;n++){const[r,,i]=t[n]
|
|
157
|
+
;j(e,r,i)}}}_reject(e){
|
|
158
|
+
"pending"===this.status&&this._rejectAsync(e)}
|
|
159
|
+
_rejectAsync(e){
|
|
160
|
+
this.status="rejected",b(e)?e.then(this._rejectAsync,this._rejectAsync):this._rejectSync(e)
|
|
161
|
+
}_rejectSync(e){const t=this._handlers
|
|
162
|
+
;if(this.reason=e,null!=t){this._handlers=null
|
|
163
|
+
;for(let n=0,r=t.length;n<r;n++){const[,r,i]=t[n]
|
|
164
|
+
;E(e,r,i)}}}then(e,t){const n=new A(S)
|
|
172
165
|
;return"pending"===this.status?(null==this._handlers&&(this._handlers=[]),
|
|
173
|
-
this._handlers.push([t,
|
|
174
|
-
n}catch(
|
|
175
|
-
const e
|
|
176
|
-
;return
|
|
177
|
-
},n=
|
|
178
|
-
;return
|
|
179
|
-
;return this.then(
|
|
180
|
-
const
|
|
181
|
-
static reject(
|
|
182
|
-
;return
|
|
166
|
+
this._handlers.push([e,t,n])):"fulfilled"===this.status?j(this.value,e,n):E(this.reason,t,n),
|
|
167
|
+
n}catch(e){return this.then(void 0,e)}finally(e){
|
|
168
|
+
const t=e&&function(t){const n=e()
|
|
169
|
+
;return b(n)?n.then(()=>t):A.resolve(t)
|
|
170
|
+
},n=e&&function(t){const n=e()
|
|
171
|
+
;return b(n)?n.then(()=>A.reject(t)):A.reject(t)}
|
|
172
|
+
;return this.then(t,n)}static resolve(e){
|
|
173
|
+
const t=new A(S);return t._resolve(e),t}
|
|
174
|
+
static reject(e){const t=new A(S)
|
|
175
|
+
;return t._reject(e),t}get[Symbol.toStringTag](){
|
|
183
176
|
return"Promise"}static get[Symbol.species](){
|
|
184
|
-
return
|
|
185
|
-
let n,r;
|
|
186
|
-
n=
|
|
187
|
-
;return
|
|
188
|
-
o[
|
|
189
|
-
}),
|
|
190
|
-
return function(t
|
|
191
|
-
;const r=new
|
|
192
|
-
;const
|
|
193
|
-
|
|
194
|
-
},0===--
|
|
195
|
-
reason:
|
|
196
|
-
status:"fulfilled",value:
|
|
197
|
-
}(
|
|
198
|
-
;
|
|
199
|
-
;let
|
|
200
|
-
;return
|
|
201
|
-
o[
|
|
202
|
-
}),
|
|
203
|
-
let n,r;
|
|
204
|
-
n=
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
if(this._status="pending",
|
|
208
|
-
this.resolve=
|
|
209
|
-
;if(this.promise=new Promise(function(
|
|
210
|
-
e
|
|
211
|
-
const r=
|
|
212
|
-
;this.resolve=function(
|
|
213
|
-
},this.reject=function(
|
|
214
|
-
}else this.resolve=
|
|
177
|
+
return A}static all(e){return function(e,t){
|
|
178
|
+
let n,r;t||(t=Promise);const i=new t((e,t)=>{
|
|
179
|
+
n=e,r=t});let s=e.length;const o=[]
|
|
180
|
+
;return e.forEach((e,t)=>{b(e)?e.then(e=>{
|
|
181
|
+
o[t]=e,0===--s&&n(o)},r):(o[t]=e,0===--s&&n(o))
|
|
182
|
+
}),i}(e,A)}static allSettled(e){
|
|
183
|
+
return function(e,t){let n;t||(t=Promise)
|
|
184
|
+
;const r=new t((e,t)=>{n=e});let i=e.length
|
|
185
|
+
;const s=[];return e.forEach((e,t)=>{
|
|
186
|
+
b(e)?e.then(e=>{s[t]={status:"fulfilled",value:e
|
|
187
|
+
},0===--i&&n(s)},e=>{s[t]={status:"rejected",
|
|
188
|
+
reason:e},0===--i&&n(s)}):(s[t]={
|
|
189
|
+
status:"fulfilled",value:e},0===--i&&n(s))}),r
|
|
190
|
+
}(e,A)}static any(e){return function(e,t){let n,r
|
|
191
|
+
;t||(t=Promise);const i=new t((e,t)=>{n=e,r=t})
|
|
192
|
+
;let s=e.length;const o=[]
|
|
193
|
+
;return e.forEach((e,t)=>{b(e)?e.then(n,e=>{
|
|
194
|
+
o[t]=e,0===--s&&r(new AggregateError(o))}):n(e)
|
|
195
|
+
}),i}(e,A)}static race(e){return function(e,t){
|
|
196
|
+
let n,r;t||(t=Promise);const i=new t((e,t)=>{
|
|
197
|
+
n=e,r=t});return e.forEach(e=>{
|
|
198
|
+
b(e)?e.then(n,r):n(e)}),i}(e,A)}}
|
|
199
|
+
const P=function(){};class k{constructor(e){
|
|
200
|
+
if(this._status="pending",e&&e.aborted)this.promise=A.reject(e.reason),
|
|
201
|
+
this.resolve=P,this.reject=P;else{let t,n
|
|
202
|
+
;if(this.promise=new Promise(function(e){
|
|
203
|
+
t=e,n=function(t){p(e,t)}}),e){
|
|
204
|
+
const r=e.subscribe(function(e){n(e)})
|
|
205
|
+
;this.resolve=function(e){r(),t(e)
|
|
206
|
+
},this.reject=function(e){r(),n(e)}
|
|
207
|
+
}else this.resolve=t,this.reject=n}
|
|
215
208
|
this.promise.then(()=>{this._status="resolved"
|
|
216
209
|
},()=>{this._status="rejected"})}get state(){
|
|
217
|
-
return this._status}}class
|
|
218
|
-
constructor(t
|
|
219
|
-
super(
|
|
210
|
+
return this._status}}class I extends Error{
|
|
211
|
+
constructor(e,t){
|
|
212
|
+
super(e),Object.setPrototypeOf(this,I.prototype),this.reason=t,
|
|
220
213
|
this.name="AbortError",this._internal=!1}}
|
|
221
|
-
const
|
|
214
|
+
const T=()=>{};class O{constructor(){
|
|
222
215
|
this.aborted=!1,this.reason=void 0,this._callbacks=void 0
|
|
223
|
-
}subscribe(
|
|
224
|
-
;if(null===(
|
|
225
|
-
;return this.aborted?(
|
|
226
|
-
|
|
227
|
-
this._callbacks.add(
|
|
228
|
-
;null===(
|
|
229
|
-
})}abort(
|
|
230
|
-
;this.aborted=!0,this.reason=
|
|
231
|
-
|
|
216
|
+
}subscribe(e){var t
|
|
217
|
+
;if(null===(t=this._callbacks)||void 0===t?void 0:t.has(e))throw new Error("Already subscribed: "+e)
|
|
218
|
+
;return this.aborted?(e.call(this,this.reason),
|
|
219
|
+
T):(this._callbacks||(this._callbacks=new Set),
|
|
220
|
+
this._callbacks.add(e),()=>{var t
|
|
221
|
+
;null===(t=this._callbacks)||void 0===t||t.delete(e)
|
|
222
|
+
})}abort(e){var t
|
|
223
|
+
;this.aborted=!0,this.reason=e,null===(t=this._callbacks)||void 0===t||t.forEach(e=>{
|
|
224
|
+
e.call(this,this.reason)}),this._callbacks=void 0}
|
|
232
225
|
throwIfAborted(){if(this.aborted)throw this.reason
|
|
233
|
-
}}class
|
|
234
|
-
abort(
|
|
235
|
-
this.signal.aborted||(void 0===
|
|
236
|
-
this.signal.abort(
|
|
237
|
-
var n=0,r=null;function
|
|
238
|
-
return
|
|
239
|
-
;return
|
|
240
|
-
return r={error:
|
|
241
|
-
},console.error("[test-variants] error variant: ".concat(
|
|
242
|
-
return JSON.stringify(
|
|
243
|
-
return
|
|
226
|
+
}}class z{constructor(){this.signal=new O}
|
|
227
|
+
abort(e){
|
|
228
|
+
this.signal.aborted||(void 0===e&&((e=new I("Aborted with no reason",e))._internal=!0),
|
|
229
|
+
this.signal.abort(e))}}function L(e,t){
|
|
230
|
+
var n=0,r=null;function i(e,i,s){
|
|
231
|
+
return l(this,void 0,void 0,function(){var o
|
|
232
|
+
;return a(this,function(l){switch(l.label){case 0:
|
|
233
|
+
return r={error:e,args:i,index:s
|
|
234
|
+
},console.error("[test-variants] error variant: ".concat(s,"\n").concat(function(e){
|
|
235
|
+
return JSON.stringify(e,function(e,t){
|
|
236
|
+
return t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor!==Object?t+"":t
|
|
244
237
|
},2)
|
|
245
|
-
}(
|
|
246
|
-
n++,[2]):
|
|
247
|
-
|
|
248
|
-
return function(
|
|
249
|
-
;if(
|
|
250
|
-
return"number"==typeof
|
|
251
|
-
iterationsSync:0}:null!==
|
|
252
|
-
iterationsAsync:1,iterationsSync:0}},function(
|
|
253
|
-
return
|
|
254
|
-
iterationsAsync:0,iterationsSync:
|
|
255
|
-
}:null!==
|
|
256
|
-
iterationsAsync:0,iterationsSync:1}}catch(
|
|
257
|
-
return
|
|
258
|
-
this._branch=null,this.order=
|
|
238
|
+
}(i))),console.error(e),o=Date.now(),Date.now()-o>50&&n<5?(console.log("[test-variants] DEBUG ITERATION: "+n),
|
|
239
|
+
n++,[2]):t.onError?[4,t.onError(r)]:[3,2];case 1:
|
|
240
|
+
l.sent(),l.label=2;case 2:throw r.error}})})}
|
|
241
|
+
return function(t,n,r){try{var s=e(t,r)
|
|
242
|
+
;if(b(s))return s.then(function(e){
|
|
243
|
+
return"number"==typeof e?{iterationsAsync:e,
|
|
244
|
+
iterationsSync:0}:null!==e&&"object"==typeof e?e:{
|
|
245
|
+
iterationsAsync:1,iterationsSync:0}},function(e){
|
|
246
|
+
return i(e,t,n)});return"number"==typeof s?{
|
|
247
|
+
iterationsAsync:0,iterationsSync:s
|
|
248
|
+
}:null!==s&&"object"==typeof s?s:{
|
|
249
|
+
iterationsAsync:0,iterationsSync:1}}catch(e){
|
|
250
|
+
return i(e,t,n)}}}class F{constructor(e,t){
|
|
251
|
+
this._branch=null,this.order=e,this.parent=t}
|
|
259
252
|
get branch(){if(!this._branch){
|
|
260
|
-
const
|
|
261
|
-
;for(;null!=
|
|
262
|
-
;this._branch=
|
|
263
|
-
function
|
|
264
|
-
return null!=
|
|
265
|
-
}let
|
|
266
|
-
|
|
267
|
-
return
|
|
268
|
-
for(;
|
|
269
|
-
;
|
|
270
|
-
console.error("Unhandled promise rejection",
|
|
271
|
-
|
|
272
|
-
const r=
|
|
273
|
-
n._reject(
|
|
274
|
-
const r=e
|
|
275
|
-
}else n._reject(
|
|
276
|
-
constructor(
|
|
253
|
+
const e=[this.order];let t=this.parent
|
|
254
|
+
;for(;null!=t;)e.push(t.order),t=t.parent
|
|
255
|
+
;this._branch=e}return this._branch}}
|
|
256
|
+
function V(e){
|
|
257
|
+
return null!=e&&"object"==typeof e&&"function"==typeof e.then
|
|
258
|
+
}let D,M=[];function C(e){
|
|
259
|
+
M.push(e),D||(D=function(){
|
|
260
|
+
return l(this,void 0,void 0,function*(){
|
|
261
|
+
for(;M.length>0;){yield 0;const e=M
|
|
262
|
+
;M=[],e.forEach(e=>{try{e()}catch(e){
|
|
263
|
+
console.error("Unhandled promise rejection",e)}})}
|
|
264
|
+
D=null})}())}function R(e,t,n){C(()=>{try{
|
|
265
|
+
const r=t?t(e):e;n._resolve(r)}catch(e){
|
|
266
|
+
n._reject(e)}})}function q(e,t,n){C(()=>{if(t)try{
|
|
267
|
+
const r=t(e);n._resolve(r)}catch(e){n._reject(e)
|
|
268
|
+
}else n._reject(e)})}const B=function(){};class J{
|
|
269
|
+
constructor(e){
|
|
277
270
|
this.status="pending",this.value=void 0,this.reason=void 0,this._handlers=null
|
|
278
|
-
;const
|
|
279
|
-
;this._resolve=function(
|
|
280
|
-
},this._reject=function(
|
|
281
|
-
},this._resolveAsync=function(
|
|
282
|
-
},this._rejectAsync=function(
|
|
283
|
-
},
|
|
271
|
+
;const t=this._resolve,n=this._reject,r=this._resolveAsync,i=this._rejectAsync,s=this
|
|
272
|
+
;this._resolve=function(e){t.call(s,e)
|
|
273
|
+
},this._reject=function(e){n.call(s,e)
|
|
274
|
+
},this._resolveAsync=function(e){r.call(s,e)
|
|
275
|
+
},this._rejectAsync=function(e){i.call(s,e)
|
|
276
|
+
},e(this._resolve,this._reject)}_resolve(e){
|
|
284
277
|
"pending"===this.status&&(this.status="fulfilled",
|
|
285
|
-
this._resolveAsync(
|
|
286
|
-
|
|
287
|
-
}_resolveSync(
|
|
288
|
-
;if(this.value=
|
|
289
|
-
;for(let n=0,r=
|
|
290
|
-
;
|
|
291
|
-
"pending"===this.status&&this._rejectAsync(
|
|
292
|
-
_rejectAsync(
|
|
293
|
-
this.status="rejected",
|
|
294
|
-
}_rejectSync(
|
|
295
|
-
;if(this.reason=
|
|
296
|
-
;for(let n=0,r=
|
|
297
|
-
;
|
|
278
|
+
this._resolveAsync(e))}_resolveAsync(e){
|
|
279
|
+
V(e)?e.then(this._resolveAsync,this._rejectAsync):this._resolveSync(e)
|
|
280
|
+
}_resolveSync(e){const t=this._handlers
|
|
281
|
+
;if(this.value=e,null!=t){this._handlers=null
|
|
282
|
+
;for(let n=0,r=t.length;n<r;n++){const[r,,i]=t[n]
|
|
283
|
+
;R(e,r,i)}}}_reject(e){
|
|
284
|
+
"pending"===this.status&&this._rejectAsync(e)}
|
|
285
|
+
_rejectAsync(e){
|
|
286
|
+
this.status="rejected",V(e)?e.then(this._rejectAsync,this._rejectAsync):this._rejectSync(e)
|
|
287
|
+
}_rejectSync(e){const t=this._handlers
|
|
288
|
+
;if(this.reason=e,null!=t){this._handlers=null
|
|
289
|
+
;for(let n=0,r=t.length;n<r;n++){const[,r,i]=t[n]
|
|
290
|
+
;q(e,r,i)}}}then(e,t){const n=new J(B)
|
|
298
291
|
;return"pending"===this.status?(null==this._handlers&&(this._handlers=[]),
|
|
299
|
-
this._handlers.push([t,
|
|
300
|
-
n}catch(
|
|
301
|
-
const e
|
|
302
|
-
;return
|
|
303
|
-
},n=
|
|
304
|
-
;return
|
|
305
|
-
;return this.then(
|
|
306
|
-
const
|
|
307
|
-
static reject(
|
|
308
|
-
;return
|
|
292
|
+
this._handlers.push([e,t,n])):"fulfilled"===this.status?R(this.value,e,n):q(this.reason,t,n),
|
|
293
|
+
n}catch(e){return this.then(void 0,e)}finally(e){
|
|
294
|
+
const t=e&&function(t){const n=e()
|
|
295
|
+
;return V(n)?n.then(()=>t):J.resolve(t)
|
|
296
|
+
},n=e&&function(t){const n=e()
|
|
297
|
+
;return V(n)?n.then(()=>J.reject(t)):J.reject(t)}
|
|
298
|
+
;return this.then(t,n)}static resolve(e){
|
|
299
|
+
const t=new J(B);return t._resolve(e),t}
|
|
300
|
+
static reject(e){const t=new J(B)
|
|
301
|
+
;return t._reject(e),t}get[Symbol.toStringTag](){
|
|
309
302
|
return"Promise"}static get[Symbol.species](){
|
|
310
|
-
return
|
|
311
|
-
let n,r;
|
|
312
|
-
n=
|
|
313
|
-
;return
|
|
314
|
-
o[
|
|
315
|
-
}),
|
|
316
|
-
return function(t
|
|
317
|
-
;const r=new
|
|
318
|
-
;const
|
|
319
|
-
|
|
320
|
-
},0===--
|
|
321
|
-
reason:
|
|
322
|
-
status:"fulfilled",value:
|
|
323
|
-
}(
|
|
324
|
-
;
|
|
325
|
-
;let
|
|
326
|
-
;return
|
|
327
|
-
o[
|
|
328
|
-
}),
|
|
329
|
-
let n,r;
|
|
330
|
-
n=
|
|
331
|
-
|
|
332
|
-
const
|
|
333
|
-
if(this._status="pending",
|
|
334
|
-
this.resolve=
|
|
335
|
-
;if(this.promise=new Promise(function(
|
|
336
|
-
e
|
|
337
|
-
return{then(
|
|
338
|
-
const r=
|
|
339
|
-
;this.resolve=function(
|
|
340
|
-
},this.reject=function(
|
|
341
|
-
}else this.resolve=
|
|
303
|
+
return J}static all(e){return function(e,t){
|
|
304
|
+
let n,r;t||(t=Promise);const i=new t((e,t)=>{
|
|
305
|
+
n=e,r=t});let s=e.length;const o=[]
|
|
306
|
+
;return e.forEach((e,t)=>{V(e)?e.then(e=>{
|
|
307
|
+
o[t]=e,0===--s&&n(o)},r):(o[t]=e,0===--s&&n(o))
|
|
308
|
+
}),i}(e,J)}static allSettled(e){
|
|
309
|
+
return function(e,t){let n;t||(t=Promise)
|
|
310
|
+
;const r=new t((e,t)=>{n=e});let i=e.length
|
|
311
|
+
;const s=[];return e.forEach((e,t)=>{
|
|
312
|
+
V(e)?e.then(e=>{s[t]={status:"fulfilled",value:e
|
|
313
|
+
},0===--i&&n(s)},e=>{s[t]={status:"rejected",
|
|
314
|
+
reason:e},0===--i&&n(s)}):(s[t]={
|
|
315
|
+
status:"fulfilled",value:e},0===--i&&n(s))}),r
|
|
316
|
+
}(e,J)}static any(e){return function(e,t){let n,r
|
|
317
|
+
;t||(t=Promise);const i=new t((e,t)=>{n=e,r=t})
|
|
318
|
+
;let s=e.length;const o=[]
|
|
319
|
+
;return e.forEach((e,t)=>{V(e)?e.then(n,e=>{
|
|
320
|
+
o[t]=e,0===--s&&r(new AggregateError(o))}):n(e)
|
|
321
|
+
}),i}(e,J)}static race(e){return function(e,t){
|
|
322
|
+
let n,r;t||(t=Promise);const i=new t((e,t)=>{
|
|
323
|
+
n=e,r=t});return e.forEach(e=>{
|
|
324
|
+
V(e)?e.then(n,r):n(e)}),i}(e,J)}}
|
|
325
|
+
const N=function(){};class ${constructor(e){
|
|
326
|
+
if(this._status="pending",e&&e.aborted)this.promise=J.reject(e.reason),
|
|
327
|
+
this.resolve=N,this.reject=N;else{let t,n
|
|
328
|
+
;if(this.promise=new Promise(function(e){
|
|
329
|
+
t=e,n=function(t){!function(e,t){e(function(e){
|
|
330
|
+
return{then(t,n){n(e)}}}(t))}(e,t)}}),e){
|
|
331
|
+
const r=e.subscribe(function(e){n(e)})
|
|
332
|
+
;this.resolve=function(e){r(),t(e)
|
|
333
|
+
},this.reject=function(e){r(),n(e)}
|
|
334
|
+
}else this.resolve=t,this.reject=n}
|
|
342
335
|
this.promise.then(()=>{this._status="resolved"
|
|
343
336
|
},()=>{this._status="rejected"})}get state(){
|
|
344
337
|
return this._status}}
|
|
345
|
-
var
|
|
346
|
-
;!function(
|
|
347
|
-
var
|
|
348
|
-
;u=u&&u.setTimeout?u:
|
|
349
|
-
"[object process]"==={}.toString.call(
|
|
350
|
-
process.nextTick(function(){f(
|
|
351
|
-
if(
|
|
352
|
-
var
|
|
353
|
-
;return
|
|
354
|
-
},
|
|
355
|
-
}()?
|
|
356
|
-
f(
|
|
357
|
-
}):
|
|
358
|
-
|
|
359
|
-
;
|
|
360
|
-
f(
|
|
361
|
-
|
|
362
|
-
setTimeout(f,0,
|
|
363
|
-
}:(
|
|
364
|
-
|
|
338
|
+
var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}
|
|
339
|
+
;!function(e){if(!e.setImmediate){
|
|
340
|
+
var t,n,r,i,s,o=1,l={},a=!1,c=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e)
|
|
341
|
+
;u=u&&u.setTimeout?u:e,
|
|
342
|
+
"[object process]"==={}.toString.call(e.process)?t=function(e){
|
|
343
|
+
process.nextTick(function(){f(e)})}:!function(){
|
|
344
|
+
if(e.postMessage&&!e.importScripts){
|
|
345
|
+
var t=!0,n=e.onmessage
|
|
346
|
+
;return e.onmessage=function(){t=!1
|
|
347
|
+
},e.postMessage("","*"),e.onmessage=n,t}
|
|
348
|
+
}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){
|
|
349
|
+
f(e.data)},t=function(e){r.port2.postMessage(e)
|
|
350
|
+
}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,
|
|
351
|
+
t=function(e){var t=c.createElement("script")
|
|
352
|
+
;t.onreadystatechange=function(){
|
|
353
|
+
f(e),t.onreadystatechange=null,n.removeChild(t),
|
|
354
|
+
t=null},n.appendChild(t)}):t=function(e){
|
|
355
|
+
setTimeout(f,0,e)
|
|
356
|
+
}:(i="setImmediate$"+Math.random()+"$",s=function(t){
|
|
357
|
+
t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))
|
|
365
358
|
},
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}),u.setImmediate=function(
|
|
369
|
-
"function"!=typeof
|
|
359
|
+
e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),
|
|
360
|
+
t=function(t){e.postMessage(i+t,"*")
|
|
361
|
+
}),u.setImmediate=function(e){
|
|
362
|
+
"function"!=typeof e&&(e=new Function(""+e))
|
|
370
363
|
;for(var n=new Array(arguments.length-1),r=0;r<n.length;r++)n[r]=arguments[r+1]
|
|
371
|
-
;var
|
|
372
|
-
},u.clearImmediate=h}function h(
|
|
373
|
-
function f(
|
|
374
|
-
var
|
|
375
|
-
var e
|
|
376
|
-
|
|
377
|
-
;break;case 3:
|
|
378
|
-
|
|
379
|
-
}("undefined"==typeof self?
|
|
380
|
-
;const
|
|
381
|
-
return function(t
|
|
382
|
-
const n=
|
|
383
|
-
;for(let
|
|
384
|
-
const e
|
|
385
|
-
;if(
|
|
386
|
-
}(
|
|
387
|
-
constructor(){this._queue=new
|
|
388
|
-
run(t,
|
|
389
|
-
runTask(t,
|
|
390
|
-
_run(t,
|
|
391
|
-
priority:(o=Q++,
|
|
392
|
-
func:
|
|
393
|
-
reject:
|
|
394
|
-
;if(this._queue.add(
|
|
395
|
-
result:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
return this._inProcess||(this._inProcess=!0,this._process()),
|
|
364
|
+
;var i={callback:e,args:n};return l[o]=i,t(o),o++
|
|
365
|
+
},u.clearImmediate=h}function h(e){delete l[e]}
|
|
366
|
+
function f(e){if(a)setTimeout(f,0,e);else{
|
|
367
|
+
var t=l[e];if(t){a=!0;try{!function(e){
|
|
368
|
+
var t=e.callback,n=e.args;switch(n.length){case 0:
|
|
369
|
+
t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1])
|
|
370
|
+
;break;case 3:t(n[0],n[1],n[2]);break;default:
|
|
371
|
+
t.apply(void 0,n)}}(t)}finally{h(e),a=!1}}}}
|
|
372
|
+
}("undefined"==typeof self?G:self)
|
|
373
|
+
;const U=function(e){return e};function W(e,t){
|
|
374
|
+
return function(e,t){
|
|
375
|
+
const n=e&&e.branch,r=t&&t.branch,i=n?n.length:0,s=r?r.length:0,o=i>s?i:s
|
|
376
|
+
;for(let e=0;e<o;e++){
|
|
377
|
+
const t=e>=i?0:n[i-1-e],o=e>=s?0:r[s-1-e]
|
|
378
|
+
;if(t!==o)return t>o?1:-1}return 0
|
|
379
|
+
}(e.priority,t.priority)<0}let Q=1;class K{
|
|
380
|
+
constructor(){this._queue=new g({lessThanFunc:W})}
|
|
381
|
+
run(e,t,n){return this._run(!1,e,t,n)}
|
|
382
|
+
runTask(e,t,n){return this._run(!0,e,t,n)}
|
|
383
|
+
_run(e,t,n,r){const i=new $(r),s={
|
|
384
|
+
priority:(o=Q++,l=n,null==o?null==l?null:l:new F(o,l)),
|
|
385
|
+
func:t,abortSignal:r,resolve:i.resolve,
|
|
386
|
+
reject:i.reject,readyToRun:!e};var o,l
|
|
387
|
+
;if(this._queue.add(s),e){const e=this;return{
|
|
388
|
+
result:i.promise,setReadyToRun(t){
|
|
389
|
+
s.readyToRun=t,t&&!e._inProcess&&(e._inProcess=!0,
|
|
390
|
+
e._process())}}}
|
|
391
|
+
return this._inProcess||(this._inProcess=!0,this._process()),i.promise
|
|
399
392
|
}_process(){
|
|
400
|
-
return
|
|
401
|
-
const
|
|
402
|
-
;for(yield Promise.resolve().then(
|
|
403
|
-
if(yield 0,
|
|
404
|
-
let e
|
|
405
|
-
;if(
|
|
406
|
-
;for(const
|
|
407
|
-
n=
|
|
408
|
-
|
|
409
|
-
if(
|
|
410
|
-
let t
|
|
411
|
-
;
|
|
412
|
-
}catch(
|
|
413
|
-
const
|
|
414
|
-
return
|
|
415
|
-
constructor(
|
|
416
|
-
if(this._maxSize=0,this._size=0,this._tickPromise=new k,!
|
|
417
|
-
;this._maxSize=
|
|
418
|
-
this._size=
|
|
393
|
+
return l(this,void 0,void 0,function*(){
|
|
394
|
+
const e=this._queue
|
|
395
|
+
;for(yield Promise.resolve().then(U);;){
|
|
396
|
+
if(yield 0,e.isEmpty){this._inProcess=!1;break}
|
|
397
|
+
let t=e.getMin()
|
|
398
|
+
;if(t.readyToRun)e.deleteMin();else{let n
|
|
399
|
+
;for(const t of e.nodes())if(t.item.readyToRun){
|
|
400
|
+
n=t;break}if(!n){this._inProcess=!1;break}
|
|
401
|
+
t=n.item,e.delete(n)}
|
|
402
|
+
if(t.abortSignal&&t.abortSignal.aborted)t.reject(t.abortSignal.reason);else try{
|
|
403
|
+
let e=t.func&&t.func(t.abortSignal)
|
|
404
|
+
;e&&"function"==typeof e.then&&(e=yield e),t.resolve(e)
|
|
405
|
+
}catch(e){t.reject(e)}}})}}const H=function(){
|
|
406
|
+
const e=new K;return function(t,n){
|
|
407
|
+
return e.run(void 0,t,n)}}();class X{
|
|
408
|
+
constructor(e){
|
|
409
|
+
if(this._maxSize=0,this._size=0,this._tickPromise=new k,!e)throw new Error("maxSize should be > 0")
|
|
410
|
+
;this._maxSize=e,
|
|
411
|
+
this._size=e,this._priorityQueue=new K}
|
|
419
412
|
get maxSize(){return this._maxSize}get size(){
|
|
420
413
|
return this._size}get holdAvailable(){
|
|
421
|
-
return this._size}hold(
|
|
422
|
-
;return!(t
|
|
414
|
+
return this._size}hold(e){const t=this._size
|
|
415
|
+
;return!(e>t)&&(this._size=t-e,!0)}
|
|
423
416
|
get releaseAvailable(){
|
|
424
|
-
return this.maxSize-this._size}release(t
|
|
425
|
-
const n=this._size,r=this.maxSize-n;if(
|
|
426
|
-
if(!
|
|
427
|
-
;
|
|
428
|
-
const
|
|
429
|
-
;this._tickPromise=null,
|
|
430
|
-
tick(
|
|
417
|
+
return this.maxSize-this._size}release(e,t){
|
|
418
|
+
const n=this._size,r=this.maxSize-n;if(e>r){
|
|
419
|
+
if(!t)throw new Error(`count (${e} > maxReleaseCount (${r}))`)
|
|
420
|
+
;e=r}if(e>0&&(this._size=n+e,this._tickPromise)){
|
|
421
|
+
const e=this._tickPromise
|
|
422
|
+
;this._tickPromise=null,e.resolve()}return e}
|
|
423
|
+
tick(e){
|
|
431
424
|
if(!(this._size>=this._maxSize))return this._tickPromise||(this._tickPromise=new k),
|
|
432
|
-
function(t
|
|
433
|
-
if(
|
|
434
|
-
;function
|
|
435
|
-
|
|
436
|
-
}).catch(
|
|
437
|
-
}(
|
|
438
|
-
if(
|
|
425
|
+
function(e,t){return e?new Promise(function(n){
|
|
426
|
+
if(e&&e.aborted)return void p(n,e.reason);let r,i
|
|
427
|
+
;function s(e){i||(i=!0,r&&r(),p(n,e))}
|
|
428
|
+
t.then(function(e){r&&r(),n(e)
|
|
429
|
+
}).catch(s),e&&(r=e.subscribe(s))}):t
|
|
430
|
+
}(e,this._tickPromise.promise)}holdWait(e,t,n,r){
|
|
431
|
+
if(e>this.maxSize)throw new Error(`holdCount (${e} > maxSize (${this.maxSize}))`)
|
|
439
432
|
;return r||(r=H),
|
|
440
|
-
this._priorityQueue.run(n=>
|
|
441
|
-
for(;
|
|
442
|
-
;if(!this.hold(
|
|
443
|
-
}),
|
|
444
|
-
if(null==
|
|
445
|
-
;
|
|
446
|
-
setTimeout(function(){e
|
|
447
|
-
;return
|
|
448
|
-
;if(
|
|
449
|
-
;var n=
|
|
433
|
+
this._priorityQueue.run(n=>l(this,void 0,void 0,function*(){
|
|
434
|
+
for(;e>this._size;)yield this.tick(n),yield r(t,n)
|
|
435
|
+
;if(!this.hold(e))throw new Error("Unexpected behavior")
|
|
436
|
+
}),t,n)}}function Y(e){
|
|
437
|
+
if(null==e||e<=0)throw new Error("Iterations = ".concat(e))
|
|
438
|
+
;e--;var t=new Promise(function(t){
|
|
439
|
+
setTimeout(function(){t(e)},1)})
|
|
440
|
+
;return e<=0?t:t.then(Y)}function Z(e){var t=e/1e3
|
|
441
|
+
;if(t<60)return"".concat(t.toFixed(1),"s")
|
|
442
|
+
;var n=t/60
|
|
450
443
|
;return n<60?"".concat(n.toFixed(1),"m"):"".concat((n/60).toFixed(1),"h")
|
|
451
|
-
}function
|
|
452
|
-
;return void 0===n&&(n={}),
|
|
453
|
-
|
|
454
|
-
return
|
|
455
|
-
|
|
456
|
-
return
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
null
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
return
|
|
474
|
-
;case 4:
|
|
475
|
-
return
|
|
476
|
-
|
|
444
|
+
}function ee(e,t,n){var r,i,o,v,g,_,y,p,m
|
|
445
|
+
;return void 0===n&&(n={}),l(this,void 0,void 0,function(){
|
|
446
|
+
var x,w,j,E,S,A,P,k,I,T,O,L,F,V,D,M,C,R,q,B,J,N,$,G,U,W,Q,K,H,ee,te,ne,re,ie,se,oe,le,ae,ce,ue,he,fe,de,ve,ge=this
|
|
447
|
+
;return a(this,function(_e){switch(_e.label){
|
|
448
|
+
case 0:
|
|
449
|
+
return x=n.saveErrorVariants,w=null!==(r=null==x?void 0:x.retriesPerVariant)&&void 0!==r?r:1,
|
|
450
|
+
j=null==x?void 0:x.useToFindBestError,
|
|
451
|
+
E=new Date,S=x?s.resolve(x.dir,null!==(o=null===(i=x.getFilePath)||void 0===i?void 0:i.call(x,{
|
|
452
|
+
sessionDate:E}))&&void 0!==o?o:f({sessionDate:E
|
|
453
|
+
})):null,A=null!==(v=n.GC_Iterations)&&void 0!==v?v:1e6,
|
|
454
|
+
P=null!==(g=n.GC_IterationsAsync)&&void 0!==g?g:1e4,
|
|
455
|
+
k=null!==(_=n.GC_Interval)&&void 0!==_?_:1e3,
|
|
456
|
+
I=null!==(y=n.logInterval)&&void 0!==y?y:5e3,
|
|
457
|
+
T=null===(p=n.logCompleted)||void 0===p||p,
|
|
458
|
+
O=n.abortSignal,L=n.findBestError,F=null!==(m=null==L?void 0:L.cycles)&&void 0!==m?m:1,
|
|
459
|
+
V=null==L?void 0:L.dontThrowIfError,
|
|
460
|
+
D=n.limitTime,M=!0===n.parallel?Math.pow(2,31):!n.parallel||n.parallel<=0?1:n.parallel,
|
|
461
|
+
null!=n.limitVariantsCount&&t.addLimit({
|
|
462
|
+
index:n.limitVariantsCount}),x?[4,u(x.dir)]:[3,15]
|
|
463
|
+
;case 1:C=_e.sent(),_e.label=2;case 2:
|
|
464
|
+
_e.trys.push([2,13,14,15]),R=c(C),q=R.next(),
|
|
465
|
+
_e.label=3;case 3:
|
|
466
|
+
return q.done?[3,12]:[4,h(q.value,x.jsonToArgs)]
|
|
467
|
+
;case 4:ue=_e.sent(),B=0,_e.label=5;case 5:
|
|
468
|
+
if(!(B<w))return[3,11];_e.label=6;case 6:
|
|
469
|
+
return _e.trys.push([6,9,,10]),b(J=e(ue,-1,null))?[4,J]:[3,8]
|
|
470
|
+
;case 7:_e.sent(),_e.label=8;case 8:return[3,10]
|
|
471
|
+
;case 9:if(N=_e.sent(),j&&L)return t.addLimit({
|
|
472
|
+
args:ue,error:N}),[3,11];throw N;case 10:
|
|
473
|
+
return B++,[3,5];case 11:return q=R.next(),[3,3]
|
|
474
|
+
;case 12:return[3,15];case 13:
|
|
475
|
+
return $=_e.sent(),de={error:$},[3,15];case 14:
|
|
476
|
+
try{q&&!q.done&&(ve=R.return)&&ve.call(R)}finally{
|
|
477
|
+
if(de)throw de.error}return[7];case 15:
|
|
478
|
+
G=null,U=null,W=Date.now(),Q=W,K=new z,H=function(...e){
|
|
479
|
+
let t,n;function r(e){t.abort(e)}
|
|
480
|
+
for(let i=0;i<e.length;i++){const s=e[i];if(s){
|
|
481
|
+
if(s.aborted)return s
|
|
482
|
+
;n?(t||(t=new z,n.subscribe(r)),s.subscribe(r)):n=s
|
|
483
|
+
}}return t?t.signal:n||(new z).signal
|
|
484
|
+
}(O,K.signal),ee=H,te=!1,ne=0,re=0,ie=Date.now(),
|
|
485
|
+
se=ie,oe=ne,le=re,ae=M<=1?null:new X(M),
|
|
486
|
+
ce=!1,t.start(),_e.label=16;case 16:
|
|
487
|
+
if(!(t.cycleIndex<F)||ce)return[3,20]
|
|
488
|
+
;ue=void 0,he=function(){
|
|
489
|
+
var n,r,i,s,o,c,u,h,f,v,g,_,y,p,m,w
|
|
490
|
+
;return a(this,function(j){switch(j.label){case 0:
|
|
491
|
+
return n=t.index,r=ue,i=(I||k||D)&&Date.now(),
|
|
492
|
+
D&&i-W>=D?(ce=!0,[2,"break"]):(I&&i-ie>=I&&(s="",
|
|
493
|
+
o=i-Q,c=i-W,L?(s+="cycle: ".concat(t.cycleIndex,", variant: ").concat(t.index),
|
|
494
|
+
null!=(u=t.count)&&null!=G&&G<u&&(u=G),
|
|
495
|
+
null!=u&&t.index>0?(h=void 0,null!=U&&null!=G&&t.index<G&&o<U?(f=U-o,
|
|
496
|
+
v=G-t.index,
|
|
497
|
+
g=f/v,_=(u-t.index)*g,h=o+_):h=o*u/t.index,s+="/".concat(u," (").concat(Z(o),"/").concat(Z(h),")")):s+=" (".concat(Z(o),")")):s+="variant: ".concat(t.index," (").concat(Z(o),")"),
|
|
498
|
+
s+=", total: ".concat(ne," (").concat(Z(c),")"),
|
|
499
|
+
console.log(s),ie=i),A&&ne-oe>=A||P&&re-le>=P||k&&i-se>=k?(oe=ne,
|
|
500
|
+
le=re,se=i,[4,Y(1)]):[3,2]);case 1:
|
|
501
|
+
j.sent(),j.label=2;case 2:
|
|
502
|
+
if(null==O?void 0:O.aborted)return[2,"continue"]
|
|
503
|
+
;if(ae&&!H.aborted)return[3,10];j.label=3;case 3:
|
|
504
|
+
return j.trys.push([3,6,,9]),b(y=e(r,n,H))?[4,y]:[3,5]
|
|
505
|
+
;case 4:y=j.sent(),j.label=5;case 5:
|
|
506
|
+
return y?(p=y.iterationsAsync,m=y.iterationsSync,
|
|
507
|
+
re+=p,ne+=m+p,[3,9]):(te=!0,K.abort(),
|
|
477
508
|
[2,"continue"]);case 6:
|
|
478
|
-
return
|
|
479
|
-
;case 7:
|
|
480
|
-
;return
|
|
481
|
-
|
|
482
|
-
return
|
|
483
|
-
;case 11:
|
|
484
|
-
|
|
485
|
-
;return
|
|
486
|
-
return
|
|
487
|
-
(null==
|
|
488
|
-
;case 1:
|
|
489
|
-
return
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
;
|
|
504
|
-
|
|
505
|
-
;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
;return
|
|
516
|
-
|
|
517
|
-
var
|
|
518
|
-
;return
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
;if(
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
;
|
|
533
|
-
}(
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
e.
|
|
554
|
-
|
|
555
|
-
;
|
|
556
|
-
|
|
557
|
-
}(
|
|
558
|
-
|
|
559
|
-
;
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
;
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
},
|
|
568
|
-
|
|
509
|
+
return w=j.sent(),S?[4,d(r,S,x.argsToJson)]:[3,8]
|
|
510
|
+
;case 7:j.sent(),j.label=8;case 8:if(!L)throw w
|
|
511
|
+
;return t.addLimit({error:w}),te=!1,[3,9];case 9:
|
|
512
|
+
return[3,13];case 10:
|
|
513
|
+
return ae.hold(1)?[3,12]:[4,ae.holdWait(1)]
|
|
514
|
+
;case 11:j.sent(),j.label=12;case 12:
|
|
515
|
+
l(ge,void 0,void 0,function(){var i,s,o,l
|
|
516
|
+
;return a(this,function(a){switch(a.label){case 0:
|
|
517
|
+
return a.trys.push([0,3,6,7]),
|
|
518
|
+
(null==H?void 0:H.aborted)?[2]:b(i=e(r,n,H))?[4,i]:[3,2]
|
|
519
|
+
;case 1:i=a.sent(),a.label=2;case 2:
|
|
520
|
+
return i?(s=i.iterationsAsync,o=i.iterationsSync,
|
|
521
|
+
re+=s,ne+=o+s,[3,7]):(te=!0,K.abort(),[2]);case 3:
|
|
522
|
+
return l=a.sent(),S?[4,d(r,S,x.argsToJson)]:[3,5]
|
|
523
|
+
;case 4:a.sent(),a.label=5;case 5:if(!L)throw l
|
|
524
|
+
;return t.addLimit({error:l}),te=!1,[3,7];case 6:
|
|
525
|
+
return ae.release(1),[7];case 7:return[2]}})
|
|
526
|
+
}),j.label=13;case 13:return[2]}})},_e.label=17
|
|
527
|
+
;case 17:
|
|
528
|
+
return(null==O?void 0:O.aborted)||!te&&null==(ue=t.next())?[3,19]:[5,he()]
|
|
529
|
+
;case 18:return"break"===_e.sent()?[3,19]:[3,17]
|
|
530
|
+
;case 19:
|
|
531
|
+
return G=t.count,U=Date.now()-Q,Q=Date.now(),t.start(),[3,16]
|
|
532
|
+
;case 20:return ae?[4,ae.holdWait(M)]:[3,22]
|
|
533
|
+
;case 21:_e.sent(),ae.release(M),_e.label=22
|
|
534
|
+
;case 22:
|
|
535
|
+
if(null==ee?void 0:ee.aborted)throw ee.reason
|
|
536
|
+
;return T&&console.log("[test-variants] variants: ".concat(t.index,", iterations: ").concat(ne,", async: ").concat(re)),
|
|
537
|
+
[4,Y(1)];case 23:if(_e.sent(),(fe=t.limit?{
|
|
538
|
+
error:t.limit.error,args:t.limit.args,
|
|
539
|
+
index:t.count}:null)&&!V)throw fe.error;return[2,{
|
|
540
|
+
iterations:ne,bestError:fe}]}})})}
|
|
541
|
+
function te(e,t,n){if(n){
|
|
542
|
+
for(var r=e.length-1;r>=0;r--)if(n(e[r],t))return r
|
|
543
|
+
;return-1}
|
|
544
|
+
for(r=e.length-1;r>=0;r--)if(e[r]===t)return r
|
|
545
|
+
;return-1}function ne(e,t,n){var r=e[n]
|
|
546
|
+
;return"function"==typeof r?r(t):r}
|
|
547
|
+
function re(e,t){
|
|
548
|
+
var n=e.variants[t].length,r=e.argLimits[t]
|
|
549
|
+
;return null==r?n:r<n?r:n}function ie(e,t,n){
|
|
550
|
+
var r,i,s=Object.keys(e).filter(function(e){
|
|
551
|
+
return"seed"!==e});if(s.length!==n)return!1;try{
|
|
552
|
+
for(var o=c(s),l=o.next();!l.done;l=o.next()){
|
|
553
|
+
var a=l.value;if(!t.has(a))return!1}}catch(e){r={
|
|
554
|
+
error:e}}finally{try{
|
|
555
|
+
l&&!l.done&&(i=o.return)&&i.call(o)}finally{
|
|
556
|
+
if(r)throw r.error}}return!0}
|
|
557
|
+
function se(e,t,n,r,i){for(var s=0;s<r;s++){
|
|
558
|
+
var o=t[s]
|
|
559
|
+
;if("function"!=typeof o)if(te(o,e[n[s]],i)<0)return!1
|
|
560
|
+
}return!0}function oe(e,t,n,r,i){
|
|
561
|
+
for(var s=!1,o=0;o<r;o++){
|
|
562
|
+
var l=e.indexes[o],a=t[n[o]],c=te(e.variants[o],a,i)
|
|
563
|
+
;if(!(c<0)){if(s=!0,l<c)return!1;if(l>c)return!0}}
|
|
564
|
+
return s}function le(e,t,n,r,i,s,o){
|
|
565
|
+
if(o)for(var l=0;l<i;l++){
|
|
566
|
+
var a=r[l],c=t[a],u=e.variants[l].length>0?e.variants[l]:ne(n,e.args,l),h=te(u,c,s)
|
|
567
|
+
;if(!(h<=0)){if("function"==typeof o)if(!o({
|
|
568
|
+
name:a,valueIndex:h,values:u,
|
|
569
|
+
maxValueIndex:e.argLimits[l]}))continue
|
|
570
|
+
;var f=e.argLimits[l]
|
|
571
|
+
;(null==f||h<f)&&(e.argLimits[l]=h)}}}
|
|
572
|
+
function ae(e){
|
|
573
|
+
for(var t=e.argsTemplates,n=e.getSeed,r=e.repeatsPerVariant,i=e.equals,s=e.limitArgOnError,l=null!=r?r:1,a=Object.keys(t),c=Object.values(t),u=a.length,h=new Set(a),f=[],d=[],v=[],g=0;g<u;g++)f[g]=-1,
|
|
574
|
+
d[g]=[],v[g]=null;var _={args:{},indexes:f,
|
|
575
|
+
variants:d,argLimits:v,index:-1,cycleIndex:-1,
|
|
576
|
+
repeatIndex:0,count:null,limit:null,started:!1,
|
|
577
|
+
currentArgs:null,pendingLimits:[]},y={get index(){
|
|
578
|
+
return _.index},get cycleIndex(){
|
|
579
|
+
return _.cycleIndex},get count(){return _.count},
|
|
580
|
+
get limit(){return _.limit},addLimit:function(e){
|
|
581
|
+
var t=void 0!==(null==e?void 0:e.args)&&null!==e.args,n=null!=(null==e?void 0:e.index)
|
|
582
|
+
;if(t||n)if(!n||t)if(!t||n){if(t&&n){
|
|
583
|
+
var r=null==_.count||e.index<_.count
|
|
584
|
+
;if(r&&(_.count=e.index),!ie(e.args,h,u))return
|
|
585
|
+
;if(!se(e.args,c,a,u,i))return
|
|
586
|
+
;r&&(_.limit=void 0!==e.error?{args:e.args,
|
|
587
|
+
error:e.error}:{args:e.args
|
|
588
|
+
},le(_,e.args,c,a,u,i,s))}}else{
|
|
589
|
+
if(!ie(e.args,h,u))return
|
|
590
|
+
;if(!se(e.args,c,a,u,i))return
|
|
591
|
+
;var o=void 0!==e.error?{args:e.args,error:e.error
|
|
592
|
+
}:{args:e.args};_.pendingLimits.push(o)
|
|
593
|
+
}else(null==_.count||e.index<_.count)&&(_.count=e.index);else{
|
|
594
|
+
if(_.index<0)throw new Error("[testVariantsIterator] addLimit() requires at least one next() call")
|
|
595
|
+
;(null==_.count||_.index<_.count)&&(_.count=_.index,
|
|
596
|
+
_.limit=void 0!==(null==e?void 0:e.error)?{
|
|
597
|
+
args:_.currentArgs,error:e.error}:{
|
|
598
|
+
args:_.currentArgs},le(_,_.args,c,a,u,i,s))}},
|
|
599
|
+
start:function(){_.cycleIndex++,function(e,t,n){
|
|
600
|
+
e.index=-1,e.repeatIndex=0
|
|
601
|
+
;for(var r=0;r<n;r++)e.indexes[r]=-1,e.variants[r]=[]
|
|
602
|
+
;n>0&&(e.variants[0]=ne(t,e.args,0))
|
|
603
|
+
}(_,c,u),_.started=!0},next:function(){
|
|
604
|
+
if(!_.started)throw new Error("[testVariantsIterator] start() must be called before next()")
|
|
605
|
+
;if(_.index>=0&&_.repeatIndex+1<l&&(null==_.count||_.index<_.count)){
|
|
606
|
+
if(_.repeatIndex++,n){var e=n({
|
|
607
|
+
variantIndex:_.index,cycleIndex:_.cycleIndex,
|
|
608
|
+
repeatIndex:_.repeatIndex})
|
|
609
|
+
;_.currentArgs=o(o({},_.args),{seed:e})
|
|
610
|
+
}else _.currentArgs=o({},_.args)
|
|
611
|
+
;return _.currentArgs}
|
|
612
|
+
if(_.repeatIndex=0,!function(e,t,n,r){
|
|
613
|
+
for(var i,s=r-1;s>=0;s--){var o=e.indexes[s]+1
|
|
614
|
+
;if(o<re(e,s)){var l=n[s],a=e.variants[s][o]
|
|
615
|
+
;for(e.indexes[s]=o,e.args[l]=a,s++;s<r;s++){
|
|
616
|
+
var c=ne(t,e.args,s),u=null!==(i=e.argLimits[s])&&void 0!==i?i:c.length
|
|
617
|
+
;if(0===c.length||u<=0)break
|
|
618
|
+
;e.indexes[s]=0,e.variants[s]=c;var h=n[s],f=c[0]
|
|
619
|
+
;e.args[h]=f}if(s>=r)return!0}}return!1
|
|
620
|
+
}(_,c,a,u))return null==_.count&&(_.count=_.index+1),
|
|
621
|
+
null
|
|
622
|
+
;if(_.index++,_.pendingLimits.length>0&&function(e,t,n,r,i,s){
|
|
623
|
+
for(var o=!1,l=e.pendingLimits.length-1;l>=0;l--){
|
|
624
|
+
var a=e.pendingLimits[l]
|
|
625
|
+
;oe(e,a.args,n,r,i)&&((null==e.count||e.index<e.count)&&(e.count=e.index,
|
|
626
|
+
e.limit=void 0!==a.error?{args:a.args,
|
|
627
|
+
error:a.error}:{args:a.args
|
|
628
|
+
},le(e,a.args,t,n,r,i,s),o=!0),e.pendingLimits.splice(l,1))
|
|
629
|
+
}
|
|
630
|
+
}(_,c,a,u,i,s),null!=_.count&&_.index>=_.count)return null
|
|
631
|
+
;if(n){e=n({variantIndex:_.index,
|
|
632
|
+
cycleIndex:_.cycleIndex,repeatIndex:_.repeatIndex
|
|
633
|
+
});_.currentArgs=o(o({},_.args),{seed:e})
|
|
634
|
+
}else _.currentArgs=o({},_.args)
|
|
635
|
+
;return _.currentArgs}};return y}
|
|
636
|
+
e.createTestVariants=function(e){
|
|
637
|
+
return function(t){return function(n){var r,i,s,o
|
|
638
|
+
;return l(this,void 0,void 0,function(){var l,c
|
|
639
|
+
;return a(this,function(a){return l=L(e,{
|
|
640
|
+
onError:null==n?void 0:n.onError}),c=ae({
|
|
641
|
+
argsTemplates:t,
|
|
642
|
+
getSeed:null===(r=null==n?void 0:n.findBestError)||void 0===r?void 0:r.getSeed,
|
|
643
|
+
repeatsPerVariant:null===(i=null==n?void 0:n.findBestError)||void 0===i?void 0:i.repeatsPerVariant,
|
|
644
|
+
equals:null===(s=null==n?void 0:n.findBestError)||void 0===s?void 0:s.equals,
|
|
645
|
+
limitArgOnError:null===(o=null==n?void 0:n.findBestError)||void 0===o?void 0:o.limitArgOnError
|
|
646
|
+
}),[2,ee(l,c,n)]})})}}
|
|
647
|
+
},e.generateErrorVariantFilePath=f,e.testVariantsIterator=ae,
|
|
648
|
+
Object.defineProperty(e,"__esModule",{value:!0})
|
|
649
|
+
}({},fs,path);
|