native-fn 1.0.47 → 1.0.49

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 (37) hide show
  1. package/dist/native.cjs +150 -70
  2. package/dist/native.min.cjs +1 -1
  3. package/dist/native.min.mjs +1 -1
  4. package/dist/native.mjs +150 -70
  5. package/dist/native.umd.js +150 -70
  6. package/dist/native.umd.min.js +1 -1
  7. package/dist/plugin/app/index.cjs +170 -69
  8. package/dist/plugin/app/index.min.cjs +1 -1
  9. package/dist/plugin/app/index.min.mjs +1 -1
  10. package/dist/plugin/app/index.mjs +170 -69
  11. package/dist/plugin/app/index.umd.js +170 -69
  12. package/dist/plugin/app/index.umd.min.js +1 -1
  13. package/dist/plugin/app/src/types/platform.d.ts +3 -1
  14. package/dist/plugin/camera/index.cjs +149 -69
  15. package/dist/plugin/camera/index.min.cjs +1 -1
  16. package/dist/plugin/camera/index.min.mjs +1 -1
  17. package/dist/plugin/camera/index.mjs +149 -69
  18. package/dist/plugin/camera/index.umd.js +149 -69
  19. package/dist/plugin/camera/index.umd.min.js +1 -1
  20. package/dist/plugin/camera/src/types/platform.d.ts +3 -1
  21. package/dist/plugin/clipboard/src/types/platform.d.ts +3 -1
  22. package/dist/plugin/fullscreen/index.cjs +149 -69
  23. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  24. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  25. package/dist/plugin/fullscreen/index.mjs +149 -69
  26. package/dist/plugin/fullscreen/index.umd.js +149 -69
  27. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  28. package/dist/plugin/fullscreen/src/types/platform.d.ts +3 -1
  29. package/dist/plugin/theme/index.cjs +149 -69
  30. package/dist/plugin/theme/index.min.cjs +1 -1
  31. package/dist/plugin/theme/index.min.mjs +1 -1
  32. package/dist/plugin/theme/index.mjs +149 -69
  33. package/dist/plugin/theme/index.umd.js +149 -69
  34. package/dist/plugin/theme/index.umd.min.js +1 -1
  35. package/dist/plugin/theme/src/types/platform.d.ts +3 -1
  36. package/dist/src/types/platform.d.ts +3 -1
  37. package/package.json +1 -1
@@ -37,6 +37,7 @@ var Browsers;
37
37
  Browsers["IE"] = "IE";
38
38
  Browsers["SamsungInternet"] = "SamsungInternet";
39
39
  })(Browsers || (Browsers = {}));
40
+ var userAgent = typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' ? navigator.userAgent : '';
40
41
  var Platform = {
41
42
  device: Devices.Unknown,
42
43
  os: OS.Unknown,
@@ -46,12 +47,14 @@ var Platform = {
46
47
  browser: Browsers.Unknown,
47
48
  browserVersion: '',
48
49
  renderer: getRenderer(),
49
- userAgent: getUserAgent(),
50
- isWebview: false,
50
+ userAgent: userAgent,
51
51
  isMobile: false,
52
52
  isDesktop: false,
53
53
  isStandalone: false,
54
- isNodeJS: getIsNode(),
54
+ isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
55
+ isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
56
+ isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
57
+ isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
55
58
  };
56
59
  var OS_RESOLVER_MAP = [
57
60
  [/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
@@ -138,6 +141,137 @@ function resolveUnderscoreVersion(string) {
138
141
  return '';
139
142
  return string.replace(/_/g, '.');
140
143
  }
144
+ function resolveSemanticWindowsVersion(version, defaultValue) {
145
+ if (version.major === 10 && version.minor === 0 && version.build >= 22000)
146
+ return '11';
147
+ if (version.major === 10 && version.minor === 0 && version.build < 22000)
148
+ return '10';
149
+ if (version.major === 6 && version.minor === 3)
150
+ return '8.1';
151
+ if (version.major === 6 && version.minor === 2)
152
+ return '8';
153
+ if (version.major === 6 && version.minor === 1)
154
+ return '7';
155
+ if (version.major === 6 && version.minor === 0)
156
+ return 'Vista';
157
+ if (version.major === 5 && version.minor === 1)
158
+ return 'XP';
159
+ if (version.major === 5 && version.minor === 2)
160
+ return 'XP';
161
+ if (version.major === 5 && version.minor === 0)
162
+ return '2000';
163
+ if (version.major === 4 && version.minor === 90)
164
+ return 'ME';
165
+ if (version.major === 4 && version.minor === 0)
166
+ return 'NT 4.0';
167
+ if (version.major === 3 && version.minor === 51)
168
+ return 'NT 3.11';
169
+ return defaultValue;
170
+ }
171
+ function resolveSemanticDarwinVersion(version, defaultValue) {
172
+ if (version.major >= 24)
173
+ return '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
174
+ if (version.major === 23)
175
+ return '14.' + version.minor + '.' + version.build;
176
+ if (version.major === 22)
177
+ return '13.' + version.minor + '.' + version.build;
178
+ if (version.major === 21)
179
+ return '12.' + version.minor + '.' + version.build;
180
+ if (version.major === 20)
181
+ return '11.' + version.minor + '.' + version.build;
182
+ if (version.major === 19)
183
+ return '10.15.' + version.minor;
184
+ if (version.major === 18)
185
+ return '10.14.' + version.minor;
186
+ if (version.major === 17)
187
+ return '10.13.' + version.minor;
188
+ if (version.major === 16)
189
+ return '10.12.' + version.minor;
190
+ if (version.major === 15)
191
+ return '10.11.' + version.minor;
192
+ if (version.major === 14)
193
+ return '10.10.' + version.minor;
194
+ if (version.major === 13)
195
+ return '10.9.' + version.minor;
196
+ if (version.major >= 5 && version.major <= 12)
197
+ return '10.' + (version.major - 4) + '.' + version.minor;
198
+ return defaultValue;
199
+ }
200
+ function resolveSemanticAndroidVersion(version, defaultValue) {
201
+ if (version.major >= 36)
202
+ return '16';
203
+ if (version.major === 35)
204
+ return '15';
205
+ if (version.major === 34)
206
+ return '14';
207
+ if (version.major === 33)
208
+ return '13';
209
+ if (version.major === 32)
210
+ return '12.1';
211
+ if (version.major === 31)
212
+ return '12';
213
+ if (version.major === 30)
214
+ return '11';
215
+ if (version.major === 29)
216
+ return '10';
217
+ if (version.major === 28)
218
+ return '9';
219
+ if (version.major === 27)
220
+ return '8.1';
221
+ if (version.major === 26)
222
+ return '8.0';
223
+ if (version.major === 25)
224
+ return '7.1';
225
+ if (version.major === 24)
226
+ return '7.0';
227
+ if (version.major === 23)
228
+ return '6.0';
229
+ if (version.major === 22)
230
+ return '5.1';
231
+ if (version.major === 21)
232
+ return '5.0';
233
+ if (version.major === 20)
234
+ return '4.4W';
235
+ if (version.major === 19)
236
+ return '4.4';
237
+ if (version.major === 18)
238
+ return '4.3';
239
+ if (version.major === 17)
240
+ return '4.2';
241
+ if (version.major === 16)
242
+ return '4.1';
243
+ if (version.major === 15)
244
+ return '4.0.3';
245
+ if (version.major === 14)
246
+ return '4.0';
247
+ if (version.major === 13)
248
+ return '3.2';
249
+ if (version.major === 12)
250
+ return '3.1';
251
+ if (version.major === 11)
252
+ return '3.0';
253
+ if (version.major === 10)
254
+ return '2.3.3';
255
+ if (version.major === 9)
256
+ return '2.3';
257
+ if (version.major === 8)
258
+ return '2.2';
259
+ if (version.major === 7)
260
+ return '2.1';
261
+ if (version.major === 6)
262
+ return '2.0.1';
263
+ if (version.major === 5)
264
+ return '2.0';
265
+ if (version.major === 4)
266
+ return '1.6';
267
+ if (version.major === 3)
268
+ return '1.5';
269
+ if (version.major === 2)
270
+ return '1.1';
271
+ if (version.major === 1)
272
+ return '1.0';
273
+ return defaultValue;
274
+ }
141
275
  function resolveVersion(string, resolver) {
142
276
  if (typeof resolver === 'function')
143
277
  return resolver(string);
@@ -154,11 +288,6 @@ function normalizeBrand(entry) {
154
288
  return { brand: entry, version: '' };
155
289
  return { brand: entry.brand, version: entry.version };
156
290
  }
157
- function getUserAgent() {
158
- if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
159
- return navigator.userAgent;
160
- return '';
161
- }
162
291
  function getRenderer() {
163
292
  if (typeof globalThis.document === 'undefined')
164
293
  return '';
@@ -189,10 +318,7 @@ function getIsStandalone(os) {
189
318
  function getIsWebview() {
190
319
  return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
191
320
  }
192
- function getIsNode() {
193
- return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined;
194
- }
195
- function getNodeOSVersion(string) {
321
+ function getSemanticVersion(string) {
196
322
  var parts = string.split('.');
197
323
  return {
198
324
  major: parseInt(parts[0] || '0'),
@@ -240,95 +366,49 @@ for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
240
366
  break;
241
367
  }
242
368
  }
243
- if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
369
+ if (Platform.isReactNative) {
244
370
  try {
245
371
  var reactNative = require('react-native');
246
372
  var platform = reactNative.Platform;
247
373
  var os = platform.OS;
374
+ var release = '' + platform.Version;
375
+ var version = getSemanticVersion(release);
248
376
  switch (os) {
249
377
  case 'android':
250
378
  Platform.os = OS.Android;
379
+ Platform.osVersion = resolveSemanticAndroidVersion(version, release);
251
380
  break;
252
381
  case 'ios':
253
382
  Platform.os = OS.iOS;
383
+ Platform.osVersion = release;
254
384
  break;
255
385
  case 'windows':
256
386
  Platform.os = OS.Windows;
387
+ Platform.osVersion = resolveSemanticWindowsVersion(version, release);
257
388
  break;
258
389
  case 'macos':
259
390
  Platform.os = OS.MacOS;
391
+ Platform.osVersion = release;
260
392
  break;
261
393
  }
262
394
  }
263
395
  catch (_) {
264
396
  }
265
397
  }
266
- else if (Platform.isNodeJS) {
398
+ if (Platform.isNodeJS) {
267
399
  try {
268
400
  var os = require('os');
269
401
  var platform = os.platform();
270
402
  var release = os.release();
271
- var version = getNodeOSVersion(release);
403
+ var version = getSemanticVersion(release);
272
404
  switch (platform) {
273
405
  case 'win32':
274
406
  Platform.os = OS.Windows;
275
- if (version.major === 10 && version.minor === 0 && version.build >= 22000)
276
- Platform.osVersion = '11';
277
- else if (version.major === 10 && version.minor === 0 && version.build < 22000)
278
- Platform.osVersion = '10';
279
- else if (version.major === 6 && version.minor === 3)
280
- Platform.osVersion = '8.1';
281
- else if (version.major === 6 && version.minor === 2)
282
- Platform.osVersion = '8';
283
- else if (version.major === 6 && version.minor === 1)
284
- Platform.osVersion = '7';
285
- else if (version.major === 6 && version.minor === 0)
286
- Platform.osVersion = 'Vista';
287
- else if (version.major === 5 && version.minor === 1)
288
- Platform.osVersion = 'XP';
289
- else if (version.major === 5 && version.minor === 2)
290
- Platform.osVersion = 'XP';
291
- else if (version.major === 5 && version.minor === 0)
292
- Platform.osVersion = '2000';
293
- else if (version.major === 4 && version.minor === 90)
294
- Platform.osVersion = 'ME';
295
- else if (version.major === 4 && version.minor === 0)
296
- Platform.osVersion = 'NT 4.0';
297
- else if (version.major === 3 && version.minor === 51)
298
- Platform.osVersion = 'NT 3.11';
299
- else
300
- Platform.osVersion = release;
407
+ Platform.osVersion = resolveSemanticWindowsVersion(version, release);
301
408
  break;
302
409
  case 'darwin':
303
410
  Platform.os = OS.MacOS;
304
- if (version.major >= 24)
305
- Platform.osVersion = '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
306
- else if (version.major === 23)
307
- Platform.osVersion = '14.' + version.minor + '.' + version.build;
308
- else if (version.major === 22)
309
- Platform.osVersion = '13.' + version.minor + '.' + version.build;
310
- else if (version.major === 21)
311
- Platform.osVersion = '12.' + version.minor + '.' + version.build;
312
- else if (version.major === 20)
313
- Platform.osVersion = '11.' + version.minor + '.' + version.build;
314
- else if (version.major === 19)
315
- Platform.osVersion = '10.15.' + version.minor;
316
- else if (version.major === 18)
317
- Platform.osVersion = '10.14.' + version.minor;
318
- else if (version.major === 17)
319
- Platform.osVersion = '10.13.' + version.minor;
320
- else if (version.major === 16)
321
- Platform.osVersion = '10.12.' + version.minor;
322
- else if (version.major === 15)
323
- Platform.osVersion = '10.11.' + version.minor;
324
- else if (version.major === 14)
325
- Platform.osVersion = '10.10.' + version.minor;
326
- else if (version.major === 13)
327
- Platform.osVersion = '10.9.' + version.minor;
328
- else if (version.major >= 5 && version.major <= 12)
329
- Platform.osVersion = '10.' + (version.major - 4) + '.' + version.minor;
330
- else
331
- Platform.osVersion = release;
411
+ Platform.osVersion = resolveSemanticDarwinVersion(version, release);
332
412
  break;
333
413
  case 'android':
334
414
  Platform.os = OS.Android;
@@ -43,6 +43,7 @@
43
43
  Browsers["IE"] = "IE";
44
44
  Browsers["SamsungInternet"] = "SamsungInternet";
45
45
  })(Browsers || (Browsers = {}));
46
+ var userAgent = typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' ? navigator.userAgent : '';
46
47
  var Platform = {
47
48
  device: Devices.Unknown,
48
49
  os: OS.Unknown,
@@ -52,12 +53,14 @@
52
53
  browser: Browsers.Unknown,
53
54
  browserVersion: '',
54
55
  renderer: getRenderer(),
55
- userAgent: getUserAgent(),
56
- isWebview: false,
56
+ userAgent: userAgent,
57
57
  isMobile: false,
58
58
  isDesktop: false,
59
59
  isStandalone: false,
60
- isNodeJS: getIsNode(),
60
+ isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
61
+ isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
62
+ isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
63
+ isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
61
64
  };
62
65
  var OS_RESOLVER_MAP = [
63
66
  [/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
@@ -144,6 +147,137 @@
144
147
  return '';
145
148
  return string.replace(/_/g, '.');
146
149
  }
150
+ function resolveSemanticWindowsVersion(version, defaultValue) {
151
+ if (version.major === 10 && version.minor === 0 && version.build >= 22000)
152
+ return '11';
153
+ if (version.major === 10 && version.minor === 0 && version.build < 22000)
154
+ return '10';
155
+ if (version.major === 6 && version.minor === 3)
156
+ return '8.1';
157
+ if (version.major === 6 && version.minor === 2)
158
+ return '8';
159
+ if (version.major === 6 && version.minor === 1)
160
+ return '7';
161
+ if (version.major === 6 && version.minor === 0)
162
+ return 'Vista';
163
+ if (version.major === 5 && version.minor === 1)
164
+ return 'XP';
165
+ if (version.major === 5 && version.minor === 2)
166
+ return 'XP';
167
+ if (version.major === 5 && version.minor === 0)
168
+ return '2000';
169
+ if (version.major === 4 && version.minor === 90)
170
+ return 'ME';
171
+ if (version.major === 4 && version.minor === 0)
172
+ return 'NT 4.0';
173
+ if (version.major === 3 && version.minor === 51)
174
+ return 'NT 3.11';
175
+ return defaultValue;
176
+ }
177
+ function resolveSemanticDarwinVersion(version, defaultValue) {
178
+ if (version.major >= 24)
179
+ return '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
180
+ if (version.major === 23)
181
+ return '14.' + version.minor + '.' + version.build;
182
+ if (version.major === 22)
183
+ return '13.' + version.minor + '.' + version.build;
184
+ if (version.major === 21)
185
+ return '12.' + version.minor + '.' + version.build;
186
+ if (version.major === 20)
187
+ return '11.' + version.minor + '.' + version.build;
188
+ if (version.major === 19)
189
+ return '10.15.' + version.minor;
190
+ if (version.major === 18)
191
+ return '10.14.' + version.minor;
192
+ if (version.major === 17)
193
+ return '10.13.' + version.minor;
194
+ if (version.major === 16)
195
+ return '10.12.' + version.minor;
196
+ if (version.major === 15)
197
+ return '10.11.' + version.minor;
198
+ if (version.major === 14)
199
+ return '10.10.' + version.minor;
200
+ if (version.major === 13)
201
+ return '10.9.' + version.minor;
202
+ if (version.major >= 5 && version.major <= 12)
203
+ return '10.' + (version.major - 4) + '.' + version.minor;
204
+ return defaultValue;
205
+ }
206
+ function resolveSemanticAndroidVersion(version, defaultValue) {
207
+ if (version.major >= 36)
208
+ return '16';
209
+ if (version.major === 35)
210
+ return '15';
211
+ if (version.major === 34)
212
+ return '14';
213
+ if (version.major === 33)
214
+ return '13';
215
+ if (version.major === 32)
216
+ return '12.1';
217
+ if (version.major === 31)
218
+ return '12';
219
+ if (version.major === 30)
220
+ return '11';
221
+ if (version.major === 29)
222
+ return '10';
223
+ if (version.major === 28)
224
+ return '9';
225
+ if (version.major === 27)
226
+ return '8.1';
227
+ if (version.major === 26)
228
+ return '8.0';
229
+ if (version.major === 25)
230
+ return '7.1';
231
+ if (version.major === 24)
232
+ return '7.0';
233
+ if (version.major === 23)
234
+ return '6.0';
235
+ if (version.major === 22)
236
+ return '5.1';
237
+ if (version.major === 21)
238
+ return '5.0';
239
+ if (version.major === 20)
240
+ return '4.4W';
241
+ if (version.major === 19)
242
+ return '4.4';
243
+ if (version.major === 18)
244
+ return '4.3';
245
+ if (version.major === 17)
246
+ return '4.2';
247
+ if (version.major === 16)
248
+ return '4.1';
249
+ if (version.major === 15)
250
+ return '4.0.3';
251
+ if (version.major === 14)
252
+ return '4.0';
253
+ if (version.major === 13)
254
+ return '3.2';
255
+ if (version.major === 12)
256
+ return '3.1';
257
+ if (version.major === 11)
258
+ return '3.0';
259
+ if (version.major === 10)
260
+ return '2.3.3';
261
+ if (version.major === 9)
262
+ return '2.3';
263
+ if (version.major === 8)
264
+ return '2.2';
265
+ if (version.major === 7)
266
+ return '2.1';
267
+ if (version.major === 6)
268
+ return '2.0.1';
269
+ if (version.major === 5)
270
+ return '2.0';
271
+ if (version.major === 4)
272
+ return '1.6';
273
+ if (version.major === 3)
274
+ return '1.5';
275
+ if (version.major === 2)
276
+ return '1.1';
277
+ if (version.major === 1)
278
+ return '1.0';
279
+ return defaultValue;
280
+ }
147
281
  function resolveVersion(string, resolver) {
148
282
  if (typeof resolver === 'function')
149
283
  return resolver(string);
@@ -160,11 +294,6 @@
160
294
  return { brand: entry, version: '' };
161
295
  return { brand: entry.brand, version: entry.version };
162
296
  }
163
- function getUserAgent() {
164
- if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
165
- return navigator.userAgent;
166
- return '';
167
- }
168
297
  function getRenderer() {
169
298
  if (typeof globalThis.document === 'undefined')
170
299
  return '';
@@ -195,10 +324,7 @@
195
324
  function getIsWebview() {
196
325
  return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
197
326
  }
198
- function getIsNode() {
199
- return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined;
200
- }
201
- function getNodeOSVersion(string) {
327
+ function getSemanticVersion(string) {
202
328
  var parts = string.split('.');
203
329
  return {
204
330
  major: parseInt(parts[0] || '0'),
@@ -246,95 +372,49 @@
246
372
  break;
247
373
  }
248
374
  }
249
- if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
375
+ if (Platform.isReactNative) {
250
376
  try {
251
377
  var reactNative = require('react-native');
252
378
  var platform = reactNative.Platform;
253
379
  var os = platform.OS;
380
+ var release = '' + platform.Version;
381
+ var version = getSemanticVersion(release);
254
382
  switch (os) {
255
383
  case 'android':
256
384
  Platform.os = OS.Android;
385
+ Platform.osVersion = resolveSemanticAndroidVersion(version, release);
257
386
  break;
258
387
  case 'ios':
259
388
  Platform.os = OS.iOS;
389
+ Platform.osVersion = release;
260
390
  break;
261
391
  case 'windows':
262
392
  Platform.os = OS.Windows;
393
+ Platform.osVersion = resolveSemanticWindowsVersion(version, release);
263
394
  break;
264
395
  case 'macos':
265
396
  Platform.os = OS.MacOS;
397
+ Platform.osVersion = release;
266
398
  break;
267
399
  }
268
400
  }
269
401
  catch (_) {
270
402
  }
271
403
  }
272
- else if (Platform.isNodeJS) {
404
+ if (Platform.isNodeJS) {
273
405
  try {
274
406
  var os = require('os');
275
407
  var platform = os.platform();
276
408
  var release = os.release();
277
- var version = getNodeOSVersion(release);
409
+ var version = getSemanticVersion(release);
278
410
  switch (platform) {
279
411
  case 'win32':
280
412
  Platform.os = OS.Windows;
281
- if (version.major === 10 && version.minor === 0 && version.build >= 22000)
282
- Platform.osVersion = '11';
283
- else if (version.major === 10 && version.minor === 0 && version.build < 22000)
284
- Platform.osVersion = '10';
285
- else if (version.major === 6 && version.minor === 3)
286
- Platform.osVersion = '8.1';
287
- else if (version.major === 6 && version.minor === 2)
288
- Platform.osVersion = '8';
289
- else if (version.major === 6 && version.minor === 1)
290
- Platform.osVersion = '7';
291
- else if (version.major === 6 && version.minor === 0)
292
- Platform.osVersion = 'Vista';
293
- else if (version.major === 5 && version.minor === 1)
294
- Platform.osVersion = 'XP';
295
- else if (version.major === 5 && version.minor === 2)
296
- Platform.osVersion = 'XP';
297
- else if (version.major === 5 && version.minor === 0)
298
- Platform.osVersion = '2000';
299
- else if (version.major === 4 && version.minor === 90)
300
- Platform.osVersion = 'ME';
301
- else if (version.major === 4 && version.minor === 0)
302
- Platform.osVersion = 'NT 4.0';
303
- else if (version.major === 3 && version.minor === 51)
304
- Platform.osVersion = 'NT 3.11';
305
- else
306
- Platform.osVersion = release;
413
+ Platform.osVersion = resolveSemanticWindowsVersion(version, release);
307
414
  break;
308
415
  case 'darwin':
309
416
  Platform.os = OS.MacOS;
310
- if (version.major >= 24)
311
- Platform.osVersion = '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
312
- else if (version.major === 23)
313
- Platform.osVersion = '14.' + version.minor + '.' + version.build;
314
- else if (version.major === 22)
315
- Platform.osVersion = '13.' + version.minor + '.' + version.build;
316
- else if (version.major === 21)
317
- Platform.osVersion = '12.' + version.minor + '.' + version.build;
318
- else if (version.major === 20)
319
- Platform.osVersion = '11.' + version.minor + '.' + version.build;
320
- else if (version.major === 19)
321
- Platform.osVersion = '10.15.' + version.minor;
322
- else if (version.major === 18)
323
- Platform.osVersion = '10.14.' + version.minor;
324
- else if (version.major === 17)
325
- Platform.osVersion = '10.13.' + version.minor;
326
- else if (version.major === 16)
327
- Platform.osVersion = '10.12.' + version.minor;
328
- else if (version.major === 15)
329
- Platform.osVersion = '10.11.' + version.minor;
330
- else if (version.major === 14)
331
- Platform.osVersion = '10.10.' + version.minor;
332
- else if (version.major === 13)
333
- Platform.osVersion = '10.9.' + version.minor;
334
- else if (version.major >= 5 && version.major <= 12)
335
- Platform.osVersion = '10.' + (version.major - 4) + '.' + version.minor;
336
- else
337
- Platform.osVersion = release;
417
+ Platform.osVersion = resolveSemanticDarwinVersion(version, release);
338
418
  break;
339
419
  case 'android':
340
420
  Platform.os = OS.Android;
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"use strict";var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(i||(i={}));var o,t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},s=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],a=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var f=0;f<s.length;f++){var m=(g=s[f])[0],b=g[1],w=g[2];if(null!==(h=t.userAgent.match(m))){t.os=b,t.osVersion=d(h[1],w),b===e.iOS||b===e.Android?t.device=n.Mobile:b!==e.Windows&&b!==e.MacOS||(t.device=n.Desktop);break}}for(f=0;f<a.length;f++){m=(g=a[f])[0];var v=g[1];w=g[2];if(null!==(h=t.userAgent.match(m))){t.engine=v,t.engineVersion=d(h[1],w);break}}for(f=0;f<l.length;f++){m=(g=l[f])[0];var g,h,p=g[1];w=g[2];if(null!==(h=t.userAgent.match(m))){t.browser=p,t.browserVersion=d(h[1],w);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{switch(b=(k=require("react-native").Platform).OS){case"android":t.os=e.Android;break;case"ios":t.os=e.iOS;break;case"windows":t.os=e.Windows;break;case"macos":t.os=e.MacOS}}catch(e){}else if(t.isNodeJS)try{var k=(b=require("os")).platform(),E=b.release(),F=(o=E.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(k){case"win32":t.os=e.Windows,t.osVersion=10===F.major&&0===F.minor&&F.build>=22e3?"11":10===F.major&&0===F.minor&&F.build<22e3?"10":6===F.major&&3===F.minor?"8.1":6===F.major&&2===F.minor?"8":6===F.major&&1===F.minor?"7":6===F.major&&0===F.minor?"Vista":5===F.major&&1===F.minor||5===F.major&&2===F.minor?"XP":5===F.major&&0===F.minor?"2000":4===F.major&&90===F.minor?"ME":4===F.major&&0===F.minor?"NT 4.0":3===F.major&&51===F.minor?"NT 3.11":E;break;case"darwin":t.os=e.MacOS,t.osVersion=F.major>=24?F.major-9+"."+F.minor+"."+F.build:23===F.major?"14."+F.minor+"."+F.build:22===F.major?"13."+F.minor+"."+F.build:21===F.major?"12."+F.minor+"."+F.build:20===F.major?"11."+F.minor+"."+F.build:19===F.major?"10.15."+F.minor:18===F.major?"10.14."+F.minor:17===F.major?"10.13."+F.minor:16===F.major?"10.12."+F.minor:15===F.major?"10.11."+F.minor:14===F.major?"10.10."+F.minor:13===F.major?"10.9."+F.minor:F.major>=5&&F.major<=12?"10."+(F.major-4)+"."+F.minor:E;break;case"android":t.os=e.Android,t.osVersion=E;break;case"linux":/android/i.test(E)&&(t.os=e.Android,t.osVersion=E)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],o=n.platformVersion,s=0;s<i.length;s++){var a=null==(r=i[s])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=a.brand,u=a.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof o&&(t.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=o)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function T(){return e.iOS===t.os}var x=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=S[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function s(r,o){return new Promise((function(t,s){if(null!==e){var a=r[e.request];if("function"==typeof a)try{var l=a.call(r,o);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){T()?u():s()})):void t()}catch(e){if(!T())return void s()}}function u(){if(T()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}s()}u()}))}function a(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var s=t.call(document);return void 0!==s&&"function"==typeof s.then?void s.then((function(){r()})).catch((function(){i()})):void r()}}if(T()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var a=document.querySelectorAll("video"),l=0;l<a.length;l++){var u=a[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),T())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!T())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:s,exit:a,toggle:function(e,n){return t()?a():s(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}();return{installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}}}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"use strict";var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(T=require("react-native").Platform).OS;var j=f(F=""+T.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,T=(v=require("os")).platform();j=f(F=v.release());switch(T){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var y=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=S[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}();return{installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}}}));