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
@@ -1 +1 @@
1
- "use strict";var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=""+S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),y={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};module.exports=y;
1
+ "use strict";var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(i),isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g);break}}t.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 a=void 0,s=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(s=t<o.length?parseInt(o[t],10):0))return 1;if(a<s)return-1}return 0}(t.osVersion,"18.6")&&(null!==(j=/\) Version\/([\d.]+)/.exec(t.userAgent))&&parseInt(j[1].substring(0,2),10)>=26&&(t.osVersion=j[1]));for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=""+S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.device=t.os===e.iOS||t.os===e.Android?n.Mobile:t.os===e.Windows||t.os===e.MacOS?n.Desktop:n.Unknown,t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),V={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};module.exports=V;
@@ -1 +1 @@
1
- var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=""+S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),y={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};export{y as default};
1
+ var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(i),isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g);break}}t.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 a=void 0,s=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(s=t<o.length?parseInt(o[t],10):0))return 1;if(a<s)return-1}return 0}(t.osVersion,"18.6")&&(null!==(j=/\) Version\/([\d.]+)/.exec(t.userAgent))&&parseInt(j[1].substring(0,2),10)>=26&&(t.osVersion=j[1]));for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=""+S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.device=t.os===e.iOS||t.os===e.Android?n.Mobile:t.os===e.Windows||t.os===e.MacOS?n.Desktop:n.Unknown,t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),V={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};export{V as default};
@@ -1,3 +1,26 @@
1
+ function compareVersion(lhs, rhs) {
2
+ var pa = lhs.split('.');
3
+ var pb = rhs.split('.');
4
+ var length = Math.max(pa.length, pb.length);
5
+ for (var i = 0; i < length; i++) {
6
+ var a = void 0;
7
+ var b = void 0;
8
+ if (i < pa.length)
9
+ a = parseInt(pa[i], 10);
10
+ else
11
+ a = 0;
12
+ if (i < pb.length)
13
+ b = parseInt(pb[i], 10);
14
+ else
15
+ b = 0;
16
+ if (a > b)
17
+ return 1;
18
+ if (a < b)
19
+ return -1;
20
+ }
21
+ return 0;
22
+ }
23
+
1
24
  var OS;
2
25
  (function (OS) {
3
26
  OS["Unknown"] = "Unknown";
@@ -53,7 +76,7 @@ var Platform = {
53
76
  isStandalone: false,
54
77
  isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
55
78
  isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
56
- isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
79
+ isElectron: (typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(userAgent)),
57
80
  isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
58
81
  };
59
82
  var OS_RESOLVER_MAP = [
@@ -315,9 +338,6 @@ function getIsStandalone(os) {
315
338
  return 'standalone' in navigator && !!navigator.standalone;
316
339
  return globalThis.matchMedia('(display-mode: standalone)').matches;
317
340
  }
318
- function getIsWebview() {
319
- return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
320
- }
321
341
  function getSemanticVersion(string) {
322
342
  var parts = string.split('.');
323
343
  return {
@@ -335,13 +355,14 @@ for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
335
355
  if (matched !== null) {
336
356
  Platform.os = os;
337
357
  Platform.osVersion = resolveVersion(matched[1], resolver);
338
- if (os === OS.iOS || os === OS.Android)
339
- Platform.device = Devices.Mobile;
340
- else if (os === OS.Windows || os === OS.MacOS)
341
- Platform.device = Devices.Desktop;
342
358
  break;
343
359
  }
344
360
  }
361
+ if (Platform.os === OS.iOS && compareVersion(Platform.osVersion, '18.6') === 0) {
362
+ var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
363
+ if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
364
+ Platform.osVersion = version[1];
365
+ }
345
366
  for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
346
367
  var map = ENGINE_RESOLVER_MAP[i];
347
368
  var regexp = map[0];
@@ -449,9 +470,9 @@ if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntr
449
470
  }
450
471
  });
451
472
  }
473
+ Platform.device = Platform.os === OS.iOS || Platform.os === OS.Android ? Devices.Mobile : Platform.os === OS.Windows || Platform.os === OS.MacOS ? Devices.Desktop : Devices.Unknown;
452
474
  Platform.isMobile = Platform.device === Devices.Mobile;
453
475
  Platform.isDesktop = Platform.device === Devices.Desktop;
454
- Platform.isWebview = getIsWebview();
455
476
  Platform.isStandalone = getIsStandalone(Platform.os);
456
477
 
457
478
  var API_VARIANTS = {
@@ -4,6 +4,29 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Fullscreen = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
+ function compareVersion(lhs, rhs) {
8
+ var pa = lhs.split('.');
9
+ var pb = rhs.split('.');
10
+ var length = Math.max(pa.length, pb.length);
11
+ for (var i = 0; i < length; i++) {
12
+ var a = void 0;
13
+ var b = void 0;
14
+ if (i < pa.length)
15
+ a = parseInt(pa[i], 10);
16
+ else
17
+ a = 0;
18
+ if (i < pb.length)
19
+ b = parseInt(pb[i], 10);
20
+ else
21
+ b = 0;
22
+ if (a > b)
23
+ return 1;
24
+ if (a < b)
25
+ return -1;
26
+ }
27
+ return 0;
28
+ }
29
+
7
30
  var OS;
8
31
  (function (OS) {
9
32
  OS["Unknown"] = "Unknown";
@@ -59,7 +82,7 @@
59
82
  isStandalone: false,
60
83
  isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
61
84
  isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
62
- isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
85
+ isElectron: (typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(userAgent)),
63
86
  isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
64
87
  };
65
88
  var OS_RESOLVER_MAP = [
@@ -321,9 +344,6 @@
321
344
  return 'standalone' in navigator && !!navigator.standalone;
322
345
  return globalThis.matchMedia('(display-mode: standalone)').matches;
323
346
  }
324
- function getIsWebview() {
325
- return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
326
- }
327
347
  function getSemanticVersion(string) {
328
348
  var parts = string.split('.');
329
349
  return {
@@ -341,13 +361,14 @@
341
361
  if (matched !== null) {
342
362
  Platform.os = os;
343
363
  Platform.osVersion = resolveVersion(matched[1], resolver);
344
- if (os === OS.iOS || os === OS.Android)
345
- Platform.device = Devices.Mobile;
346
- else if (os === OS.Windows || os === OS.MacOS)
347
- Platform.device = Devices.Desktop;
348
364
  break;
349
365
  }
350
366
  }
367
+ if (Platform.os === OS.iOS && compareVersion(Platform.osVersion, '18.6') === 0) {
368
+ var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
369
+ if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
370
+ Platform.osVersion = version[1];
371
+ }
351
372
  for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
352
373
  var map = ENGINE_RESOLVER_MAP[i];
353
374
  var regexp = map[0];
@@ -455,9 +476,9 @@
455
476
  }
456
477
  });
457
478
  }
479
+ Platform.device = Platform.os === OS.iOS || Platform.os === OS.Android ? Devices.Mobile : Platform.os === OS.Windows || Platform.os === OS.MacOS ? Devices.Desktop : Devices.Unknown;
458
480
  Platform.isMobile = Platform.device === Devices.Mobile;
459
481
  Platform.isDesktop = Platform.device === Devices.Desktop;
460
- Platform.isWebview = getIsWebview();
461
482
  Platform.isStandalone = getIsStandalone(Platform.os);
462
483
 
463
484
  var API_VARIANTS = {
@@ -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;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(T=require("react-native").Platform).OS;var j=f(F=""+T.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,T=(v=require("os")).platform();j=f(F=v.release());switch(T){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var y=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=S[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}();return{installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}}}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"use strict";var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(i),isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(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 m(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=m(k[1],g);break}}t.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 a=void 0,s=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(s=t<o.length?parseInt(o[t],10):0))return 1;if(a<s)return-1}return 0}(t.osVersion,"18.6")&&(null!==(j=/\) Version\/([\d.]+)/.exec(t.userAgent))&&parseInt(j[1].substring(0,2),10)>=26&&(t.osVersion=j[1]));for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=m(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=m(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=""+S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=d(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=d(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.device=t.os===e.iOS||t.os===e.Android?n.Mobile:t.os===e.Windows||t.os===e.MacOS?n.Desktop:n.Unknown,t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var y=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}();return{installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}}}));
@@ -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>;
@@ -1,5 +1,28 @@
1
1
  'use strict';
2
2
 
3
+ function compareVersion(lhs, rhs) {
4
+ var pa = lhs.split('.');
5
+ var pb = rhs.split('.');
6
+ var length = Math.max(pa.length, pb.length);
7
+ for (var i = 0; i < length; i++) {
8
+ var a = void 0;
9
+ var b = void 0;
10
+ if (i < pa.length)
11
+ a = parseInt(pa[i], 10);
12
+ else
13
+ a = 0;
14
+ if (i < pb.length)
15
+ b = parseInt(pb[i], 10);
16
+ else
17
+ b = 0;
18
+ if (a > b)
19
+ return 1;
20
+ if (a < b)
21
+ return -1;
22
+ }
23
+ return 0;
24
+ }
25
+
3
26
  var OS;
4
27
  (function (OS) {
5
28
  OS["Unknown"] = "Unknown";
@@ -55,7 +78,7 @@ var Platform = {
55
78
  isStandalone: false,
56
79
  isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
57
80
  isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
58
- isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
81
+ isElectron: (typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(userAgent)),
59
82
  isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
60
83
  };
61
84
  var OS_RESOLVER_MAP = [
@@ -317,9 +340,6 @@ function getIsStandalone(os) {
317
340
  return 'standalone' in navigator && !!navigator.standalone;
318
341
  return globalThis.matchMedia('(display-mode: standalone)').matches;
319
342
  }
320
- function getIsWebview() {
321
- return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
322
- }
323
343
  function getSemanticVersion(string) {
324
344
  var parts = string.split('.');
325
345
  return {
@@ -337,13 +357,14 @@ for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
337
357
  if (matched !== null) {
338
358
  Platform.os = os;
339
359
  Platform.osVersion = resolveVersion(matched[1], resolver);
340
- if (os === OS.iOS || os === OS.Android)
341
- Platform.device = Devices.Mobile;
342
- else if (os === OS.Windows || os === OS.MacOS)
343
- Platform.device = Devices.Desktop;
344
360
  break;
345
361
  }
346
362
  }
363
+ if (Platform.os === OS.iOS && compareVersion(Platform.osVersion, '18.6') === 0) {
364
+ var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
365
+ if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
366
+ Platform.osVersion = version[1];
367
+ }
347
368
  for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
348
369
  var map = ENGINE_RESOLVER_MAP[i];
349
370
  var regexp = map[0];
@@ -451,34 +472,11 @@ if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntr
451
472
  }
452
473
  });
453
474
  }
475
+ Platform.device = Platform.os === OS.iOS || Platform.os === OS.Android ? Devices.Mobile : Platform.os === OS.Windows || Platform.os === OS.MacOS ? Devices.Desktop : Devices.Unknown;
454
476
  Platform.isMobile = Platform.device === Devices.Mobile;
455
477
  Platform.isDesktop = Platform.device === Devices.Desktop;
456
- Platform.isWebview = getIsWebview();
457
478
  Platform.isStandalone = getIsStandalone(Platform.os);
458
479
 
459
- function compareVersion(lhs, rhs) {
460
- var pa = lhs.split('.');
461
- var pb = rhs.split('.');
462
- var length = Math.max(pa.length, pb.length);
463
- for (var i = 0; i < length; i++) {
464
- var a = void 0;
465
- var b = void 0;
466
- if (i < pa.length)
467
- a = parseInt(pa[i], 10);
468
- else
469
- a = 0;
470
- if (i < pb.length)
471
- b = parseInt(pb[i], 10);
472
- else
473
- b = 0;
474
- if (a > b)
475
- return 1;
476
- if (a < b)
477
- return -1;
478
- }
479
- return 0;
480
- }
481
-
482
480
  var Appearances;
483
481
  (function (Appearances) {
484
482
  Appearances["Unknown"] = "unknown";
@@ -1019,6 +1017,30 @@ function rgbaToHex(rgba) {
1019
1017
  + toHex(rgba.blue)
1020
1018
  + toHex(Math.round(rgba.alpha * 255));
1021
1019
  }
1020
+ function detectFromReactNative() {
1021
+ return new Promise(function (resolve) {
1022
+ try {
1023
+ var reactNative = require('react-native');
1024
+ var appearance = reactNative.Appearance;
1025
+ resolve(appearance.getColorScheme() || Appearances.Unknown);
1026
+ }
1027
+ catch (_) {
1028
+ resolve(Appearances.Unknown);
1029
+ }
1030
+ });
1031
+ }
1032
+ function detectFromElectron() {
1033
+ return new Promise(function (resolve) {
1034
+ try {
1035
+ var electron = require('electron');
1036
+ var appearance = electron.nativeTheme;
1037
+ resolve(appearance.shouldUseDarkColors ? Appearances.Dark : Appearances.Light);
1038
+ }
1039
+ catch (_) {
1040
+ resolve(Appearances.Unknown);
1041
+ }
1042
+ });
1043
+ }
1022
1044
  function detectFromEngine() {
1023
1045
  return new Promise(function (resolve) {
1024
1046
  var img = new Image();
@@ -1263,7 +1285,11 @@ function removeThemeColor(appearance) {
1263
1285
  themeColorMetaGroup[appearance] = undefined;
1264
1286
  }
1265
1287
  function detectAppearance() {
1266
- if (Platform.browser === Browsers.SamsungInternet)
1288
+ if (Platform.isReactNative)
1289
+ return detectFromReactNative();
1290
+ else if (Platform.isElectron)
1291
+ return detectFromElectron();
1292
+ else if (Platform.browser === Browsers.SamsungInternet)
1267
1293
  return detectFromEngine();
1268
1294
  else
1269
1295
  return Promise.resolve(detectFromMediaQuery());