native-fn 1.0.70 → 1.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.cjs +2 -507
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +2 -507
- package/dist/native.umd.js +2 -507
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +434 -429
- package/dist/plugin/app/index.d.ts +8 -33
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +434 -429
- package/dist/plugin/app/index.umd.js +434 -429
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/app/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/app/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/app/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/appearance/index.cjs +30 -16
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +30 -16
- package/dist/plugin/appearance/index.umd.js +30 -16
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/appearance/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/appearance/src/plugin/platform/index.d.ts +11 -0
- package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +11 -0
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +18 -0
- package/dist/plugin/appearance/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/camera/index.cjs +118 -109
- package/dist/plugin/camera/index.min.cjs +1 -1
- package/dist/plugin/camera/index.min.mjs +1 -1
- package/dist/plugin/camera/index.mjs +118 -109
- package/dist/plugin/camera/index.umd.js +118 -109
- package/dist/plugin/camera/index.umd.min.js +1 -1
- package/dist/plugin/camera/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/camera/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/camera/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/camera/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/camera/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/camera/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/camera/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/camera/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/camera/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/clipboard/index.cjs +226 -212
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +226 -212
- package/dist/plugin/clipboard/index.umd.js +226 -212
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/clipboard/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/clipboard/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/fullscreen/index.cjs +34 -20
- package/dist/plugin/fullscreen/index.d.ts +4 -13
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +34 -20
- package/dist/plugin/fullscreen/index.umd.js +34 -20
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/fullscreen/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/fullscreen/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/plugin/platform/index.cjs +355 -109
- package/dist/plugin/platform/index.d.ts +15 -20
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +355 -109
- package/dist/plugin/platform/index.umd.js +355 -109
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +12 -0
- package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/app/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +11 -2
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/appearance/constants/index.d.ts +11 -0
- package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/appearance/index.d.ts +8 -0
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +12 -0
- package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/camera/constants/inedx.d.ts +4 -0
- package/dist/plugin/platform/src/plugin/camera/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/camera/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/camera/types/camera.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/camera/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +35 -0
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +5 -5
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/platform/src/plugin/theme/constants/index.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +2 -21
- package/dist/plugin/platform/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/plugin/theme/index.cjs +63 -906
- package/dist/plugin/theme/index.d.ts +4 -87
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +63 -906
- package/dist/plugin/theme/index.umd.js +63 -906
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/plugin/theme/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +1 -13
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +2 -22
- package/dist/src/plugin/app/cores/index.d.ts +0 -4
- package/dist/src/plugin/app/types/app.d.ts +1 -1
- package/dist/src/plugin/camera/cores/index.d.ts +2 -2
- package/dist/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +3 -10
- package/dist/src/plugin/platform/constants/index.d.ts +42 -0
- package/dist/src/plugin/platform/cores/index.d.ts +28 -0
- package/dist/src/plugin/platform/index.d.ts +2 -2
- package/dist/src/plugin/platform/types/index.d.ts +5 -1
- package/dist/src/plugin/platform/types/platform.d.ts +5 -2
- package/dist/src/plugin/theme/constants/index.d.ts +0 -12
- package/dist/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/src/plugin/theme/index.d.ts +1 -13
- package/dist/src/plugin/theme/types/index.d.ts +0 -12
- package/dist/src/plugin/theme/types/theme.d.ts +2 -22
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,r,n,t;!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"}(r||(r={})),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"}(n||(n={})),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"}(t||(t={}));var o=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",i=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,a=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(o),l=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,s={device:r.Unknown,os:e.Unknown,osVersion:"",engine:n.Unknown,engineVersion:"",browser:t.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:o,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(o)},c=[[/windows nt (6\.[23]); arm/i,e.Windows,m],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,m],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,m],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,m],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,m],[/windows ce\/?([\d.]*)/i,e.Windows,m],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,f],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,f],[/cfnetwork\/.+darwin/i,e.iOS,f],[/mac os x ?([\w. ]*)/i,e.MacOS,f],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,f],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],u=[[/windows.+ edge\/([\w.]+)/i,n.EdgeHTML],[/arkweb\/([\w.]+)/i,n.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,n.Blink],[/presto\/([\w.]+)/i,n.Presto],[/webkit\/([\w.]+)/i,n.WebKit],[/trident\/([\w.]+)/i,n.Trident],[/netfront\/([\w.]+)/i,n.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,n.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,n.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,n.Gecko]],d=[[/\b(?:crmo|crios)\/([\w.]+)/i,t.Chrome],[/webview.+edge\/([\w.]+)/i,t.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,t.Edge],[/opera mini\/([-\w.]+)/i,t.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,t.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,t.Opera],[/opios[\/ ]+([\w.]+)/i,t.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,t.Opera],[/\bopr\/([\w.]+)/i,t.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,t.IE],[/(?:ms|\()ie ([\w.]+)/i,t.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,t.IE],[/\bfocus\/([\w.]+)/i,t.Firefox],[/\bopt\/([\w.]+)/i,t.Opera],[/coast\/([\w.]+)/i,t.Opera],[/fxios\/([\w.-]+)/i,t.Firefox],[/samsungbrowser\/([\w.]+)/i,t.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,t.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,t.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,t.Chrome],[/chrome\/([\w.]+) mobile/i,t.Chrome],[/chrome\/v?([\w.]+)/i,t.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/version\/([\w.,]+) .*safari/i,t.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,t.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,t.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,t.Firefox],[/firefox\/([\w.]+)/i,t.Firefox]];function m(e){if(void 0===e)return"";var r={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==r?r:e}function f(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,r){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":r}function b(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function v(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}for(var h=0;h<c.length;h++){var g=(x=c[h])[0],w=x[1],y=x[2];if(null!==(k=s.userAgent.match(g))){s.os=w,s.osVersion=b(k[1],y);break}}s.os===e.iOS&&0===function(e,r){for(var n=e.split("."),t=r.split("."),o=Math.max(n.length,t.length),i=0;i<o;i++){var a=void 0,l=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(l=i<t.length?parseInt(t[i],10):0))return 1;if(a<l)return-1}return 0}(s.osVersion,"18.6")&&(null!==(E=/\) Version\/([\d.]+)/.exec(s.userAgent))&&parseInt(E[1].substring(0,2),10)>=26&&(s.osVersion=E[1]));for(h=0;h<u.length;h++){g=(x=u[h])[0];var T=x[1];y=x[2];if(null!==(k=s.userAgent.match(g))){s.engine=T,s.engineVersion=b(k[1],y);break}}for(h=0;h<d.length;h++){g=(x=d[h])[0];var x,k,j=x[1];y=x[2];if(null!==(k=s.userAgent.match(g))){s.browser=j,s.browserVersion=b(k[1],y);break}}if(l)try{w=(D=require("react-native").Platform).OS;var E=v(S=""+D.Version);switch(w){case"android":s.os=e.Android,s.osVersion=function(e,r){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":r}(E,S);break;case"ios":s.os=e.iOS,s.osVersion=S;break;case"windows":s.os=e.Windows,s.osVersion=p(E,S);break;case"macos":s.os=e.MacOS,s.osVersion=S}}catch(e){}if(i)try{var S,D=(w=require("os")).platform();E=v(S=w.release());switch(D){case"win32":s.os=e.Windows,s.osVersion=p(E,S);break;case"darwin":s.os=e.MacOS,s.osVersion=function(e,r){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:r}(E,S);break;case"android":s.os=e.Android,s.osVersion=S;break;case"linux":/android/i.test(S)&&(s.os=e.Android,s.osVersion=S)}}catch(e){}function V(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),r?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}function M(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];for(var t="",o=0;o<r.length-2;o++){var i=r[o];void 0!==i&&(t=t+i.charAt(0).toUpperCase()+i.slice(1))}return t}function O(){this.returnValue=!1}function A(){this.cancelBubble=!0}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(s.os===e.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":s.os=e.Android;break;case"iOS":s.os=e.iOS}s.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var n,t=r.fullVersionList||r.brands||[],o=r.platformVersion,i=0;i<t.length;i++){var a=null==(n=t[i])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},l=a.brand,c=a.version;/not.a.brand/i.test(l)||"Chromium"===l&&(s.engineVersion=c)}"string"==typeof o&&(s.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=o)})),s.device=s.os===e.iOS||s.os===e.Android?r.Mobile:s.os===e.Windows||s.os===e.MacOS?r.Desktop:r.Unknown,s.isMobile=s.device===r.Mobile,s.isDesktop=s.device===r.Desktop,s.isStandalone=function(r){return"matchMedia"in globalThis&&(r===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var P=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,C=["","webkit","moz","ms","MS","o","O"],W={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},L={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var t=L.withVender(e,r.type),o=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(t,n,o)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(t,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+t,n.__ieWrapper):e.attachEvent("on"+t,n.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=O),"function"!=typeof r.stopPropagation&&(r.stopPropagation=A),"function"==typeof n?n.call(e,r):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var t=L.withVender(e,r.type),o=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(t,n,o)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(t,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=n.__ieWrapper;void 0!==i&&(e.detachEvent("on"+t,i),delete n.__ieWrapper)}}},withVender:function(e,r){if(void 0===r)return"";if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(r)>-1)return r;if(void 0!==e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(r)>-1)return r;var n;n=r in W?W[r]:P.test(r)?[r,r.replace(P,M)]:[r];for(var t=0;t<C.length;t++)for(var o=0;o<n.length;o++){var i=C[t]+n[o];if(void 0!==e["on"+i])return i}return""}},N={copy:function(e){var r=function(e){if(function(e){return I(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return I(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(a)return function(e){try{var r=require("electron");return new Promise((function(n){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),n(!0)}catch(e){n(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(_()&&("write"in navigator.clipboard||"writeText"in navigator.clipboard))return function(e){try{if("ClipboardItem"in window&&"write"in navigator.clipboard)return navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]).then((function(){return!0})).catch((function(){return!1}));if("writeText"in navigator.clipboard)return navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(r).then((function(e){return!!e||U(r)})).catch((function(){return U(r)}));return Promise.resolve(U(r))},paste:function(){if(a)return function(){try{var e=require("electron");return new Promise((function(r){try{var n=e.clipboard.readHTML();return r(n?n.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(_()&&("read"in navigator.clipboard||"readText"in navigator.clipboard))return function(){try{if("ClipboardItem"in window&&"read"in navigator.clipboard)return navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var r=e[0],n=r.types,t=0;t<n.length;t++)if("text/html"===n[t])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<n.length;t++)if("text/plain"===n[t])return r.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}));return Promise.resolve(null)})).catch((function(){return null}));if("readText"in navigator.clipboard)return navigator.clipboard.readText().then((function(e){return e})).catch((function(){return null}))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}().then((function(e){return null!==e?e:R()})).catch((function(){return R()}));return Promise.resolve(R())}};function I(e){return null!==e&&"object"==typeof e}function _(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function U(e){return function(e){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var r=V("div");if(void 0===r)return!1;r.contentEditable="true",r.innerHTML=e,r.style.whiteSpace="pre",r.style.userSelect="text",r.style.setProperty("-webkit-user-select","text"),r.style.setProperty("-moz-user-select","text"),r.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(r);var n=globalThis.getSelection(),t=globalThis.document.createRange(),o=function(r){try{null!==r.clipboardData&&"function"==typeof r.clipboardData.setData&&(r.preventDefault(),r.clipboardData.setData("text/html",e),r.clipboardData.setData("text/plain",e))}catch(e){}};L.add(globalThis.document,{type:"copy",callback:o,options:{once:!0,capture:!0}});try{if(null===n)return F(r,n,o),!1;n.removeAllRanges(),t.selectNodeContents(r),n.addRange(t);var i=globalThis.document.execCommand("copy");return F(r,n,o),i}catch(e){return F(r,n,o),!1}}(e)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(e)}function R(){return function(){var e=V("div");if(void 0===e)return null;e.contentEditable="true",globalThis.document.body.appendChild(e),e.focus();var r=null,n=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.getData&&(e.preventDefault(),r=e.clipboardData.getData("text/html")||e.clipboardData.getData("text/plain")||null)}catch(e){}};L.add(globalThis.document,{type:"paste",callback:n,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||r||(r=e.innerHTML||e.textContent||null),H(e,n),r}catch(r){return H(e,n),null}}()||function(){var e=window.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{return e.getData("Text")||null}catch(e){return null}return null}()||""}function F(e,r,n){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),L.remove(globalThis.document,{type:"copy",callback:n})}function H(e,r){globalThis.document.body.removeChild(e),L.remove(globalThis.document,{type:"paste",callback:r})}var B={installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}};export{B as default};
|
|
1
|
+
function e(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var o=globalThis.document.createElement(e);return"width"in o&&(o.width="0"),"height"in o&&(o.height="0"),"border"in o&&(o.border="0"),"frameBorder"in o&&(o.frameBorder="0"),"scrolling"in o&&(o.scrolling="no"),"cellPadding"in o&&(o.cellPadding="0"),"cellSpacing"in o&&(o.cellSpacing="0"),"frame"in o&&(o.frame="void"),"rules"in o&&(o.rules="none"),"noWrap"in o&&(o.noWrap=!0),o.tabIndex=-1,o.setAttribute("role","presentation"),r?(o.style.width="1px",o.style.height="1px"):(o.setAttribute("aria-hidden","true"),o.style.width="0",o.style.height="0",o.style.zIndex="-9999",o.style.display="none",o.style.visibility="hidden",o.style.pointerEvents="none"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.padding="0",o.style.margin="0",o.style.border="none",o.style.outline="none",o.style.clip="rect(1px, 1px, 1px, 1px)",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",o}}function r(e){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];for(var t="",n=0;n<r.length-2;n++){var i=r[n];void 0!==i&&(t=t+i.charAt(0).toUpperCase()+i.slice(1))}return t}function o(){this.returnValue=!1}function t(){this.cancelBubble=!0}var n,i,a,s,l,c=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,u=["","webkit","moz","ms","MS","o","O"],d={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},m={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var i=m.withVender(e,r.type),a=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=o),"function"!=typeof r.stopPropagation&&(r.stopPropagation=t),"function"==typeof n?n.call(e,r):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var o=r.callback;if(void 0!==e&&null!==o){var t=m.withVender(e,r.type),n=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(t,o,n)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(o)}catch(e){}else try{return e.removeListener(t,o)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=o.__ieWrapper;void 0!==i&&(e.detachEvent("on"+t,i),delete o.__ieWrapper)}}},withVender:function(e,o){if(void 0===o)return"";if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(o)>-1)return o;if(void 0!==e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(o)>-1)return o;var t;t=o in d?d[o]:c.test(o)?[o,o.replace(c,r)]:[o];for(var n=0;n<u.length;n++)for(var i=0;i<t.length;i++){var a=u[n]+t[i];if(void 0!==e["on"+a])return a}return""}};!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(n||(n={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(i||(i={})),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"}(a||(a={})),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"}(s||(s={})),function(e){e.NotACrossPlatformFramework="NotACrossPlatformFramework",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(l||(l={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",p={device:i.Unknown,os:n.Unknown,engine:a.Unknown,browser:s.Unknown,crossPlatformFramework:l.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var o=r.getExtension("WEBGL_debug_renderer_info");return null===o?r.getParameter(r.RENDERER):r.getParameter(o.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:f,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(f)},b=[[/windows nt (6\.[23]); arm/i,n.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,n.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,n.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,n.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,n.Windows,g],[/windows ce\/?([\d.]*)/i,n.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,n.iOS,w],[/cfnetwork\/.+darwin/i,n.iOS,w],[/mac os x ?([\w. ]*)/i,n.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,n.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,n.Android],[/android\w*[-\/.; ]?([\d.]*)/i,n.Android]],v=[[/windows.+ edge\/([\w.]+)/i,a.EdgeHTML],[/arkweb\/([\w.]+)/i,a.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,a.Blink],[/presto\/([\w.]+)/i,a.Presto],[/webkit\/([\w.]+)/i,a.WebKit],[/trident\/([\w.]+)/i,a.Trident],[/netfront\/([\w.]+)/i,a.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,a.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,a.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,a.Gecko]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,s.Chrome],[/webview.+edge\/([\w.]+)/i,s.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,s.Edge],[/opera mini\/([-\w.]+)/i,s.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,s.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,s.Opera],[/opios[\/ ]+([\w.]+)/i,s.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,s.Opera],[/\bopr\/([\w.]+)/i,s.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,s.IE],[/(?:ms|\()ie ([\w.]+)/i,s.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,s.IE],[/\bfocus\/([\w.]+)/i,s.Firefox],[/\bopt\/([\w.]+)/i,s.Opera],[/coast\/([\w.]+)/i,s.Opera],[/fxios\/([\w.-]+)/i,s.Firefox],[/samsungbrowser\/([\w.]+)/i,s.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,s.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,s.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,s.Chrome],[/chrome\/([\w.]+) mobile/i,s.Chrome],[/chrome\/v?([\w.]+)/i,s.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/version\/([\w.,]+) .*safari/i,s.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,s.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,s.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,s.Firefox],[/firefox\/([\w.]+)/i,s.Firefox]];function g(e){if(void 0===e)return"";var r={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==r?r:e}function w(e){return void 0===e?"":e.replace(/_/g,".")}function y(e,r){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":r}function T(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function k(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(p.crossPlatformFramework=l.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(p.crossPlatformFramework=l.ReactNative);for(var x=0;x<b.length;x++){var j=(D=b[x])[0],E=D[1],S=D[2];if(null!==(A=p.userAgent.match(j))){p.os=E,p.osVersion=T(A[1],S);break}}p.os===n.iOS&&0===function(e,r){for(var o=e.split("."),t=r.split("."),n=Math.max(o.length,t.length),i=0;i<n;i++){var a=void 0,s=void 0;if((a=i<o.length?parseInt(o[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}(p.osVersion,"18.6")&&(null!==(V=/\) Version\/([\d.]+)/.exec(p.userAgent))&&parseInt(V[1].substring(0,2),10)>=26&&(p.osVersion=V[1]));for(x=0;x<v.length;x++){j=(D=v[x])[0];var P=D[1];S=D[2];if(null!==(A=p.userAgent.match(j))){p.engine=P,p.engineVersion=T(A[1],S);break}}for(x=0;x<h.length;x++){j=(D=h[x])[0];var D,A,C=D[1];S=D[2];if(null!==(A=p.userAgent.match(j))){p.browser=C,p.browserVersion=T(A[1],S);break}}if(p.crossPlatformFramework===l.ReactNative)try{E=(O=require("react-native").Platform).OS;var V=k(M=""+O.Version);switch(E){case"android":p.os=n.Android,p.osVersion=function(e,r){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":r}(V,M);break;case"ios":p.os=n.iOS,p.osVersion=M;break;case"windows":p.os=n.Windows,p.osVersion=y(V,M);break;case"macos":p.os=n.MacOS,p.osVersion=M}}catch(e){}if(p.isNode)try{var M,O=(E=require("os")).platform();V=k(M=E.release());switch(O){case"win32":p.os=n.Windows,p.osVersion=y(V,M);break;case"darwin":p.os=n.MacOS,p.osVersion=function(e,r){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:r}(V,M);break;case"android":p.os=n.Android,p.osVersion=M;break;case"linux":/android/i.test(M)&&(p.os=n.Android,p.osVersion=M)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(p.crossPlatformFramework=l.Cordova,p.os===n.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":p.os=n.Android;break;case"iOS":p.os=n.iOS}p.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,o=e.fullVersionList||e.brands||[],t=e.platformVersion,i=0;i<o.length;i++){var a=null==(r=o[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(p.engineVersion=l)}"string"==typeof t&&(p.os===n.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?p.osVersion="11":p.osVersion=t)})),p.device=p.os===n.iOS||p.os===n.Android?i.Mobile:p.os===n.Windows||p.os===n.MacOS?i.Desktop:i.Unknown,p.isMobile=p.device===i.Mobile,p.isDesktop=p.device===i.Desktop,p.isStandalone=function(e){return"matchMedia"in globalThis&&(e===n.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(p.os);var N={copy:function(e){var r=function(e){if(function(e){return W(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return W(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(p.crossPlatformFramework===l.Electron)return function(e){try{var r=require("electron");return new Promise((function(o){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),o(!0)}catch(e){o(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(L()&&("write"in navigator.clipboard||"writeText"in navigator.clipboard))return function(e){try{if("ClipboardItem"in window&&"write"in navigator.clipboard)return navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]).then((function(){return!0})).catch((function(){return!1}));if("writeText"in navigator.clipboard)return navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(r).then((function(e){return!!e||F(r)})).catch((function(){return F(r)}));return Promise.resolve(F(r))},paste:function(){if(p.crossPlatformFramework===l.Electron)return function(){try{var e=require("electron");return new Promise((function(r){try{var o=e.clipboard.readHTML();return r(o?o.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(L()&&("read"in navigator.clipboard||"readText"in navigator.clipboard))return function(){try{if("ClipboardItem"in window&&"read"in navigator.clipboard)return navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var r=e[0],o=r.types,t=0;t<o.length;t++)if("text/html"===o[t])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<o.length;t++)if("text/plain"===o[t])return r.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}));return Promise.resolve(null)})).catch((function(){return null}));if("readText"in navigator.clipboard)return navigator.clipboard.readText().then((function(e){return e})).catch((function(){return null}))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}().then((function(e){return null!==e?e:I()})).catch((function(){return I()}));return Promise.resolve(I())}};function W(e){return null!==e&&"object"==typeof e}function L(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function F(r){return function(r){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var o=e("div");if(void 0===o)return!1;o.contentEditable="true",o.innerHTML=r,o.style.whiteSpace="pre",o.style.userSelect="text",o.style.setProperty("-webkit-user-select","text"),o.style.setProperty("-moz-user-select","text"),o.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(o);var t=globalThis.getSelection(),n=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===t)return R(o,t,i),!1;t.removeAllRanges(),n.selectNodeContents(o),t.addRange(n);var a=globalThis.document.execCommand("copy");return R(o,t,i),a}catch(e){return R(o,t,i),!1}}(r)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(r)}function I(){return function(){var r=e("div");if(void 0===r)return null;r.contentEditable="true",globalThis.document.body.appendChild(r),r.focus();var o=null,t=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.getData&&(e.preventDefault(),o=e.clipboardData.getData("text/html")||e.clipboardData.getData("text/plain")||null)}catch(e){}};m.add(globalThis.document,{type:"paste",callback:t,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||o||(o=r.innerHTML||r.textContent||null),_(r,t),o}catch(e){return _(r,t),null}}()||function(){var e=window.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{return e.getData("Text")||null}catch(e){return null}return null}()||""}function R(e,r,o){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:o})}function _(e,r){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:r})}var U={installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}};export{U as default};
|
|
@@ -9,6 +9,204 @@ function isSecureContext() {
|
|
|
9
9
|
hostname === '[::1]';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
function createHiddenElement(tagName, focusable) {
|
|
13
|
+
if (focusable === void 0) { focusable = true; }
|
|
14
|
+
if (typeof globalThis.document === 'undefined')
|
|
15
|
+
return undefined;
|
|
16
|
+
var element = globalThis.document.createElement(tagName);
|
|
17
|
+
if ('width' in element)
|
|
18
|
+
element.width = '0';
|
|
19
|
+
if ('height' in element)
|
|
20
|
+
element.height = '0';
|
|
21
|
+
if ('border' in element)
|
|
22
|
+
element.border = '0';
|
|
23
|
+
if ('frameBorder' in element)
|
|
24
|
+
element.frameBorder = '0';
|
|
25
|
+
if ('scrolling' in element)
|
|
26
|
+
element.scrolling = 'no';
|
|
27
|
+
if ('cellPadding' in element)
|
|
28
|
+
element.cellPadding = '0';
|
|
29
|
+
if ('cellSpacing' in element)
|
|
30
|
+
element.cellSpacing = '0';
|
|
31
|
+
if ('frame' in element)
|
|
32
|
+
element.frame = 'void';
|
|
33
|
+
if ('rules' in element)
|
|
34
|
+
element.rules = 'none';
|
|
35
|
+
if ('noWrap' in element)
|
|
36
|
+
element.noWrap = true;
|
|
37
|
+
element.tabIndex = -1;
|
|
38
|
+
element.setAttribute('role', 'presentation');
|
|
39
|
+
if (focusable) {
|
|
40
|
+
element.style.width = '1px';
|
|
41
|
+
element.style.height = '1px';
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
element.setAttribute('aria-hidden', 'true');
|
|
45
|
+
element.style.width = '0';
|
|
46
|
+
element.style.height = '0';
|
|
47
|
+
element.style.zIndex = '-9999';
|
|
48
|
+
element.style.display = 'none';
|
|
49
|
+
element.style.visibility = 'hidden';
|
|
50
|
+
element.style.pointerEvents = 'none';
|
|
51
|
+
}
|
|
52
|
+
element.style.position = 'absolute';
|
|
53
|
+
element.style.top = '0';
|
|
54
|
+
element.style.left = '0';
|
|
55
|
+
element.style.padding = '0';
|
|
56
|
+
element.style.margin = '0';
|
|
57
|
+
element.style.border = 'none';
|
|
58
|
+
element.style.outline = 'none';
|
|
59
|
+
element.style.clip = 'rect(1px, 1px, 1px, 1px)';
|
|
60
|
+
element.style.clipPath = 'inset(50%)';
|
|
61
|
+
element.style.overflow = 'hidden';
|
|
62
|
+
element.style.whiteSpace = 'nowrap';
|
|
63
|
+
return element;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function capitalize(_) {
|
|
67
|
+
var groups = [];
|
|
68
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
69
|
+
groups[_i - 1] = arguments[_i];
|
|
70
|
+
}
|
|
71
|
+
var result = '';
|
|
72
|
+
for (var i = 0; i < groups.length - 2; i++) {
|
|
73
|
+
var arg = groups[i];
|
|
74
|
+
if (arg !== undefined)
|
|
75
|
+
result = result + arg.charAt(0).toUpperCase() + arg.slice(1);
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
function preventDefaultPolyfill() {
|
|
80
|
+
this.returnValue = false;
|
|
81
|
+
}
|
|
82
|
+
function stopPropagationPolyfill() {
|
|
83
|
+
this.cancelBubble = true;
|
|
84
|
+
}
|
|
85
|
+
var EVENT_TYPE_REGEXP = /(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i;
|
|
86
|
+
var VENDORS = ['', 'webkit', 'moz', 'ms', 'MS', 'o', 'O'];
|
|
87
|
+
var LEGACY_TYPE_MAP = {
|
|
88
|
+
'wheel': ['wheel', 'mousewheel', 'DOMMouseScroll'],
|
|
89
|
+
'focus': ['focus', 'focusin'],
|
|
90
|
+
'blur': ['blur', 'focusout'],
|
|
91
|
+
'beforeinput': ['beforeinput', 'textInput'],
|
|
92
|
+
};
|
|
93
|
+
var EventListenerUtils = {
|
|
94
|
+
useStd: typeof globalThis.document !== 'undefined' && typeof globalThis.document.addEventListener === 'function',
|
|
95
|
+
add: function (target, eventListenerOptions) {
|
|
96
|
+
if (eventListenerOptions === void 0) { eventListenerOptions = { callback: null, options: false }; }
|
|
97
|
+
var callback = eventListenerOptions.callback;
|
|
98
|
+
if (target === undefined || callback === null)
|
|
99
|
+
return;
|
|
100
|
+
var type = EventListenerUtils.withVender(target, eventListenerOptions.type);
|
|
101
|
+
var options = eventListenerOptions.options;
|
|
102
|
+
if (typeof target.addEventListener === 'function') {
|
|
103
|
+
try {
|
|
104
|
+
return target.addEventListener(type, callback, options);
|
|
105
|
+
}
|
|
106
|
+
catch (_) {
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (typeof target.addListener === 'function') {
|
|
110
|
+
if (typeof target.matches === 'boolean') {
|
|
111
|
+
try {
|
|
112
|
+
return target.addListener(callback);
|
|
113
|
+
}
|
|
114
|
+
catch (_) {
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
try {
|
|
119
|
+
return target.addListener(type, callback);
|
|
120
|
+
}
|
|
121
|
+
catch (_) {
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function wrapper(event) {
|
|
126
|
+
if (event === undefined)
|
|
127
|
+
event = globalThis.event;
|
|
128
|
+
if (event === undefined)
|
|
129
|
+
return;
|
|
130
|
+
event.currentTarget = target;
|
|
131
|
+
if (typeof event.preventDefault !== 'function')
|
|
132
|
+
event.preventDefault = preventDefaultPolyfill;
|
|
133
|
+
if (typeof event.stopPropagation !== 'function')
|
|
134
|
+
event.stopPropagation = stopPropagationPolyfill;
|
|
135
|
+
if (typeof callback === 'function')
|
|
136
|
+
callback.call(target, event);
|
|
137
|
+
else if (callback && typeof callback.handleEvent === 'function')
|
|
138
|
+
callback.handleEvent.call(target, event);
|
|
139
|
+
}
|
|
140
|
+
if (typeof target.attachEvent === 'function') {
|
|
141
|
+
if (callback.__ieWrapper)
|
|
142
|
+
return target.attachEvent('on' + type, callback.__ieWrapper);
|
|
143
|
+
return target.attachEvent('on' + type, callback.__ieWrapper = wrapper);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
remove: function (target, eventListenerOptions) {
|
|
147
|
+
if (eventListenerOptions === void 0) { eventListenerOptions = { callback: null, options: false }; }
|
|
148
|
+
var callback = eventListenerOptions.callback;
|
|
149
|
+
if (target === undefined || callback === null)
|
|
150
|
+
return;
|
|
151
|
+
var type = EventListenerUtils.withVender(target, eventListenerOptions.type);
|
|
152
|
+
var options = eventListenerOptions.options;
|
|
153
|
+
if (typeof target.removeEventListener === 'function') {
|
|
154
|
+
try {
|
|
155
|
+
return target.removeEventListener(type, callback, options);
|
|
156
|
+
}
|
|
157
|
+
catch (_) {
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (typeof target.removeListener === 'function') {
|
|
161
|
+
if (typeof target.matches === 'boolean') {
|
|
162
|
+
try {
|
|
163
|
+
return target.removeListener(callback);
|
|
164
|
+
}
|
|
165
|
+
catch (_) {
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
try {
|
|
170
|
+
return target.removeListener(type, callback);
|
|
171
|
+
}
|
|
172
|
+
catch (_) {
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (typeof target.detachEvent === 'function') {
|
|
177
|
+
var wrapper = callback.__ieWrapper;
|
|
178
|
+
if (wrapper !== undefined) {
|
|
179
|
+
target.detachEvent('on' + type, wrapper);
|
|
180
|
+
delete callback.__ieWrapper;
|
|
181
|
+
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
withVender: function (target, type) {
|
|
186
|
+
if (type === undefined)
|
|
187
|
+
return '';
|
|
188
|
+
if (target === globalThis.document && ['deviceready', 'pause', 'resume', 'backbutton', 'menubutton', 'searchbutton', 'startcallbutton', 'endcallbutton', 'volumedownbutton', 'volumeupbutton', 'activated', 'cordovacallbackerror'].indexOf(type) > -1)
|
|
189
|
+
return type;
|
|
190
|
+
if (typeof target.webkitEnterFullscreen !== 'undefined' && ['webkitbeginfullscreen', 'webkitendfullscreen', 'webkitpresentationmodechanged'].indexOf(type) > -1)
|
|
191
|
+
return type;
|
|
192
|
+
var types;
|
|
193
|
+
if (type in LEGACY_TYPE_MAP)
|
|
194
|
+
types = LEGACY_TYPE_MAP[type];
|
|
195
|
+
else if (EVENT_TYPE_REGEXP.test(type))
|
|
196
|
+
types = [type, type.replace(EVENT_TYPE_REGEXP, capitalize)];
|
|
197
|
+
else
|
|
198
|
+
types = [type];
|
|
199
|
+
for (var i = 0; i < VENDORS.length; i++) {
|
|
200
|
+
for (var j = 0; j < types.length; j++) {
|
|
201
|
+
var name_1 = VENDORS[i] + types[j];
|
|
202
|
+
if (typeof target['on' + name_1] !== 'undefined')
|
|
203
|
+
return name_1;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return '';
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
12
210
|
function compareVersion(lhs, rhs) {
|
|
13
211
|
var pa = lhs.split('.');
|
|
14
212
|
var pb = rhs.split('.');
|
|
@@ -71,24 +269,31 @@ var Browsers;
|
|
|
71
269
|
Browsers["IE"] = "IE";
|
|
72
270
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
73
271
|
})(Browsers || (Browsers = {}));
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
272
|
+
var CrossPlatformFramework;
|
|
273
|
+
(function (CrossPlatformFramework) {
|
|
274
|
+
CrossPlatformFramework["NotACrossPlatformFramework"] = "NotACrossPlatformFramework";
|
|
275
|
+
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
276
|
+
CrossPlatformFramework["Electron"] = "Electron";
|
|
277
|
+
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
278
|
+
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
279
|
+
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
280
|
+
|
|
78
281
|
var Platform = {
|
|
79
282
|
device: Devices.Unknown,
|
|
80
283
|
os: OS.Unknown,
|
|
81
|
-
osVersion: '',
|
|
82
284
|
engine: Engines.Unknown,
|
|
83
|
-
engineVersion: '',
|
|
84
285
|
browser: Browsers.Unknown,
|
|
286
|
+
crossPlatformFramework: CrossPlatformFramework.NotACrossPlatformFramework,
|
|
287
|
+
osVersion: '',
|
|
288
|
+
engineVersion: '',
|
|
85
289
|
browserVersion: '',
|
|
86
290
|
renderer: getRenderer(),
|
|
87
|
-
userAgent:
|
|
291
|
+
userAgent: USER_AGENT,
|
|
292
|
+
isNode: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
|
|
88
293
|
isMobile: false,
|
|
89
294
|
isDesktop: false,
|
|
90
295
|
isStandalone: false,
|
|
91
|
-
isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(
|
|
296
|
+
isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(USER_AGENT),
|
|
92
297
|
};
|
|
93
298
|
var OS_RESOLVER_MAP = [
|
|
94
299
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -357,6 +562,12 @@ function getSemanticVersion(string) {
|
|
|
357
562
|
build: parseInt(parts[2] || '0')
|
|
358
563
|
};
|
|
359
564
|
}
|
|
565
|
+
if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(USER_AGENT))) {
|
|
566
|
+
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
567
|
+
}
|
|
568
|
+
if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative') {
|
|
569
|
+
Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
|
|
570
|
+
}
|
|
360
571
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
361
572
|
var map = OS_RESOLVER_MAP[i];
|
|
362
573
|
var regexp = map[0];
|
|
@@ -398,7 +609,7 @@ for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
|
398
609
|
break;
|
|
399
610
|
}
|
|
400
611
|
}
|
|
401
|
-
if (
|
|
612
|
+
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
402
613
|
try {
|
|
403
614
|
var reactNative = require('react-native');
|
|
404
615
|
var platform = reactNative.Platform;
|
|
@@ -427,7 +638,7 @@ if (IS_REACT_NATIVE) {
|
|
|
427
638
|
catch (_) {
|
|
428
639
|
}
|
|
429
640
|
}
|
|
430
|
-
if (
|
|
641
|
+
if (Platform.isNode) {
|
|
431
642
|
try {
|
|
432
643
|
var os = require('os');
|
|
433
644
|
var platform = os.platform();
|
|
@@ -459,6 +670,7 @@ if (IS_NODE_JS) {
|
|
|
459
670
|
}
|
|
460
671
|
if (typeof globalThis.document !== 'undefined') {
|
|
461
672
|
globalThis.document.addEventListener("deviceready", function () {
|
|
673
|
+
Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
|
|
462
674
|
if (Platform.os === OS.Unknown && typeof globalThis.device !== 'undefined') {
|
|
463
675
|
switch (globalThis.device.platform) {
|
|
464
676
|
case 'Android':
|
|
@@ -501,205 +713,7 @@ Platform.isMobile = Platform.device === Devices.Mobile;
|
|
|
501
713
|
Platform.isDesktop = Platform.device === Devices.Desktop;
|
|
502
714
|
Platform.isStandalone = getIsStandalone(Platform.os);
|
|
503
715
|
|
|
504
|
-
|
|
505
|
-
if (focusable === void 0) { focusable = true; }
|
|
506
|
-
if (typeof globalThis.document === 'undefined')
|
|
507
|
-
return undefined;
|
|
508
|
-
var element = globalThis.document.createElement(tagName);
|
|
509
|
-
if ('width' in element)
|
|
510
|
-
element.width = '0';
|
|
511
|
-
if ('height' in element)
|
|
512
|
-
element.height = '0';
|
|
513
|
-
if ('border' in element)
|
|
514
|
-
element.border = '0';
|
|
515
|
-
if ('frameBorder' in element)
|
|
516
|
-
element.frameBorder = '0';
|
|
517
|
-
if ('scrolling' in element)
|
|
518
|
-
element.scrolling = 'no';
|
|
519
|
-
if ('cellPadding' in element)
|
|
520
|
-
element.cellPadding = '0';
|
|
521
|
-
if ('cellSpacing' in element)
|
|
522
|
-
element.cellSpacing = '0';
|
|
523
|
-
if ('frame' in element)
|
|
524
|
-
element.frame = 'void';
|
|
525
|
-
if ('rules' in element)
|
|
526
|
-
element.rules = 'none';
|
|
527
|
-
if ('noWrap' in element)
|
|
528
|
-
element.noWrap = true;
|
|
529
|
-
element.tabIndex = -1;
|
|
530
|
-
element.setAttribute('role', 'presentation');
|
|
531
|
-
if (focusable) {
|
|
532
|
-
element.style.width = '1px';
|
|
533
|
-
element.style.height = '1px';
|
|
534
|
-
}
|
|
535
|
-
else {
|
|
536
|
-
element.setAttribute('aria-hidden', 'true');
|
|
537
|
-
element.style.width = '0';
|
|
538
|
-
element.style.height = '0';
|
|
539
|
-
element.style.zIndex = '-9999';
|
|
540
|
-
element.style.display = 'none';
|
|
541
|
-
element.style.visibility = 'hidden';
|
|
542
|
-
element.style.pointerEvents = 'none';
|
|
543
|
-
}
|
|
544
|
-
element.style.position = 'absolute';
|
|
545
|
-
element.style.top = '0';
|
|
546
|
-
element.style.left = '0';
|
|
547
|
-
element.style.padding = '0';
|
|
548
|
-
element.style.margin = '0';
|
|
549
|
-
element.style.border = 'none';
|
|
550
|
-
element.style.outline = 'none';
|
|
551
|
-
element.style.clip = 'rect(1px, 1px, 1px, 1px)';
|
|
552
|
-
element.style.clipPath = 'inset(50%)';
|
|
553
|
-
element.style.overflow = 'hidden';
|
|
554
|
-
element.style.whiteSpace = 'nowrap';
|
|
555
|
-
return element;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function capitalize(_) {
|
|
559
|
-
var groups = [];
|
|
560
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
561
|
-
groups[_i - 1] = arguments[_i];
|
|
562
|
-
}
|
|
563
|
-
var result = '';
|
|
564
|
-
for (var i = 0; i < groups.length - 2; i++) {
|
|
565
|
-
var arg = groups[i];
|
|
566
|
-
if (arg !== undefined)
|
|
567
|
-
result = result + arg.charAt(0).toUpperCase() + arg.slice(1);
|
|
568
|
-
}
|
|
569
|
-
return result;
|
|
570
|
-
}
|
|
571
|
-
function preventDefaultPolyfill() {
|
|
572
|
-
this.returnValue = false;
|
|
573
|
-
}
|
|
574
|
-
function stopPropagationPolyfill() {
|
|
575
|
-
this.cancelBubble = true;
|
|
576
|
-
}
|
|
577
|
-
var EVENT_TYPE_REGEXP = /(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i;
|
|
578
|
-
var VENDORS = ['', 'webkit', 'moz', 'ms', 'MS', 'o', 'O'];
|
|
579
|
-
var LEGACY_TYPE_MAP = {
|
|
580
|
-
'wheel': ['wheel', 'mousewheel', 'DOMMouseScroll'],
|
|
581
|
-
'focus': ['focus', 'focusin'],
|
|
582
|
-
'blur': ['blur', 'focusout'],
|
|
583
|
-
'beforeinput': ['beforeinput', 'textInput'],
|
|
584
|
-
};
|
|
585
|
-
var EventListenerUtils = {
|
|
586
|
-
useStd: typeof globalThis.document !== 'undefined' && typeof globalThis.document.addEventListener === 'function',
|
|
587
|
-
add: function (target, eventListenerOptions) {
|
|
588
|
-
if (eventListenerOptions === void 0) { eventListenerOptions = { callback: null, options: false }; }
|
|
589
|
-
var callback = eventListenerOptions.callback;
|
|
590
|
-
if (target === undefined || callback === null)
|
|
591
|
-
return;
|
|
592
|
-
var type = EventListenerUtils.withVender(target, eventListenerOptions.type);
|
|
593
|
-
var options = eventListenerOptions.options;
|
|
594
|
-
if (typeof target.addEventListener === 'function') {
|
|
595
|
-
try {
|
|
596
|
-
return target.addEventListener(type, callback, options);
|
|
597
|
-
}
|
|
598
|
-
catch (_) {
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
if (typeof target.addListener === 'function') {
|
|
602
|
-
if (typeof target.matches === 'boolean') {
|
|
603
|
-
try {
|
|
604
|
-
return target.addListener(callback);
|
|
605
|
-
}
|
|
606
|
-
catch (_) {
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
else {
|
|
610
|
-
try {
|
|
611
|
-
return target.addListener(type, callback);
|
|
612
|
-
}
|
|
613
|
-
catch (_) {
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
function wrapper(event) {
|
|
618
|
-
if (event === undefined)
|
|
619
|
-
event = globalThis.event;
|
|
620
|
-
if (event === undefined)
|
|
621
|
-
return;
|
|
622
|
-
event.currentTarget = target;
|
|
623
|
-
if (typeof event.preventDefault !== 'function')
|
|
624
|
-
event.preventDefault = preventDefaultPolyfill;
|
|
625
|
-
if (typeof event.stopPropagation !== 'function')
|
|
626
|
-
event.stopPropagation = stopPropagationPolyfill;
|
|
627
|
-
if (typeof callback === 'function')
|
|
628
|
-
callback.call(target, event);
|
|
629
|
-
else if (callback && typeof callback.handleEvent === 'function')
|
|
630
|
-
callback.handleEvent.call(target, event);
|
|
631
|
-
}
|
|
632
|
-
if (typeof target.attachEvent === 'function') {
|
|
633
|
-
if (callback.__ieWrapper)
|
|
634
|
-
return target.attachEvent('on' + type, callback.__ieWrapper);
|
|
635
|
-
return target.attachEvent('on' + type, callback.__ieWrapper = wrapper);
|
|
636
|
-
}
|
|
637
|
-
},
|
|
638
|
-
remove: function (target, eventListenerOptions) {
|
|
639
|
-
if (eventListenerOptions === void 0) { eventListenerOptions = { callback: null, options: false }; }
|
|
640
|
-
var callback = eventListenerOptions.callback;
|
|
641
|
-
if (target === undefined || callback === null)
|
|
642
|
-
return;
|
|
643
|
-
var type = EventListenerUtils.withVender(target, eventListenerOptions.type);
|
|
644
|
-
var options = eventListenerOptions.options;
|
|
645
|
-
if (typeof target.removeEventListener === 'function') {
|
|
646
|
-
try {
|
|
647
|
-
return target.removeEventListener(type, callback, options);
|
|
648
|
-
}
|
|
649
|
-
catch (_) {
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
if (typeof target.removeListener === 'function') {
|
|
653
|
-
if (typeof target.matches === 'boolean') {
|
|
654
|
-
try {
|
|
655
|
-
return target.removeListener(callback);
|
|
656
|
-
}
|
|
657
|
-
catch (_) {
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
else {
|
|
661
|
-
try {
|
|
662
|
-
return target.removeListener(type, callback);
|
|
663
|
-
}
|
|
664
|
-
catch (_) {
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
if (typeof target.detachEvent === 'function') {
|
|
669
|
-
var wrapper = callback.__ieWrapper;
|
|
670
|
-
if (wrapper !== undefined) {
|
|
671
|
-
target.detachEvent('on' + type, wrapper);
|
|
672
|
-
delete callback.__ieWrapper;
|
|
673
|
-
}
|
|
674
|
-
return;
|
|
675
|
-
}
|
|
676
|
-
},
|
|
677
|
-
withVender: function (target, type) {
|
|
678
|
-
if (type === undefined)
|
|
679
|
-
return '';
|
|
680
|
-
if (target === globalThis.document && ['deviceready', 'pause', 'resume', 'backbutton', 'menubutton', 'searchbutton', 'startcallbutton', 'endcallbutton', 'volumedownbutton', 'volumeupbutton', 'activated', 'cordovacallbackerror'].indexOf(type) > -1)
|
|
681
|
-
return type;
|
|
682
|
-
if (typeof target.webkitEnterFullscreen !== 'undefined' && ['webkitbeginfullscreen', 'webkitendfullscreen', 'webkitpresentationmodechanged'].indexOf(type) > -1)
|
|
683
|
-
return type;
|
|
684
|
-
var types;
|
|
685
|
-
if (type in LEGACY_TYPE_MAP)
|
|
686
|
-
types = LEGACY_TYPE_MAP[type];
|
|
687
|
-
else if (EVENT_TYPE_REGEXP.test(type))
|
|
688
|
-
types = [type, type.replace(EVENT_TYPE_REGEXP, capitalize)];
|
|
689
|
-
else
|
|
690
|
-
types = [type];
|
|
691
|
-
for (var i = 0; i < VENDORS.length; i++) {
|
|
692
|
-
for (var j = 0; j < types.length; j++) {
|
|
693
|
-
var name_1 = VENDORS[i] + types[j];
|
|
694
|
-
if (typeof target['on' + name_1] !== 'undefined')
|
|
695
|
-
return name_1;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
return '';
|
|
699
|
-
}
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
var Index = {
|
|
716
|
+
var Clipboard = {
|
|
703
717
|
copy: copy,
|
|
704
718
|
paste: paste
|
|
705
719
|
};
|
|
@@ -743,7 +757,7 @@ function supportsClipboardReadAPI() {
|
|
|
743
757
|
}
|
|
744
758
|
function copy(item) {
|
|
745
759
|
var text = convertToString(item);
|
|
746
|
-
if (
|
|
760
|
+
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
747
761
|
return copyViaElectron(text);
|
|
748
762
|
}
|
|
749
763
|
else if (supportsClipboardWriteAPI()) {
|
|
@@ -870,7 +884,7 @@ function copyViaLegacy(text) {
|
|
|
870
884
|
return copyViaSelection(text) || copyViaClipboardData(text);
|
|
871
885
|
}
|
|
872
886
|
function paste() {
|
|
873
|
-
if (
|
|
887
|
+
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
874
888
|
return pasteViaElectron();
|
|
875
889
|
}
|
|
876
890
|
else if (supportsClipboardReadAPI()) {
|
|
@@ -1019,7 +1033,7 @@ function cleanupPaste(div, onPaste) {
|
|
|
1019
1033
|
var NativeClipboardPlugin = {
|
|
1020
1034
|
installed: false,
|
|
1021
1035
|
name: 'Clipboard',
|
|
1022
|
-
module:
|
|
1036
|
+
module: Clipboard,
|
|
1023
1037
|
Constants: {},
|
|
1024
1038
|
Errors: {}
|
|
1025
1039
|
};
|