native-fn 1.0.76 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.cjs +1 -1
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/native.umd.js +1 -1
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +95 -51
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +95 -51
- package/dist/plugin/app/index.umd.js +95 -51
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +2 -0
- package/dist/plugin/appearance/index.cjs +95 -51
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +95 -51
- package/dist/plugin/appearance/index.umd.js +95 -51
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +2 -0
- package/dist/plugin/clipboard/index.cjs +95 -51
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +95 -51
- package/dist/plugin/clipboard/index.umd.js +95 -51
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +2 -0
- package/dist/plugin/fullscreen/index.cjs +95 -51
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +95 -51
- package/dist/plugin/fullscreen/index.umd.js +95 -51
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +2 -0
- package/dist/plugin/platform/index.cjs +95 -51
- package/dist/plugin/platform/index.d.ts +2 -0
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +95 -51
- package/dist/plugin/platform/index.umd.js +95 -51
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +2 -0
- package/dist/plugin/theme/index.cjs +95 -51
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +95 -51
- package/dist/plugin/theme/index.umd.js +95 -51
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +2 -0
- package/dist/src/plugin/platform/types/platform.d.ts +2 -0
- package/package.json +7 -7
|
@@ -75,12 +75,18 @@
|
|
|
75
75
|
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
76
76
|
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
77
77
|
|
|
78
|
+
var readyState = 'loading';
|
|
79
|
+
var readyCallback = [];
|
|
80
|
+
var pendingTasks = 0;
|
|
78
81
|
var Platform = {
|
|
79
82
|
os: { name: OS.Unknown, version: '' },
|
|
80
83
|
engine: { name: Engines.Unknown, version: '' },
|
|
81
84
|
browser: { name: Browsers.Unknown, version: '' },
|
|
82
85
|
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
83
86
|
userAgent: USER_AGENT,
|
|
87
|
+
get readyState() {
|
|
88
|
+
return readyState;
|
|
89
|
+
},
|
|
84
90
|
get network() {
|
|
85
91
|
return getNetwork();
|
|
86
92
|
},
|
|
@@ -113,6 +119,18 @@
|
|
|
113
119
|
return false;
|
|
114
120
|
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
115
121
|
},
|
|
122
|
+
onready: function (callback) {
|
|
123
|
+
if (this.readyState === 'complete') {
|
|
124
|
+
try {
|
|
125
|
+
callback(this);
|
|
126
|
+
}
|
|
127
|
+
catch (_) {
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
readyCallback.push(callback);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
116
134
|
};
|
|
117
135
|
var OS_RESOLVER_MAP = [
|
|
118
136
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -180,6 +198,26 @@
|
|
|
180
198
|
'HeadlessChrome': 'Chrome Headless',
|
|
181
199
|
'OperaMobile': 'Opera Mobi',
|
|
182
200
|
};
|
|
201
|
+
function incrementPendingTasks() {
|
|
202
|
+
pendingTasks++;
|
|
203
|
+
}
|
|
204
|
+
function decrementPendingTasks() {
|
|
205
|
+
pendingTasks--;
|
|
206
|
+
checkReady();
|
|
207
|
+
}
|
|
208
|
+
function checkReady() {
|
|
209
|
+
if (pendingTasks === 0 && readyState === 'loading') {
|
|
210
|
+
readyState = 'complete';
|
|
211
|
+
for (var i = 0; i < readyCallback.length; i++) {
|
|
212
|
+
try {
|
|
213
|
+
readyCallback[i](Platform);
|
|
214
|
+
}
|
|
215
|
+
catch (_) {
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
readyCallback.length = 0;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
183
221
|
function resolveWindowsVersion(string) {
|
|
184
222
|
if (string === undefined)
|
|
185
223
|
return '';
|
|
@@ -380,6 +418,7 @@
|
|
|
380
418
|
break;
|
|
381
419
|
}
|
|
382
420
|
}
|
|
421
|
+
decrementPendingTasks();
|
|
383
422
|
}
|
|
384
423
|
function getRenderer() {
|
|
385
424
|
if (typeof globalThis.document === 'undefined')
|
|
@@ -489,9 +528,6 @@
|
|
|
489
528
|
}
|
|
490
529
|
return network;
|
|
491
530
|
}
|
|
492
|
-
function canUseHighEntropyValues(navigator) {
|
|
493
|
-
return typeof globalThis.navigator !== 'undefined' && typeof navigator.userAgentData !== 'undefined' && typeof navigator.userAgentData.getHighEntropyValues !== 'undefined';
|
|
494
|
-
}
|
|
495
531
|
function init() {
|
|
496
532
|
if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(USER_AGENT)))
|
|
497
533
|
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
@@ -624,6 +660,7 @@
|
|
|
624
660
|
}
|
|
625
661
|
}
|
|
626
662
|
if (typeof globalThis.document !== 'undefined') {
|
|
663
|
+
incrementPendingTasks();
|
|
627
664
|
if (typeof globalThis.device !== 'undefined') {
|
|
628
665
|
parseOSFromCordova();
|
|
629
666
|
}
|
|
@@ -631,61 +668,68 @@
|
|
|
631
668
|
globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
|
|
632
669
|
}
|
|
633
670
|
}
|
|
634
|
-
if (
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
.userAgentData
|
|
638
|
-
.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
671
|
+
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
672
|
+
incrementPendingTasks();
|
|
673
|
+
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
639
674
|
.then(function (result) {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
var
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
675
|
+
try {
|
|
676
|
+
var brands = result.fullVersionList || result.brands || [];
|
|
677
|
+
var platformVersion = result.platformVersion;
|
|
678
|
+
var platform = result.platform;
|
|
679
|
+
var browserName = Platform.browser.name;
|
|
680
|
+
var prevBrandName = null;
|
|
681
|
+
for (var i = 0; i < brands.length; i++) {
|
|
682
|
+
var brand = normalizeBrand(brands[i]);
|
|
683
|
+
var brandVersion = brand.version;
|
|
684
|
+
var brandName = brand.brand;
|
|
685
|
+
if (/not.a.brand/i.test(brandName))
|
|
686
|
+
continue;
|
|
687
|
+
if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
|
|
688
|
+
brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
|
|
689
|
+
prevBrandName = browserName;
|
|
690
|
+
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
691
|
+
browserName = brandName;
|
|
692
|
+
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
693
|
+
Platform.browser.name = Browsers.Chrome;
|
|
694
|
+
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
695
|
+
Platform.browser.name = Browsers.Edge;
|
|
696
|
+
else if (browserName === 'Opera Mobi')
|
|
697
|
+
Platform.browser.name = Browsers.Opera;
|
|
698
|
+
Platform.browser.version = brandVersion;
|
|
699
|
+
}
|
|
700
|
+
prevBrandName = brandName;
|
|
663
701
|
}
|
|
664
|
-
|
|
702
|
+
if (brandName === 'Chromium')
|
|
703
|
+
Platform.engine.version = brandVersion;
|
|
704
|
+
}
|
|
705
|
+
if (typeof platformVersion === 'string') {
|
|
706
|
+
if (Platform.os.name === OS.Windows)
|
|
707
|
+
Platform.os.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
708
|
+
else
|
|
709
|
+
Platform.os.version = platformVersion;
|
|
710
|
+
}
|
|
711
|
+
if (typeof platform === 'string') {
|
|
712
|
+
if (/android/i.test(platform))
|
|
713
|
+
Platform.os.name = OS.Android;
|
|
714
|
+
else if (/ios|iphone|ipad/i.test(platform))
|
|
715
|
+
Platform.os.name = OS.iOS;
|
|
716
|
+
else if (/windows|win32/i.test(platform))
|
|
717
|
+
Platform.os.name = OS.Windows;
|
|
718
|
+
else if (/macos|macintel/i.test(platform))
|
|
719
|
+
Platform.os.name = OS.MacOS;
|
|
665
720
|
}
|
|
666
|
-
if (
|
|
667
|
-
Platform.
|
|
721
|
+
if (result.mobile === true)
|
|
722
|
+
Platform.device = Devices.Mobile;
|
|
668
723
|
}
|
|
669
|
-
|
|
670
|
-
if (Platform.os.name === OS.Windows)
|
|
671
|
-
Platform.os.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
672
|
-
else
|
|
673
|
-
Platform.os.version = platformVersion;
|
|
724
|
+
catch (_) {
|
|
674
725
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
Platform.os.name = OS.Android;
|
|
678
|
-
else if (/ios|iphone|ipad/i.test(platform))
|
|
679
|
-
Platform.os.name = OS.iOS;
|
|
680
|
-
else if (/windows|win32/i.test(platform))
|
|
681
|
-
Platform.os.name = OS.Windows;
|
|
682
|
-
else if (/macos|macintel/i.test(platform))
|
|
683
|
-
Platform.os.name = OS.MacOS;
|
|
726
|
+
finally {
|
|
727
|
+
decrementPendingTasks();
|
|
684
728
|
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
});
|
|
729
|
+
})
|
|
730
|
+
.catch(decrementPendingTasks);
|
|
688
731
|
}
|
|
732
|
+
checkReady();
|
|
689
733
|
}
|
|
690
734
|
init();
|
|
691
735
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).Theme=o()}(this,(function(){"use strict";var e,o,i,r,n;!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"}(o||(o={})),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"}(i||(i={})),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"}(r||(r={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(n||(n={}));var a=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",t={os:{name:e.Unknown,version:""},engine:{name:i.Unknown,version:""},browser:{name:r.Unknown,version:""},crossPlatformFramework:n.Unknown,userAgent:a,get network(){return function(){var o={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(o.isOnline=globalThis.navigator.onLine);var i=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==i&&(void 0!==i.effectiveType&&(o.effectiveType=i.effectiveType),void 0!==i.type&&(o.type=i.type),void 0!==i.downlink&&(o.downlink=i.downlink),void 0!==i.rtt&&(o.rtt=i.rtt),void 0!==i.saveData&&(o.saveData=i.saveData))}if(t.isNode){try{for(var r=require("os").networkInterfaces(),n=Object.keys(r),a=0;a<n.length;a++){for(var s=r[n[a]],l=0;l<s.length;l++){var m=s[l];m.internal||"IPv4"!==m.family||(o.isOnline=!0)}if(o.isOnline)break}}catch(e){}try{var d=require("child_process");if(t.os.name===e.Windows){try{(c=d.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&c.includes("connected")&&(o.type="wifi")}catch(e){}if(null===o.type)try{(c=d.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(o.type="ethernet")}catch(e){}null===o.type&&(o.type="other")}else if(t.os.name===e.MacOS)try{var c=d.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),u=d.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});u.includes("en0")&&c.includes("Wi-Fi")?o.type="wifi":u.includes("en")||c.includes("Ethernet")?o.type="ethernet":o.type="other"}catch(e){o.type="other"}}catch(e){}}return o}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?o.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?o.Desktop:o.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var o=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===o)return"";if(o instanceof WebGLRenderingContext||"getParameter"in o&&"function"==typeof o.getParameter){var i=o.getExtension("WEBGL_debug_renderer_info");return null===i?o.getParameter(o.RENDERER):o.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===o.Mobile},get isDesktop(){return this.device===o.Desktop},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return this.os.name===e.iOS?"standalone"in globalThis.navigator&&!!globalThis.navigator.standalone:"matchMedia"in globalThis&&globalThis.matchMedia("(display-mode: standalone)").matches}},s=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,u],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,u],[/cfnetwork\/.+darwin/i,e.iOS,u],[/mac os x ?([\w. ]*)/i,e.MacOS,u],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,u],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],m=[[/\b(?:crmo|crios)\/([\w.]+)/i,r.Chrome],[/webview.+edge\/([\w.]+)/i,r.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,r.Edge],[/opera mini\/([-\w.]+)/i,r.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,r.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,r.Opera],[/opios[\/ ]+([\w.]+)/i,r.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,r.Opera],[/\bopr\/([\w.]+)/i,r.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,r.IE],[/(?:ms|\()ie ([\w.]+)/i,r.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,r.IE],[/\bfocus\/([\w.]+)/i,r.Firefox],[/\bopt\/([\w.]+)/i,r.Opera],[/coast\/([\w.]+)/i,r.Opera],[/fxios\/([\w.-]+)/i,r.Firefox],[/samsungbrowser\/([\w.]+)/i,r.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,r.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,r.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,r.Chrome],[/chrome\/([\w.]+) mobile/i,r.Chrome],[/chrome\/v?([\w.]+)/i,r.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/version\/([\w.,]+) .*safari/i,r.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,r.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,r.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,r.Firefox],[/firefox\/([\w.]+)/i,r.Firefox]],d={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function c(e){if(void 0===e)return"";var o={"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!==o?o:e}function u(e){return void 0===e?"":e.replace(/_/g,".")}function v(e,o){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":o}function w(e,o){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:o}function g(e,o){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||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":o}function b(e,o){return"function"==typeof o?o(e):"string"==typeof o?o:void 0===e?"":e}function f(e){var o=e.split(".");return{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")}}function h(){if(t.crossPlatformFramework=n.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":t.os={name:e.Android,version:globalThis.device.version};break;case"iOS":t.os={name:e.iOS,version:globalThis.device.version}}}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(a))&&(t.crossPlatformFramework=n.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(t.crossPlatformFramework=n.ReactNative);for(var i=0;i<s.length;i++){var c=(k=s[i])[0],u=k[1],p=k[2];if(null!==(y=t.userAgent.match(c))){t.os={name:u,version:b(y[1],p)};break}}var T;for(t.os.name===e.iOS&&0===function(e,o){for(var i=e.split("."),r=o.split("."),n=Math.max(i.length,r.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<i.length?parseInt(i[a],10):0)>(s=a<r.length?parseInt(r[a],10):0))return 1;if(t<s)return-1}return 0}(t.os.version,"18.6")&&null!==(O=/\) Version\/([\d.]+)/.exec(t.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(t.os.version=O[1]),i=0;i<l.length;i++){c=(k=l[i])[0];var j=k[1];p=k[2];if(null!==(y=t.userAgent.match(c))){t.engine={name:j,version:b(y[1],p)};break}}for(i=0;i<m.length;i++){c=(k=m[i])[0];var k,y,E=k[1];p=k[2];if(null!==(y=t.userAgent.match(c))){t.browser={name:E,version:b(y[1],p)};break}}if(t.crossPlatformFramework===n.ReactNative)try{u=(x=require("react-native").Platform).OS;var O=f(S=""+x.Version);switch(u){case"android":t.os={name:e.Android,version:g(O,S)};break;case"ios":t.os={name:e.iOS,version:S};break;case"windows":t.os={name:e.Windows,version:v(O,S)};break;case"macos":t.os={name:e.MacOS,version:S}}}catch(e){}if(t.isNode)try{var S,x=(u=require("os")).platform();O=f(S=u.release());switch(x){case"win32":t.os={name:e.Windows,version:v(O,S)};break;case"darwin":t.os={name:e.MacOS,version:w(O,S)};break;case"android":t.os={name:e.Android,version:S};break;case"linux":/android/i.test(S)&&(t.os={name:e.Android,version:S})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?h():globalThis.document.addEventListener("deviceready",h,!1)),T=globalThis.navigator,void 0!==globalThis.navigator&&void 0!==T.userAgentData&&void 0!==T.userAgentData.getHighEntropyValues&&globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(i){for(var n,a=i.fullVersionList||i.brands||[],s=i.platformVersion,l=i.platform,m=t.browser.name,c=null,u=0;u<a.length;u++){var v=null==(n=a[u])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},w=v.version,g=v.brand;/not.a.brand/i.test(g)||((null===c||/Chrom/.test(c)&&"Chromium"!==g||"Edge"===c&&/WebView2/.test(g))&&(g=d[g]||g,null!==(c=m)&&!/Chrom/.test(c)&&/Chrom/.test(g)||("Chrome"===(m=g)||"Chrome WebView"===m||"Chrome Headless"===m?t.browser.name=r.Chrome:"Edge"===m||"Edge WebView2"===m?t.browser.name=r.Edge:"Opera Mobi"===m&&(t.browser.name=r.Opera),t.browser.version=w),c=g),"Chromium"===g&&(t.engine.version=w))}"string"==typeof s&&(t.os.name===e.Windows?t.os.version=parseInt(s.split(".")[0],10)>=13?"11":"10":t.os.version=s),"string"==typeof l&&(/android/i.test(l)?t.os.name=e.Android:/ios|iphone|ipad/i.test(l)?t.os.name=e.iOS:/windows|win32/i.test(l)?t.os.name=e.Windows:/macos|macintel/i.test(l)&&(t.os.name=e.MacOS)),!0===i.mobile&&(t.device=o.Mobile)}))}();var p=/iemobile/i.test(t.userAgent),T=/windows phone/i.test(t.userAgent),j=null;function k(){return p?"msapplication-navbutton-color":T?"msapplication-TileColor":"theme-color"}function y(){return null!==j&&j.isConnected?j:j=globalThis.document.querySelector('meta[name="'+k()+'"]')}return{installed:!1,name:"Theme",module:{get value(){return(e=y())&&e.getAttribute("content")||void 0;var e},set value(e){var o;void 0===e?(o=y())&&(o.remove(),j=null):function(e){var o=y();null===o&&(o=function(){var e=globalThis.document.createElement("meta");return e.setAttribute("name",k()),globalThis.document.head.prepend(e),j=e}());o.setAttribute("content",e)}(e)}},Constants:{},Errors:{}}}));
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).Theme=o()}(this,(function(){"use strict";var e,o,i,r,n;!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"}(o||(o={})),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"}(i||(i={})),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"}(r||(r={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(n||(n={}));var a=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",t="loading",s=[],l=0,m={os:{name:e.Unknown,version:""},engine:{name:i.Unknown,version:""},browser:{name:r.Unknown,version:""},crossPlatformFramework:n.Unknown,userAgent:a,get readyState(){return t},get network(){return function(){var o={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(o.isOnline=globalThis.navigator.onLine);var i=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==i&&(void 0!==i.effectiveType&&(o.effectiveType=i.effectiveType),void 0!==i.type&&(o.type=i.type),void 0!==i.downlink&&(o.downlink=i.downlink),void 0!==i.rtt&&(o.rtt=i.rtt),void 0!==i.saveData&&(o.saveData=i.saveData))}if(m.isNode){try{for(var r=require("os").networkInterfaces(),n=Object.keys(r),a=0;a<n.length;a++){for(var t=r[n[a]],s=0;s<t.length;s++){var l=t[s];l.internal||"IPv4"!==l.family||(o.isOnline=!0)}if(o.isOnline)break}}catch(e){}try{var d=require("child_process");if(m.os.name===e.Windows){try{(c=d.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&c.includes("connected")&&(o.type="wifi")}catch(e){}if(null===o.type)try{(c=d.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(o.type="ethernet")}catch(e){}null===o.type&&(o.type="other")}else if(m.os.name===e.MacOS)try{var c=d.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),u=d.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});u.includes("en0")&&c.includes("Wi-Fi")?o.type="wifi":u.includes("en")||c.includes("Ethernet")?o.type="ethernet":o.type="other"}catch(e){o.type="other"}}catch(e){}}return o}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?o.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?o.Desktop:o.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var o=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===o)return"";if(o instanceof WebGLRenderingContext||"getParameter"in o&&"function"==typeof o.getParameter){var i=o.getExtension("WEBGL_debug_renderer_info");return null===i?o.getParameter(o.RENDERER):o.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===o.Mobile},get isDesktop(){return this.device===o.Desktop},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return this.os.name===e.iOS?"standalone"in globalThis.navigator&&!!globalThis.navigator.standalone:"matchMedia"in globalThis&&globalThis.matchMedia("(display-mode: standalone)").matches},onready:function(e){if("complete"===this.readyState)try{e(this)}catch(e){}else s.push(e)}},d=[[/windows nt (6\.[23]); arm/i,e.Windows,b],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,b],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,b],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,b],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,b],[/windows ce\/?([\d.]*)/i,e.Windows,b],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,h],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,h],[/cfnetwork\/.+darwin/i,e.iOS,h],[/mac os x ?([\w. ]*)/i,e.MacOS,h],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,h],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],c=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,r.Chrome],[/webview.+edge\/([\w.]+)/i,r.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,r.Edge],[/opera mini\/([-\w.]+)/i,r.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,r.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,r.Opera],[/opios[\/ ]+([\w.]+)/i,r.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,r.Opera],[/\bopr\/([\w.]+)/i,r.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,r.IE],[/(?:ms|\()ie ([\w.]+)/i,r.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,r.IE],[/\bfocus\/([\w.]+)/i,r.Firefox],[/\bopt\/([\w.]+)/i,r.Opera],[/coast\/([\w.]+)/i,r.Opera],[/fxios\/([\w.-]+)/i,r.Firefox],[/samsungbrowser\/([\w.]+)/i,r.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,r.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,r.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,r.Chrome],[/chrome\/([\w.]+) mobile/i,r.Chrome],[/chrome\/v?([\w.]+)/i,r.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/version\/([\w.,]+) .*safari/i,r.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,r.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,r.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,r.Firefox],[/firefox\/([\w.]+)/i,r.Firefox]],v={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function g(){l++}function w(){l--,f()}function f(){if(0===l&&"loading"===t){t="complete";for(var e=0;e<s.length;e++)try{s[e](m)}catch(e){}s.length=0}}function b(e){if(void 0===e)return"";var o={"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!==o?o:e}function h(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,o){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":o}function T(e,o){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:o}function j(e,o){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||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":o}function k(e,o){return"function"==typeof o?o(e):"string"==typeof o?o:void 0===e?"":e}function y(e){var o=e.split(".");return{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")}}function E(){if(m.crossPlatformFramework=n.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":m.os={name:e.Android,version:globalThis.device.version};break;case"iOS":m.os={name:e.iOS,version:globalThis.device.version}}w()}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(a))&&(m.crossPlatformFramework=n.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(m.crossPlatformFramework=n.ReactNative);for(var i=0;i<d.length;i++){var t=(h=d[i])[0],s=h[1],l=h[2];if(null!==(O=m.userAgent.match(t))){m.os={name:s,version:k(O[1],l)};break}}for(m.os.name===e.iOS&&0===function(e,o){for(var i=e.split("."),r=o.split("."),n=Math.max(i.length,r.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<i.length?parseInt(i[a],10):0)>(s=a<r.length?parseInt(r[a],10):0))return 1;if(t<s)return-1}return 0}(m.os.version,"18.6")&&null!==(x=/\) Version\/([\d.]+)/.exec(m.userAgent))&&parseInt(x[1].substring(0,2),10)>=26&&(m.os.version=x[1]),i=0;i<c.length;i++){t=(h=c[i])[0];var b=h[1];l=h[2];if(null!==(O=m.userAgent.match(t))){m.engine={name:b,version:k(O[1],l)};break}}for(i=0;i<u.length;i++){t=(h=u[i])[0];var h,O,S=h[1];l=h[2];if(null!==(O=m.userAgent.match(t))){m.browser={name:S,version:k(O[1],l)};break}}if(m.crossPlatformFramework===n.ReactNative)try{s=(A=require("react-native").Platform).OS;var x=y(C=""+A.Version);switch(s){case"android":m.os={name:e.Android,version:j(x,C)};break;case"ios":m.os={name:e.iOS,version:C};break;case"windows":m.os={name:e.Windows,version:p(x,C)};break;case"macos":m.os={name:e.MacOS,version:C}}}catch(e){}if(m.isNode)try{var C,A=(s=require("os")).platform();x=y(C=s.release());switch(A){case"win32":m.os={name:e.Windows,version:p(x,C)};break;case"darwin":m.os={name:e.MacOS,version:T(x,C)};break;case"android":m.os={name:e.Android,version:C};break;case"linux":/android/i.test(C)&&(m.os={name:e.Android,version:C})}}catch(e){}void 0!==globalThis.document&&(g(),void 0!==globalThis.device?E():globalThis.document.addEventListener("deviceready",E,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(g(),globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(i){try{for(var n=i.fullVersionList||i.brands||[],a=i.platformVersion,t=i.platform,s=m.browser.name,l=null,d=0;d<n.length;d++){var c=null==(f=n[d])?{brand:"",version:""}:"string"==typeof f?{brand:f,version:""}:{brand:f.brand,version:f.version},u=c.version,g=c.brand;/not.a.brand/i.test(g)||((null===l||/Chrom/.test(l)&&"Chromium"!==g||"Edge"===l&&/WebView2/.test(g))&&(g=v[g]||g,null!==(l=s)&&!/Chrom/.test(l)&&/Chrom/.test(g)||("Chrome"===(s=g)||"Chrome WebView"===s||"Chrome Headless"===s?m.browser.name=r.Chrome:"Edge"===s||"Edge WebView2"===s?m.browser.name=r.Edge:"Opera Mobi"===s&&(m.browser.name=r.Opera),m.browser.version=u),l=g),"Chromium"===g&&(m.engine.version=u))}"string"==typeof a&&(m.os.name===e.Windows?m.os.version=parseInt(a.split(".")[0],10)>=13?"11":"10":m.os.version=a),"string"==typeof t&&(/android/i.test(t)?m.os.name=e.Android:/ios|iphone|ipad/i.test(t)?m.os.name=e.iOS:/windows|win32/i.test(t)?m.os.name=e.Windows:/macos|macintel/i.test(t)&&(m.os.name=e.MacOS)),!0===i.mobile&&(m.device=o.Mobile)}catch(e){}finally{w()}var f})).catch(w)),f()}();var O=/iemobile/i.test(m.userAgent),S=/windows phone/i.test(m.userAgent),x=null;function C(){return O?"msapplication-navbutton-color":S?"msapplication-TileColor":"theme-color"}function A(){return null!==x&&x.isConnected?x:x=globalThis.document.querySelector('meta[name="'+C()+'"]')}return{installed:!1,name:"Theme",module:{get value(){return(e=A())&&e.getAttribute("content")||void 0;var e},set value(e){var o;void 0===e?(o=A())&&(o.remove(),x=null):function(e){var o=A();null===o&&(o=function(){var e=globalThis.document.createElement("meta");return e.setAttribute("name",C()),globalThis.document.head.prepend(e),x=e}());o.setAttribute("content",e)}(e)}},Constants:{},Errors:{}}}));
|
|
@@ -8,11 +8,13 @@ export declare interface PlatformInstance {
|
|
|
8
8
|
network: Network;
|
|
9
9
|
renderer: string;
|
|
10
10
|
userAgent: string;
|
|
11
|
+
readyState: 'loading' | 'complete';
|
|
11
12
|
isNode: boolean;
|
|
12
13
|
isStandalone: boolean;
|
|
13
14
|
isMobile: boolean;
|
|
14
15
|
isDesktop: boolean;
|
|
15
16
|
isWebview: boolean;
|
|
17
|
+
onready(callback: (platform: PlatformInstance) => void): void;
|
|
16
18
|
}
|
|
17
19
|
export declare interface NameVersionPair<T> {
|
|
18
20
|
name: T;
|
|
@@ -8,11 +8,13 @@ export declare interface PlatformInstance {
|
|
|
8
8
|
network: Network;
|
|
9
9
|
renderer: string;
|
|
10
10
|
userAgent: string;
|
|
11
|
+
readyState: 'loading' | 'complete';
|
|
11
12
|
isNode: boolean;
|
|
12
13
|
isStandalone: boolean;
|
|
13
14
|
isMobile: boolean;
|
|
14
15
|
isDesktop: boolean;
|
|
15
16
|
isWebview: boolean;
|
|
17
|
+
onready(callback: (platform: PlatformInstance) => void): void;
|
|
16
18
|
}
|
|
17
19
|
export declare interface NameVersionPair<T> {
|
|
18
20
|
name: T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-fn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.78",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"require": "./dist/plugin/fullscreen/index.cjs",
|
|
53
53
|
"default": "./dist/plugin/fullscreen/index.mjs"
|
|
54
54
|
},
|
|
55
|
-
"./plugin/platform
|
|
56
|
-
"types": "./dist/plugin/platform
|
|
57
|
-
"import": "./dist/plugin/platform
|
|
58
|
-
"require": "./dist/plugin/platform
|
|
59
|
-
"default": "./dist/plugin/platform
|
|
55
|
+
"./plugin/platform": {
|
|
56
|
+
"types": "./dist/plugin/platform/index.d.ts",
|
|
57
|
+
"import": "./dist/plugin/platform/index.mjs",
|
|
58
|
+
"require": "./dist/plugin/platform/index.cjs",
|
|
59
|
+
"default": "./dist/plugin/platform/index.mjs"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"plugin/camera": ["dist/plugin/camera/index.d.ts"],
|
|
69
69
|
"plugin/clipboard": ["dist/plugin/clipboard/index.d.ts"],
|
|
70
70
|
"plugin/fullscreen": ["dist/plugin/fullscreen/index.d.ts"],
|
|
71
|
-
"plugin/platform
|
|
71
|
+
"plugin/platform": ["dist/plugin/platform/index.d.ts"],
|
|
72
72
|
"dist/*": ["dist/*"]
|
|
73
73
|
}
|
|
74
74
|
},
|