native-fn 1.0.74 → 1.0.76

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 (66) hide show
  1. package/dist/index.d.ts +5 -5
  2. package/dist/native.cjs +1 -1
  3. package/dist/native.min.cjs +1 -1
  4. package/dist/native.min.mjs +1 -1
  5. package/dist/native.mjs +1 -1
  6. package/dist/native.umd.js +1 -1
  7. package/dist/native.umd.min.js +1 -1
  8. package/dist/plugin/app/index.cjs +355 -176
  9. package/dist/plugin/app/index.min.cjs +1 -1
  10. package/dist/plugin/app/index.min.mjs +1 -1
  11. package/dist/plugin/app/index.mjs +355 -176
  12. package/dist/plugin/app/index.umd.js +355 -176
  13. package/dist/plugin/app/index.umd.min.js +1 -1
  14. package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +12 -0
  15. package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +16 -6
  16. package/dist/plugin/app/src/types/native.d.ts +5 -5
  17. package/dist/plugin/appearance/index.cjs +344 -165
  18. package/dist/plugin/appearance/index.min.cjs +1 -1
  19. package/dist/plugin/appearance/index.min.mjs +1 -1
  20. package/dist/plugin/appearance/index.mjs +344 -165
  21. package/dist/plugin/appearance/index.umd.js +344 -165
  22. package/dist/plugin/appearance/index.umd.min.js +1 -1
  23. package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +12 -0
  24. package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +16 -6
  25. package/dist/plugin/appearance/src/types/native.d.ts +5 -5
  26. package/dist/plugin/clipboard/index.cjs +339 -160
  27. package/dist/plugin/clipboard/index.min.cjs +1 -1
  28. package/dist/plugin/clipboard/index.min.mjs +1 -1
  29. package/dist/plugin/clipboard/index.mjs +339 -160
  30. package/dist/plugin/clipboard/index.umd.js +339 -160
  31. package/dist/plugin/clipboard/index.umd.min.js +1 -1
  32. package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +12 -0
  33. package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +16 -6
  34. package/dist/plugin/clipboard/src/types/native.d.ts +5 -5
  35. package/dist/plugin/fullscreen/index.cjs +348 -169
  36. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  37. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  38. package/dist/plugin/fullscreen/index.mjs +348 -169
  39. package/dist/plugin/fullscreen/index.umd.js +348 -169
  40. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  41. package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +12 -0
  42. package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +16 -6
  43. package/dist/plugin/fullscreen/src/types/native.d.ts +5 -5
  44. package/dist/plugin/platform/index.cjs +339 -160
  45. package/dist/plugin/platform/index.d.ts +17 -7
  46. package/dist/plugin/platform/index.min.cjs +1 -1
  47. package/dist/plugin/platform/index.min.mjs +1 -1
  48. package/dist/plugin/platform/index.mjs +339 -160
  49. package/dist/plugin/platform/index.umd.js +339 -160
  50. package/dist/plugin/platform/index.umd.min.js +1 -1
  51. package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +12 -0
  52. package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +16 -6
  53. package/dist/plugin/platform/src/types/native.d.ts +5 -5
  54. package/dist/plugin/theme/index.cjs +339 -160
  55. package/dist/plugin/theme/index.min.cjs +1 -1
  56. package/dist/plugin/theme/index.min.mjs +1 -1
  57. package/dist/plugin/theme/index.mjs +339 -160
  58. package/dist/plugin/theme/index.umd.js +339 -160
  59. package/dist/plugin/theme/index.umd.min.js +1 -1
  60. package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +12 -0
  61. package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +16 -6
  62. package/dist/plugin/theme/src/types/native.d.ts +5 -5
  63. package/dist/src/plugin/platform/cores/index.d.ts +12 -0
  64. package/dist/src/plugin/platform/types/platform.d.ts +16 -6
  65. package/dist/src/types/native.d.ts +5 -5
  66. package/package.json +8 -1
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"use strict";var e,n,r,o,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(i||(i={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",l={device:n.Unknown,os:e.Unknown,engine:r.Unknown,browser:o.Unknown,crossPlatformFramework:i.Unknown,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:t,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(t)},a=[[/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,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function c(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function f(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function b(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(l.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(l.crossPlatformFramework=i.ReactNative);for(var w=0;w<a.length;w++){var g=(k=a[w])[0],v=k[1],h=k[2];if(null!==(E=l.userAgent.match(g))){l.os=v,l.osVersion=f(E[1],h);break}}l.os===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var l=void 0,a=void 0;if((l=t<r.length?parseInt(r[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(l.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(l.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(l.osVersion=F[1]));for(w=0;w<s.length;w++){g=(k=s[w])[0];var p=k[1];h=k[2];if(null!==(E=l.userAgent.match(g))){l.engine=p,l.engineVersion=f(E[1],h);break}}for(w=0;w<u.length;w++){g=(k=u[w])[0];var k,E,T=k[1];h=k[2];if(null!==(E=l.userAgent.match(g))){l.browser=T,l.browserVersion=f(E[1],h);break}}if(l.crossPlatformFramework===i.ReactNative)try{v=(j=require("react-native").Platform).OS;var F=b(S=""+j.Version);switch(v){case"android":l.os=e.Android,l.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(F,S);break;case"ios":l.os=e.iOS,l.osVersion=S;break;case"windows":l.os=e.Windows,l.osVersion=m(F,S);break;case"macos":l.os=e.MacOS,l.osVersion=S}}catch(e){}if(l.isNode)try{var S,j=(v=require("os")).platform();F=b(S=v.release());switch(j){case"win32":l.os=e.Windows,l.osVersion=m(F,S);break;case"darwin":l.os=e.MacOS,l.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(F,S);break;case"android":l.os=e.Android,l.osVersion=S;break;case"linux":/android/i.test(S)&&(l.os=e.Android,l.osVersion=S)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(l.crossPlatformFramework=i.Cordova,l.os===e.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":l.os=e.Android;break;case"iOS":l.os=e.iOS}l.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,t=0;t<o.length;t++){var a=null==(r=o[t])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,u=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(l.engineVersion=u)}"string"==typeof i&&(l.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?l.osVersion="11":l.osVersion=i)})),l.device=l.os===e.iOS||l.os===e.Android?n.Mobile:l.os===e.Windows||l.os===e.MacOS?n.Desktop:n.Unknown,l.isMobile=l.device===n.Mobile,l.isDesktop=l.device===n.Desktop,l.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(l.os);var x={get enabled(){return function(){if(l.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===V){if(e.iOS!==l.os)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var t=globalThis.document[V.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[V.element]}()},get element(){return P()},get isFullscreen(){return C()},request:R,exit:L,toggle:function(e,n){return C()?L():R(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},y=null,O=null,M=null,W=!1,V=function(){if(l.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return A.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=A[o];if(t.enabled in globalThis.document||t.element in globalThis.document||t.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}if("webkitCurrentFullScreenElement"in globalThis.document){var a={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:A.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),A={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function N(){null!==M&&(O.fullScreenable=M.fullScreenable,O.autoHideMenuBar=M.autoHideMenuBar,M=null),O=null}function q(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function P(){if(l.crossPlatformFramework===i.Electron){if(null!==O)return O;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||l.os===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===V)return y&&y.webkitDisplayingFullscreen?y:null;var t=globalThis.document[V.element];return null!=t?t:null}function C(){return null!==P()}function R(n,r){if(void 0===n&&(n=function(){if(l.crossPlatformFramework===i.Electron){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(l.os===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),l.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===O&&(M={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),O=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==V){var t=n[V.request];if("function"==typeof t)try{var a=t.call(n,r);return void 0!==a&&"function"==typeof a.then?void a.then((function(){o()})).catch((function(){e.iOS===l.os?s():i()})):void o()}catch(n){if(e.iOS!==l.os)return void i()}}function s(){if(e.iOS===l.os&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return y=r,q(),r.webkitEnterFullscreen(),void o()}i()}s()}))}function L(){return l.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==O)O.setFullScreen(!1),N();else{var r=P();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==V){var o=globalThis.document[V.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(e.iOS===l.os&&null!==y){if("function"==typeof y.webkitExitFullscreen&&!0===y.webkitDisplayingFullscreen)return y.webkitExitFullscreen(),y=null,void n();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var s=t[a];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void n()}}P()?r():n()}))}return function(){if(!W){W=!0;var n=!1;if(l.crossPlatformFramework===i.Electron)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),t=function(e){var n=o[e];n.on("enter-full-screen",(function(){O=n,d()})),n.on("leave-full-screen",(function(){N(),d()}))},a=0;a<o.length;a++)t(a);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){O=n,d()})),n.on("leave-full-screen",(function(){N(),d()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);for(a=0;a<u.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[a],m,!1);if(e.iOS===l.os)if(q(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){q()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}(),{installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}}}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"use strict";var e,n,r,o,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(i||(i={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",a={os:{name:e.Unknown,version:""},engine:{name:r.Unknown,version:""},browser:{name:o.Unknown,version:""},crossPlatformFramework:i.Unknown,userAgent:t,get network(){return function(){var n={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(n.isOnline=globalThis.navigator.onLine);var r=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==r&&(void 0!==r.effectiveType&&(n.effectiveType=r.effectiveType),void 0!==r.type&&(n.type=r.type),void 0!==r.downlink&&(n.downlink=r.downlink),void 0!==r.rtt&&(n.rtt=r.rtt),void 0!==r.saveData&&(n.saveData=r.saveData))}if(a.isNode){try{for(var o=require("os").networkInterfaces(),i=Object.keys(o),t=0;t<i.length;t++){for(var l=o[i[t]],s=0;s<l.length;s++){var u=l[s];u.internal||"IPv4"!==u.family||(n.isOnline=!0)}if(n.isOnline)break}}catch(e){}try{var c=require("child_process");if(a.os.name===e.Windows){try{(d=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(d=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(a.os.name===e.MacOS)try{var d=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),m=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});m.includes("en0")&&d.includes("Wi-Fi")?n.type="wifi":m.includes("en")||d.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?n.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?n.Desktop:n.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===n.Mobile},get isDesktop(){return this.device===n.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}},l=[[/windows nt (6\.[23]); arm/i,e.Windows,d],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,d],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,d],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,d],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,d],[/windows ce\/?([\d.]*)/i,e.Windows,d],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,m],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,m],[/cfnetwork\/.+darwin/i,e.iOS,m],[/mac os x ?([\w. ]*)/i,e.MacOS,m],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,m],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],c={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function d(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function m(e){return void 0===e?"":e.replace(/_/g,".")}function f(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function b(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}function v(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}function w(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function g(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function h(){if(a.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":a.os={name:e.Android,version:globalThis.device.version};break;case"iOS":a.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(t))&&(a.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(a.crossPlatformFramework=i.ReactNative);for(var r=0;r<l.length;r++){var d=(E=l[r])[0],m=E[1],p=E[2];if(null!==(S=a.userAgent.match(d))){a.os={name:m,version:w(S[1],p)};break}}var k;for(a.os.name===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var a=void 0,l=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(l=t<o.length?parseInt(o[t],10):0))return 1;if(a<l)return-1}return 0}(a.os.version,"18.6")&&null!==(y=/\) Version\/([\d.]+)/.exec(a.userAgent))&&parseInt(y[1].substring(0,2),10)>=26&&(a.os.version=y[1]),r=0;r<s.length;r++){d=(E=s[r])[0];var T=E[1];p=E[2];if(null!==(S=a.userAgent.match(d))){a.engine={name:T,version:w(S[1],p)};break}}for(r=0;r<u.length;r++){d=(E=u[r])[0];var E,S,F=E[1];p=E[2];if(null!==(S=a.userAgent.match(d))){a.browser={name:F,version:w(S[1],p)};break}}if(a.crossPlatformFramework===i.ReactNative)try{m=(O=require("react-native").Platform).OS;var y=g(j=""+O.Version);switch(m){case"android":a.os={name:e.Android,version:v(y,j)};break;case"ios":a.os={name:e.iOS,version:j};break;case"windows":a.os={name:e.Windows,version:f(y,j)};break;case"macos":a.os={name:e.MacOS,version:j}}}catch(e){}if(a.isNode)try{var j,O=(m=require("os")).platform();y=g(j=m.release());switch(O){case"win32":a.os={name:e.Windows,version:f(y,j)};break;case"darwin":a.os={name:e.MacOS,version:b(y,j)};break;case"android":a.os={name:e.Android,version:j};break;case"linux":/android/i.test(j)&&(a.os={name:e.Android,version:j})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?h():globalThis.document.addEventListener("deviceready",h,!1)),k=globalThis.navigator,void 0!==globalThis.navigator&&void 0!==k.userAgentData&&void 0!==k.userAgentData.getHighEntropyValues&&globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var i,t=r.fullVersionList||r.brands||[],l=r.platformVersion,s=r.platform,u=a.browser.name,d=null,m=0;m<t.length;m++){var f=null==(i=t[m])?{brand:"",version:""}:"string"==typeof i?{brand:i,version:""}:{brand:i.brand,version:i.version},b=f.version,v=f.brand;/not.a.brand/i.test(v)||((null===d||/Chrom/.test(d)&&"Chromium"!==v||"Edge"===d&&/WebView2/.test(v))&&(v=c[v]||v,null!==(d=u)&&!/Chrom/.test(d)&&/Chrom/.test(v)||("Chrome"===(u=v)||"Chrome WebView"===u||"Chrome Headless"===u?a.browser.name=o.Chrome:"Edge"===u||"Edge WebView2"===u?a.browser.name=o.Edge:"Opera Mobi"===u&&(a.browser.name=o.Opera),a.browser.version=b),d=v),"Chromium"===v&&(a.engine.version=b))}"string"==typeof l&&(a.os.name===e.Windows?a.os.version=parseInt(l.split(".")[0],10)>=13?"11":"10":a.os.version=l),"string"==typeof s&&(/android/i.test(s)?a.os.name=e.Android:/ios|iphone|ipad/i.test(s)?a.os.name=e.iOS:/windows|win32/i.test(s)?a.os.name=e.Windows:/macos|macintel/i.test(s)&&(a.os.name=e.MacOS)),!0===r.mobile&&(a.device=n.Mobile)}))}();var p={get enabled(){return function(){if(a.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===F){if(a.os.name!==e.iOS)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var t=globalThis.document[F.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[F.element]}()},get element(){return x()},get isFullscreen(){return M()},request:W,exit:C,toggle:function(e,n){return M()?C():W(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},k=null,T=null,E=null,S=!1,F=function(){if(a.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return y.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=y[o];if(t.enabled in globalThis.document||t.element in globalThis.document||t.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}if("webkitCurrentFullScreenElement"in globalThis.document){var l={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:y.webkit.events};return"webkitRequestFullScreen"in e&&(l.request="webkitRequestFullScreen"),l}return null}(),y={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function j(){null!==E&&(T.fullScreenable=E.fullScreenable,T.autoHideMenuBar=E.autoHideMenuBar,E=null),T=null}function O(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function x(){if(a.crossPlatformFramework===i.Electron){if(null!==T)return T;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||a.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===F)return k&&k.webkitDisplayingFullscreen?k:null;var t=globalThis.document[F.element];return null!=t?t:null}function M(){return null!==x()}function W(n,r){if(void 0===n&&(n=function(){if(a.crossPlatformFramework===i.Electron){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(a.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),a.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===T&&(E={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),T=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==F){var t=n[F.request];if("function"==typeof t)try{var l=t.call(n,r);return void 0!==l&&"function"==typeof l.then?void l.then((function(){o()})).catch((function(){a.os.name===e.iOS?s():i()})):void o()}catch(n){if(a.os.name!==e.iOS)return void i()}}function s(){if(a.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return k=r,O(),r.webkitEnterFullscreen(),void o()}i()}s()}))}function C(){return a.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==T)T.setFullScreen(!1),j();else{var r=x();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==F){var o=globalThis.document[F.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(a.os.name===e.iOS&&null!==k){if("function"==typeof k.webkitExitFullscreen&&!0===k.webkitDisplayingFullscreen)return k.webkitExitFullscreen(),k=null,void n();for(var t=globalThis.document.querySelectorAll("video"),l=0;l<t.length;l++){var s=t[l];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void n()}}x()?r():n()}))}return function(){if(!S){S=!0;var n=!1;if(a.crossPlatformFramework===i.Electron)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),t=function(e){var n=o[e];n.on("enter-full-screen",(function(){T=n,d()})),n.on("leave-full-screen",(function(){j(),d()}))},l=0;l<o.length;l++)t(l);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){T=n,d()})),n.on("leave-full-screen",(function(){j(),d()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(l=0;l<s.length;l++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[l],d,!1);for(l=0;l<u.length;l++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[l],m,!1);if(a.os.name===e.iOS)if(O(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){O()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}(),{installed:!1,name:"Fullscreen",module:p,Constants:{},Errors:{}}}));
@@ -5,8 +5,18 @@ declare global {
5
5
  interface Navigator {
6
6
  userAgent?: string;
7
7
  userAgentData?: UserAgentData;
8
+ connection?: NavigatorConnection;
9
+ mozConnection?: NavigatorConnection;
10
+ webkitConnection?: NavigatorConnection;
8
11
  }
9
12
  }
13
+ interface NavigatorConnection {
14
+ effectiveType?: 'slow-2g' | '2g' | '3g' | '4g';
15
+ type?: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other';
16
+ downlink?: number;
17
+ rtt?: number;
18
+ saveData?: boolean;
19
+ }
10
20
  interface CordovaDevice {
11
21
  platform: string;
12
22
  version: string;
@@ -20,6 +30,8 @@ interface UserAgentDataValues {
20
30
  brands?: UserAgentDataBrand[];
21
31
  fullVersionList?: UserAgentDataBrand[];
22
32
  platformVersion?: string | null | undefined;
33
+ platform?: string | null | undefined;
34
+ mobile?: boolean;
23
35
  }
24
36
  interface UserAgentData {
25
37
  getHighEntropyValues?(hints: string[]): Promise<UserAgentDataValues>;
@@ -1,13 +1,11 @@
1
1
  import { Browsers, CrossPlatformFramework, Devices, Engines, OS } from "../constants";
2
2
  export declare interface PlatformInstance {
3
- os: OS;
3
+ os: NameVersionPair<OS>;
4
+ engine: NameVersionPair<Engines>;
5
+ browser: NameVersionPair<Browsers>;
4
6
  device: Devices;
5
- engine: Engines;
6
- browser: Browsers;
7
7
  crossPlatformFramework: CrossPlatformFramework;
8
- osVersion: string;
9
- engineVersion: string;
10
- browserVersion: string;
8
+ network: Network;
11
9
  renderer: string;
12
10
  userAgent: string;
13
11
  isNode: boolean;
@@ -16,3 +14,15 @@ export declare interface PlatformInstance {
16
14
  isDesktop: boolean;
17
15
  isWebview: boolean;
18
16
  }
17
+ export declare interface NameVersionPair<T> {
18
+ name: T;
19
+ version: string;
20
+ }
21
+ export declare interface Network {
22
+ isOnline: boolean | null;
23
+ effectiveType: 'slow-2g' | '2g' | '3g' | '4g' | null;
24
+ type: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | null;
25
+ downlink: number | null;
26
+ rtt: number | null;
27
+ saveData: boolean | null;
28
+ }
@@ -1,9 +1,9 @@
1
1
  import { PluginNotExtendedError } from "../errors/plugin-not-extended-error";
2
- export interface NativePlugins {
2
+ export declare interface NativePlugins {
3
3
  }
4
- export interface NativeConstants extends Record<string, any> {
4
+ export declare interface NativeConstants extends Record<string, any> {
5
5
  }
6
- export interface NativeErrors extends Record<string, ErrorConstructor> {
6
+ export declare interface NativeErrors extends Record<string, ErrorConstructor> {
7
7
  PluginNotExtendedError: typeof PluginNotExtendedError;
8
8
  }
9
9
  export declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
@@ -13,10 +13,10 @@ export declare interface NativePlugin<Key extends string, Module, Constants exte
13
13
  Constants: Constants;
14
14
  Errors: Errors;
15
15
  }
16
- export type ExtendedNativeBase<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = NativeBase<NativePlugins & {
16
+ export declare type ExtendedNativeBase<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = NativeBase<NativePlugins & {
17
17
  [Plugin in Key]: Module;
18
18
  }, NativeConstants & Constants, NativeErrors & Errors>;
19
- export type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
19
+ export declare type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
20
20
  Version: string;
21
21
  Constants: AssignedConstants;
22
22
  Errors: AssignedErrors;