native-fn 1.0.71 → 1.0.73
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 +435 -423
- 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 +435 -423
- package/dist/plugin/app/index.umd.js +435 -423
- 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 +3 -2
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +4 -0
- 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 +12 -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 +3 -2
- package/dist/plugin/camera/src/plugin/platform/types/index.d.ts +4 -0
- 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 +3 -2
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +4 -0
- 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 +3 -2
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +4 -0
- 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 +356 -109
- package/dist/plugin/platform/index.d.ts +15 -19
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +356 -109
- package/dist/plugin/platform/index.umd.js +356 -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 +3 -2
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +4 -0
- 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 +3 -2
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +4 -0
- 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 +3 -2
- package/dist/src/plugin/platform/types/index.d.ts +4 -0
- 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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NativePlugin } from "../../types";
|
|
2
|
+
import { PlatformInstance } from "./types";
|
|
3
|
+
import { Browsers, CrossPlatformFramework, Devices, Engines, OS } from "./constants";
|
|
4
|
+
export * from "./types";
|
|
5
|
+
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {
|
|
6
|
+
OS: typeof OS;
|
|
7
|
+
Devices: typeof Devices;
|
|
8
|
+
Engines: typeof Engines;
|
|
9
|
+
Browsers: typeof Browsers;
|
|
10
|
+
CrossPlatformFramework: typeof CrossPlatformFramework;
|
|
11
|
+
}, {}>;
|
|
12
|
+
export default NativePlatformPlugin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Browsers, CrossPlatformFramework, Devices, Engines, OS } from "../constants";
|
|
2
|
+
export declare interface PlatformInstance {
|
|
3
|
+
os: OS;
|
|
4
|
+
device: Devices;
|
|
5
|
+
engine: Engines;
|
|
6
|
+
browser: Browsers;
|
|
7
|
+
crossPlatformFramework: CrossPlatformFramework;
|
|
8
|
+
osVersion: string;
|
|
9
|
+
engineVersion: string;
|
|
10
|
+
browserVersion: string;
|
|
11
|
+
renderer: string;
|
|
12
|
+
userAgent: string;
|
|
13
|
+
isNode: boolean;
|
|
14
|
+
isStandalone: boolean;
|
|
15
|
+
isMobile: boolean;
|
|
16
|
+
isDesktop: boolean;
|
|
17
|
+
isWebview: boolean;
|
|
18
|
+
}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import type { ListenerEntry } from "../types";
|
|
2
|
-
export declare enum Appearances {
|
|
3
|
-
Unknown = "unknown",
|
|
4
|
-
Light = "light",
|
|
5
|
-
Dark = "dark"
|
|
6
|
-
}
|
|
7
|
-
export declare const MEDIA_QUERY_LIST: MediaQueryList;
|
|
8
|
-
export declare const SUPPORT_PREFERS_COLOR_SCHEME: boolean;
|
|
9
|
-
export declare const IS_FULL_SUPPORT_THEME_COLOR: boolean;
|
|
10
|
-
export declare const CONTEXT: CanvasRenderingContext2D | null;
|
|
11
|
-
export declare const SVG_PIXEL_DATA_URL: string;
|
|
12
1
|
export declare const IS_IE_MOBILE: boolean;
|
|
13
2
|
export declare const IS_WINDOWS_PHONE: boolean;
|
|
14
|
-
export declare const ENTRIES: ListenerEntry[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ThemeInstance } from "../types";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const Theme: ThemeInstance;
|
|
3
|
+
export default Theme;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import type { NativePlugin } from "../../types";
|
|
2
2
|
import type { ThemeInstance } from "./types";
|
|
3
|
-
import { Appearances } from "./constants";
|
|
4
|
-
import { EasingError, UnsupportedEasingFunctionError, StepSyntaxError, LinearSyntaxError, CubicBezierSyntaxError } from "./errors/easing-error";
|
|
5
|
-
import { UnsupportedColorError } from "./errors/unsupported-color-error";
|
|
6
3
|
export * from "./types";
|
|
7
|
-
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
8
|
-
Appearances: typeof Appearances;
|
|
9
|
-
}, {
|
|
10
|
-
EasingError: typeof EasingError;
|
|
11
|
-
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
12
|
-
StepSyntaxError: typeof StepSyntaxError;
|
|
13
|
-
LinearSyntaxError: typeof LinearSyntaxError;
|
|
14
|
-
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
15
|
-
UnsupportedColorError: typeof UnsupportedColorError;
|
|
16
|
-
}>;
|
|
4
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {}, {}>;
|
|
17
5
|
export default NativeThemePlugin;
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
export * from "./color";
|
|
2
|
-
export * from "./easing-syntax";
|
|
3
1
|
export * from "./theme";
|
|
4
2
|
import type { ThemeInstance } from "./theme";
|
|
5
|
-
import { Appearances } from "../constants";
|
|
6
|
-
import { UnsupportedColorError } from "../errors/unsupported-color-error";
|
|
7
|
-
import { CubicBezierSyntaxError, EasingError, LinearSyntaxError, StepSyntaxError, UnsupportedEasingFunctionError } from "../errors/easing-error";
|
|
8
3
|
declare module 'native-fn' {
|
|
9
4
|
interface NativePlugins {
|
|
10
5
|
Theme: ThemeInstance;
|
|
11
6
|
}
|
|
12
7
|
interface NativeConstants {
|
|
13
|
-
Appearances: typeof Appearances;
|
|
14
8
|
}
|
|
15
9
|
interface NativeErrors {
|
|
16
|
-
EasingError: typeof EasingError;
|
|
17
|
-
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
18
|
-
StepSyntaxError: typeof StepSyntaxError;
|
|
19
|
-
LinearSyntaxError: typeof LinearSyntaxError;
|
|
20
|
-
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
21
|
-
UnsupportedColorError: typeof UnsupportedColorError;
|
|
22
10
|
}
|
|
23
11
|
}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import { Appearances } from "../constants";
|
|
2
|
-
import type { EasingKeyword, EasingSyntax, Color } from "../types";
|
|
3
|
-
export declare interface ListenerEntry {
|
|
4
|
-
fn: (appearance: Appearances) => any;
|
|
5
|
-
capture: boolean;
|
|
6
|
-
once: boolean;
|
|
7
|
-
signal?: AbortSignal;
|
|
8
|
-
}
|
|
9
|
-
export declare type ThemeColorMetaAppearanceKeys = 'default' | 'dark' | 'light';
|
|
10
|
-
export declare type ThemeColorMetaGroup = Partial<Record<ThemeColorMetaAppearanceKeys, HTMLMetaElement>>;
|
|
11
|
-
export declare interface SetThemeColorOptions {
|
|
12
|
-
appearance?: ThemeColorMetaAppearanceKeys;
|
|
13
|
-
duration?: number;
|
|
14
|
-
easingFunction?: EasingSyntax | EasingKeyword;
|
|
15
|
-
defaultColor?: string;
|
|
16
|
-
}
|
|
17
1
|
export declare interface ThemeInstance {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
removeThemeColor(appearance?: ThemeColorMetaAppearanceKeys): void;
|
|
21
|
-
getAppearance(): Promise<Appearances>;
|
|
22
|
-
setAppearance(appearances?: Exclude<Appearances, Appearances.Unknown>): void;
|
|
23
|
-
onAppearanceChange(listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions): () => void;
|
|
2
|
+
get value(): string | undefined;
|
|
3
|
+
set value(color: string | undefined);
|
|
24
4
|
}
|
|
@@ -1,5 +1,88 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
function getTopmostWindow() {
|
|
4
|
+
try {
|
|
5
|
+
if (globalThis.top && globalThis.top !== window) {
|
|
6
|
+
void globalThis.top.location.href;
|
|
7
|
+
return globalThis.top;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
catch (_) {
|
|
11
|
+
}
|
|
12
|
+
return window;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function dispatchClickEvent(element, view) {
|
|
16
|
+
if (view === void 0) { view = window; }
|
|
17
|
+
var fake;
|
|
18
|
+
try {
|
|
19
|
+
fake = new MouseEvent('click', {
|
|
20
|
+
bubbles: true,
|
|
21
|
+
cancelable: true,
|
|
22
|
+
view: view
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
catch (_) {
|
|
26
|
+
fake = globalThis.document.createEvent('MouseEvents');
|
|
27
|
+
fake.initMouseEvent('click', true, true, view, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
28
|
+
}
|
|
29
|
+
element.dispatchEvent(fake);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function createHiddenElement(tagName, focusable) {
|
|
33
|
+
if (focusable === void 0) { focusable = true; }
|
|
34
|
+
if (typeof globalThis.document === 'undefined')
|
|
35
|
+
return undefined;
|
|
36
|
+
var element = globalThis.document.createElement(tagName);
|
|
37
|
+
if ('width' in element)
|
|
38
|
+
element.width = '0';
|
|
39
|
+
if ('height' in element)
|
|
40
|
+
element.height = '0';
|
|
41
|
+
if ('border' in element)
|
|
42
|
+
element.border = '0';
|
|
43
|
+
if ('frameBorder' in element)
|
|
44
|
+
element.frameBorder = '0';
|
|
45
|
+
if ('scrolling' in element)
|
|
46
|
+
element.scrolling = 'no';
|
|
47
|
+
if ('cellPadding' in element)
|
|
48
|
+
element.cellPadding = '0';
|
|
49
|
+
if ('cellSpacing' in element)
|
|
50
|
+
element.cellSpacing = '0';
|
|
51
|
+
if ('frame' in element)
|
|
52
|
+
element.frame = 'void';
|
|
53
|
+
if ('rules' in element)
|
|
54
|
+
element.rules = 'none';
|
|
55
|
+
if ('noWrap' in element)
|
|
56
|
+
element.noWrap = true;
|
|
57
|
+
element.tabIndex = -1;
|
|
58
|
+
element.setAttribute('role', 'presentation');
|
|
59
|
+
if (focusable) {
|
|
60
|
+
element.style.width = '1px';
|
|
61
|
+
element.style.height = '1px';
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
element.setAttribute('aria-hidden', 'true');
|
|
65
|
+
element.style.width = '0';
|
|
66
|
+
element.style.height = '0';
|
|
67
|
+
element.style.zIndex = '-9999';
|
|
68
|
+
element.style.display = 'none';
|
|
69
|
+
element.style.visibility = 'hidden';
|
|
70
|
+
element.style.pointerEvents = 'none';
|
|
71
|
+
}
|
|
72
|
+
element.style.position = 'absolute';
|
|
73
|
+
element.style.top = '0';
|
|
74
|
+
element.style.left = '0';
|
|
75
|
+
element.style.padding = '0';
|
|
76
|
+
element.style.margin = '0';
|
|
77
|
+
element.style.border = 'none';
|
|
78
|
+
element.style.outline = 'none';
|
|
79
|
+
element.style.clip = 'rect(1px, 1px, 1px, 1px)';
|
|
80
|
+
element.style.clipPath = 'inset(50%)';
|
|
81
|
+
element.style.overflow = 'hidden';
|
|
82
|
+
element.style.whiteSpace = 'nowrap';
|
|
83
|
+
return element;
|
|
84
|
+
}
|
|
85
|
+
|
|
3
86
|
function compareVersion(lhs, rhs) {
|
|
4
87
|
var pa = lhs.split('.');
|
|
5
88
|
var pb = rhs.split('.');
|
|
@@ -62,24 +145,31 @@ var Browsers;
|
|
|
62
145
|
Browsers["IE"] = "IE";
|
|
63
146
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
64
147
|
})(Browsers || (Browsers = {}));
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
148
|
+
var CrossPlatformFramework;
|
|
149
|
+
(function (CrossPlatformFramework) {
|
|
150
|
+
CrossPlatformFramework["NotACrossPlatformFramework"] = "NotACrossPlatformFramework";
|
|
151
|
+
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
152
|
+
CrossPlatformFramework["Electron"] = "Electron";
|
|
153
|
+
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
154
|
+
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
155
|
+
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
156
|
+
|
|
69
157
|
var Platform = {
|
|
70
158
|
device: Devices.Unknown,
|
|
71
159
|
os: OS.Unknown,
|
|
72
|
-
osVersion: '',
|
|
73
160
|
engine: Engines.Unknown,
|
|
74
|
-
engineVersion: '',
|
|
75
161
|
browser: Browsers.Unknown,
|
|
162
|
+
crossPlatformFramework: CrossPlatformFramework.NotACrossPlatformFramework,
|
|
163
|
+
osVersion: '',
|
|
164
|
+
engineVersion: '',
|
|
76
165
|
browserVersion: '',
|
|
77
166
|
renderer: getRenderer(),
|
|
78
|
-
userAgent:
|
|
167
|
+
userAgent: USER_AGENT,
|
|
168
|
+
isNode: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
|
|
79
169
|
isMobile: false,
|
|
80
170
|
isDesktop: false,
|
|
81
171
|
isStandalone: false,
|
|
82
|
-
isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(
|
|
172
|
+
isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(USER_AGENT),
|
|
83
173
|
};
|
|
84
174
|
var OS_RESOLVER_MAP = [
|
|
85
175
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -348,6 +438,12 @@ function getSemanticVersion(string) {
|
|
|
348
438
|
build: parseInt(parts[2] || '0')
|
|
349
439
|
};
|
|
350
440
|
}
|
|
441
|
+
if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(USER_AGENT))) {
|
|
442
|
+
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
443
|
+
}
|
|
444
|
+
if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative') {
|
|
445
|
+
Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
|
|
446
|
+
}
|
|
351
447
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
352
448
|
var map = OS_RESOLVER_MAP[i];
|
|
353
449
|
var regexp = map[0];
|
|
@@ -389,7 +485,7 @@ for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
|
389
485
|
break;
|
|
390
486
|
}
|
|
391
487
|
}
|
|
392
|
-
if (
|
|
488
|
+
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
393
489
|
try {
|
|
394
490
|
var reactNative = require('react-native');
|
|
395
491
|
var platform = reactNative.Platform;
|
|
@@ -418,7 +514,7 @@ if (IS_REACT_NATIVE) {
|
|
|
418
514
|
catch (_) {
|
|
419
515
|
}
|
|
420
516
|
}
|
|
421
|
-
if (
|
|
517
|
+
if (Platform.isNode) {
|
|
422
518
|
try {
|
|
423
519
|
var os = require('os');
|
|
424
520
|
var platform = os.platform();
|
|
@@ -450,6 +546,7 @@ if (IS_NODE_JS) {
|
|
|
450
546
|
}
|
|
451
547
|
if (typeof globalThis.document !== 'undefined') {
|
|
452
548
|
globalThis.document.addEventListener("deviceready", function () {
|
|
549
|
+
Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
|
|
453
550
|
if (Platform.os === OS.Unknown && typeof globalThis.device !== 'undefined') {
|
|
454
551
|
switch (globalThis.device.platform) {
|
|
455
552
|
case 'Android':
|
|
@@ -492,89 +589,6 @@ Platform.isMobile = Platform.device === Devices.Mobile;
|
|
|
492
589
|
Platform.isDesktop = Platform.device === Devices.Desktop;
|
|
493
590
|
Platform.isStandalone = getIsStandalone(Platform.os);
|
|
494
591
|
|
|
495
|
-
function getTopmostWindow() {
|
|
496
|
-
try {
|
|
497
|
-
if (globalThis.top && globalThis.top !== window) {
|
|
498
|
-
void globalThis.top.location.href;
|
|
499
|
-
return globalThis.top;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
catch (_) {
|
|
503
|
-
}
|
|
504
|
-
return window;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
function dispatchClickEvent(element, view) {
|
|
508
|
-
if (view === void 0) { view = window; }
|
|
509
|
-
var fake;
|
|
510
|
-
try {
|
|
511
|
-
fake = new MouseEvent('click', {
|
|
512
|
-
bubbles: true,
|
|
513
|
-
cancelable: true,
|
|
514
|
-
view: view
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
catch (_) {
|
|
518
|
-
fake = globalThis.document.createEvent('MouseEvents');
|
|
519
|
-
fake.initMouseEvent('click', true, true, view, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
520
|
-
}
|
|
521
|
-
element.dispatchEvent(fake);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
function createHiddenElement(tagName, focusable) {
|
|
525
|
-
if (focusable === void 0) { focusable = true; }
|
|
526
|
-
if (typeof globalThis.document === 'undefined')
|
|
527
|
-
return undefined;
|
|
528
|
-
var element = globalThis.document.createElement(tagName);
|
|
529
|
-
if ('width' in element)
|
|
530
|
-
element.width = '0';
|
|
531
|
-
if ('height' in element)
|
|
532
|
-
element.height = '0';
|
|
533
|
-
if ('border' in element)
|
|
534
|
-
element.border = '0';
|
|
535
|
-
if ('frameBorder' in element)
|
|
536
|
-
element.frameBorder = '0';
|
|
537
|
-
if ('scrolling' in element)
|
|
538
|
-
element.scrolling = 'no';
|
|
539
|
-
if ('cellPadding' in element)
|
|
540
|
-
element.cellPadding = '0';
|
|
541
|
-
if ('cellSpacing' in element)
|
|
542
|
-
element.cellSpacing = '0';
|
|
543
|
-
if ('frame' in element)
|
|
544
|
-
element.frame = 'void';
|
|
545
|
-
if ('rules' in element)
|
|
546
|
-
element.rules = 'none';
|
|
547
|
-
if ('noWrap' in element)
|
|
548
|
-
element.noWrap = true;
|
|
549
|
-
element.tabIndex = -1;
|
|
550
|
-
element.setAttribute('role', 'presentation');
|
|
551
|
-
if (focusable) {
|
|
552
|
-
element.style.width = '1px';
|
|
553
|
-
element.style.height = '1px';
|
|
554
|
-
}
|
|
555
|
-
else {
|
|
556
|
-
element.setAttribute('aria-hidden', 'true');
|
|
557
|
-
element.style.width = '0';
|
|
558
|
-
element.style.height = '0';
|
|
559
|
-
element.style.zIndex = '-9999';
|
|
560
|
-
element.style.display = 'none';
|
|
561
|
-
element.style.visibility = 'hidden';
|
|
562
|
-
element.style.pointerEvents = 'none';
|
|
563
|
-
}
|
|
564
|
-
element.style.position = 'absolute';
|
|
565
|
-
element.style.top = '0';
|
|
566
|
-
element.style.left = '0';
|
|
567
|
-
element.style.padding = '0';
|
|
568
|
-
element.style.margin = '0';
|
|
569
|
-
element.style.border = 'none';
|
|
570
|
-
element.style.outline = 'none';
|
|
571
|
-
element.style.clip = 'rect(1px, 1px, 1px, 1px)';
|
|
572
|
-
element.style.clipPath = 'inset(50%)';
|
|
573
|
-
element.style.overflow = 'hidden';
|
|
574
|
-
element.style.whiteSpace = 'nowrap';
|
|
575
|
-
return element;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
592
|
function tryOpenCamera(type) {
|
|
579
593
|
var top = getTopmostWindow();
|
|
580
594
|
var document = top.document;
|
|
@@ -603,25 +617,20 @@ function tryOpenCamera(type) {
|
|
|
603
617
|
}
|
|
604
618
|
}
|
|
605
619
|
|
|
606
|
-
var
|
|
620
|
+
var Camera = {
|
|
607
621
|
open: open
|
|
608
622
|
};
|
|
609
623
|
function open(type) {
|
|
610
|
-
|
|
611
|
-
|
|
624
|
+
if (Platform.os === OS.Android) {
|
|
625
|
+
tryOpenCamera(type);
|
|
626
|
+
}
|
|
627
|
+
else if (Platform.os === OS.iOS) {
|
|
628
|
+
if (compareVersion(Platform.osVersion, '10.3') >= 0) {
|
|
612
629
|
tryOpenCamera(type);
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
else {
|
|
619
|
-
alert(Platform.osVersion);
|
|
620
|
-
}
|
|
621
|
-
break;
|
|
622
|
-
case OS.Windows:
|
|
623
|
-
case OS.MacOS:
|
|
624
|
-
break;
|
|
630
|
+
}
|
|
631
|
+
else {
|
|
632
|
+
alert(Platform.osVersion);
|
|
633
|
+
}
|
|
625
634
|
}
|
|
626
635
|
}
|
|
627
636
|
|
|
@@ -634,7 +643,7 @@ var CameraType;
|
|
|
634
643
|
var NativeMediaPlugin = {
|
|
635
644
|
installed: false,
|
|
636
645
|
name: 'Camera',
|
|
637
|
-
module:
|
|
646
|
+
module: Camera,
|
|
638
647
|
Constants: {
|
|
639
648
|
CameraType: CameraType
|
|
640
649
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,o){for(var i=e.split("."),r=o.split("."),n=Math.max(i.length,r.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<i.length?parseInt(i[a],10):0)>(s=a<r.length?parseInt(r[a],10):0))return 1;if(t<s)return-1}return 0}var o,i,r,n;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),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"}(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"}(n||(n={}));var a=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;void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(a);var s=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,l={device:i.Unknown,os:o.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:n.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var o=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===o)return"";if(o instanceof WebGLRenderingContext||"getParameter"in o&&"function"==typeof o.getParameter){var i=o.getExtension("WEBGL_debug_renderer_info");return null===i?o.getParameter(o.RENDERER):o.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:a,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(a)},d=[[/windows nt (6\.[23]); arm/i,o.Windows,w],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,w],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,w],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,w],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,w],[/windows ce\/?([\d.]*)/i,o.Windows,w],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,b],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,b],[/cfnetwork\/.+darwin/i,o.iOS,b],[/mac os x ?([\w. ]*)/i,o.MacOS,b],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,b],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],m=[[/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]],c=[[/\b(?:crmo|crios)\/([\w.]+)/i,n.Chrome],[/webview.+edge\/([\w.]+)/i,n.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,n.Edge],[/opera mini\/([-\w.]+)/i,n.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,n.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,n.Opera],[/opios[\/ ]+([\w.]+)/i,n.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,n.Opera],[/\bopr\/([\w.]+)/i,n.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,n.IE],[/(?:ms|\()ie ([\w.]+)/i,n.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,n.IE],[/\bfocus\/([\w.]+)/i,n.Firefox],[/\bopt\/([\w.]+)/i,n.Opera],[/coast\/([\w.]+)/i,n.Opera],[/fxios\/([\w.-]+)/i,n.Firefox],[/samsungbrowser\/([\w.]+)/i,n.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,n.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,n.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,n.Chrome],[/chrome\/([\w.]+) mobile/i,n.Chrome],[/chrome\/v?([\w.]+)/i,n.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/version\/([\w.,]+) .*safari/i,n.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,n.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,n.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,n.Firefox],[/firefox\/([\w.]+)/i,n.Firefox]];function w(e){if(void 0===e)return"";var o={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==o?o:e}function b(e){return void 0===e?"":e.replace(/_/g,".")}function u(e,o){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":o}function g(e,o){return"function"==typeof o?o(e):"string"==typeof o?o:void 0===e?"":e}function p(e){var o=e.split(".");return{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")}}for(var v=0;v<d.length;v++){var f=(k=d[v])[0],h=k[1],j=k[2];if(null!==(y=l.userAgent.match(f))){l.os=h,l.osVersion=g(y[1],j);break}}l.os===o.iOS&&0===e(l.osVersion,"18.6")&&(null!==(x=/\) Version\/([\d.]+)/.exec(l.userAgent))&&parseInt(x[1].substring(0,2),10)>=26&&(l.osVersion=x[1]));for(v=0;v<m.length;v++){f=(k=m[v])[0];var T=k[1];j=k[2];if(null!==(y=l.userAgent.match(f))){l.engine=T,l.engineVersion=g(y[1],j);break}}for(v=0;v<c.length;v++){f=(k=c[v])[0];var k,y,E=k[1];j=k[2];if(null!==(y=l.userAgent.match(f))){l.browser=E,l.browserVersion=g(y[1],j);break}}if(s)try{h=(V=require("react-native").Platform).OS;var x=p(S=""+V.Version);switch(h){case"android":l.os=o.Android,l.osVersion=function(e,o){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":o}(x,S);break;case"ios":l.os=o.iOS,l.osVersion=S;break;case"windows":l.os=o.Windows,l.osVersion=u(x,S);break;case"macos":l.os=o.MacOS,l.osVersion=S}}catch(e){}if(t)try{var S,V=(h=require("os")).platform();x=p(S=h.release());switch(V){case"win32":l.os=o.Windows,l.osVersion=u(x,S);break;case"darwin":l.os=o.MacOS,l.osVersion=function(e,o){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:o}(x,S);break;case"android":l.os=o.Android,l.osVersion=S;break;case"linux":/android/i.test(S)&&(l.os=o.Android,l.osVersion=S)}}catch(e){}function M(e){var i,r=function(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}(),n=r.document;try{if(void 0===(i=function(e,o){if(void 0===o&&(o=!0),void 0!==globalThis.document){var i=globalThis.document.createElement(e);return"width"in i&&(i.width="0"),"height"in i&&(i.height="0"),"border"in i&&(i.border="0"),"frameBorder"in i&&(i.frameBorder="0"),"scrolling"in i&&(i.scrolling="no"),"cellPadding"in i&&(i.cellPadding="0"),"cellSpacing"in i&&(i.cellSpacing="0"),"frame"in i&&(i.frame="void"),"rules"in i&&(i.rules="none"),"noWrap"in i&&(i.noWrap=!0),i.tabIndex=-1,i.setAttribute("role","presentation"),o?(i.style.width="1px",i.style.height="1px"):(i.setAttribute("aria-hidden","true"),i.style.width="0",i.style.height="0",i.style.zIndex="-9999",i.style.display="none",i.style.visibility="hidden",i.style.pointerEvents="none"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.padding="0",i.style.margin="0",i.style.border="none",i.style.outline="none",i.style.clip="rect(1px, 1px, 1px, 1px)",i.style.clipPath="inset(50%)",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i}}("input")))return;if(i.type="file",i.accept=e+"/*","capture"in HTMLInputElement.prototype)i.capture="user";else if(l.os===o.Android){var a="";"image"===e?a="camera":"video"===e&&(a="camcorder"),i.accept=e+"/*;capture="+a}n.body.appendChild(i),function(e,o){var i;void 0===o&&(o=window);try{i=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:o})}catch(e){(i=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,o,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(i)}(i,r)}catch(e){}}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(l.os===o.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":l.os=o.Android;break;case"iOS":l.os=o.iOS}l.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var i,r=e.fullVersionList||e.brands||[],n=e.platformVersion,a=0;a<r.length;a++){var t=null==(i=r[a])?{brand:"",version:""}:"string"==typeof i?{brand:i,version:""}:{brand:i.brand,version:i.version},s=t.brand,d=t.version;/not.a.brand/i.test(s)||"Chromium"===s&&(l.engineVersion=d)}"string"==typeof n&&(l.os===o.Windows&&parseInt(n.replace(/[^\d.]/g,"").split(".")[0],10)>=13?l.osVersion="11":l.osVersion=n)})),l.device=l.os===o.iOS||l.os===o.Android?i.Mobile:l.os===o.Windows||l.os===o.MacOS?i.Desktop:i.Unknown,l.isMobile=l.device===i.Mobile,l.isDesktop=l.device===i.Desktop,l.isStandalone=function(e){return"matchMedia"in globalThis&&(e===o.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(l.os);var O,A={open:function(i){switch(l.os){case o.Android:M(i);break;case o.iOS:e(l.osVersion,"10.3")>=0?M(i):alert(l.osVersion);case o.Windows:case o.MacOS:}}};!function(e){e.Image="image",e.Video="video"}(O||(O={}));var W={installed:!1,name:"Camera",module:A,Constants:{CameraType:O},Errors:{}};module.exports=W;
|
|
1
|
+
"use strict";function o(o,e){for(var r=o.split("."),i=e.split("."),n=Math.max(r.length,i.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<r.length?parseInt(r[a],10):0)>(s=a<i.length?parseInt(i[a],10):0))return 1;if(t<s)return-1}return 0}var e,r,i,n,a;!function(o){o.Unknown="Unknown",o.Android="Android",o.iOS="iOS",o.Windows="Windows",o.MacOS="MacOS"}(e||(e={})),function(o){o.Unknown="Unknown",o.Mobile="Mobile",o.Desktop="Desktop"}(r||(r={})),function(o){o.Unknown="Unknown",o.EdgeHTML="EdgeHTML",o.ArkWeb="ArkWeb",o.Blink="Blink",o.Presto="Presto",o.WebKit="WebKit",o.Trident="Trident",o.NetFront="NetFront",o.KHTML="KHTML",o.Tasman="Tasman",o.Gecko="Gecko"}(i||(i={})),function(o){o.Unknown="Unknown",o.Chrome="Chrome",o.Safari="Safari",o.Edge="Edge",o.Firefox="Firefox",o.Opera="Opera",o.IE="IE",o.SamsungInternet="SamsungInternet"}(n||(n={})),function(o){o.NotACrossPlatformFramework="NotACrossPlatformFramework",o.ReactNative="ReactNative",o.Electron="Electron",o.Cordova="Cordova"}(a||(a={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",s={device:r.Unknown,os:e.Unknown,engine:i.Unknown,browser:n.Unknown,crossPlatformFramework:a.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var o=globalThis.document.createElement("canvas");if("function"!=typeof o.getContext)return"";var e=o.getContext("webgl2")||o.getContext("experimental-webgl")||o.getContext("webgl");if(null===e)return"";if(e instanceof WebGLRenderingContext||"getParameter"in e&&"function"==typeof e.getParameter){var r=e.getExtension("WEBGL_debug_renderer_info");return null===r?e.getParameter(e.RENDERER):e.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:t,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(t)},l=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,w],[/cfnetwork\/.+darwin/i,e.iOS,w],[/mac os x ?([\w. ]*)/i,e.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],m=[[/\b(?:crmo|crios)\/([\w.]+)/i,n.Chrome],[/webview.+edge\/([\w.]+)/i,n.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,n.Edge],[/opera mini\/([-\w.]+)/i,n.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,n.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,n.Opera],[/opios[\/ ]+([\w.]+)/i,n.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,n.Opera],[/\bopr\/([\w.]+)/i,n.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,n.IE],[/(?:ms|\()ie ([\w.]+)/i,n.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,n.IE],[/\bfocus\/([\w.]+)/i,n.Firefox],[/\bopt\/([\w.]+)/i,n.Opera],[/coast\/([\w.]+)/i,n.Opera],[/fxios\/([\w.-]+)/i,n.Firefox],[/samsungbrowser\/([\w.]+)/i,n.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,n.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,n.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,n.Chrome],[/chrome\/([\w.]+) mobile/i,n.Chrome],[/chrome\/v?([\w.]+)/i,n.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/version\/([\w.,]+) .*safari/i,n.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,n.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,n.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,n.Firefox],[/firefox\/([\w.]+)/i,n.Firefox]];function c(o){if(void 0===o)return"";var e={"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"}[o];return void 0!==e?e:o}function w(o){return void 0===o?"":o.replace(/_/g,".")}function b(o,e){return 10===o.major&&0===o.minor&&o.build>=22e3?"11":10===o.major&&0===o.minor&&o.build<22e3?"10":6===o.major&&3===o.minor?"8.1":6===o.major&&2===o.minor?"8":6===o.major&&1===o.minor?"7":6===o.major&&0===o.minor?"Vista":5===o.major&&1===o.minor||5===o.major&&2===o.minor?"XP":5===o.major&&0===o.minor?"2000":4===o.major&&90===o.minor?"ME":4===o.major&&0===o.minor?"NT 4.0":3===o.major&&51===o.minor?"NT 3.11":e}function u(o,e){return"function"==typeof e?e(o):"string"==typeof e?e:void 0===o?"":o}function g(o){var e=o.split(".");return{major:parseInt(e[0]||"0"),minor:parseInt(e[1]||"0"),build:parseInt(e[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(s.crossPlatformFramework=a.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(s.crossPlatformFramework=a.ReactNative);for(var v=0;v<l.length;v++){var f=(k=l[v])[0],p=k[1],h=k[2];if(null!==(T=s.userAgent.match(f))){s.os=p,s.osVersion=u(T[1],h);break}}s.os===e.iOS&&0===o(s.osVersion,"18.6")&&(null!==(E=/\) Version\/([\d.]+)/.exec(s.userAgent))&&parseInt(E[1].substring(0,2),10)>=26&&(s.osVersion=E[1]));for(v=0;v<d.length;v++){f=(k=d[v])[0];var j=k[1];h=k[2];if(null!==(T=s.userAgent.match(f))){s.engine=j,s.engineVersion=u(T[1],h);break}}for(v=0;v<m.length;v++){f=(k=m[v])[0];var k,T,y=k[1];h=k[2];if(null!==(T=s.userAgent.match(f))){s.browser=y,s.browserVersion=u(T[1],h);break}}if(s.crossPlatformFramework===a.ReactNative)try{p=(S=require("react-native").Platform).OS;var E=g(x=""+S.Version);switch(p){case"android":s.os=e.Android,s.osVersion=function(o,e){return o.major>=36?"16":35===o.major?"15":34===o.major?"14":33===o.major?"13":32===o.major?"12.1":31===o.major?"12":30===o.major?"11":29===o.major?"10":28===o.major?"9":27===o.major?"8.1":26===o.major?"8.0":25===o.major?"7.1":24===o.major?"7.0":23===o.major?"6.0":22===o.major?"5.1":21===o.major?"5.0":20===o.major||19===o.major?"4.4":18===o.major?"4.3":17===o.major?"4.2":16===o.major?"4.1":15===o.major?"4.0.3":14===o.major?"4.0":13===o.major?"3.2":12===o.major?"3.1":11===o.major?"3.0":10===o.major?"2.3.3":9===o.major?"2.3":8===o.major?"2.2":7===o.major?"2.1":6===o.major?"2.0.1":5===o.major?"2.0":4===o.major?"1.6":3===o.major?"1.5":2===o.major?"1.1":1===o.major?"1.0":e}(E,x);break;case"ios":s.os=e.iOS,s.osVersion=x;break;case"windows":s.os=e.Windows,s.osVersion=b(E,x);break;case"macos":s.os=e.MacOS,s.osVersion=x}}catch(o){}if(s.isNode)try{var x,S=(p=require("os")).platform();E=g(x=p.release());switch(S){case"win32":s.os=e.Windows,s.osVersion=b(E,x);break;case"darwin":s.os=e.MacOS,s.osVersion=function(o,e){return o.major>=24?o.major-9+"."+o.minor+"."+o.build:23===o.major?"14."+o.minor+"."+o.build:22===o.major?"13."+o.minor+"."+o.build:21===o.major?"12."+o.minor+"."+o.build:20===o.major?"11."+o.minor+"."+o.build:19===o.major?"10.15."+o.minor:18===o.major?"10.14."+o.minor:17===o.major?"10.13."+o.minor:16===o.major?"10.12."+o.minor:15===o.major?"10.11."+o.minor:14===o.major?"10.10."+o.minor:13===o.major?"10.9."+o.minor:o.major>=5&&o.major<=12?"10."+(o.major-4)+"."+o.minor:e}(E,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(o){}function V(o){var r,i=function(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(o){}return window}(),n=i.document;try{if(void 0===(r=function(o,e){if(void 0===e&&(e=!0),void 0!==globalThis.document){var r=globalThis.document.createElement(o);return"width"in r&&(r.width="0"),"height"in r&&(r.height="0"),"border"in r&&(r.border="0"),"frameBorder"in r&&(r.frameBorder="0"),"scrolling"in r&&(r.scrolling="no"),"cellPadding"in r&&(r.cellPadding="0"),"cellSpacing"in r&&(r.cellSpacing="0"),"frame"in r&&(r.frame="void"),"rules"in r&&(r.rules="none"),"noWrap"in r&&(r.noWrap=!0),r.tabIndex=-1,r.setAttribute("role","presentation"),e?(r.style.width="1px",r.style.height="1px"):(r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.zIndex="-9999",r.style.display="none",r.style.visibility="hidden",r.style.pointerEvents="none"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.padding="0",r.style.margin="0",r.style.border="none",r.style.outline="none",r.style.clip="rect(1px, 1px, 1px, 1px)",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",r}}("input")))return;if(r.type="file",r.accept=o+"/*","capture"in HTMLInputElement.prototype)r.capture="user";else if(s.os===e.Android){var a="";"image"===o?a="camera":"video"===o&&(a="camcorder"),r.accept=o+"/*;capture="+a}n.body.appendChild(r),function(o,e){var r;void 0===e&&(e=window);try{r=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:e})}catch(o){(r=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,null)}o.dispatchEvent(r)}(r,i)}catch(o){}}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(s.crossPlatformFramework=a.Cordova,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(o){for(var r,i=o.fullVersionList||o.brands||[],n=o.platformVersion,a=0;a<i.length;a++){var t=null==(r=i[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=t.brand,d=t.version;/not.a.brand/i.test(l)||"Chromium"===l&&(s.engineVersion=d)}"string"==typeof n&&(s.os===e.Windows&&parseInt(n.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=n)})),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(o){return"matchMedia"in globalThis&&(o===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var A,N={open:function(r){s.os===e.Android?V(r):s.os===e.iOS&&(o(s.osVersion,"10.3")>=0?V(r):alert(s.osVersion))}};!function(o){o.Image="image",o.Video="video"}(A||(A={}));var M={installed:!1,name:"Camera",module:N,Constants:{CameraType:A},Errors:{}};module.exports=M;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,o){for(var i=e.split("."),r=o.split("."),n=Math.max(i.length,r.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<i.length?parseInt(i[a],10):0)>(s=a<r.length?parseInt(r[a],10):0))return 1;if(t<s)return-1}return 0}var o,i,r,n;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),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"}(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"}(n||(n={}));var a=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;void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(a);var s=void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product,l={device:i.Unknown,os:o.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:n.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var o=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===o)return"";if(o instanceof WebGLRenderingContext||"getParameter"in o&&"function"==typeof o.getParameter){var i=o.getExtension("WEBGL_debug_renderer_info");return null===i?o.getParameter(o.RENDERER):o.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:a,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(a)},d=[[/windows nt (6\.[23]); arm/i,o.Windows,w],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,w],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,w],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,w],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,w],[/windows ce\/?([\d.]*)/i,o.Windows,w],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,b],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,b],[/cfnetwork\/.+darwin/i,o.iOS,b],[/mac os x ?([\w. ]*)/i,o.MacOS,b],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,b],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],m=[[/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]],c=[[/\b(?:crmo|crios)\/([\w.]+)/i,n.Chrome],[/webview.+edge\/([\w.]+)/i,n.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,n.Edge],[/opera mini\/([-\w.]+)/i,n.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,n.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,n.Opera],[/opios[\/ ]+([\w.]+)/i,n.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,n.Opera],[/\bopr\/([\w.]+)/i,n.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,n.IE],[/(?:ms|\()ie ([\w.]+)/i,n.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,n.IE],[/\bfocus\/([\w.]+)/i,n.Firefox],[/\bopt\/([\w.]+)/i,n.Opera],[/coast\/([\w.]+)/i,n.Opera],[/fxios\/([\w.-]+)/i,n.Firefox],[/samsungbrowser\/([\w.]+)/i,n.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,n.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,n.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,n.Chrome],[/chrome\/([\w.]+) mobile/i,n.Chrome],[/chrome\/v?([\w.]+)/i,n.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/version\/([\w.,]+) .*safari/i,n.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,n.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,n.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,n.Firefox],[/firefox\/([\w.]+)/i,n.Firefox]];function w(e){if(void 0===e)return"";var o={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==o?o:e}function b(e){return void 0===e?"":e.replace(/_/g,".")}function g(e,o){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":o}function u(e,o){return"function"==typeof o?o(e):"string"==typeof o?o:void 0===e?"":e}function p(e){var o=e.split(".");return{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")}}for(var v=0;v<d.length;v++){var f=(k=d[v])[0],h=k[1],j=k[2];if(null!==(y=l.userAgent.match(f))){l.os=h,l.osVersion=u(y[1],j);break}}l.os===o.iOS&&0===e(l.osVersion,"18.6")&&(null!==(x=/\) Version\/([\d.]+)/.exec(l.userAgent))&&parseInt(x[1].substring(0,2),10)>=26&&(l.osVersion=x[1]));for(v=0;v<m.length;v++){f=(k=m[v])[0];var T=k[1];j=k[2];if(null!==(y=l.userAgent.match(f))){l.engine=T,l.engineVersion=u(y[1],j);break}}for(v=0;v<c.length;v++){f=(k=c[v])[0];var k,y,E=k[1];j=k[2];if(null!==(y=l.userAgent.match(f))){l.browser=E,l.browserVersion=u(y[1],j);break}}if(s)try{h=(V=require("react-native").Platform).OS;var x=p(S=""+V.Version);switch(h){case"android":l.os=o.Android,l.osVersion=function(e,o){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":o}(x,S);break;case"ios":l.os=o.iOS,l.osVersion=S;break;case"windows":l.os=o.Windows,l.osVersion=g(x,S);break;case"macos":l.os=o.MacOS,l.osVersion=S}}catch(e){}if(t)try{var S,V=(h=require("os")).platform();x=p(S=h.release());switch(V){case"win32":l.os=o.Windows,l.osVersion=g(x,S);break;case"darwin":l.os=o.MacOS,l.osVersion=function(e,o){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:o}(x,S);break;case"android":l.os=o.Android,l.osVersion=S;break;case"linux":/android/i.test(S)&&(l.os=o.Android,l.osVersion=S)}}catch(e){}function M(e){var i,r=function(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}(),n=r.document;try{if(void 0===(i=function(e,o){if(void 0===o&&(o=!0),void 0!==globalThis.document){var i=globalThis.document.createElement(e);return"width"in i&&(i.width="0"),"height"in i&&(i.height="0"),"border"in i&&(i.border="0"),"frameBorder"in i&&(i.frameBorder="0"),"scrolling"in i&&(i.scrolling="no"),"cellPadding"in i&&(i.cellPadding="0"),"cellSpacing"in i&&(i.cellSpacing="0"),"frame"in i&&(i.frame="void"),"rules"in i&&(i.rules="none"),"noWrap"in i&&(i.noWrap=!0),i.tabIndex=-1,i.setAttribute("role","presentation"),o?(i.style.width="1px",i.style.height="1px"):(i.setAttribute("aria-hidden","true"),i.style.width="0",i.style.height="0",i.style.zIndex="-9999",i.style.display="none",i.style.visibility="hidden",i.style.pointerEvents="none"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.padding="0",i.style.margin="0",i.style.border="none",i.style.outline="none",i.style.clip="rect(1px, 1px, 1px, 1px)",i.style.clipPath="inset(50%)",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i}}("input")))return;if(i.type="file",i.accept=e+"/*","capture"in HTMLInputElement.prototype)i.capture="user";else if(l.os===o.Android){var a="";"image"===e?a="camera":"video"===e&&(a="camcorder"),i.accept=e+"/*;capture="+a}n.body.appendChild(i),function(e,o){var i;void 0===o&&(o=window);try{i=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:o})}catch(e){(i=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,o,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(i)}(i,r)}catch(e){}}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(l.os===o.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":l.os=o.Android;break;case"iOS":l.os=o.iOS}l.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var i,r=e.fullVersionList||e.brands||[],n=e.platformVersion,a=0;a<r.length;a++){var t=null==(i=r[a])?{brand:"",version:""}:"string"==typeof i?{brand:i,version:""}:{brand:i.brand,version:i.version},s=t.brand,d=t.version;/not.a.brand/i.test(s)||"Chromium"===s&&(l.engineVersion=d)}"string"==typeof n&&(l.os===o.Windows&&parseInt(n.replace(/[^\d.]/g,"").split(".")[0],10)>=13?l.osVersion="11":l.osVersion=n)})),l.device=l.os===o.iOS||l.os===o.Android?i.Mobile:l.os===o.Windows||l.os===o.MacOS?i.Desktop:i.Unknown,l.isMobile=l.device===i.Mobile,l.isDesktop=l.device===i.Desktop,l.isStandalone=function(e){return"matchMedia"in globalThis&&(e===o.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(l.os);var O,A={open:function(i){switch(l.os){case o.Android:M(i);break;case o.iOS:e(l.osVersion,"10.3")>=0?M(i):alert(l.osVersion);case o.Windows:case o.MacOS:}}};!function(e){e.Image="image",e.Video="video"}(O||(O={}));var W={installed:!1,name:"Camera",module:A,Constants:{CameraType:O},Errors:{}};export{W as default};
|
|
1
|
+
function o(o,e){for(var r=o.split("."),i=e.split("."),n=Math.max(r.length,i.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<r.length?parseInt(r[a],10):0)>(s=a<i.length?parseInt(i[a],10):0))return 1;if(t<s)return-1}return 0}var e,r,i,n,a;!function(o){o.Unknown="Unknown",o.Android="Android",o.iOS="iOS",o.Windows="Windows",o.MacOS="MacOS"}(e||(e={})),function(o){o.Unknown="Unknown",o.Mobile="Mobile",o.Desktop="Desktop"}(r||(r={})),function(o){o.Unknown="Unknown",o.EdgeHTML="EdgeHTML",o.ArkWeb="ArkWeb",o.Blink="Blink",o.Presto="Presto",o.WebKit="WebKit",o.Trident="Trident",o.NetFront="NetFront",o.KHTML="KHTML",o.Tasman="Tasman",o.Gecko="Gecko"}(i||(i={})),function(o){o.Unknown="Unknown",o.Chrome="Chrome",o.Safari="Safari",o.Edge="Edge",o.Firefox="Firefox",o.Opera="Opera",o.IE="IE",o.SamsungInternet="SamsungInternet"}(n||(n={})),function(o){o.NotACrossPlatformFramework="NotACrossPlatformFramework",o.ReactNative="ReactNative",o.Electron="Electron",o.Cordova="Cordova"}(a||(a={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",s={device:r.Unknown,os:e.Unknown,engine:i.Unknown,browser:n.Unknown,crossPlatformFramework:a.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var o=globalThis.document.createElement("canvas");if("function"!=typeof o.getContext)return"";var e=o.getContext("webgl2")||o.getContext("experimental-webgl")||o.getContext("webgl");if(null===e)return"";if(e instanceof WebGLRenderingContext||"getParameter"in e&&"function"==typeof e.getParameter){var r=e.getExtension("WEBGL_debug_renderer_info");return null===r?e.getParameter(e.RENDERER):e.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:t,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(t)},l=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,w],[/cfnetwork\/.+darwin/i,e.iOS,w],[/mac os x ?([\w. ]*)/i,e.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],m=[[/\b(?:crmo|crios)\/([\w.]+)/i,n.Chrome],[/webview.+edge\/([\w.]+)/i,n.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,n.Edge],[/opera mini\/([-\w.]+)/i,n.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,n.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,n.Opera],[/opios[\/ ]+([\w.]+)/i,n.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,n.Opera],[/\bopr\/([\w.]+)/i,n.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,n.IE],[/(?:ms|\()ie ([\w.]+)/i,n.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,n.IE],[/\bfocus\/([\w.]+)/i,n.Firefox],[/\bopt\/([\w.]+)/i,n.Opera],[/coast\/([\w.]+)/i,n.Opera],[/fxios\/([\w.-]+)/i,n.Firefox],[/samsungbrowser\/([\w.]+)/i,n.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,n.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,n.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,n.Chrome],[/chrome\/([\w.]+) mobile/i,n.Chrome],[/chrome\/v?([\w.]+)/i,n.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/version\/([\w.,]+) .*safari/i,n.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,n.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,n.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,n.Firefox],[/firefox\/([\w.]+)/i,n.Firefox]];function c(o){if(void 0===o)return"";var e={"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"}[o];return void 0!==e?e:o}function w(o){return void 0===o?"":o.replace(/_/g,".")}function b(o,e){return 10===o.major&&0===o.minor&&o.build>=22e3?"11":10===o.major&&0===o.minor&&o.build<22e3?"10":6===o.major&&3===o.minor?"8.1":6===o.major&&2===o.minor?"8":6===o.major&&1===o.minor?"7":6===o.major&&0===o.minor?"Vista":5===o.major&&1===o.minor||5===o.major&&2===o.minor?"XP":5===o.major&&0===o.minor?"2000":4===o.major&&90===o.minor?"ME":4===o.major&&0===o.minor?"NT 4.0":3===o.major&&51===o.minor?"NT 3.11":e}function u(o,e){return"function"==typeof e?e(o):"string"==typeof e?e:void 0===o?"":o}function g(o){var e=o.split(".");return{major:parseInt(e[0]||"0"),minor:parseInt(e[1]||"0"),build:parseInt(e[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(s.crossPlatformFramework=a.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(s.crossPlatformFramework=a.ReactNative);for(var f=0;f<l.length;f++){var v=(k=l[f])[0],p=k[1],h=k[2];if(null!==(T=s.userAgent.match(v))){s.os=p,s.osVersion=u(T[1],h);break}}s.os===e.iOS&&0===o(s.osVersion,"18.6")&&(null!==(E=/\) Version\/([\d.]+)/.exec(s.userAgent))&&parseInt(E[1].substring(0,2),10)>=26&&(s.osVersion=E[1]));for(f=0;f<d.length;f++){v=(k=d[f])[0];var j=k[1];h=k[2];if(null!==(T=s.userAgent.match(v))){s.engine=j,s.engineVersion=u(T[1],h);break}}for(f=0;f<m.length;f++){v=(k=m[f])[0];var k,T,y=k[1];h=k[2];if(null!==(T=s.userAgent.match(v))){s.browser=y,s.browserVersion=u(T[1],h);break}}if(s.crossPlatformFramework===a.ReactNative)try{p=(S=require("react-native").Platform).OS;var E=g(x=""+S.Version);switch(p){case"android":s.os=e.Android,s.osVersion=function(o,e){return o.major>=36?"16":35===o.major?"15":34===o.major?"14":33===o.major?"13":32===o.major?"12.1":31===o.major?"12":30===o.major?"11":29===o.major?"10":28===o.major?"9":27===o.major?"8.1":26===o.major?"8.0":25===o.major?"7.1":24===o.major?"7.0":23===o.major?"6.0":22===o.major?"5.1":21===o.major?"5.0":20===o.major||19===o.major?"4.4":18===o.major?"4.3":17===o.major?"4.2":16===o.major?"4.1":15===o.major?"4.0.3":14===o.major?"4.0":13===o.major?"3.2":12===o.major?"3.1":11===o.major?"3.0":10===o.major?"2.3.3":9===o.major?"2.3":8===o.major?"2.2":7===o.major?"2.1":6===o.major?"2.0.1":5===o.major?"2.0":4===o.major?"1.6":3===o.major?"1.5":2===o.major?"1.1":1===o.major?"1.0":e}(E,x);break;case"ios":s.os=e.iOS,s.osVersion=x;break;case"windows":s.os=e.Windows,s.osVersion=b(E,x);break;case"macos":s.os=e.MacOS,s.osVersion=x}}catch(o){}if(s.isNode)try{var x,S=(p=require("os")).platform();E=g(x=p.release());switch(S){case"win32":s.os=e.Windows,s.osVersion=b(E,x);break;case"darwin":s.os=e.MacOS,s.osVersion=function(o,e){return o.major>=24?o.major-9+"."+o.minor+"."+o.build:23===o.major?"14."+o.minor+"."+o.build:22===o.major?"13."+o.minor+"."+o.build:21===o.major?"12."+o.minor+"."+o.build:20===o.major?"11."+o.minor+"."+o.build:19===o.major?"10.15."+o.minor:18===o.major?"10.14."+o.minor:17===o.major?"10.13."+o.minor:16===o.major?"10.12."+o.minor:15===o.major?"10.11."+o.minor:14===o.major?"10.10."+o.minor:13===o.major?"10.9."+o.minor:o.major>=5&&o.major<=12?"10."+(o.major-4)+"."+o.minor:e}(E,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(o){}function V(o){var r,i=function(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(o){}return window}(),n=i.document;try{if(void 0===(r=function(o,e){if(void 0===e&&(e=!0),void 0!==globalThis.document){var r=globalThis.document.createElement(o);return"width"in r&&(r.width="0"),"height"in r&&(r.height="0"),"border"in r&&(r.border="0"),"frameBorder"in r&&(r.frameBorder="0"),"scrolling"in r&&(r.scrolling="no"),"cellPadding"in r&&(r.cellPadding="0"),"cellSpacing"in r&&(r.cellSpacing="0"),"frame"in r&&(r.frame="void"),"rules"in r&&(r.rules="none"),"noWrap"in r&&(r.noWrap=!0),r.tabIndex=-1,r.setAttribute("role","presentation"),e?(r.style.width="1px",r.style.height="1px"):(r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.zIndex="-9999",r.style.display="none",r.style.visibility="hidden",r.style.pointerEvents="none"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.padding="0",r.style.margin="0",r.style.border="none",r.style.outline="none",r.style.clip="rect(1px, 1px, 1px, 1px)",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",r}}("input")))return;if(r.type="file",r.accept=o+"/*","capture"in HTMLInputElement.prototype)r.capture="user";else if(s.os===e.Android){var a="";"image"===o?a="camera":"video"===o&&(a="camcorder"),r.accept=o+"/*;capture="+a}n.body.appendChild(r),function(o,e){var r;void 0===e&&(e=window);try{r=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:e})}catch(o){(r=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,null)}o.dispatchEvent(r)}(r,i)}catch(o){}}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(s.crossPlatformFramework=a.Cordova,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(o){for(var r,i=o.fullVersionList||o.brands||[],n=o.platformVersion,a=0;a<i.length;a++){var t=null==(r=i[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=t.brand,d=t.version;/not.a.brand/i.test(l)||"Chromium"===l&&(s.engineVersion=d)}"string"==typeof n&&(s.os===e.Windows&&parseInt(n.replace(/[^\d.]/g,"").split(".")[0],10)>=13?s.osVersion="11":s.osVersion=n)})),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(o){return"matchMedia"in globalThis&&(o===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(s.os);var A,N={open:function(r){s.os===e.Android?V(r):s.os===e.iOS&&(o(s.osVersion,"10.3")>=0?V(r):alert(s.osVersion))}};!function(o){o.Image="image",o.Video="video"}(A||(A={}));var M={installed:!1,name:"Camera",module:N,Constants:{CameraType:A},Errors:{}};export{M as default};
|