native-fn 1.0.62 → 1.0.64

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 (252) hide show
  1. package/README.md +2 -2
  2. package/dist/index.d.ts +0 -198
  3. package/dist/native.cjs +2 -14
  4. package/dist/native.min.cjs +1 -1
  5. package/dist/native.min.mjs +1 -1
  6. package/dist/native.mjs +2 -14
  7. package/dist/native.umd.js +2 -14
  8. package/dist/native.umd.min.js +1 -1
  9. package/dist/plugin/app/index.cjs +12 -7
  10. package/dist/plugin/app/index.d.ts +12 -53
  11. package/dist/plugin/app/index.min.cjs +1 -1
  12. package/dist/plugin/app/index.min.mjs +1 -1
  13. package/dist/plugin/app/index.mjs +12 -7
  14. package/dist/plugin/app/index.umd.js +12 -7
  15. package/dist/plugin/app/index.umd.min.js +1 -1
  16. package/dist/plugin/app/src/plugin/app/constants/index.d.ts +12 -0
  17. package/dist/plugin/app/src/plugin/app/cores/index.d.ts +3 -0
  18. package/dist/plugin/app/src/plugin/app/index.d.ts +1 -1
  19. package/dist/plugin/app/src/plugin/app/types/app.d.ts +6 -1
  20. package/dist/plugin/app/src/plugin/app/types/index.d.ts +2 -2
  21. package/dist/plugin/app/src/plugin/appearance/constants/index.d.ts +11 -0
  22. package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +3 -0
  23. package/dist/plugin/app/src/plugin/appearance/index.d.ts +8 -0
  24. package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +6 -0
  25. package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +13 -0
  26. package/dist/plugin/app/src/plugin/camera/constants/inedx.d.ts +4 -0
  27. package/dist/plugin/app/src/plugin/camera/cores/index.d.ts +3 -0
  28. package/dist/plugin/app/src/plugin/camera/index.d.ts +1 -1
  29. package/dist/plugin/app/src/plugin/camera/types/camera.d.ts +1 -1
  30. package/dist/plugin/app/src/plugin/camera/types/index.d.ts +1 -1
  31. package/dist/plugin/app/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  32. package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +3 -0
  33. package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +35 -0
  34. package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  35. package/dist/plugin/app/src/plugin/theme/constants/index.d.ts +14 -0
  36. package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +3 -0
  37. package/dist/plugin/app/src/plugin/theme/index.d.ts +1 -1
  38. package/dist/plugin/app/src/plugin/theme/types/index.d.ts +1 -1
  39. package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +1 -1
  40. package/dist/plugin/app/src/types/native.d.ts +0 -8
  41. package/dist/plugin/appearance/index.cjs +764 -0
  42. package/dist/plugin/appearance/index.d.ts +100 -0
  43. package/dist/plugin/appearance/index.min.cjs +1 -0
  44. package/dist/plugin/appearance/index.min.mjs +1 -0
  45. package/dist/plugin/appearance/index.mjs +762 -0
  46. package/dist/plugin/appearance/index.umd.js +770 -0
  47. package/dist/plugin/appearance/index.umd.min.js +1 -0
  48. package/dist/plugin/appearance/src/constants/platform.d.ts +67 -0
  49. package/dist/plugin/appearance/src/errors/plugin-not-extended-error.d.ts +2 -0
  50. package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +12 -0
  51. package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +3 -0
  52. package/dist/plugin/appearance/src/plugin/app/errors/url-open-error.d.ts +2 -0
  53. package/dist/plugin/appearance/src/plugin/app/index.d.ts +12 -0
  54. package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +54 -0
  55. package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +16 -0
  56. package/dist/plugin/appearance/src/plugin/app/utils/try-open-url.d.ts +16 -0
  57. package/dist/plugin/appearance/src/plugin/appearance/constants/index.d.ts +11 -0
  58. package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +3 -0
  59. package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +8 -0
  60. package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +6 -0
  61. package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +13 -0
  62. package/dist/plugin/appearance/src/plugin/camera/constants/inedx.d.ts +4 -0
  63. package/dist/plugin/appearance/src/plugin/camera/cores/index.d.ts +3 -0
  64. package/dist/plugin/appearance/src/plugin/camera/index.d.ts +8 -0
  65. package/dist/plugin/appearance/src/plugin/camera/types/camera.d.ts +4 -0
  66. package/dist/plugin/appearance/src/plugin/camera/types/index.d.ts +13 -0
  67. package/dist/plugin/appearance/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
  68. package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +3 -0
  69. package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +5 -0
  70. package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +4 -0
  71. package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +11 -0
  72. package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +35 -0
  73. package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +5 -0
  74. package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +17 -0
  75. package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +11 -0
  76. package/dist/plugin/appearance/src/plugin/theme/constants/index.d.ts +14 -0
  77. package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +3 -0
  78. package/dist/plugin/appearance/src/plugin/theme/errors/easing-error.d.ts +6 -0
  79. package/dist/plugin/appearance/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
  80. package/dist/plugin/appearance/src/plugin/theme/index.d.ts +17 -0
  81. package/dist/plugin/appearance/src/plugin/theme/types/color.d.ts +17 -0
  82. package/dist/plugin/appearance/src/plugin/theme/types/easing-syntax.d.ts +16 -0
  83. package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +23 -0
  84. package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +24 -0
  85. package/dist/plugin/appearance/src/plugin/theme/utils/parse-color.d.ts +2 -0
  86. package/dist/plugin/appearance/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
  87. package/dist/plugin/appearance/src/types/event-listener-util.d.ts +11 -0
  88. package/dist/plugin/appearance/src/types/index.d.ts +1 -0
  89. package/dist/plugin/appearance/src/types/native.d.ts +27 -0
  90. package/dist/plugin/appearance/src/types/platform.d.ts +16 -0
  91. package/dist/plugin/appearance/src/utils/assign.d.ts +1 -0
  92. package/dist/plugin/appearance/src/utils/compare-version.d.ts +1 -0
  93. package/dist/plugin/appearance/src/utils/create-custom-error.d.ts +6 -0
  94. package/dist/plugin/appearance/src/utils/create-hidden-element.d.ts +1 -0
  95. package/dist/plugin/appearance/src/utils/dispatch-click-event.d.ts +1 -0
  96. package/dist/plugin/appearance/src/utils/event-listener-utils.d.ts +3 -0
  97. package/dist/plugin/appearance/src/utils/get-topmost-window.d.ts +1 -0
  98. package/dist/plugin/appearance/src/utils/is-secure-context.d.ts +1 -0
  99. package/dist/plugin/camera/index.cjs +3 -3
  100. package/dist/plugin/camera/index.d.ts +0 -150
  101. package/dist/plugin/camera/index.min.cjs +1 -1
  102. package/dist/plugin/camera/index.min.mjs +1 -1
  103. package/dist/plugin/camera/index.mjs +3 -3
  104. package/dist/plugin/camera/index.umd.js +3 -3
  105. package/dist/plugin/camera/index.umd.min.js +1 -1
  106. package/dist/plugin/camera/src/plugin/app/constants/index.d.ts +12 -0
  107. package/dist/plugin/camera/src/plugin/app/cores/index.d.ts +3 -0
  108. package/dist/plugin/camera/src/plugin/app/index.d.ts +1 -1
  109. package/dist/plugin/camera/src/plugin/app/types/app.d.ts +6 -1
  110. package/dist/plugin/camera/src/plugin/app/types/index.d.ts +2 -2
  111. package/dist/plugin/camera/src/plugin/appearance/constants/index.d.ts +11 -0
  112. package/dist/plugin/camera/src/plugin/appearance/cores/index.d.ts +3 -0
  113. package/dist/plugin/camera/src/plugin/appearance/index.d.ts +8 -0
  114. package/dist/plugin/camera/src/plugin/appearance/types/appearance.d.ts +6 -0
  115. package/dist/plugin/camera/src/plugin/appearance/types/index.d.ts +13 -0
  116. package/dist/plugin/camera/src/plugin/camera/constants/inedx.d.ts +4 -0
  117. package/dist/plugin/camera/src/plugin/camera/cores/index.d.ts +3 -0
  118. package/dist/plugin/camera/src/plugin/camera/index.d.ts +1 -1
  119. package/dist/plugin/camera/src/plugin/camera/types/camera.d.ts +1 -1
  120. package/dist/plugin/camera/src/plugin/camera/types/index.d.ts +1 -1
  121. package/dist/plugin/camera/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  122. package/dist/plugin/camera/src/plugin/clipboard/cores/index.d.ts +3 -0
  123. package/dist/plugin/camera/src/plugin/fullscreen/cores/index.d.ts +35 -0
  124. package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  125. package/dist/plugin/camera/src/plugin/theme/constants/index.d.ts +14 -0
  126. package/dist/plugin/camera/src/plugin/theme/cores/index.d.ts +3 -0
  127. package/dist/plugin/camera/src/plugin/theme/index.d.ts +1 -1
  128. package/dist/plugin/camera/src/plugin/theme/types/index.d.ts +1 -1
  129. package/dist/plugin/camera/src/plugin/theme/types/theme.d.ts +1 -1
  130. package/dist/plugin/camera/src/types/native.d.ts +0 -8
  131. package/dist/plugin/clipboard/index.cjs +3 -3
  132. package/dist/plugin/clipboard/index.d.ts +0 -135
  133. package/dist/plugin/clipboard/index.min.cjs +1 -1
  134. package/dist/plugin/clipboard/index.min.mjs +1 -1
  135. package/dist/plugin/clipboard/index.mjs +3 -3
  136. package/dist/plugin/clipboard/index.umd.js +3 -3
  137. package/dist/plugin/clipboard/index.umd.min.js +1 -1
  138. package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +12 -0
  139. package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +3 -0
  140. package/dist/plugin/clipboard/src/plugin/app/index.d.ts +1 -1
  141. package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +6 -1
  142. package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +2 -2
  143. package/dist/plugin/clipboard/src/plugin/appearance/constants/index.d.ts +11 -0
  144. package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +3 -0
  145. package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +8 -0
  146. package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +6 -0
  147. package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +13 -0
  148. package/dist/plugin/clipboard/src/plugin/camera/constants/inedx.d.ts +4 -0
  149. package/dist/plugin/clipboard/src/plugin/camera/cores/index.d.ts +3 -0
  150. package/dist/plugin/clipboard/src/plugin/camera/index.d.ts +1 -1
  151. package/dist/plugin/clipboard/src/plugin/camera/types/camera.d.ts +1 -1
  152. package/dist/plugin/clipboard/src/plugin/camera/types/index.d.ts +1 -1
  153. package/dist/plugin/clipboard/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  154. package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +3 -0
  155. package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +35 -0
  156. package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  157. package/dist/plugin/clipboard/src/plugin/theme/constants/index.d.ts +14 -0
  158. package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +3 -0
  159. package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +1 -1
  160. package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +1 -1
  161. package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +1 -1
  162. package/dist/plugin/clipboard/src/types/native.d.ts +0 -8
  163. package/dist/plugin/fullscreen/index.cjs +322 -327
  164. package/dist/plugin/fullscreen/index.d.ts +10 -130
  165. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  166. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  167. package/dist/plugin/fullscreen/index.mjs +322 -327
  168. package/dist/plugin/fullscreen/index.umd.js +322 -327
  169. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  170. package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +12 -0
  171. package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +3 -0
  172. package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +1 -1
  173. package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +6 -1
  174. package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +2 -2
  175. package/dist/plugin/fullscreen/src/plugin/appearance/constants/index.d.ts +11 -0
  176. package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +3 -0
  177. package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +8 -0
  178. package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +6 -0
  179. package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +13 -0
  180. package/dist/plugin/fullscreen/src/plugin/camera/constants/inedx.d.ts +4 -0
  181. package/dist/plugin/fullscreen/src/plugin/camera/cores/index.d.ts +3 -0
  182. package/dist/plugin/fullscreen/src/plugin/camera/index.d.ts +1 -1
  183. package/dist/plugin/fullscreen/src/plugin/camera/types/camera.d.ts +1 -1
  184. package/dist/plugin/fullscreen/src/plugin/camera/types/index.d.ts +1 -1
  185. package/dist/plugin/fullscreen/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  186. package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +3 -0
  187. package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +35 -0
  188. package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  189. package/dist/plugin/fullscreen/src/plugin/theme/constants/index.d.ts +14 -0
  190. package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +3 -0
  191. package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +1 -1
  192. package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +1 -1
  193. package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +1 -1
  194. package/dist/plugin/fullscreen/src/types/native.d.ts +0 -8
  195. package/dist/plugin/theme/index.cjs +3 -3
  196. package/dist/plugin/theme/index.d.ts +0 -150
  197. package/dist/plugin/theme/index.min.cjs +1 -1
  198. package/dist/plugin/theme/index.min.mjs +1 -1
  199. package/dist/plugin/theme/index.mjs +3 -3
  200. package/dist/plugin/theme/index.umd.js +3 -3
  201. package/dist/plugin/theme/index.umd.min.js +1 -1
  202. package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +12 -0
  203. package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +3 -0
  204. package/dist/plugin/theme/src/plugin/app/index.d.ts +1 -1
  205. package/dist/plugin/theme/src/plugin/app/types/app.d.ts +6 -1
  206. package/dist/plugin/theme/src/plugin/app/types/index.d.ts +2 -2
  207. package/dist/plugin/theme/src/plugin/appearance/constants/index.d.ts +11 -0
  208. package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +3 -0
  209. package/dist/plugin/theme/src/plugin/appearance/index.d.ts +8 -0
  210. package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +6 -0
  211. package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +13 -0
  212. package/dist/plugin/theme/src/plugin/camera/constants/inedx.d.ts +4 -0
  213. package/dist/plugin/theme/src/plugin/camera/cores/index.d.ts +3 -0
  214. package/dist/plugin/theme/src/plugin/camera/index.d.ts +1 -1
  215. package/dist/plugin/theme/src/plugin/camera/types/camera.d.ts +1 -1
  216. package/dist/plugin/theme/src/plugin/camera/types/index.d.ts +1 -1
  217. package/dist/plugin/theme/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  218. package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +3 -0
  219. package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +35 -0
  220. package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  221. package/dist/plugin/theme/src/plugin/theme/constants/index.d.ts +14 -0
  222. package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +3 -0
  223. package/dist/plugin/theme/src/plugin/theme/index.d.ts +1 -1
  224. package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +1 -1
  225. package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +1 -1
  226. package/dist/plugin/theme/src/types/native.d.ts +0 -8
  227. package/dist/src/plugin/app/constants/index.d.ts +12 -0
  228. package/dist/src/plugin/app/cores/index.d.ts +3 -0
  229. package/dist/src/plugin/app/index.d.ts +1 -1
  230. package/dist/src/plugin/app/types/app.d.ts +6 -1
  231. package/dist/src/plugin/app/types/index.d.ts +2 -2
  232. package/dist/src/plugin/appearance/constants/index.d.ts +11 -0
  233. package/dist/src/plugin/appearance/cores/index.d.ts +3 -0
  234. package/dist/src/plugin/appearance/index.d.ts +8 -0
  235. package/dist/src/plugin/appearance/types/appearance.d.ts +6 -0
  236. package/dist/src/plugin/appearance/types/index.d.ts +13 -0
  237. package/dist/src/plugin/camera/constants/inedx.d.ts +4 -0
  238. package/dist/src/plugin/camera/cores/index.d.ts +3 -0
  239. package/dist/src/plugin/camera/index.d.ts +1 -1
  240. package/dist/src/plugin/camera/types/camera.d.ts +1 -1
  241. package/dist/src/plugin/camera/types/index.d.ts +1 -1
  242. package/dist/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  243. package/dist/src/plugin/clipboard/cores/index.d.ts +3 -0
  244. package/dist/src/plugin/fullscreen/cores/index.d.ts +35 -0
  245. package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  246. package/dist/src/plugin/theme/constants/index.d.ts +14 -0
  247. package/dist/src/plugin/theme/cores/index.d.ts +3 -0
  248. package/dist/src/plugin/theme/index.d.ts +1 -1
  249. package/dist/src/plugin/theme/types/index.d.ts +1 -1
  250. package/dist/src/plugin/theme/types/theme.d.ts +1 -1
  251. package/dist/src/types/native.d.ts +0 -8
  252. package/package.json +1 -1
@@ -1,124 +1,5 @@
1
1
  import * as electron from 'electron';
2
2
 
3
- declare global {
4
- var cordova: string | undefined;
5
- var device: CordovaDevice | undefined;
6
- interface Navigator {
7
- userAgent?: string;
8
- userAgentData?: UserAgentData;
9
- }
10
- }
11
- interface CordovaDevice {
12
- platform: string;
13
- version: string;
14
- }
15
- interface ModernUserAgentDataBrand {
16
- brand: string;
17
- version: string;
18
- }
19
- type UserAgentDataBrand = ModernUserAgentDataBrand | string | null | undefined;
20
- interface UserAgentDataValues {
21
- brands?: UserAgentDataBrand[];
22
- fullVersionList?: UserAgentDataBrand[];
23
- platformVersion?: string | null | undefined;
24
- }
25
- interface UserAgentData {
26
- getHighEntropyValues?(hints: string[]): Promise<UserAgentDataValues>;
27
- }
28
- declare enum OS {
29
- Unknown = "Unknown",
30
- Android = "Android",
31
- iOS = "iOS",
32
- Windows = "Windows",
33
- MacOS = "MacOS"
34
- }
35
-
36
- declare enum AppOpenState {
37
- Scheme = 0,
38
- Universal = 1,
39
- Intent = 2,
40
- Fallback = 3,
41
- Store = 4
42
- }
43
- declare enum MessengerType {
44
- Telephone = "telephone",
45
- Message = "message",
46
- Mail = "mail"
47
- }
48
-
49
- declare interface AppInfo {
50
- scheme?: URLCandidate;
51
- fallback?: URLCandidateOrFallback;
52
- timeout?: number;
53
- allowWebStore?: boolean;
54
- }
55
- declare interface AndroidAppInfo extends AppInfo {
56
- packageName?: string;
57
- intent?: URLCandidate;
58
- }
59
- declare interface IOSAppInfo extends MacOSAppInfo {
60
- universal?: URLCandidate;
61
- }
62
- declare interface WindowsAppInfo extends AppInfo {
63
- productId?: string;
64
- }
65
- declare interface MacOSAppInfo extends AppInfo {
66
- bundleId?: string;
67
- trackId?: string;
68
- }
69
- declare interface AppOpenOptions {
70
- [OS.Android]?: AndroidAppInfo;
71
- [OS.iOS]?: IOSAppInfo;
72
- [OS.Windows]?: WindowsAppInfo;
73
- [OS.MacOS]?: MacOSAppInfo;
74
- }
75
- declare type URLCandidate = URL | string;
76
- declare type URLCandidateOrFallback = URLCandidate | (() => any);
77
- declare type Stringifiable = string | number | boolean | HTMLElement | null | undefined;
78
- declare type StringifiableSequence = Stringifiable[] | NodeList | NodeListOf<Node> | HTMLCollectionBase;
79
- declare type MessengerOpenOptions = {
80
- to?: Stringifiable | StringifiableSequence;
81
- cc?: Stringifiable | StringifiableSequence;
82
- bcc?: Stringifiable | StringifiableSequence;
83
- subject?: Stringifiable;
84
- body?: Stringifiable;
85
- } | HTMLFormElement | FormData;
86
- declare type Messenger = Record<MessengerType, (options: MessengerOpenOptions) => Promise<void>>;
87
- declare interface AppInstance {
88
- open(options: AppOpenOptions): Promise<AppOpenState>;
89
- messenger: Messenger;
90
- }
91
-
92
- declare const URLOpenError: ErrorConstructor;
93
-
94
- declare module 'native-fn' {
95
- interface NativePlugins {
96
- App: AppInstance;
97
- }
98
- interface NativeConstants {
99
- AppOpenState: typeof AppOpenState;
100
- Messengers: typeof MessengerType;
101
- }
102
- interface NativeErrors {
103
- URLOpenError: typeof URLOpenError;
104
- }
105
- }
106
-
107
- declare interface ClipboardInstance {
108
- copy(item: any): Promise<boolean>;
109
- paste(): Promise<string>;
110
- }
111
-
112
- declare module 'native-fn' {
113
- interface NativePlugins {
114
- Clipboard: ClipboardInstance;
115
- }
116
- interface NativeConstants {
117
- }
118
- interface NativeErrors {
119
- }
120
- }
121
-
122
3
  declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
123
4
  installed: boolean;
124
5
  name: Key;
@@ -127,14 +8,6 @@ declare interface NativePlugin<Key extends string, Module, Constants extends Rec
127
8
  Errors: Errors;
128
9
  }
129
10
 
130
- declare type BrowserWindow = electron.BrowserWindow;
131
- declare type IsElectron = typeof process extends {
132
- versions: {
133
- electron: string;
134
- };
135
- } ? true : false;
136
- declare type FullscreenTarget = IsElectron extends true ? BrowserWindow : Element;
137
-
138
11
  declare interface FullscreenInstance {
139
12
  enabled: boolean;
140
13
  element: FullscreenTarget | null;
@@ -142,9 +15,16 @@ declare interface FullscreenInstance {
142
15
  request(target?: FullscreenTarget, options?: FullscreenOptions): Promise<void>;
143
16
  exit(): Promise<void>;
144
17
  toggle(target?: FullscreenTarget, options?: FullscreenOptions): Promise<void>;
145
- onChange(handler: (event: Event) => void): () => void;
146
- onError(handler: (event: Event) => void): () => void;
18
+ onchange(handler: (event: Event) => void): () => void;
19
+ onerror(handler: (event: Event) => void): () => void;
147
20
  }
21
+ declare type BrowserWindow = electron.BrowserWindow;
22
+ declare type IsElectron = typeof process extends {
23
+ versions: {
24
+ electron: string;
25
+ };
26
+ } ? true : false;
27
+ declare type FullscreenTarget = IsElectron extends true ? BrowserWindow : Element;
148
28
 
149
29
  declare module 'native-fn' {
150
30
  interface NativePlugins {
@@ -159,4 +39,4 @@ declare module 'native-fn' {
159
39
  declare const NativeFullscreenPlugin: NativePlugin<'Fullscreen', FullscreenInstance, {}, {}>;
160
40
 
161
41
  export { NativeFullscreenPlugin as default };
162
- export type { FullscreenInstance };
42
+ export type { BrowserWindow, FullscreenInstance, FullscreenTarget, IsElectron };
@@ -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=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",t=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,l=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(i),a=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,s={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)},u=[[/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]],c=[[/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]],d=[[/\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 m(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 f(e){return void 0===e?"":e.replace(/_/g,".")}function b(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 w(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function g(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var v=0;v<u.length;v++){var h=(E=u[v])[0],p=E[1],k=E[2];if(null!==(S=s.userAgent.match(h))){s.os=p,s.osVersion=w(S[1],k);break}}s.os===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var l=void 0,a=void 0;if((l=t<r.length?parseInt(r[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(s.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(s.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(s.osVersion=F[1]));for(v=0;v<c.length;v++){h=(E=c[v])[0];var T=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.engine=T,s.engineVersion=w(S[1],k);break}}for(v=0;v<d.length;v++){h=(E=d[v])[0];var E,S,j=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.browser=j,s.browserVersion=w(S[1],k);break}}if(a)try{p=(O=require("react-native").Platform).OS;var F=g(x=""+O.Version);switch(p){case"android":s.os=e.Android,s.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}(F,x);break;case"ios":s.os=e.iOS,s.osVersion=x;break;case"windows":s.os=e.Windows,s.osVersion=b(F,x);break;case"macos":s.os=e.MacOS,s.osVersion=x}}catch(e){}if(t)try{var x,O=(p=require("os")).platform();F=g(x=p.release());switch(O){case"win32":s.os=e.Windows,s.osVersion=b(F,x);break;case"darwin":s.os=e.MacOS,s.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(F,x);break;case"android":s.os=e.Android,s.osVersion=x;break;case"linux":/android/i.test(x)&&(s.os=e.Android,s.osVersion=x)}}catch(e){}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(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,t=0;t<o.length;t++){var l=null==(r=o[t])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},a=l.brand,u=l.version;/not.a.brand/i.test(a)||"Chromium"===a&&(s.engineVersion=u)}"string"==typeof i&&(s.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=i)})),s.device=s.os===e.iOS||s.os===e.Android?n.Mobile:s.os===e.Windows||s.os===e.MacOS?n.Desktop:n.Unknown,s.isMobile=s.device===n.Mobile,s.isDesktop=s.device===n.Desktop,s.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var y={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};var M=function(){var n=function(){if(l)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return y.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=y[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:y.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),r=null,o=null,i=null,t=!1;function a(){null!==i&&(o.fullScreenable=i.fullScreenable,o.autoHideMenuBar=i.autoHideMenuBar,i=null),o=null}function u(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function c(){if(l){if(null!==o)return o;try{for(var i=require("electron").BrowserWindow.getAllWindows(),t=0;t<i.length;t++){var a=i[t];if(a.isFullScreen()||s.os===e.MacOS&&"function"==typeof a.isSimpleFullScreen&&a.isSimpleFullScreen())return a}return null}catch(e){return null}}if(null===n)return r&&r.webkitDisplayingFullscreen?r:null;var u=globalThis.document[n.element];return null!=u?u:null}function d(){return null!==c()}function m(t,a){if(void 0===t&&(t=function(){if(l){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(e.iOS===s.os){var i=globalThis.document.querySelector("video");if(null===i)throw new Error;return i}return globalThis.document.documentElement}()),l){var c=t;return new Promise((function(e,n){try{return null===o&&(i={fullScreenable:c.fullScreenable,autoHideMenuBar:c.autoHideMenuBar},c.fullScreenable=!0,c.autoHideMenuBar=!0),c.setFullScreen(!0),o=c,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==n){var l=t[n.request];if("function"==typeof l)try{var c=l.call(t,a);return void 0!==c&&"function"==typeof c.then?void c.then((function(){o()})).catch((function(){e.iOS===s.os?d():i()})):void o()}catch(n){if(e.iOS!==s.os)return void i()}}function d(){if(e.iOS===s.os&&"VIDEO"===t.tagName.toUpperCase()){var n=t;if(n.webkitSupportsFullscreen&&"function"==typeof n.webkitEnterFullscreen)return r=n,u(),n.webkitEnterFullscreen(),void o()}i()}d()}))}function f(){return new Promise(l?function(e,n){try{if(null!==o)o.setFullScreen(!1),a();else{var r=c();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}}:function(o,i){if(null!==n){var t=globalThis.document[n.exit];if("function"==typeof t){var l=t.call(globalThis.document);return void 0!==l&&"function"==typeof l.then?void l.then((function(){o()})).catch((function(){i()})):void o()}}if(e.iOS===s.os&&null!==r){if("function"==typeof r.webkitExitFullscreen&&!0===r.webkitDisplayingFullscreen)return r.webkitExitFullscreen(),r=null,void o();for(var a=globalThis.document.querySelectorAll("video"),u=0;u<a.length;u++){var d=a[u];if("function"==typeof d.webkitExitFullscreen&&!0===d.webkitDisplayingFullscreen)return d.webkitExitFullscreen(),void o()}}c()?i():o()})}return function(){if(!t){t=!0;var n=!1;if(l)try{for(var r=require("electron"),i=r.BrowserWindow.getAllWindows(),c=function(e){var n=i[e];n.on("enter-full-screen",(function(){o=n,w()})),n.on("leave-full-screen",(function(){a(),w()}))},d=0;d<i.length;d++)c(d);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){o=n,w()})),n.on("leave-full-screen",(function(){a(),w()}))}))}catch(e){}var m=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],f=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(d=0;d<m.length;d++)void 0!==globalThis.document&&globalThis.document.addEventListener(m[d],w,!1);for(d=0;d<f.length;d++)void 0!==globalThis.document&&globalThis.document.addEventListener(f[d],g,!1);if(e.iOS===s.os)if(u(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){u()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function b(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function w(){b("fullscreenchange")}function g(){b("fullscreenerror")}}(),{get enabled(){return function(){if(l)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===n){if(e.iOS!==s.os)return!1;for(var r=globalThis.document.querySelectorAll("video"),o=0;o<r.length;o++){var i=r[o];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var t=globalThis.document[n.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[n.element]}()},get element(){return c()},get isFullscreen(){return d()},request:m,exit:f,toggle:function(e,n){return d()?f():m(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}void 0!==globalThis.document&&(globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.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)}void 0!==globalThis.document&&(globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)})))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),W={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};module.exports=W;
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=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",t=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,l=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(i),a=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,s={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)},u=[[/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]],c=[[/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]],d=[[/\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 m(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 f(e){return void 0===e?"":e.replace(/_/g,".")}function b(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 w(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function g(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var v=0;v<u.length;v++){var h=(E=u[v])[0],p=E[1],k=E[2];if(null!==(S=s.userAgent.match(h))){s.os=p,s.osVersion=w(S[1],k);break}}s.os===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var l=void 0,a=void 0;if((l=t<r.length?parseInt(r[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(s.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(s.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(s.osVersion=F[1]));for(v=0;v<c.length;v++){h=(E=c[v])[0];var T=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.engine=T,s.engineVersion=w(S[1],k);break}}for(v=0;v<d.length;v++){h=(E=d[v])[0];var E,S,j=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.browser=j,s.browserVersion=w(S[1],k);break}}if(a)try{p=(O=require("react-native").Platform).OS;var F=g(x=""+O.Version);switch(p){case"android":s.os=e.Android,s.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(F,x);break;case"ios":s.os=e.iOS,s.osVersion=x;break;case"windows":s.os=e.Windows,s.osVersion=b(F,x);break;case"macos":s.os=e.MacOS,s.osVersion=x}}catch(e){}if(t)try{var x,O=(p=require("os")).platform();F=g(x=p.release());switch(O){case"win32":s.os=e.Windows,s.osVersion=b(F,x);break;case"darwin":s.os=e.MacOS,s.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(F,x);break;case"android":s.os=e.Android,s.osVersion=x;break;case"linux":/android/i.test(x)&&(s.os=e.Android,s.osVersion=x)}}catch(e){}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(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,t=0;t<o.length;t++){var l=null==(r=o[t])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},a=l.brand,u=l.version;/not.a.brand/i.test(a)||"Chromium"===a&&(s.engineVersion=u)}"string"==typeof i&&(s.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=i)})),s.device=s.os===e.iOS||s.os===e.Android?n.Mobile:s.os===e.Windows||s.os===e.MacOS?n.Desktop:n.Unknown,s.isMobile=s.device===n.Mobile,s.isDesktop=s.device===n.Desktop,s.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var y={get enabled(){return function(){if(l)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===q){if(e.iOS!==s.os)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=globalThis.document[q.enabled];return"boolean"==typeof i?i:void 0!==globalThis.document[q.element]}()},get element(){return B()},get isFullscreen(){return R()},request:D,exit:I,toggle:function(e,n){return R()?I():D(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},M=null,W=null,V=null,A=!1,q=function(){if(l)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return N.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],i=N[o];if(i.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 t={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:N.webkit.events};return"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}return null}(),N={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 L(){null!==V&&(W.fullScreenable=V.fullScreenable,W.autoHideMenuBar=V.autoHideMenuBar,V=null),W=null}function C(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function B(){if(l){if(null!==W)return W;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||s.os===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===q)return M&&M.webkitDisplayingFullscreen?M:null;var i=globalThis.document[q.element];return null!=i?i:null}function R(){return null!==B()}function D(n,r){if(void 0===n&&(n=function(){if(l){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(e.iOS===s.os){var i=globalThis.document.querySelector("video");if(null===i)throw new Error;return i}return globalThis.document.documentElement}()),l){var o=n;return new Promise((function(e,n){try{return null===W&&(V={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),W=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==q){var t=n[q.request];if("function"==typeof t)try{var l=t.call(n,r);return void 0!==l&&"function"==typeof l.then?void l.then((function(){o()})).catch((function(){e.iOS===s.os?a():i()})):void o()}catch(n){if(e.iOS!==s.os)return void i()}}function a(){if(e.iOS===s.os&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return M=r,C(),r.webkitEnterFullscreen(),void o()}i()}a()}))}function I(){return new Promise(l?function(e,n){try{if(null!==W)W.setFullScreen(!1),L();else{var r=B();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}}:function(n,r){if(null!==q){var o=globalThis.document[q.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(e.iOS===s.os&&null!==M){if("function"==typeof M.webkitExitFullscreen&&!0===M.webkitDisplayingFullscreen)return M.webkitExitFullscreen(),M=null,void n();for(var t=globalThis.document.querySelectorAll("video"),l=0;l<t.length;l++){var a=t[l];if("function"==typeof a.webkitExitFullscreen&&!0===a.webkitDisplayingFullscreen)return a.webkitExitFullscreen(),void n()}}B()?r():n()})}!function(){if(!A){A=!0;var n=!1;if(l)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),i=function(e){var n=o[e];n.on("enter-full-screen",(function(){W=n,d()})),n.on("leave-full-screen",(function(){L(),d()}))},t=0;t<o.length;t++)i(t);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){W=n,d()})),n.on("leave-full-screen",(function(){L(),d()}))}))}catch(e){}var a=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(t=0;t<a.length;t++)void 0!==globalThis.document&&globalThis.document.addEventListener(a[t],d,!1);for(t=0;t<u.length;t++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[t],m,!1);if(e.iOS===s.os)if(C(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){C()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var U={installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}};module.exports=U;
@@ -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=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",t=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,l=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(i),a=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,s={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)},u=[[/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]],c=[[/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]],d=[[/\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 m(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 f(e){return void 0===e?"":e.replace(/_/g,".")}function b(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 w(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function g(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var v=0;v<u.length;v++){var h=(E=u[v])[0],p=E[1],k=E[2];if(null!==(S=s.userAgent.match(h))){s.os=p,s.osVersion=w(S[1],k);break}}s.os===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var l=void 0,a=void 0;if((l=t<r.length?parseInt(r[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(s.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(s.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(s.osVersion=F[1]));for(v=0;v<c.length;v++){h=(E=c[v])[0];var T=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.engine=T,s.engineVersion=w(S[1],k);break}}for(v=0;v<d.length;v++){h=(E=d[v])[0];var E,S,j=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.browser=j,s.browserVersion=w(S[1],k);break}}if(a)try{p=(O=require("react-native").Platform).OS;var F=g(x=""+O.Version);switch(p){case"android":s.os=e.Android,s.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}(F,x);break;case"ios":s.os=e.iOS,s.osVersion=x;break;case"windows":s.os=e.Windows,s.osVersion=b(F,x);break;case"macos":s.os=e.MacOS,s.osVersion=x}}catch(e){}if(t)try{var x,O=(p=require("os")).platform();F=g(x=p.release());switch(O){case"win32":s.os=e.Windows,s.osVersion=b(F,x);break;case"darwin":s.os=e.MacOS,s.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(F,x);break;case"android":s.os=e.Android,s.osVersion=x;break;case"linux":/android/i.test(x)&&(s.os=e.Android,s.osVersion=x)}}catch(e){}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(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,t=0;t<o.length;t++){var l=null==(r=o[t])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},a=l.brand,u=l.version;/not.a.brand/i.test(a)||"Chromium"===a&&(s.engineVersion=u)}"string"==typeof i&&(s.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=i)})),s.device=s.os===e.iOS||s.os===e.Android?n.Mobile:s.os===e.Windows||s.os===e.MacOS?n.Desktop:n.Unknown,s.isMobile=s.device===n.Mobile,s.isDesktop=s.device===n.Desktop,s.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var y={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};var M=function(){var n=function(){if(l)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return y.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=y[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:y.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),r=null,o=null,i=null,t=!1;function a(){null!==i&&(o.fullScreenable=i.fullScreenable,o.autoHideMenuBar=i.autoHideMenuBar,i=null),o=null}function u(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function c(){if(l){if(null!==o)return o;try{for(var i=require("electron").BrowserWindow.getAllWindows(),t=0;t<i.length;t++){var a=i[t];if(a.isFullScreen()||s.os===e.MacOS&&"function"==typeof a.isSimpleFullScreen&&a.isSimpleFullScreen())return a}return null}catch(e){return null}}if(null===n)return r&&r.webkitDisplayingFullscreen?r:null;var u=globalThis.document[n.element];return null!=u?u:null}function d(){return null!==c()}function m(t,a){if(void 0===t&&(t=function(){if(l){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(e.iOS===s.os){var i=globalThis.document.querySelector("video");if(null===i)throw new Error;return i}return globalThis.document.documentElement}()),l){var c=t;return new Promise((function(e,n){try{return null===o&&(i={fullScreenable:c.fullScreenable,autoHideMenuBar:c.autoHideMenuBar},c.fullScreenable=!0,c.autoHideMenuBar=!0),c.setFullScreen(!0),o=c,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==n){var l=t[n.request];if("function"==typeof l)try{var c=l.call(t,a);return void 0!==c&&"function"==typeof c.then?void c.then((function(){o()})).catch((function(){e.iOS===s.os?d():i()})):void o()}catch(n){if(e.iOS!==s.os)return void i()}}function d(){if(e.iOS===s.os&&"VIDEO"===t.tagName.toUpperCase()){var n=t;if(n.webkitSupportsFullscreen&&"function"==typeof n.webkitEnterFullscreen)return r=n,u(),n.webkitEnterFullscreen(),void o()}i()}d()}))}function f(){return new Promise(l?function(e,n){try{if(null!==o)o.setFullScreen(!1),a();else{var r=c();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}}:function(o,i){if(null!==n){var t=globalThis.document[n.exit];if("function"==typeof t){var l=t.call(globalThis.document);return void 0!==l&&"function"==typeof l.then?void l.then((function(){o()})).catch((function(){i()})):void o()}}if(e.iOS===s.os&&null!==r){if("function"==typeof r.webkitExitFullscreen&&!0===r.webkitDisplayingFullscreen)return r.webkitExitFullscreen(),r=null,void o();for(var a=globalThis.document.querySelectorAll("video"),u=0;u<a.length;u++){var d=a[u];if("function"==typeof d.webkitExitFullscreen&&!0===d.webkitDisplayingFullscreen)return d.webkitExitFullscreen(),void o()}}c()?i():o()})}return function(){if(!t){t=!0;var n=!1;if(l)try{for(var r=require("electron"),i=r.BrowserWindow.getAllWindows(),c=function(e){var n=i[e];n.on("enter-full-screen",(function(){o=n,w()})),n.on("leave-full-screen",(function(){a(),w()}))},d=0;d<i.length;d++)c(d);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){o=n,w()})),n.on("leave-full-screen",(function(){a(),w()}))}))}catch(e){}var m=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],f=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(d=0;d<m.length;d++)void 0!==globalThis.document&&globalThis.document.addEventListener(m[d],w,!1);for(d=0;d<f.length;d++)void 0!==globalThis.document&&globalThis.document.addEventListener(f[d],g,!1);if(e.iOS===s.os)if(u(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){u()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function b(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function w(){b("fullscreenchange")}function g(){b("fullscreenerror")}}(),{get enabled(){return function(){if(l)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===n){if(e.iOS!==s.os)return!1;for(var r=globalThis.document.querySelectorAll("video"),o=0;o<r.length;o++){var i=r[o];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var t=globalThis.document[n.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[n.element]}()},get element(){return c()},get isFullscreen(){return d()},request:m,exit:f,toggle:function(e,n){return d()?f():m(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}void 0!==globalThis.document&&(globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.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)}void 0!==globalThis.document&&(globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)})))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),W={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};export{W 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=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",t=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,l=void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(i),a=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,s={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)},u=[[/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]],c=[[/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]],d=[[/\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 m(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 f(e){return void 0===e?"":e.replace(/_/g,".")}function b(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 w(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function g(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var v=0;v<u.length;v++){var h=(E=u[v])[0],p=E[1],k=E[2];if(null!==(S=s.userAgent.match(h))){s.os=p,s.osVersion=w(S[1],k);break}}s.os===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var l=void 0,a=void 0;if((l=t<r.length?parseInt(r[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(s.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(s.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(s.osVersion=F[1]));for(v=0;v<c.length;v++){h=(E=c[v])[0];var T=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.engine=T,s.engineVersion=w(S[1],k);break}}for(v=0;v<d.length;v++){h=(E=d[v])[0];var E,S,j=E[1];k=E[2];if(null!==(S=s.userAgent.match(h))){s.browser=j,s.browserVersion=w(S[1],k);break}}if(a)try{p=(O=require("react-native").Platform).OS;var F=g(x=""+O.Version);switch(p){case"android":s.os=e.Android,s.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(F,x);break;case"ios":s.os=e.iOS,s.osVersion=x;break;case"windows":s.os=e.Windows,s.osVersion=b(F,x);break;case"macos":s.os=e.MacOS,s.osVersion=x}}catch(e){}if(t)try{var x,O=(p=require("os")).platform();F=g(x=p.release());switch(O){case"win32":s.os=e.Windows,s.osVersion=b(F,x);break;case"darwin":s.os=e.MacOS,s.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(F,x);break;case"android":s.os=e.Android,s.osVersion=x;break;case"linux":/android/i.test(x)&&(s.os=e.Android,s.osVersion=x)}}catch(e){}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(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,t=0;t<o.length;t++){var l=null==(r=o[t])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},a=l.brand,u=l.version;/not.a.brand/i.test(a)||"Chromium"===a&&(s.engineVersion=u)}"string"==typeof i&&(s.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=i)})),s.device=s.os===e.iOS||s.os===e.Android?n.Mobile:s.os===e.Windows||s.os===e.MacOS?n.Desktop:n.Unknown,s.isMobile=s.device===n.Mobile,s.isDesktop=s.device===n.Desktop,s.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var y={get enabled(){return function(){if(l)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===q){if(e.iOS!==s.os)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=globalThis.document[q.enabled];return"boolean"==typeof i?i:void 0!==globalThis.document[q.element]}()},get element(){return B()},get isFullscreen(){return R()},request:D,exit:I,toggle:function(e,n){return R()?I():D(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},M=null,W=null,V=null,A=!1,q=function(){if(l)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return N.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],i=N[o];if(i.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 t={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:N.webkit.events};return"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}return null}(),N={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 L(){null!==V&&(W.fullScreenable=V.fullScreenable,W.autoHideMenuBar=V.autoHideMenuBar,V=null),W=null}function C(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function B(){if(l){if(null!==W)return W;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||s.os===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===q)return M&&M.webkitDisplayingFullscreen?M:null;var i=globalThis.document[q.element];return null!=i?i:null}function R(){return null!==B()}function D(n,r){if(void 0===n&&(n=function(){if(l){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(e.iOS===s.os){var i=globalThis.document.querySelector("video");if(null===i)throw new Error;return i}return globalThis.document.documentElement}()),l){var o=n;return new Promise((function(e,n){try{return null===W&&(V={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),W=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==q){var t=n[q.request];if("function"==typeof t)try{var l=t.call(n,r);return void 0!==l&&"function"==typeof l.then?void l.then((function(){o()})).catch((function(){e.iOS===s.os?a():i()})):void o()}catch(n){if(e.iOS!==s.os)return void i()}}function a(){if(e.iOS===s.os&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return M=r,C(),r.webkitEnterFullscreen(),void o()}i()}a()}))}function I(){return new Promise(l?function(e,n){try{if(null!==W)W.setFullScreen(!1),L();else{var r=B();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}}:function(n,r){if(null!==q){var o=globalThis.document[q.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(e.iOS===s.os&&null!==M){if("function"==typeof M.webkitExitFullscreen&&!0===M.webkitDisplayingFullscreen)return M.webkitExitFullscreen(),M=null,void n();for(var t=globalThis.document.querySelectorAll("video"),l=0;l<t.length;l++){var a=t[l];if("function"==typeof a.webkitExitFullscreen&&!0===a.webkitDisplayingFullscreen)return a.webkitExitFullscreen(),void n()}}B()?r():n()})}!function(){if(!A){A=!0;var n=!1;if(l)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),i=function(e){var n=o[e];n.on("enter-full-screen",(function(){W=n,d()})),n.on("leave-full-screen",(function(){L(),d()}))},t=0;t<o.length;t++)i(t);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){W=n,d()})),n.on("leave-full-screen",(function(){L(),d()}))}))}catch(e){}var a=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(t=0;t<a.length;t++)void 0!==globalThis.document&&globalThis.document.addEventListener(a[t],d,!1);for(t=0;t<u.length;t++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[t],m,!1);if(e.iOS===s.os)if(C(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){C()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var U={installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}};export{U as default};