native-fn 1.0.49 → 1.0.51

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 +31 -10
  2. package/dist/native.min.cjs +1 -1
  3. package/dist/native.min.mjs +1 -1
  4. package/dist/native.mjs +31 -10
  5. package/dist/native.umd.js +31 -10
  6. package/dist/native.umd.min.js +1 -1
  7. package/dist/plugin/app/index.cjs +91 -67
  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 +91 -67
  11. package/dist/plugin/app/index.umd.js +91 -67
  12. package/dist/plugin/app/index.umd.min.js +1 -1
  13. package/dist/plugin/app/src/plugin/app/utils/try-open-url.d.ts +1 -1
  14. package/dist/plugin/camera/index.cjs +30 -33
  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 +30 -33
  18. package/dist/plugin/camera/index.umd.js +30 -33
  19. package/dist/plugin/camera/index.umd.min.js +1 -1
  20. package/dist/plugin/camera/src/plugin/app/utils/try-open-url.d.ts +1 -1
  21. package/dist/plugin/clipboard/src/plugin/app/utils/try-open-url.d.ts +1 -1
  22. package/dist/plugin/fullscreen/index.cjs +30 -9
  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 +30 -9
  26. package/dist/plugin/fullscreen/index.umd.js +30 -9
  27. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  28. package/dist/plugin/fullscreen/src/plugin/app/utils/try-open-url.d.ts +1 -1
  29. package/dist/plugin/theme/index.cjs +59 -33
  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 +59 -33
  33. package/dist/plugin/theme/index.umd.js +59 -33
  34. package/dist/plugin/theme/index.umd.min.js +1 -1
  35. package/dist/plugin/theme/src/plugin/app/utils/try-open-url.d.ts +1 -1
  36. package/dist/src/plugin/app/utils/try-open-url.d.ts +1 -1
  37. package/package.json +1 -1
@@ -13,6 +13,29 @@ var MessengerType;
13
13
  MessengerType["Mail"] = "mail";
14
14
  })(MessengerType || (MessengerType = {}));
15
15
 
16
+ function compareVersion(lhs, rhs) {
17
+ var pa = lhs.split('.');
18
+ var pb = rhs.split('.');
19
+ var length = Math.max(pa.length, pb.length);
20
+ for (var i = 0; i < length; i++) {
21
+ var a = void 0;
22
+ var b = void 0;
23
+ if (i < pa.length)
24
+ a = parseInt(pa[i], 10);
25
+ else
26
+ a = 0;
27
+ if (i < pb.length)
28
+ b = parseInt(pb[i], 10);
29
+ else
30
+ b = 0;
31
+ if (a > b)
32
+ return 1;
33
+ if (a < b)
34
+ return -1;
35
+ }
36
+ return 0;
37
+ }
38
+
16
39
  var OS;
17
40
  (function (OS) {
18
41
  OS["Unknown"] = "Unknown";
@@ -68,7 +91,7 @@ var Platform = {
68
91
  isStandalone: false,
69
92
  isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
70
93
  isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
71
- isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
94
+ isElectron: (typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(userAgent)),
72
95
  isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
73
96
  };
74
97
  var OS_RESOLVER_MAP = [
@@ -330,9 +353,6 @@ function getIsStandalone(os) {
330
353
  return 'standalone' in navigator && !!navigator.standalone;
331
354
  return globalThis.matchMedia('(display-mode: standalone)').matches;
332
355
  }
333
- function getIsWebview() {
334
- return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
335
- }
336
356
  function getSemanticVersion(string) {
337
357
  var parts = string.split('.');
338
358
  return {
@@ -350,13 +370,14 @@ for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
350
370
  if (matched !== null) {
351
371
  Platform.os = os;
352
372
  Platform.osVersion = resolveVersion(matched[1], resolver);
353
- if (os === OS.iOS || os === OS.Android)
354
- Platform.device = Devices.Mobile;
355
- else if (os === OS.Windows || os === OS.MacOS)
356
- Platform.device = Devices.Desktop;
357
373
  break;
358
374
  }
359
375
  }
376
+ if (Platform.os === OS.iOS && compareVersion(Platform.osVersion, '18.6') === 0) {
377
+ var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
378
+ if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
379
+ Platform.osVersion = version[1];
380
+ }
360
381
  for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
361
382
  var map = ENGINE_RESOLVER_MAP[i];
362
383
  var regexp = map[0];
@@ -464,9 +485,9 @@ if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntr
464
485
  }
465
486
  });
466
487
  }
488
+ Platform.device = Platform.os === OS.iOS || Platform.os === OS.Android ? Devices.Mobile : Platform.os === OS.Windows || Platform.os === OS.MacOS ? Devices.Desktop : Devices.Unknown;
467
489
  Platform.isMobile = Platform.device === Devices.Mobile;
468
490
  Platform.isDesktop = Platform.device === Devices.Desktop;
469
- Platform.isWebview = getIsWebview();
470
491
  Platform.isStandalone = getIsStandalone(Platform.os);
471
492
 
472
493
  function capitalize(match) {
@@ -694,29 +715,6 @@ function createHiddenElement(tagName, focusable) {
694
715
  return element;
695
716
  }
696
717
 
697
- function compareVersion(lhs, rhs) {
698
- var pa = lhs.split('.');
699
- var pb = rhs.split('.');
700
- var length = Math.max(pa.length, pb.length);
701
- for (var i = 0; i < length; i++) {
702
- var a = void 0;
703
- var b = void 0;
704
- if (i < pa.length)
705
- a = parseInt(pa[i], 10);
706
- else
707
- a = 0;
708
- if (i < pb.length)
709
- b = parseInt(pb[i], 10);
710
- else
711
- b = 0;
712
- if (a > b)
713
- return 1;
714
- if (a < b)
715
- return -1;
716
- }
717
- return 0;
718
- }
719
-
720
718
  function openURLViaHref(url, index) {
721
719
  var top = getTopmostWindow();
722
720
  var document = top.document;
@@ -853,28 +851,47 @@ function restoreFocus() {
853
851
  }
854
852
  return hasFocus(document);
855
853
  }
856
- function tryOpenUrl(url, index, timeout) {
857
- if (Platform.isReactNative) {
858
- try {
859
- var reactNative_1 = require('react-native');
860
- return new Promise(function (resolve, reject) {
861
- reactNative_1.Linking.canOpenURL(url)
862
- .then(function (canOpen) {
863
- if (canOpen) {
864
- reactNative_1.Linking.openURL(url)
865
- .then(function () {
866
- resolve();
867
- });
868
- }
869
- else {
870
- reject();
871
- }
872
- });
873
- });
874
- }
875
- catch (_) {
876
- }
854
+ function tryOpenURLReactNative(url) {
855
+ try {
856
+ var reactNative = require('react-native');
857
+ var linking_1 = reactNative.Linking;
858
+ return new Promise(function (resolve, reject) {
859
+ linking_1
860
+ .canOpenURL(url)
861
+ .then(function (canOpen) {
862
+ if (canOpen) {
863
+ linking_1
864
+ .openURL(url)
865
+ .then(resolve)
866
+ .catch(reject);
867
+ }
868
+ else {
869
+ reject();
870
+ }
871
+ })
872
+ .catch(reject);
873
+ });
874
+ }
875
+ catch (_) {
876
+ return Promise.reject();
877
877
  }
878
+ }
879
+ function tryOpenURLElectron(url) {
880
+ try {
881
+ var electron = require('electron');
882
+ var shell_1 = electron.shell;
883
+ return new Promise(function (resolve, reject) {
884
+ shell_1
885
+ .openExternal(url)
886
+ .then(resolve)
887
+ .catch(reject);
888
+ });
889
+ }
890
+ catch (_) {
891
+ return Promise.reject();
892
+ }
893
+ }
894
+ function tryOpenURLBrowser(url, index, timeout) {
878
895
  var top = getTopmostWindow();
879
896
  var document = top.document;
880
897
  var eventType = { focus: undefined, blur: undefined, visibilitychange: undefined };
@@ -961,6 +978,13 @@ function tryOpenUrl(url, index, timeout) {
961
978
  }
962
979
  });
963
980
  }
981
+ function tryOpenURL(url, index, timeout) {
982
+ if (Platform.isReactNative)
983
+ return tryOpenURLReactNative(url);
984
+ if (Platform.isElectron)
985
+ return tryOpenURLElectron(url);
986
+ return tryOpenURLBrowser(url, index, timeout);
987
+ }
964
988
 
965
989
  function createCustomError(name, Base) {
966
990
  if (Base === void 0) { Base = Error; }
@@ -1185,12 +1209,12 @@ function canOpenUniversalURL() {
1185
1209
  return Platform.os === OS.iOS && compareVersion(Platform.osVersion, '9.0') >= 0;
1186
1210
  }
1187
1211
  function getURLOpenError(tried) {
1188
- var triedUrlString = '';
1212
+ var triedURLString = '';
1189
1213
  for (var i = 0; i < tried.length; i++)
1190
- triedUrlString += '\n' + (i + 1) + ': ' + tried[i];
1191
- if (triedUrlString.length > 0)
1192
- triedUrlString = '\n' + triedUrlString + '\n';
1193
- return new URLOpenError('Failed to open any of the provided URLs: ' + triedUrlString);
1214
+ triedURLString += '\n' + (i + 1) + ': ' + tried[i];
1215
+ if (triedURLString.length > 0)
1216
+ triedURLString = '\n' + triedURLString + '\n';
1217
+ return new URLOpenError('Failed to open any of the provided URLs: ' + triedURLString);
1194
1218
  }
1195
1219
  function open(options) {
1196
1220
  var os = Platform.os;
@@ -1265,12 +1289,12 @@ function open(options) {
1265
1289
  if (infos.bundleId !== undefined && infos.trackId === undefined)
1266
1290
  infos.trackId = getTrackId(infos.bundleId);
1267
1291
  }
1268
- pushUrl(urls, infos.intent, AppOpenState.Intent, canOpenIntentURL());
1269
- pushUrl(urls, infos.universal, AppOpenState.Universal, canOpenUniversalURL());
1270
- pushUrl(urls, infos.scheme, AppOpenState.Scheme);
1271
- pushUrl(urls, infos.fallback, AppOpenState.Fallback);
1272
- pushUrl(urls, infos.appStore, AppOpenState.Store);
1273
- pushUrl(urls, infos.webStore, AppOpenState.Store, infos.allowWebStore);
1292
+ pushURL(urls, infos.intent, AppOpenState.Intent, canOpenIntentURL());
1293
+ pushURL(urls, infos.universal, AppOpenState.Universal, canOpenUniversalURL());
1294
+ pushURL(urls, infos.scheme, AppOpenState.Scheme);
1295
+ pushURL(urls, infos.fallback, AppOpenState.Fallback);
1296
+ pushURL(urls, infos.appStore, AppOpenState.Store);
1297
+ pushURL(urls, infos.webStore, AppOpenState.Store, infos.allowWebStore);
1274
1298
  if (timeout === undefined)
1275
1299
  timeout = getDefaultTimeoutByOS(os);
1276
1300
  return new Promise(function (resolve, reject) {
@@ -1283,7 +1307,7 @@ function open(options) {
1283
1307
  var url = entry[1];
1284
1308
  if (typeof url === 'string') {
1285
1309
  tried[index] = url;
1286
- return tryOpenUrl(url, index, timeout)
1310
+ return tryOpenURL(url, index, timeout)
1287
1311
  .then(function () {
1288
1312
  resolve(state);
1289
1313
  })
@@ -1300,7 +1324,7 @@ function open(options) {
1300
1324
  return openURLSequential();
1301
1325
  });
1302
1326
  }
1303
- function pushUrl(urls, url, state, condition) {
1327
+ function pushURL(urls, url, state, condition) {
1304
1328
  if (condition === void 0) { condition = true; }
1305
1329
  if ((typeof url === 'function' || typeof url === 'string') && condition)
1306
1330
  urls.push([state, url]);
@@ -1426,7 +1450,7 @@ function normalize(value) {
1426
1450
  }
1427
1451
  function openMessenger(options, type) {
1428
1452
  options = normalize(options);
1429
- return tryOpenUrl(type + ':' + options.to
1453
+ return tryOpenURL(type + ':' + options.to
1430
1454
  + '?cc=' + options.cc
1431
1455
  + '&bcc=' + options.bcc
1432
1456
  + '&subject=' + options.subject
@@ -19,6 +19,29 @@
19
19
  MessengerType["Mail"] = "mail";
20
20
  })(MessengerType || (MessengerType = {}));
21
21
 
22
+ function compareVersion(lhs, rhs) {
23
+ var pa = lhs.split('.');
24
+ var pb = rhs.split('.');
25
+ var length = Math.max(pa.length, pb.length);
26
+ for (var i = 0; i < length; i++) {
27
+ var a = void 0;
28
+ var b = void 0;
29
+ if (i < pa.length)
30
+ a = parseInt(pa[i], 10);
31
+ else
32
+ a = 0;
33
+ if (i < pb.length)
34
+ b = parseInt(pb[i], 10);
35
+ else
36
+ b = 0;
37
+ if (a > b)
38
+ return 1;
39
+ if (a < b)
40
+ return -1;
41
+ }
42
+ return 0;
43
+ }
44
+
22
45
  var OS;
23
46
  (function (OS) {
24
47
  OS["Unknown"] = "Unknown";
@@ -74,7 +97,7 @@
74
97
  isStandalone: false,
75
98
  isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
76
99
  isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
77
- isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
100
+ isElectron: (typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(userAgent)),
78
101
  isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
79
102
  };
80
103
  var OS_RESOLVER_MAP = [
@@ -336,9 +359,6 @@
336
359
  return 'standalone' in navigator && !!navigator.standalone;
337
360
  return globalThis.matchMedia('(display-mode: standalone)').matches;
338
361
  }
339
- function getIsWebview() {
340
- return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
341
- }
342
362
  function getSemanticVersion(string) {
343
363
  var parts = string.split('.');
344
364
  return {
@@ -356,13 +376,14 @@
356
376
  if (matched !== null) {
357
377
  Platform.os = os;
358
378
  Platform.osVersion = resolveVersion(matched[1], resolver);
359
- if (os === OS.iOS || os === OS.Android)
360
- Platform.device = Devices.Mobile;
361
- else if (os === OS.Windows || os === OS.MacOS)
362
- Platform.device = Devices.Desktop;
363
379
  break;
364
380
  }
365
381
  }
382
+ if (Platform.os === OS.iOS && compareVersion(Platform.osVersion, '18.6') === 0) {
383
+ var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
384
+ if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
385
+ Platform.osVersion = version[1];
386
+ }
366
387
  for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
367
388
  var map = ENGINE_RESOLVER_MAP[i];
368
389
  var regexp = map[0];
@@ -470,9 +491,9 @@
470
491
  }
471
492
  });
472
493
  }
494
+ Platform.device = Platform.os === OS.iOS || Platform.os === OS.Android ? Devices.Mobile : Platform.os === OS.Windows || Platform.os === OS.MacOS ? Devices.Desktop : Devices.Unknown;
473
495
  Platform.isMobile = Platform.device === Devices.Mobile;
474
496
  Platform.isDesktop = Platform.device === Devices.Desktop;
475
- Platform.isWebview = getIsWebview();
476
497
  Platform.isStandalone = getIsStandalone(Platform.os);
477
498
 
478
499
  function capitalize(match) {
@@ -700,29 +721,6 @@
700
721
  return element;
701
722
  }
702
723
 
703
- function compareVersion(lhs, rhs) {
704
- var pa = lhs.split('.');
705
- var pb = rhs.split('.');
706
- var length = Math.max(pa.length, pb.length);
707
- for (var i = 0; i < length; i++) {
708
- var a = void 0;
709
- var b = void 0;
710
- if (i < pa.length)
711
- a = parseInt(pa[i], 10);
712
- else
713
- a = 0;
714
- if (i < pb.length)
715
- b = parseInt(pb[i], 10);
716
- else
717
- b = 0;
718
- if (a > b)
719
- return 1;
720
- if (a < b)
721
- return -1;
722
- }
723
- return 0;
724
- }
725
-
726
724
  function openURLViaHref(url, index) {
727
725
  var top = getTopmostWindow();
728
726
  var document = top.document;
@@ -859,28 +857,47 @@
859
857
  }
860
858
  return hasFocus(document);
861
859
  }
862
- function tryOpenUrl(url, index, timeout) {
863
- if (Platform.isReactNative) {
864
- try {
865
- var reactNative_1 = require('react-native');
866
- return new Promise(function (resolve, reject) {
867
- reactNative_1.Linking.canOpenURL(url)
868
- .then(function (canOpen) {
869
- if (canOpen) {
870
- reactNative_1.Linking.openURL(url)
871
- .then(function () {
872
- resolve();
873
- });
874
- }
875
- else {
876
- reject();
877
- }
878
- });
879
- });
880
- }
881
- catch (_) {
882
- }
860
+ function tryOpenURLReactNative(url) {
861
+ try {
862
+ var reactNative = require('react-native');
863
+ var linking_1 = reactNative.Linking;
864
+ return new Promise(function (resolve, reject) {
865
+ linking_1
866
+ .canOpenURL(url)
867
+ .then(function (canOpen) {
868
+ if (canOpen) {
869
+ linking_1
870
+ .openURL(url)
871
+ .then(resolve)
872
+ .catch(reject);
873
+ }
874
+ else {
875
+ reject();
876
+ }
877
+ })
878
+ .catch(reject);
879
+ });
880
+ }
881
+ catch (_) {
882
+ return Promise.reject();
883
883
  }
884
+ }
885
+ function tryOpenURLElectron(url) {
886
+ try {
887
+ var electron = require('electron');
888
+ var shell_1 = electron.shell;
889
+ return new Promise(function (resolve, reject) {
890
+ shell_1
891
+ .openExternal(url)
892
+ .then(resolve)
893
+ .catch(reject);
894
+ });
895
+ }
896
+ catch (_) {
897
+ return Promise.reject();
898
+ }
899
+ }
900
+ function tryOpenURLBrowser(url, index, timeout) {
884
901
  var top = getTopmostWindow();
885
902
  var document = top.document;
886
903
  var eventType = { focus: undefined, blur: undefined, visibilitychange: undefined };
@@ -967,6 +984,13 @@
967
984
  }
968
985
  });
969
986
  }
987
+ function tryOpenURL(url, index, timeout) {
988
+ if (Platform.isReactNative)
989
+ return tryOpenURLReactNative(url);
990
+ if (Platform.isElectron)
991
+ return tryOpenURLElectron(url);
992
+ return tryOpenURLBrowser(url, index, timeout);
993
+ }
970
994
 
971
995
  function createCustomError(name, Base) {
972
996
  if (Base === void 0) { Base = Error; }
@@ -1191,12 +1215,12 @@
1191
1215
  return Platform.os === OS.iOS && compareVersion(Platform.osVersion, '9.0') >= 0;
1192
1216
  }
1193
1217
  function getURLOpenError(tried) {
1194
- var triedUrlString = '';
1218
+ var triedURLString = '';
1195
1219
  for (var i = 0; i < tried.length; i++)
1196
- triedUrlString += '\n' + (i + 1) + ': ' + tried[i];
1197
- if (triedUrlString.length > 0)
1198
- triedUrlString = '\n' + triedUrlString + '\n';
1199
- return new URLOpenError('Failed to open any of the provided URLs: ' + triedUrlString);
1220
+ triedURLString += '\n' + (i + 1) + ': ' + tried[i];
1221
+ if (triedURLString.length > 0)
1222
+ triedURLString = '\n' + triedURLString + '\n';
1223
+ return new URLOpenError('Failed to open any of the provided URLs: ' + triedURLString);
1200
1224
  }
1201
1225
  function open(options) {
1202
1226
  var os = Platform.os;
@@ -1271,12 +1295,12 @@
1271
1295
  if (infos.bundleId !== undefined && infos.trackId === undefined)
1272
1296
  infos.trackId = getTrackId(infos.bundleId);
1273
1297
  }
1274
- pushUrl(urls, infos.intent, AppOpenState.Intent, canOpenIntentURL());
1275
- pushUrl(urls, infos.universal, AppOpenState.Universal, canOpenUniversalURL());
1276
- pushUrl(urls, infos.scheme, AppOpenState.Scheme);
1277
- pushUrl(urls, infos.fallback, AppOpenState.Fallback);
1278
- pushUrl(urls, infos.appStore, AppOpenState.Store);
1279
- pushUrl(urls, infos.webStore, AppOpenState.Store, infos.allowWebStore);
1298
+ pushURL(urls, infos.intent, AppOpenState.Intent, canOpenIntentURL());
1299
+ pushURL(urls, infos.universal, AppOpenState.Universal, canOpenUniversalURL());
1300
+ pushURL(urls, infos.scheme, AppOpenState.Scheme);
1301
+ pushURL(urls, infos.fallback, AppOpenState.Fallback);
1302
+ pushURL(urls, infos.appStore, AppOpenState.Store);
1303
+ pushURL(urls, infos.webStore, AppOpenState.Store, infos.allowWebStore);
1280
1304
  if (timeout === undefined)
1281
1305
  timeout = getDefaultTimeoutByOS(os);
1282
1306
  return new Promise(function (resolve, reject) {
@@ -1289,7 +1313,7 @@
1289
1313
  var url = entry[1];
1290
1314
  if (typeof url === 'string') {
1291
1315
  tried[index] = url;
1292
- return tryOpenUrl(url, index, timeout)
1316
+ return tryOpenURL(url, index, timeout)
1293
1317
  .then(function () {
1294
1318
  resolve(state);
1295
1319
  })
@@ -1306,7 +1330,7 @@
1306
1330
  return openURLSequential();
1307
1331
  });
1308
1332
  }
1309
- function pushUrl(urls, url, state, condition) {
1333
+ function pushURL(urls, url, state, condition) {
1310
1334
  if (condition === void 0) { condition = true; }
1311
1335
  if ((typeof url === 'function' || typeof url === 'string') && condition)
1312
1336
  urls.push([state, url]);
@@ -1432,7 +1456,7 @@
1432
1456
  }
1433
1457
  function openMessenger(options, type) {
1434
1458
  options = normalize(options);
1435
- return tryOpenUrl(type + ':' + options.to
1459
+ return tryOpenURL(type + ':' + options.to
1436
1460
  + '?cc=' + options.cc
1437
1461
  + '&bcc=' + options.bcc
1438
1462
  + '&subject=' + options.subject
@@ -1 +1 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).App=r()}(this,(function(){"use strict";var e,r,t,n,o,i;!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(e||(e={})),function(e){e.Telephone="telephone",e.Message="message",e.Mail="mail"}(r||(r={})),function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(t||(t={})),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"}(o||(o={})),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 a="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",s={device:n.Unknown,os:t.Unknown,osVersion:"",engine:o.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 r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var t=r.getExtension("WEBGL_debug_renderer_info");return null===t?r.getParameter(r.RENDERER):r.getParameter(t.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:a,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(a),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},c=[[/windows nt (6\.[23]); arm/i,t.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,t.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,t.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,t.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,t.Windows,u],[/windows ce\/?([\d.]*)/i,t.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,t.iOS,f],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,t.iOS,f],[/cfnetwork\/.+darwin/i,t.iOS,f],[/mac os x ?([\w. ]*)/i,t.MacOS,f],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,t.MacOS,f],[/droid ([\w.]+)\b.+(android[- ]x86)/i,t.Android],[/android\w*[-\/.; ]?([\d.]*)/i,t.Android]],l=[[/windows.+ edge\/([\w.]+)/i,o.EdgeHTML],[/arkweb\/([\w.]+)/i,o.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,o.Blink],[/presto\/([\w.]+)/i,o.Presto],[/webkit\/([\w.]+)/i,o.WebKit],[/trident\/([\w.]+)/i,o.Trident],[/netfront\/([\w.]+)/i,o.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,o.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,o.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,o.Gecko]],d=[[/\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 r={"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!==r?r:e}function f(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,r){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":r}function b(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function m(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}for(var v=0;v<c.length;v++){var h=(k=c[v])[0],w=k[1],g=k[2];if(null!==(S=s.userAgent.match(h))){s.os=w,s.osVersion=b(S[1],g),w===t.iOS||w===t.Android?s.device=n.Mobile:w!==t.Windows&&w!==t.MacOS||(s.device=n.Desktop);break}}for(v=0;v<l.length;v++){h=(k=l[v])[0];var y=k[1];g=k[2];if(null!==(S=s.userAgent.match(h))){s.engine=y,s.engineVersion=b(S[1],g);break}}for(v=0;v<d.length;v++){h=(k=d[v])[0];var k,S,j=k[1];g=k[2];if(null!==(S=s.userAgent.match(h))){s.browser=j,s.browserVersion=b(S[1],g);break}}if(s.isReactNative)try{w=(E=require("react-native").Platform).OS;var T=m(O=""+E.Version);switch(w){case"android":s.os=t.Android,s.osVersion=function(e,r){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":r}(T,O);break;case"ios":s.os=t.iOS,s.osVersion=O;break;case"windows":s.os=t.Windows,s.osVersion=p(T,O);break;case"macos":s.os=t.MacOS,s.osVersion=O}}catch(e){}if(s.isNodeJS)try{var O,E=(w=require("os")).platform();T=m(O=w.release());switch(E){case"win32":s.os=t.Windows,s.osVersion=p(T,O);break;case"darwin":s.os=t.MacOS,s.osVersion=function(e,r){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:r}(T,O);break;case"android":s.os=t.Android,s.osVersion=O;break;case"linux":/android/i.test(O)&&(s.os=t.Android,s.osVersion=O)}}catch(e){}function I(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var n="",o=0;o<r.length-2;o++){var i=r[o];void 0!==i&&(n=n+i.charAt(0).toUpperCase()+i.slice(1))}return n}function A(){this.returnValue=!1}function x(){this.cancelBubble=!0}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(e){for(var r,n=e.fullVersionList||e.brands||[],o=e.platformVersion,i=0;i<n.length;i++){var a=null==(r=n[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},c=a.brand,l=a.version;/not.a.brand/i.test(c)||"Chromium"===c&&(s.engineVersion=l)}"string"==typeof o&&(s.os===t.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=o)})),s.isMobile=s.device===n.Mobile,s.isDesktop=s.device===n.Desktop,s.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(s.userAgent),s.isStandalone=function(e){return"matchMedia"in globalThis&&(e===t.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var M=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,W=["","webkit","moz","ms","MS","o","O"],V={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},N={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,r){void 0===r&&(r={callback:null,options:!1});var t=r.callback;if(void 0!==e&&null!==t){var n=N.withVender(e,r.type),o=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(n,t,o)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(t)}catch(e){}else try{return e.addListener(n,t)}catch(e){}return"function"==typeof e.attachEvent?t.__ieWrapper?e.attachEvent("on"+n,t.__ieWrapper):e.attachEvent("on"+n,t.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=A),"function"!=typeof r.stopPropagation&&(r.stopPropagation=x),"function"==typeof t?t.call(e,r):t&&"function"==typeof t.handleEvent&&t.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var t=r.callback;if(void 0!==e&&null!==t){var n=N.withVender(e,r.type),o=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(n,t,o)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(t)}catch(e){}else try{return e.removeListener(n,t)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=t.__ieWrapper;void 0!==i&&(e.detachEvent("on"+n,i),delete t.__ieWrapper)}}},withVender:function(e,r){if(void 0===r)return"";if("webkitEnterFullscreen"in e&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(r)>-1)return r;var t;t=r in V?V[r]:M.test(r)?[r,r.replace(M,I)]:[r];for(var n=0;n<W.length;n++)for(var o=0;o<t.length;o++){var i=W[n]+t[o];if(void 0!==e["on"+i])return i}return""}};function L(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function _(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var t=globalThis.document.createElement(e);return"width"in t&&(t.width="0"),"height"in t&&(t.height="0"),"border"in t&&(t.border="0"),"frameBorder"in t&&(t.frameBorder="0"),"scrolling"in t&&(t.scrolling="no"),"cellPadding"in t&&(t.cellPadding="0"),"cellSpacing"in t&&(t.cellSpacing="0"),"frame"in t&&(t.frame="void"),"rules"in t&&(t.rules="none"),"noWrap"in t&&(t.noWrap=!0),t.tabIndex=-1,t.setAttribute("role","presentation"),r?(t.style.width="1px",t.style.height="1px"):(t.setAttribute("aria-hidden","true"),t.style.width="0",t.style.height="0",t.style.zIndex="-9999",t.style.display="none",t.style.visibility="hidden",t.style.pointerEvents="none"),t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.padding="0",t.style.margin="0",t.style.border="none",t.style.outline="none",t.style.clip="rect(1px, 1px, 1px, 1px)",t.style.clipPath="inset(50%)",t.style.overflow="hidden",t.style.whiteSpace="nowrap",t}}function P(e,r){for(var t=e.split("."),n=r.split("."),o=Math.max(t.length,n.length),i=0;i<o;i++){var a=void 0,s=void 0;if((a=i<t.length?parseInt(t[i],10):0)>(s=i<n.length?parseInt(n[i],10):0))return 1;if(a<s)return-1}return 0}function F(e,r){var t=L(),n=t.document,o=void 0;try{if(0===r)return void(t.location.href=e);if(void 0===(o=_("a")))return;o.href=e,n.body.appendChild(o),function(e,r){var t;void 0===r&&(r=window);try{t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:r})}catch(e){(t=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(t)}(o,t)}catch(e){}finally{if(void 0!==o)try{n.body.removeChild(o)}catch(e){}}}function U(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function C(e){try{e.focus({preventScroll:!0})}catch(r){try{e.focus()}catch(e){}}}function R(e,r,n){if(s.isReactNative)try{var o=require("react-native");return new Promise((function(r,t){o.Linking.canOpenURL(e).then((function(n){n?o.Linking.openURL(e).then((function(){r()})):t()}))}))}catch(e){}var i=L(),a=i.document,c={focus:void 0,blur:void 0,visibilitychange:void 0},l={focus:void 0,blur:void 0,visibilitychange:void 0};return s.os===t.iOS?P(s.osVersion,"8.0")>=0?(l={visibilitychange:a},c={visibilitychange:"visibilitychange"}):(l={focus:i,blur:i},c={focus:"pageshow",blur:"pagehide"}):N.useStd?(l={focus:i,blur:i,visibilitychange:a},c={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}):(l={focus:a,blur:a,visibilitychange:a},c={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}),new Promise((function(t,o){var i,s=!1;function d(e){if(!s){s=!0;try{!function(){void 0!==i&&(clearTimeout(i),i=void 0);try{N.remove(l.blur,{type:c.blur,callback:u}),N.remove(l.focus,{type:c.focus,callback:f}),N.remove(l.visibilitychange,{type:c.visibilitychange,callback:p})}catch(e){}}(),e?t():o()}catch(e){t()}}}function u(){void 0!==i&&(clearTimeout(i),i=void 0),N.remove(l.blur,{type:c.blur,callback:u}),N.add(l.focus,{type:c.focus,callback:f})}function f(){d(!0)}function p(){(function(){var e=L().document;return"hidden"===e.visibilityState||"hidden"===e.webkitVisibilityState||"hidden"===e.mozVisibilityState||"hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus())})()&&d(!0)}i=globalThis.setTimeout((function(){d(!1)}),n),N.add(l.blur,{type:c.blur,callback:u}),N.add(l.visibilitychange,{type:c.visibilitychange,callback:p}),U(a)||function(){var e=L(),r=e.document;if(C(e),U(r))return!0;if(r.body.tabIndex<0&&(r.body.tabIndex=-1),C(r.body),U(r))return!0;var t=void 0;try{if(void 0===(t=_("input")))return!1;t.type="text",t.readOnly=!0,r.body.appendChild(t),C(t);try{t.select()}catch(e){}if(U(r))return!0}catch(e){}finally{if(void 0!==t){try{t.blur()}catch(e){}try{r.body.removeChild(t)}catch(e){}}}U(r)}();try{F(e,r),function(e){var r=L(),t=void 0;try{if(void 0===(t=_("iframe")))return;t.src=e,r.document.body.appendChild(t),globalThis.setTimeout((function(){if(void 0!==t)try{r.document.body.removeChild(t)}catch(e){}}),500)}catch(e){}}(e)}catch(e){d(!1)}}))}var H,D=function(e,r){function t(n){if(!(this instanceof t))return new t(n);var o=new r(n||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,t.prototype):o.__proto__=t.prototype,o.name=e,void 0!==n&&(o.message=n),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,t);else if(r.captureStackTrace&&"function"==typeof r.captureStackTrace)r.captureStackTrace(o,t);else try{var i=new r;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===r&&(r=Error),t.prototype=Object.create(r.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(t.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(r){try{t.prototype.name=e}catch(e){}}try{Object.defineProperty(t,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return t}("URLOpenError"),B={open:function(r){var n,o=s.os,i=[],a=[],c={};if(o===t.Android){if(void 0===(d=r[t.Android]))return Promise.reject(Q(a));if(n=d.timeout,c.scheme=ee(d.scheme),c.intent=ee(d.intent),c.packageName=d.packageName,c.fallback=ee(d.fallback),c.appStore=K(c.packageName,t.Android),c.webStore=z(c.packageName,t.Android),c.allowWebStore=d.allowWebStore,void 0!==c.intent&&(void 0===c.scheme||void 0===c.packageName||void 0===c.fallback)){var l=function(e){for(var r={},t=e.split("#Intent;"),n=t[0].substring(9),o=t[1],i=o.substring(0,o.length-4).split(";"),a={},s=0;s<i.length;s++){var c=i[s],l=c.indexOf("=");-1!==l&&(a[c.substring(0,l)]=c.substring(l+1))}void 0!==a.scheme&&(r.scheme=a.scheme+"://"+n);void 0!==a.package&&(r.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(r.fallback=a["S.browser_fallback_url"]);return r}(c.intent);void 0!==l.scheme&&void 0===c.scheme&&(c.scheme=l.scheme),void 0!==l.packageName&&void 0===c.packageName&&(c.packageName=l.packageName),void 0!==l.fallback&&void 0===c.fallback&&(c.fallback=l.fallback)}void 0!==c.scheme&&void 0===c.intent&&(c.intent=function(e,r,n){var o=e.split("://"),i=o[0],a=o[1],s="intent://";void 0!==a&&(s+=a);s=s+"#Intent;scheme="+i+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==r&&(s=s+"package="+r+";");void 0!==n&&"string"==typeof n?s=s+"S.browser_fallback_url="+n+";":void 0!==r&&(s=s+"S.browser_fallback_url="+K(r,t.Android)+";");return s+"end"}(c.scheme,c.packageName,c.fallback))}else if(o===t.iOS){if(void 0===(d=r[t.iOS]))return Promise.reject(Q(a));n=d.timeout,c.scheme=ee(d.scheme),c.bundleId=d.bundleId,c.trackId=d.trackId,c.universal=ee(d.universal),c.fallback=ee(d.fallback),c.appStore=K(c.trackId,t.iOS),c.webStore=z(c.trackId,t.iOS),c.allowWebStore=d.allowWebStore,void 0!==c.bundleId&&void 0===c.trackId&&(c.trackId=G(c.bundleId))}else if(o===t.Windows){if(void 0===(d=r[t.Windows]))return Promise.reject(Q(a));n=d.timeout,c.scheme=ee(d.scheme),c.productId=d.productId,c.fallback=ee(d.fallback),c.appStore=K(c.productId,t.Windows),c.webStore=z(c.productId,t.Windows),c.allowWebStore=d.allowWebStore}else if(o===t.MacOS){var d;if(void 0===(d=r[t.MacOS]))return Promise.reject(Q(a));n=d.timeout,c.scheme=ee(d.scheme),c.bundleId=d.bundleId,c.trackId=d.trackId,c.fallback=ee(d.fallback),c.appStore=K(c.trackId,t.MacOS),c.webStore=z(c.trackId,t.MacOS),c.allowWebStore=d.allowWebStore,void 0!==c.bundleId&&void 0===c.trackId&&(c.trackId=G(c.bundleId))}Y(i,c.intent,e.Intent,X()),Y(i,c.universal,e.Universal,J()),Y(i,c.scheme,e.Scheme),Y(i,c.fallback,e.Fallback),Y(i,c.appStore,e.Store),Y(i,c.webStore,e.Store,c.allowWebStore),void 0===n&&(n=q(o));return new Promise((function(e,r){return function t(o){if(void 0===o&&(o=0),o>=i.length)return r(Q(a));var s=i[o],c=s[0],l=s[1];if("string"==typeof l)return a[o]=l,R(l,o,n).then((function(){e(c)})).catch((function(){t(o+1)}));a[o]="[function fallback]",l(),e(c)}()}))},messenger:(H={},H[r.Telephone]=function(e){return ne(e,"tel")},H[r.Message]=function(e){return ne(e,"sms")},H[r.Mail]=function(e){return ne(e,"mailto")},H)};function G(e){try{var r=new XMLHttpRequest;if(r.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),r.send(),200===r.status)try{var t=JSON.parse(r.response);if(void 0===t.results)return;var n=t.results;if(!Array.isArray(n)||0===n.length)return;var o=n[0];if(void 0===o)return;return o.trackId}catch(e){return}return}catch(e){return}}function K(e,r){if(void 0!==e)switch(r){case t.Android:return"market://details?id="+e;case t.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case t.Windows:return"ms-windows-store://pdp/?ProductId="+e;case t.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new D('Unsupported OS: "'+s.userAgent+'"')}}function z(e,r){if(void 0!==e)switch(r){case t.Android:return"https://play.google.com/store/apps/details?id="+e;case t.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case t.Windows:return"https://apps.microsoft.com/detail/"+e;case t.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new D('Unsupported OS: "'+s.userAgent+'"')}}function q(e){switch(e){case t.iOS:return 2e3;case t.Android:return 1e3;default:return 750}}function X(){return s.os===t.Android&&(!(s.browser===i.SamsungInternet&&P(s.browserVersion,"17.0.1.69")>=0&&P(s.browserVersion,"17.0.7.34")<0)&&(!(s.browser===i.Firefox&&P(s.browserVersion,"41.0")<0)&&(!(s.browser===i.Firefox&&P(s.browserVersion,"58.0")>=0&&P(s.browserVersion,"68.11.0")<0)&&(!(s.browser===i.Firefox&&P(s.browserVersion,"79.0")>=0&&P(s.browserVersion,"81.2.0")<0)&&(!(s.browser===i.Firefox&&P(s.browserVersion,"96.0")>=0&&P(s.browserVersion,"107.0")<0)&&(!(s.browser===i.Opera&&P(s.browserVersion,"14.0")<0)&&!(/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(s.userAgent)||/instagram[\/ ][-\w.]+/i.test(s.userAgent)||/micromessenger\/([\w.]+)/i.test(s.userAgent)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(s.userAgent)||/ultralite app_version\/[\w.]+/i.test(s.userAgent))))))))}function J(){return s.os===t.iOS&&P(s.osVersion,"9.0")>=0}function Q(e){for(var r="",t=0;t<e.length;t++)r+="\n"+(t+1)+": "+e[t];return r.length>0&&(r="\n"+r+"\n"),new D("Failed to open any of the provided URLs: "+r)}function Y(e,r,t,n){void 0===n&&(n=!0),"function"!=typeof r&&"string"!=typeof r||!n||e.push([t,r])}function Z(e,r,t){void 0===t&&(t=",");for(var n=e.length,o="",i=0;i<n;i++)o+=r(e[i]),i!==n-1&&(o+=t);return o}function $(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function ee(e){return e instanceof URL?e.toString():e}function re(e){if("string"==typeof e)return $(e);if("number"==typeof e||"boolean"==typeof e)return $(String(e));if(null==e)return"";if(function(e){if(null==e||"string"==typeof e)return!1;var r=e.length;return"number"==typeof r&&r>=0&&!(r%1)}(e))return Z(e,(function(e){return re(e)}));if(e instanceof HTMLInputElement){var r=e.type;if("checkbox"===r)return $(e.checked.toString());if("radio"===r)return e.checked?$(e.value):"";if("file"===r){var t=e.files;return null===t?"":Z(t,(function(e){return $(e.name)}))}return $(e.value)}return e instanceof HTMLSelectElement?e.multiple?Z(e.selectedOptions,(function(e){return $(e.value)})):$(e.value):e instanceof HTMLTextAreaElement?$(e.value):e instanceof HTMLElement?$(e.innerText):e instanceof Node?re(e.textContent):$(e.toString())}function te(e){if(e instanceof HTMLFormElement)return te(new FormData(e));if(e instanceof FormData){var r={};return e.forEach((function(e,t){var n;if(n=e instanceof File?e.name:e,Object.prototype.hasOwnProperty.call(r,t)){var o=r[t];Array.isArray(o)?o.push(n):r[t]=[o,n]}else r[t]=n})),te(r)}for(var t={},n=Object.keys(e),o=0;o<n.length;o++){var i=n[o];t[i]=re(e[i])}return void 0===t.to&&(t.to=""),void 0===t.cc&&(t.cc=""),void 0===t.bcc&&(t.bcc=""),void 0===t.subject&&(t.subject=""),void 0===t.body&&(t.body=""),t}function ne(e,r){return R(r+":"+(e=te(e)).to+"?cc="+e.cc+"&bcc="+e.bcc+"&subject="+e.subject+"&body="+e.body,0,q(s.os))}return{installed:!1,name:"App",module:B,Constants:{AppOpenState:e,Messengers:r},Errors:{URLOpenError:D}}}));
1
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).App=r()}(this,(function(){"use strict";var e,r,n,t,o,i;function a(e,r){for(var n=e.split("."),t=r.split("."),o=Math.max(n.length,t.length),i=0;i<o;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(e||(e={})),function(e){e.Telephone="telephone",e.Message="message",e.Mail="mail"}(r||(r={})),function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(n||(n={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(t||(t={})),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"}(o||(o={})),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 s="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",c={device:t.Unknown,os:n.Unknown,osVersion:"",engine:o.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 r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:s,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(s),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||/ electron\//i.test(s),isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},l=[[/windows nt (6\.[23]); arm/i,n.Windows,f],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,n.Windows,f],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,n.Windows,f],[/windows nt ?([\d.)]*)(?!.+xbox)/i,n.Windows,f],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,n.Windows,f],[/windows ce\/?([\d.]*)/i,n.Windows,f],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,p],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,n.iOS,p],[/cfnetwork\/.+darwin/i,n.iOS,p],[/mac os x ?([\w. ]*)/i,n.MacOS,p],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,n.MacOS,p],[/droid ([\w.]+)\b.+(android[- ]x86)/i,n.Android],[/android\w*[-\/.; ]?([\d.]*)/i,n.Android]],d=[[/windows.+ edge\/([\w.]+)/i,o.EdgeHTML],[/arkweb\/([\w.]+)/i,o.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,o.Blink],[/presto\/([\w.]+)/i,o.Presto],[/webkit\/([\w.]+)/i,o.WebKit],[/trident\/([\w.]+)/i,o.Trident],[/netfront\/([\w.]+)/i,o.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,o.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,o.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,o.Gecko]],u=[[/\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 f(e){if(void 0===e)return"";var r={"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!==r?r:e}function p(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,r){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":r}function b(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function v(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}for(var h=0;h<l.length;h++){var w=(S=l[h])[0],g=S[1],y=S[2];if(null!==(j=c.userAgent.match(w))){c.os=g,c.osVersion=b(j[1],y);break}}c.os===n.iOS&&0===a(c.osVersion,"18.6")&&(null!==(O=/\) Version\/([\d.]+)/.exec(c.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(c.osVersion=O[1]));for(h=0;h<d.length;h++){w=(S=d[h])[0];var k=S[1];y=S[2];if(null!==(j=c.userAgent.match(w))){c.engine=k,c.engineVersion=b(j[1],y);break}}for(h=0;h<u.length;h++){w=(S=u[h])[0];var S,j,T=S[1];y=S[2];if(null!==(j=c.userAgent.match(w))){c.browser=T,c.browserVersion=b(j[1],y);break}}if(c.isReactNative)try{g=(I=require("react-native").Platform).OS;var O=v(E=""+I.Version);switch(g){case"android":c.os=n.Android,c.osVersion=function(e,r){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":r}(O,E);break;case"ios":c.os=n.iOS,c.osVersion=E;break;case"windows":c.os=n.Windows,c.osVersion=m(O,E);break;case"macos":c.os=n.MacOS,c.osVersion=E}}catch(e){}if(c.isNodeJS)try{var E,I=(g=require("os")).platform();O=v(E=g.release());switch(I){case"win32":c.os=n.Windows,c.osVersion=m(O,E);break;case"darwin":c.os=n.MacOS,c.osVersion=function(e,r){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:r}(O,E);break;case"android":c.os=n.Android,c.osVersion=E;break;case"linux":/android/i.test(E)&&(c.os=n.Android,c.osVersion=E)}}catch(e){}function x(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];for(var t="",o=0;o<r.length-2;o++){var i=r[o];void 0!==i&&(t=t+i.charAt(0).toUpperCase()+i.slice(1))}return t}function A(){this.returnValue=!1}function V(){this.cancelBubble=!0}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(e){for(var r,t=e.fullVersionList||e.brands||[],o=e.platformVersion,i=0;i<t.length;i++){var a=null==(r=t[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(c.engineVersion=l)}"string"==typeof o&&(c.os===n.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?c.osVersion="11":c.osVersion=o)})),c.device=c.os===n.iOS||c.os===n.Android?t.Mobile:c.os===n.Windows||c.os===n.MacOS?t.Desktop:t.Unknown,c.isMobile=c.device===t.Mobile,c.isDesktop=c.device===t.Desktop,c.isStandalone=function(e){return"matchMedia"in globalThis&&(e===n.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(c.os);var M=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,W=["","webkit","moz","ms","MS","o","O"],N={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},L={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var t=L.withVender(e,r.type),o=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(t,n,o)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(t,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+t,n.__ieWrapper):e.attachEvent("on"+t,n.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=A),"function"!=typeof r.stopPropagation&&(r.stopPropagation=V),"function"==typeof n?n.call(e,r):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var t=L.withVender(e,r.type),o=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(t,n,o)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(t,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=n.__ieWrapper;void 0!==i&&(e.detachEvent("on"+t,i),delete n.__ieWrapper)}}},withVender:function(e,r){if(void 0===r)return"";if("webkitEnterFullscreen"in e&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(r)>-1)return r;var n;n=r in N?N[r]:M.test(r)?[r,r.replace(M,x)]:[r];for(var t=0;t<W.length;t++)for(var o=0;o<n.length;o++){var i=W[t]+n[o];if(void 0!==e["on"+i])return i}return""}};function _(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function P(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),r?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}function F(e,r){var n=_(),t=n.document,o=void 0;try{if(0===r)return void(n.location.href=e);if(void 0===(o=P("a")))return;o.href=e,t.body.appendChild(o),function(e,r){var n;void 0===r&&(r=window);try{n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:r})}catch(e){(n=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(n)}(o,n)}catch(e){}finally{if(void 0!==o)try{t.body.removeChild(o)}catch(e){}}}function U(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function C(e){try{e.focus({preventScroll:!0})}catch(r){try{e.focus()}catch(e){}}}function R(e,r,t){var o=_(),i=o.document,s={focus:void 0,blur:void 0,visibilitychange:void 0},l={focus:void 0,blur:void 0,visibilitychange:void 0};return c.os===n.iOS?a(c.osVersion,"8.0")>=0?(l={visibilitychange:i},s={visibilitychange:"visibilitychange"}):(l={focus:o,blur:o},s={focus:"pageshow",blur:"pagehide"}):L.useStd?(l={focus:o,blur:o,visibilitychange:i},s={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}):(l={focus:i,blur:i,visibilitychange:i},s={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}),new Promise((function(n,o){var a,c=!1;function d(e){if(!c){c=!0;try{!function(){void 0!==a&&(clearTimeout(a),a=void 0);try{L.remove(l.blur,{type:s.blur,callback:u}),L.remove(l.focus,{type:s.focus,callback:f}),L.remove(l.visibilitychange,{type:s.visibilitychange,callback:p})}catch(e){}}(),e?n():o()}catch(e){n()}}}function u(){void 0!==a&&(clearTimeout(a),a=void 0),L.remove(l.blur,{type:s.blur,callback:u}),L.add(l.focus,{type:s.focus,callback:f})}function f(){d(!0)}function p(){(function(){var e=_().document;return"hidden"===e.visibilityState||"hidden"===e.webkitVisibilityState||"hidden"===e.mozVisibilityState||"hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus())})()&&d(!0)}a=globalThis.setTimeout((function(){d(!1)}),t),L.add(l.blur,{type:s.blur,callback:u}),L.add(l.visibilitychange,{type:s.visibilitychange,callback:p}),U(i)||function(){var e=_(),r=e.document;if(C(e),U(r))return!0;if(r.body.tabIndex<0&&(r.body.tabIndex=-1),C(r.body),U(r))return!0;var n=void 0;try{if(void 0===(n=P("input")))return!1;n.type="text",n.readOnly=!0,r.body.appendChild(n),C(n);try{n.select()}catch(e){}if(U(r))return!0}catch(e){}finally{if(void 0!==n){try{n.blur()}catch(e){}try{r.body.removeChild(n)}catch(e){}}}U(r)}();try{F(e,r),function(e){var r=_(),n=void 0;try{if(void 0===(n=P("iframe")))return;n.src=e,r.document.body.appendChild(n),globalThis.setTimeout((function(){if(void 0!==n)try{r.document.body.removeChild(n)}catch(e){}}),500)}catch(e){}}(e)}catch(e){d(!1)}}))}function H(e,r,n){return c.isReactNative?function(e){try{var r=require("react-native").Linking;return new Promise((function(n,t){r.canOpenURL(e).then((function(o){o?r.openURL(e).then(n).catch(t):t()})).catch(t)}))}catch(e){return Promise.reject()}}(e):c.isElectron?function(e){try{var r=require("electron").shell;return new Promise((function(n,t){r.openExternal(e).then(n).catch(t)}))}catch(e){return Promise.reject()}}(e):R(e,r,n)}var D,B=function(e,r){function n(t){if(!(this instanceof n))return new n(t);var o=new r(t||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==t&&(o.message=t),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(r.captureStackTrace&&"function"==typeof r.captureStackTrace)r.captureStackTrace(o,n);else try{var i=new r;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===r&&(r=Error),n.prototype=Object.create(r.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(r){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}("URLOpenError"),G={open:function(r){var t,o=c.os,i=[],a=[],s={};if(o===n.Android){if(void 0===(d=r[n.Android]))return Promise.reject(Y(a));if(t=d.timeout,s.scheme=re(d.scheme),s.intent=re(d.intent),s.packageName=d.packageName,s.fallback=re(d.fallback),s.appStore=q(s.packageName,n.Android),s.webStore=z(s.packageName,n.Android),s.allowWebStore=d.allowWebStore,void 0!==s.intent&&(void 0===s.scheme||void 0===s.packageName||void 0===s.fallback)){var l=function(e){for(var r={},n=e.split("#Intent;"),t=n[0].substring(9),o=n[1],i=o.substring(0,o.length-4).split(";"),a={},s=0;s<i.length;s++){var c=i[s],l=c.indexOf("=");-1!==l&&(a[c.substring(0,l)]=c.substring(l+1))}void 0!==a.scheme&&(r.scheme=a.scheme+"://"+t);void 0!==a.package&&(r.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(r.fallback=a["S.browser_fallback_url"]);return r}(s.intent);void 0!==l.scheme&&void 0===s.scheme&&(s.scheme=l.scheme),void 0!==l.packageName&&void 0===s.packageName&&(s.packageName=l.packageName),void 0!==l.fallback&&void 0===s.fallback&&(s.fallback=l.fallback)}void 0!==s.scheme&&void 0===s.intent&&(s.intent=function(e,r,t){var o=e.split("://"),i=o[0],a=o[1],s="intent://";void 0!==a&&(s+=a);s=s+"#Intent;scheme="+i+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==r&&(s=s+"package="+r+";");void 0!==t&&"string"==typeof t?s=s+"S.browser_fallback_url="+t+";":void 0!==r&&(s=s+"S.browser_fallback_url="+q(r,n.Android)+";");return s+"end"}(s.scheme,s.packageName,s.fallback))}else if(o===n.iOS){if(void 0===(d=r[n.iOS]))return Promise.reject(Y(a));t=d.timeout,s.scheme=re(d.scheme),s.bundleId=d.bundleId,s.trackId=d.trackId,s.universal=re(d.universal),s.fallback=re(d.fallback),s.appStore=q(s.trackId,n.iOS),s.webStore=z(s.trackId,n.iOS),s.allowWebStore=d.allowWebStore,void 0!==s.bundleId&&void 0===s.trackId&&(s.trackId=K(s.bundleId))}else if(o===n.Windows){if(void 0===(d=r[n.Windows]))return Promise.reject(Y(a));t=d.timeout,s.scheme=re(d.scheme),s.productId=d.productId,s.fallback=re(d.fallback),s.appStore=q(s.productId,n.Windows),s.webStore=z(s.productId,n.Windows),s.allowWebStore=d.allowWebStore}else if(o===n.MacOS){var d;if(void 0===(d=r[n.MacOS]))return Promise.reject(Y(a));t=d.timeout,s.scheme=re(d.scheme),s.bundleId=d.bundleId,s.trackId=d.trackId,s.fallback=re(d.fallback),s.appStore=q(s.trackId,n.MacOS),s.webStore=z(s.trackId,n.MacOS),s.allowWebStore=d.allowWebStore,void 0!==s.bundleId&&void 0===s.trackId&&(s.trackId=K(s.bundleId))}Z(i,s.intent,e.Intent,J()),Z(i,s.universal,e.Universal,Q()),Z(i,s.scheme,e.Scheme),Z(i,s.fallback,e.Fallback),Z(i,s.appStore,e.Store),Z(i,s.webStore,e.Store,s.allowWebStore),void 0===t&&(t=X(o));return new Promise((function(e,r){return function n(o){if(void 0===o&&(o=0),o>=i.length)return r(Y(a));var s=i[o],c=s[0],l=s[1];if("string"==typeof l)return a[o]=l,H(l,o,t).then((function(){e(c)})).catch((function(){n(o+1)}));a[o]="[function fallback]",l(),e(c)}()}))},messenger:(D={},D[r.Telephone]=function(e){return oe(e,"tel")},D[r.Message]=function(e){return oe(e,"sms")},D[r.Mail]=function(e){return oe(e,"mailto")},D)};function K(e){try{var r=new XMLHttpRequest;if(r.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),r.send(),200===r.status)try{var n=JSON.parse(r.response);if(void 0===n.results)return;var t=n.results;if(!Array.isArray(t)||0===t.length)return;var o=t[0];if(void 0===o)return;return o.trackId}catch(e){return}return}catch(e){return}}function q(e,r){if(void 0!==e)switch(r){case n.Android:return"market://details?id="+e;case n.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case n.Windows:return"ms-windows-store://pdp/?ProductId="+e;case n.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new B('Unsupported OS: "'+c.userAgent+'"')}}function z(e,r){if(void 0!==e)switch(r){case n.Android:return"https://play.google.com/store/apps/details?id="+e;case n.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case n.Windows:return"https://apps.microsoft.com/detail/"+e;case n.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new B('Unsupported OS: "'+c.userAgent+'"')}}function X(e){switch(e){case n.iOS:return 2e3;case n.Android:return 1e3;default:return 750}}function J(){return c.os===n.Android&&(!(c.browser===i.SamsungInternet&&a(c.browserVersion,"17.0.1.69")>=0&&a(c.browserVersion,"17.0.7.34")<0)&&(!(c.browser===i.Firefox&&a(c.browserVersion,"41.0")<0)&&(!(c.browser===i.Firefox&&a(c.browserVersion,"58.0")>=0&&a(c.browserVersion,"68.11.0")<0)&&(!(c.browser===i.Firefox&&a(c.browserVersion,"79.0")>=0&&a(c.browserVersion,"81.2.0")<0)&&(!(c.browser===i.Firefox&&a(c.browserVersion,"96.0")>=0&&a(c.browserVersion,"107.0")<0)&&(!(c.browser===i.Opera&&a(c.browserVersion,"14.0")<0)&&!(/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(c.userAgent)||/instagram[\/ ][-\w.]+/i.test(c.userAgent)||/micromessenger\/([\w.]+)/i.test(c.userAgent)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(c.userAgent)||/ultralite app_version\/[\w.]+/i.test(c.userAgent))))))))}function Q(){return c.os===n.iOS&&a(c.osVersion,"9.0")>=0}function Y(e){for(var r="",n=0;n<e.length;n++)r+="\n"+(n+1)+": "+e[n];return r.length>0&&(r="\n"+r+"\n"),new B("Failed to open any of the provided URLs: "+r)}function Z(e,r,n,t){void 0===t&&(t=!0),"function"!=typeof r&&"string"!=typeof r||!t||e.push([n,r])}function $(e,r,n){void 0===n&&(n=",");for(var t=e.length,o="",i=0;i<t;i++)o+=r(e[i]),i!==t-1&&(o+=n);return o}function ee(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function re(e){return e instanceof URL?e.toString():e}function ne(e){if("string"==typeof e)return ee(e);if("number"==typeof e||"boolean"==typeof e)return ee(String(e));if(null==e)return"";if(function(e){if(null==e||"string"==typeof e)return!1;var r=e.length;return"number"==typeof r&&r>=0&&!(r%1)}(e))return $(e,(function(e){return ne(e)}));if(e instanceof HTMLInputElement){var r=e.type;if("checkbox"===r)return ee(e.checked.toString());if("radio"===r)return e.checked?ee(e.value):"";if("file"===r){var n=e.files;return null===n?"":$(n,(function(e){return ee(e.name)}))}return ee(e.value)}return e instanceof HTMLSelectElement?e.multiple?$(e.selectedOptions,(function(e){return ee(e.value)})):ee(e.value):e instanceof HTMLTextAreaElement?ee(e.value):e instanceof HTMLElement?ee(e.innerText):e instanceof Node?ne(e.textContent):ee(e.toString())}function te(e){if(e instanceof HTMLFormElement)return te(new FormData(e));if(e instanceof FormData){var r={};return e.forEach((function(e,n){var t;if(t=e instanceof File?e.name:e,Object.prototype.hasOwnProperty.call(r,n)){var o=r[n];Array.isArray(o)?o.push(t):r[n]=[o,t]}else r[n]=t})),te(r)}for(var n={},t=Object.keys(e),o=0;o<t.length;o++){var i=t[o];n[i]=ne(e[i])}return void 0===n.to&&(n.to=""),void 0===n.cc&&(n.cc=""),void 0===n.bcc&&(n.bcc=""),void 0===n.subject&&(n.subject=""),void 0===n.body&&(n.body=""),n}function oe(e,r){return H(r+":"+(e=te(e)).to+"?cc="+e.cc+"&bcc="+e.bcc+"&subject="+e.subject+"&body="+e.body,0,X(c.os))}return{installed:!1,name:"App",module:G,Constants:{AppOpenState:e,Messengers:r},Errors:{URLOpenError:B}}}));
@@ -1 +1 @@
1
- export default function tryOpenUrl(url: string, index: number, timeout: number): Promise<void>;
1
+ export default function tryOpenURL(url: string, index: number, timeout: number): Promise<void>;