stormcloud-video-player 0.3.14 → 0.3.16
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/stormcloud-vp.min.js +9 -9
- package/lib/index.cjs +8282 -6531
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8112 -6495
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +5575 -3981
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/players/FilePlayer.cjs +556 -225
- package/lib/players/FilePlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +5845 -4163
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +6142 -4371
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +954 -699
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/sdk/ima.cjs +1034 -809
- package/lib/sdk/ima.cjs.map +1 -1
- package/lib/sdk/ima.d.cts +1 -1
- package/lib/{types-t9jEJXZy.d.cts → types-CryTJVCC.d.cts} +1 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +6992 -5561
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/browserCompat.cjs +241 -194
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/polyfills.cjs +379 -214
- package/lib/utils/polyfills.cjs.map +1 -1
- package/lib/utils/tracking.cjs +559 -257
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/package.json +2 -1
package/lib/utils/polyfills.cjs
CHANGED
|
@@ -1,253 +1,418 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
10
|
+
function _class_call_check(instance, Constructor) {
|
|
11
|
+
if (!(instance instanceof Constructor)) {
|
|
12
|
+
throw new TypeError("Cannot call a class as a function");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _defineProperties(target, props) {
|
|
16
|
+
for(var i = 0; i < props.length; i++){
|
|
17
|
+
var descriptor = props[i];
|
|
18
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
19
|
+
descriptor.configurable = true;
|
|
20
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
21
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
25
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
26
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
27
|
+
return Constructor;
|
|
28
|
+
}
|
|
29
|
+
function _instanceof(left, right) {
|
|
30
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
31
|
+
return !!right[Symbol.hasInstance](left);
|
|
32
|
+
} else {
|
|
33
|
+
return left instanceof right;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function _iterable_to_array_limit(arr, i) {
|
|
37
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
38
|
+
if (_i == null) return;
|
|
39
|
+
var _arr = [];
|
|
40
|
+
var _n = true;
|
|
41
|
+
var _d = false;
|
|
42
|
+
var _s, _e;
|
|
43
|
+
try {
|
|
44
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
45
|
+
_arr.push(_s.value);
|
|
46
|
+
if (i && _arr.length === i) break;
|
|
47
|
+
}
|
|
48
|
+
} catch (err) {
|
|
49
|
+
_d = true;
|
|
50
|
+
_e = err;
|
|
51
|
+
} finally{
|
|
52
|
+
try {
|
|
53
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
54
|
+
} finally{
|
|
55
|
+
if (_d) throw _e;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return _arr;
|
|
59
|
+
}
|
|
60
|
+
function _non_iterable_rest() {
|
|
61
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
62
|
+
}
|
|
63
|
+
function _sliced_to_array(arr, i) {
|
|
64
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
65
|
+
}
|
|
66
|
+
function _type_of(obj) {
|
|
67
|
+
"@swc/helpers - typeof";
|
|
68
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
69
|
+
}
|
|
70
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
71
|
+
if (!o) return;
|
|
72
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
73
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
74
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
75
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
76
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
77
|
+
}
|
|
2
78
|
var __defProp = Object.defineProperty;
|
|
3
79
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
80
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
81
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all)
|
|
7
|
-
|
|
8
|
-
|
|
82
|
+
var __export = function(target, all) {
|
|
83
|
+
for(var name in all)__defProp(target, name, {
|
|
84
|
+
get: all[name],
|
|
85
|
+
enumerable: true
|
|
86
|
+
});
|
|
9
87
|
};
|
|
10
|
-
var __copyProps = (to, from, except, desc)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
88
|
+
var __copyProps = function(to, from, except, desc) {
|
|
89
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
90
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
91
|
+
try {
|
|
92
|
+
var _loop = function() {
|
|
93
|
+
var key = _step.value;
|
|
94
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
95
|
+
get: function() {
|
|
96
|
+
return from[key];
|
|
97
|
+
},
|
|
98
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
102
|
+
} catch (err) {
|
|
103
|
+
_didIteratorError = true;
|
|
104
|
+
_iteratorError = err;
|
|
105
|
+
} finally{
|
|
106
|
+
try {
|
|
107
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
108
|
+
_iterator.return();
|
|
109
|
+
}
|
|
110
|
+
} finally{
|
|
111
|
+
if (_didIteratorError) {
|
|
112
|
+
throw _iteratorError;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return to;
|
|
118
|
+
};
|
|
119
|
+
var __toCommonJS = function(mod) {
|
|
120
|
+
return __copyProps(__defProp({}, "__esModule", {
|
|
121
|
+
value: true
|
|
122
|
+
}), mod);
|
|
17
123
|
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
124
|
// src/utils/polyfills.ts
|
|
21
125
|
var polyfills_exports = {};
|
|
22
126
|
__export(polyfills_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
127
|
+
initializePolyfills: function() {
|
|
128
|
+
return initializePolyfills;
|
|
129
|
+
},
|
|
130
|
+
polyfillArrayFrom: function() {
|
|
131
|
+
return polyfillArrayFrom;
|
|
132
|
+
},
|
|
133
|
+
polyfillObjectAssign: function() {
|
|
134
|
+
return polyfillObjectAssign;
|
|
135
|
+
},
|
|
136
|
+
polyfillPromiseFinally: function() {
|
|
137
|
+
return polyfillPromiseFinally;
|
|
138
|
+
},
|
|
139
|
+
polyfillStringEndsWith: function() {
|
|
140
|
+
return polyfillStringEndsWith;
|
|
141
|
+
},
|
|
142
|
+
polyfillStringIncludes: function() {
|
|
143
|
+
return polyfillStringIncludes;
|
|
144
|
+
},
|
|
145
|
+
polyfillStringStartsWith: function() {
|
|
146
|
+
return polyfillStringStartsWith;
|
|
147
|
+
},
|
|
148
|
+
polyfillTextEncoder: function() {
|
|
149
|
+
return polyfillTextEncoder;
|
|
150
|
+
},
|
|
151
|
+
polyfillURLSearchParams: function() {
|
|
152
|
+
return polyfillURLSearchParams;
|
|
153
|
+
}
|
|
32
154
|
});
|
|
33
155
|
module.exports = __toCommonJS(polyfills_exports);
|
|
34
156
|
function polyfillURLSearchParams() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
class URLSearchParamsPolyfill {
|
|
39
|
-
constructor(init) {
|
|
40
|
-
this.params = /* @__PURE__ */ new Map();
|
|
41
|
-
if (typeof init === "string") {
|
|
42
|
-
this.parseQueryString(init);
|
|
43
|
-
} else if (init instanceof URLSearchParamsPolyfill) {
|
|
44
|
-
init.forEach((value, key) => {
|
|
45
|
-
this.append(key, value);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
157
|
+
if (typeof URLSearchParams !== "undefined") {
|
|
158
|
+
return;
|
|
48
159
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
160
|
+
var URLSearchParamsPolyfill = /*#__PURE__*/ function() {
|
|
161
|
+
function URLSearchParamsPolyfill(init) {
|
|
162
|
+
var _this = this;
|
|
163
|
+
_class_call_check(this, URLSearchParamsPolyfill);
|
|
164
|
+
this.params = /* @__PURE__ */ new Map();
|
|
165
|
+
if (typeof init === "string") {
|
|
166
|
+
this.parseQueryString(init);
|
|
167
|
+
} else if (_instanceof(init, URLSearchParamsPolyfill)) {
|
|
168
|
+
init.forEach(function(value, key) {
|
|
169
|
+
_this.append(key, value);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
58
172
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
173
|
+
_create_class(URLSearchParamsPolyfill, [
|
|
174
|
+
{
|
|
175
|
+
key: "parseQueryString",
|
|
176
|
+
value: function parseQueryString(query) {
|
|
177
|
+
var _this = this;
|
|
178
|
+
var cleanQuery = query.startsWith("?") ? query.slice(1) : query;
|
|
179
|
+
if (!cleanQuery) return;
|
|
180
|
+
cleanQuery.split("&").forEach(function(param) {
|
|
181
|
+
var _param_split = _sliced_to_array(param.split("="), 2), key = _param_split[0], value = _param_split[1];
|
|
182
|
+
if (key) {
|
|
183
|
+
var decodedKey = _this.safeDecodeURIComponent(key);
|
|
184
|
+
var decodedValue = value ? _this.safeDecodeURIComponent(value) : "";
|
|
185
|
+
_this.append(decodedKey, decodedValue);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
key: "safeDecodeURIComponent",
|
|
192
|
+
value: function safeDecodeURIComponent(str) {
|
|
193
|
+
try {
|
|
194
|
+
return decodeURIComponent(str.replace(/\+/g, " "));
|
|
195
|
+
} catch (e) {
|
|
196
|
+
return str;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
key: "append",
|
|
202
|
+
value: function append(name, value) {
|
|
203
|
+
var values = this.params.get(name) || [];
|
|
204
|
+
values.push(String(value));
|
|
205
|
+
this.params.set(name, values);
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
key: "delete",
|
|
210
|
+
value: function _delete(name) {
|
|
211
|
+
this.params.delete(name);
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
key: "get",
|
|
216
|
+
value: function get(name) {
|
|
217
|
+
var values = this.params.get(name);
|
|
218
|
+
return values && values.length > 0 && values[0] !== void 0 ? values[0] : null;
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
key: "getAll",
|
|
223
|
+
value: function getAll(name) {
|
|
224
|
+
return this.params.get(name) || [];
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
key: "has",
|
|
229
|
+
value: function has(name) {
|
|
230
|
+
return this.params.has(name);
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
key: "set",
|
|
235
|
+
value: function set(name, value) {
|
|
236
|
+
this.params.set(name, [
|
|
237
|
+
String(value)
|
|
238
|
+
]);
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
key: "forEach",
|
|
243
|
+
value: function forEach(callback) {
|
|
244
|
+
var _this = this;
|
|
245
|
+
this.params.forEach(function(values, key) {
|
|
246
|
+
values.forEach(function(value) {
|
|
247
|
+
callback(value, key, _this);
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
key: "toString",
|
|
254
|
+
value: function toString() {
|
|
255
|
+
var parts = [];
|
|
256
|
+
this.params.forEach(function(values, key) {
|
|
257
|
+
values.forEach(function(value) {
|
|
258
|
+
parts.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value)));
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
return parts.join("&");
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
]);
|
|
265
|
+
return URLSearchParamsPolyfill;
|
|
266
|
+
}();
|
|
267
|
+
window.URLSearchParams = URLSearchParamsPolyfill;
|
|
107
268
|
}
|
|
108
269
|
function polyfillTextEncoder() {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
class TextEncoderPolyfill {
|
|
113
|
-
constructor() {
|
|
114
|
-
this.encoding = "utf-8";
|
|
270
|
+
if (typeof TextEncoder !== "undefined") {
|
|
271
|
+
return;
|
|
115
272
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (charcode < 128) {
|
|
121
|
-
utf8.push(charcode);
|
|
122
|
-
} else if (charcode < 2048) {
|
|
123
|
-
utf8.push(192 | charcode >> 6, 128 | charcode & 63);
|
|
124
|
-
} else if (charcode < 55296 || charcode >= 57344) {
|
|
125
|
-
utf8.push(
|
|
126
|
-
224 | charcode >> 12,
|
|
127
|
-
128 | charcode >> 6 & 63,
|
|
128
|
-
128 | charcode & 63
|
|
129
|
-
);
|
|
130
|
-
} else {
|
|
131
|
-
i++;
|
|
132
|
-
charcode = 65536 + ((charcode & 1023) << 10 | str.charCodeAt(i) & 1023);
|
|
133
|
-
utf8.push(
|
|
134
|
-
240 | charcode >> 18,
|
|
135
|
-
128 | charcode >> 12 & 63,
|
|
136
|
-
128 | charcode >> 6 & 63,
|
|
137
|
-
128 | charcode & 63
|
|
138
|
-
);
|
|
273
|
+
var TextEncoderPolyfill = /*#__PURE__*/ function() {
|
|
274
|
+
function TextEncoderPolyfill() {
|
|
275
|
+
_class_call_check(this, TextEncoderPolyfill);
|
|
276
|
+
this.encoding = "utf-8";
|
|
139
277
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
278
|
+
_create_class(TextEncoderPolyfill, [
|
|
279
|
+
{
|
|
280
|
+
key: "encode",
|
|
281
|
+
value: function encode(str) {
|
|
282
|
+
var utf8 = [];
|
|
283
|
+
for(var i = 0; i < str.length; i++){
|
|
284
|
+
var charcode = str.charCodeAt(i);
|
|
285
|
+
if (charcode < 128) {
|
|
286
|
+
utf8.push(charcode);
|
|
287
|
+
} else if (charcode < 2048) {
|
|
288
|
+
utf8.push(192 | charcode >> 6, 128 | charcode & 63);
|
|
289
|
+
} else if (charcode < 55296 || charcode >= 57344) {
|
|
290
|
+
utf8.push(224 | charcode >> 12, 128 | charcode >> 6 & 63, 128 | charcode & 63);
|
|
291
|
+
} else {
|
|
292
|
+
i++;
|
|
293
|
+
charcode = 65536 + ((charcode & 1023) << 10 | str.charCodeAt(i) & 1023);
|
|
294
|
+
utf8.push(240 | charcode >> 18, 128 | charcode >> 12 & 63, 128 | charcode >> 6 & 63, 128 | charcode & 63);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return new Uint8Array(utf8);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
]);
|
|
301
|
+
return TextEncoderPolyfill;
|
|
302
|
+
}();
|
|
303
|
+
window.TextEncoder = TextEncoderPolyfill;
|
|
145
304
|
}
|
|
146
305
|
function polyfillPromiseFinally() {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
306
|
+
if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
|
|
307
|
+
Promise.prototype.finally = function(callback) {
|
|
308
|
+
var constructor = this.constructor;
|
|
309
|
+
return this.then(function(value) {
|
|
310
|
+
return constructor.resolve(callback()).then(function() {
|
|
311
|
+
return value;
|
|
312
|
+
});
|
|
313
|
+
}, function(reason) {
|
|
314
|
+
return constructor.resolve(callback()).then(function() {
|
|
315
|
+
throw reason;
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
}
|
|
158
320
|
}
|
|
159
321
|
function polyfillObjectAssign() {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
const to = Object(target);
|
|
166
|
-
for (let i = 0; i < sources.length; i++) {
|
|
167
|
-
const nextSource = sources[i];
|
|
168
|
-
if (nextSource != null) {
|
|
169
|
-
for (const nextKey in nextSource) {
|
|
170
|
-
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
|
171
|
-
to[nextKey] = nextSource[nextKey];
|
|
322
|
+
if (typeof Object.assign !== "function") {
|
|
323
|
+
Object.assign = function(target) {
|
|
324
|
+
for(var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
325
|
+
sources[_key - 1] = arguments[_key];
|
|
172
326
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
327
|
+
if (target == null) {
|
|
328
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
329
|
+
}
|
|
330
|
+
var to = Object(target);
|
|
331
|
+
for(var i = 0; i < sources.length; i++){
|
|
332
|
+
var nextSource = sources[i];
|
|
333
|
+
if (nextSource != null) {
|
|
334
|
+
for(var nextKey in nextSource){
|
|
335
|
+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
|
336
|
+
to[nextKey] = nextSource[nextKey];
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return to;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
179
344
|
}
|
|
180
345
|
function polyfillArrayFrom() {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
346
|
+
if (!Array.from) {
|
|
347
|
+
Array.from = function(arrayLike, mapFn, thisArg) {
|
|
348
|
+
var items = Object(arrayLike);
|
|
349
|
+
if (arrayLike == null) {
|
|
350
|
+
throw new TypeError("Array.from requires an array-like object");
|
|
351
|
+
}
|
|
352
|
+
var len = items.length >>> 0;
|
|
353
|
+
var result = new Array(len);
|
|
354
|
+
for(var i = 0; i < len; i++){
|
|
355
|
+
if (mapFn) {
|
|
356
|
+
result[i] = mapFn.call(thisArg, items[i], i);
|
|
357
|
+
} else {
|
|
358
|
+
result[i] = items[i];
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return result;
|
|
362
|
+
};
|
|
363
|
+
}
|
|
199
364
|
}
|
|
200
365
|
function polyfillStringStartsWith() {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
366
|
+
if (!String.prototype.startsWith) {
|
|
367
|
+
String.prototype.startsWith = function(search, pos) {
|
|
368
|
+
pos = !pos || pos < 0 ? 0 : +pos;
|
|
369
|
+
return this.substring(pos, pos + search.length) === search;
|
|
370
|
+
};
|
|
371
|
+
}
|
|
207
372
|
}
|
|
208
373
|
function polyfillStringEndsWith() {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
374
|
+
if (!String.prototype.endsWith) {
|
|
375
|
+
String.prototype.endsWith = function(search, length) {
|
|
376
|
+
if (length === void 0 || length > this.length) {
|
|
377
|
+
length = this.length;
|
|
378
|
+
}
|
|
379
|
+
return this.substring(length - search.length, length) === search;
|
|
380
|
+
};
|
|
381
|
+
}
|
|
217
382
|
}
|
|
218
383
|
function polyfillStringIncludes() {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
384
|
+
if (!String.prototype.includes) {
|
|
385
|
+
String.prototype.includes = function(search, start) {
|
|
386
|
+
if (typeof start !== "number") {
|
|
387
|
+
start = 0;
|
|
388
|
+
}
|
|
389
|
+
if (start + search.length > this.length) {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
return this.indexOf(search, start) !== -1;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
230
395
|
}
|
|
231
396
|
function initializePolyfills() {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
397
|
+
polyfillObjectAssign();
|
|
398
|
+
polyfillArrayFrom();
|
|
399
|
+
polyfillStringStartsWith();
|
|
400
|
+
polyfillStringEndsWith();
|
|
401
|
+
polyfillStringIncludes();
|
|
402
|
+
polyfillURLSearchParams();
|
|
403
|
+
polyfillTextEncoder();
|
|
404
|
+
polyfillPromiseFinally();
|
|
240
405
|
}
|
|
241
406
|
// Annotate the CommonJS export names for ESM import in node:
|
|
242
407
|
0 && (module.exports = {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
408
|
+
initializePolyfills: initializePolyfills,
|
|
409
|
+
polyfillArrayFrom: polyfillArrayFrom,
|
|
410
|
+
polyfillObjectAssign: polyfillObjectAssign,
|
|
411
|
+
polyfillPromiseFinally: polyfillPromiseFinally,
|
|
412
|
+
polyfillStringEndsWith: polyfillStringEndsWith,
|
|
413
|
+
polyfillStringIncludes: polyfillStringIncludes,
|
|
414
|
+
polyfillStringStartsWith: polyfillStringStartsWith,
|
|
415
|
+
polyfillTextEncoder: polyfillTextEncoder,
|
|
416
|
+
polyfillURLSearchParams: polyfillURLSearchParams
|
|
252
417
|
});
|
|
253
418
|
//# sourceMappingURL=polyfills.cjs.map
|