native-fn 1.0.88 → 1.0.90
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/index.d.ts +4 -33
- package/dist/native.cjs +2742 -47
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +2742 -47
- package/dist/native.umd.js +2742 -47
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +637 -663
- package/dist/plugin/app/index.d.ts +4 -114
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +637 -663
- package/dist/plugin/app/index.umd.js +637 -663
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/app/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/app/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/app/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/app/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/app/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/app/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/app/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/app/src/types/native.d.ts +16 -26
- package/dist/plugin/appearance/index.cjs +392 -585
- package/dist/plugin/appearance/index.d.ts +4 -37
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +392 -585
- package/dist/plugin/appearance/index.umd.js +392 -585
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/appearance/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/appearance/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/appearance/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/appearance/src/types/native.d.ts +16 -26
- package/dist/plugin/clipboard/index.cjs +48 -822
- package/dist/plugin/clipboard/index.d.ts +4 -27
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +48 -822
- package/dist/plugin/clipboard/index.umd.js +48 -822
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/clipboard/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/clipboard/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/clipboard/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/clipboard/src/types/native.d.ts +16 -26
- package/dist/plugin/dimension/index.cjs +3 -883
- package/dist/plugin/dimension/index.d.ts +4 -36
- package/dist/plugin/dimension/index.min.cjs +1 -1
- package/dist/plugin/dimension/index.min.mjs +1 -1
- package/dist/plugin/dimension/index.mjs +3 -883
- package/dist/plugin/dimension/index.umd.js +3 -883
- package/dist/plugin/dimension/index.umd.min.js +1 -1
- package/dist/plugin/dimension/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/dimension/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/dimension/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/dimension/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/dimension/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/dimension/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/dimension/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/dimension/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/dimension/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/dimension/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/dimension/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/dimension/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/dimension/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/dimension/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/dimension/src/types/native.d.ts +16 -26
- package/dist/plugin/fullscreen/index.cjs +391 -588
- package/dist/plugin/fullscreen/index.d.ts +4 -33
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +391 -588
- package/dist/plugin/fullscreen/index.umd.js +391 -588
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/fullscreen/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/fullscreen/src/types/native.d.ts +16 -26
- package/dist/plugin/platform/index.cjs +409 -488
- package/dist/plugin/platform/index.d.ts +4 -96
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +409 -488
- package/dist/plugin/platform/index.umd.js +409 -488
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/platform/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/platform/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/platform/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/platform/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/platform/src/types/native.d.ts +16 -26
- package/dist/plugin/theme/index.cjs +390 -461
- package/dist/plugin/theme/index.d.ts +4 -27
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +390 -461
- package/dist/plugin/theme/index.umd.js +390 -461
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/theme/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/theme/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/theme/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/theme/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/theme/src/types/native.d.ts +16 -26
- package/dist/src/plugin/Display/constants/index.d.ts +4 -0
- package/dist/src/plugin/Display/cores/index.d.ts +3 -0
- package/dist/src/plugin/Display/index.d.ts +3 -0
- package/dist/src/plugin/Display/types/display.d.ts +13 -0
- package/dist/src/plugin/Display/types/index.d.ts +1 -0
- package/dist/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/src/plugin/app/cores/index.d.ts +11 -2
- package/dist/src/plugin/app/index.d.ts +2 -11
- package/dist/src/plugin/app/types/app.d.ts +25 -3
- package/dist/src/plugin/app/types/index.d.ts +0 -15
- package/dist/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/src/plugin/appearance/index.d.ts +2 -7
- package/dist/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/src/plugin/dimension/index.d.ts +3 -4
- package/dist/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/src/plugin/network/cores/index.d.ts +15 -0
- package/dist/src/plugin/network/index.d.ts +3 -0
- package/dist/src/plugin/network/types/index.d.ts +1 -0
- package/dist/src/plugin/network/types/network.d.ts +4 -0
- package/dist/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/src/plugin/platform/index.d.ts +2 -11
- package/dist/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/src/plugin/platform/types/platform.d.ts +23 -15
- package/dist/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/src/plugin/theme/index.d.ts +2 -4
- package/dist/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/src/types/native.d.ts +16 -26
- package/package.json +1 -1
|
@@ -21,6 +21,33 @@ function compareVersion(lhs, rhs) {
|
|
|
21
21
|
return 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
function resolveWindowsVersion(string) {
|
|
25
|
+
if (typeof string === 'undefined')
|
|
26
|
+
return '';
|
|
27
|
+
var mapped = {
|
|
28
|
+
'4.90': 'ME',
|
|
29
|
+
'NT3.51': 'NT 3.11',
|
|
30
|
+
'NT4.0': 'NT 4.0',
|
|
31
|
+
'NT 5.0': '2000',
|
|
32
|
+
'NT 5.1': 'XP',
|
|
33
|
+
'NT 5.2': 'XP',
|
|
34
|
+
'NT 6.0': 'Vista',
|
|
35
|
+
'NT 6.1': '7',
|
|
36
|
+
'NT 6.2': '8',
|
|
37
|
+
'NT 6.3': '8.1',
|
|
38
|
+
'NT 6.4': '10',
|
|
39
|
+
'NT 10.0': '10',
|
|
40
|
+
'ARM': 'RT'
|
|
41
|
+
}[string];
|
|
42
|
+
if (typeof mapped !== 'undefined')
|
|
43
|
+
return mapped;
|
|
44
|
+
return string;
|
|
45
|
+
}
|
|
46
|
+
function resolveUnderscoreVersion(string) {
|
|
47
|
+
if (typeof string === 'undefined')
|
|
48
|
+
return '';
|
|
49
|
+
return string.replace(/_/g, '.');
|
|
50
|
+
}
|
|
24
51
|
var OS;
|
|
25
52
|
(function (OS) {
|
|
26
53
|
OS["Unknown"] = "Unknown";
|
|
@@ -60,13 +87,6 @@ var Browsers;
|
|
|
60
87
|
Browsers["IE"] = "IE";
|
|
61
88
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
62
89
|
})(Browsers || (Browsers = {}));
|
|
63
|
-
var CrossPlatformFramework;
|
|
64
|
-
(function (CrossPlatformFramework) {
|
|
65
|
-
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
66
|
-
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
67
|
-
CrossPlatformFramework["Electron"] = "Electron";
|
|
68
|
-
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
69
|
-
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
70
90
|
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
71
91
|
var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
72
92
|
'Google Chrome': 'Chrome',
|
|
@@ -76,82 +96,7 @@ var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
|
76
96
|
'HeadlessChrome': 'Chrome Headless',
|
|
77
97
|
'OperaMobile': 'Opera Mobi',
|
|
78
98
|
};
|
|
79
|
-
|
|
80
|
-
var readyState = 'loading';
|
|
81
|
-
var readyCallback = [];
|
|
82
|
-
var pendingTasks = 0;
|
|
83
|
-
var Platform = {
|
|
84
|
-
os: { name: OS.Unknown, version: '' },
|
|
85
|
-
engine: { name: Engines.Unknown, version: '' },
|
|
86
|
-
browser: { name: Browsers.Unknown, version: '' },
|
|
87
|
-
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
88
|
-
userAgent: USER_AGENT,
|
|
89
|
-
get locale() {
|
|
90
|
-
return getLocale();
|
|
91
|
-
},
|
|
92
|
-
get device() {
|
|
93
|
-
if (this.os.name === OS.iOS || this.os.name === OS.Android)
|
|
94
|
-
return Devices.Mobile;
|
|
95
|
-
if (this.os.name === OS.Windows || this.os.name === OS.MacOS)
|
|
96
|
-
return Devices.Desktop;
|
|
97
|
-
return Devices.Unknown;
|
|
98
|
-
},
|
|
99
|
-
get renderer() {
|
|
100
|
-
return getRenderer();
|
|
101
|
-
},
|
|
102
|
-
get isWebview() {
|
|
103
|
-
return /; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent);
|
|
104
|
-
},
|
|
105
|
-
get isNode() {
|
|
106
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
107
|
-
},
|
|
108
|
-
get isStandalone() {
|
|
109
|
-
if (this.os.name === OS.iOS)
|
|
110
|
-
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
111
|
-
if (!('matchMedia' in globalThis))
|
|
112
|
-
return false;
|
|
113
|
-
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
114
|
-
},
|
|
115
|
-
onready: function (callback) {
|
|
116
|
-
if (readyState === 'complete') {
|
|
117
|
-
try {
|
|
118
|
-
callback(this);
|
|
119
|
-
}
|
|
120
|
-
catch (_) {
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
readyCallback.push(callback);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
function resolveWindowsVersion(string) {
|
|
129
|
-
if (typeof string === 'undefined')
|
|
130
|
-
return '';
|
|
131
|
-
var mapped = {
|
|
132
|
-
'4.90': 'ME',
|
|
133
|
-
'NT3.51': 'NT 3.11',
|
|
134
|
-
'NT4.0': 'NT 4.0',
|
|
135
|
-
'NT 5.0': '2000',
|
|
136
|
-
'NT 5.1': 'XP',
|
|
137
|
-
'NT 5.2': 'XP',
|
|
138
|
-
'NT 6.0': 'Vista',
|
|
139
|
-
'NT 6.1': '7',
|
|
140
|
-
'NT 6.2': '8',
|
|
141
|
-
'NT 6.3': '8.1',
|
|
142
|
-
'NT 6.4': '10',
|
|
143
|
-
'NT 10.0': '10',
|
|
144
|
-
'ARM': 'RT'
|
|
145
|
-
}[string];
|
|
146
|
-
if (typeof mapped !== 'undefined')
|
|
147
|
-
return mapped;
|
|
148
|
-
return string;
|
|
149
|
-
}
|
|
150
|
-
function resolveUnderscoreVersion(string) {
|
|
151
|
-
if (typeof string === 'undefined')
|
|
152
|
-
return '';
|
|
153
|
-
return string.replace(/_/g, '.');
|
|
154
|
-
}
|
|
99
|
+
var RTL_LANGUAGES = ['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'iw', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi'];
|
|
155
100
|
var OS_RESOLVER_MAP = [
|
|
156
101
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
157
102
|
[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -210,157 +155,237 @@ var BROWSER_RESOLVER_MAP = [
|
|
|
210
155
|
[/mobile vr; rv:([\w.]+)\).+firefox/i, Browsers.Firefox],
|
|
211
156
|
[/firefox\/([\w.]+)/i, Browsers.Firefox],
|
|
212
157
|
];
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
158
|
+
var BOT_REGEXP = [
|
|
159
|
+
/ daum[ /]/i,
|
|
160
|
+
/ deusu\//i,
|
|
161
|
+
/(?:^|[^g])news(?!sapphire)/i,
|
|
162
|
+
/(?<! (?:channel\/|google\/))google(?!(app|\/google| pixel))/i,
|
|
163
|
+
/(?<! cu)bots?(?:\b|_)/i,
|
|
164
|
+
/(?<!lib)http/i,
|
|
165
|
+
/(?<![hg]m)score/i,
|
|
166
|
+
/(?<!cam)scan/i,
|
|
167
|
+
/24x7/i,
|
|
168
|
+
/@[a-z][\w-]+\./i,
|
|
169
|
+
/\(\)/i,
|
|
170
|
+
/\.com\b/i,
|
|
171
|
+
/\b\w+\.ai/i,
|
|
172
|
+
/\bmanus-user\//i,
|
|
173
|
+
/\bort\//i,
|
|
174
|
+
/\bperl\b/i,
|
|
175
|
+
/\bsecurityheaders\b/i,
|
|
176
|
+
/\btime\//i,
|
|
177
|
+
/\|/i,
|
|
178
|
+
/^[\w .\-(?:)%]+(?:\/v?\d+(?:\.\d+)?(?:\.\d{1,10})*?)?(?:,|$)/i,
|
|
179
|
+
/^[^ ]{50,}$/i,
|
|
180
|
+
/^\d+\b/i,
|
|
181
|
+
/^\W/i,
|
|
182
|
+
/^\w*search\b/i,
|
|
183
|
+
/^\w+\/[\w()]*$/i,
|
|
184
|
+
/^\w+\/\d\.\d\s\([\w@]+\)$/i,
|
|
185
|
+
/^active/i,
|
|
186
|
+
/^ad muncher/i,
|
|
187
|
+
/^amaya/i,
|
|
188
|
+
/^apache\//i,
|
|
189
|
+
/^avsdevicesdk\//i,
|
|
190
|
+
/^azure/i,
|
|
191
|
+
/^biglotron/i,
|
|
192
|
+
/^bot/i,
|
|
193
|
+
/^bw\//i,
|
|
194
|
+
/^clamav[ /]/i,
|
|
195
|
+
/^client\//i,
|
|
196
|
+
/^cobweb\//i,
|
|
197
|
+
/^custom/i,
|
|
198
|
+
/^ddg[_-]android/i,
|
|
199
|
+
/^discourse/i,
|
|
200
|
+
/^dispatch\/\d/i,
|
|
201
|
+
/^downcast\//i,
|
|
202
|
+
/^duckduckgo/i,
|
|
203
|
+
/^email/i,
|
|
204
|
+
/^facebook/i,
|
|
205
|
+
/^getright\//i,
|
|
206
|
+
/^gozilla\//i,
|
|
207
|
+
/^hobbit/i,
|
|
208
|
+
/^hotzonu/i,
|
|
209
|
+
/^hwcdn\//i,
|
|
210
|
+
/^igetter\//i,
|
|
211
|
+
/^jeode\//i,
|
|
212
|
+
/^jetty\//i,
|
|
213
|
+
/^jigsaw/i,
|
|
214
|
+
/^microsoft bits/i,
|
|
215
|
+
/^movabletype/i,
|
|
216
|
+
/^mozilla\/\d\.\d\s[\w.-]+$/i,
|
|
217
|
+
/^mozilla\/\d\.\d\s\(compatible;?(?:\s[\w-.]+\/\d+\.\d+)?\)$/i,
|
|
218
|
+
/^navermailapp/i,
|
|
219
|
+
/^netsurf/i,
|
|
220
|
+
/^offline/i,
|
|
221
|
+
/^openai\//i,
|
|
222
|
+
/^owler/i,
|
|
223
|
+
/^php/i,
|
|
224
|
+
/^postman/i,
|
|
225
|
+
/^python/i,
|
|
226
|
+
/^rank/i,
|
|
227
|
+
/^read/i,
|
|
228
|
+
/^reed/i,
|
|
229
|
+
/^rest/i,
|
|
230
|
+
/^rss/i,
|
|
231
|
+
/^snapchat/i,
|
|
232
|
+
/^space bison/i,
|
|
233
|
+
/^svn/i,
|
|
234
|
+
/^swcd /i,
|
|
235
|
+
/^taringa/i,
|
|
236
|
+
/^thumbor\//i,
|
|
237
|
+
/^track/i,
|
|
238
|
+
/^w3c/i,
|
|
239
|
+
/^webbandit\//i,
|
|
240
|
+
/^webcopier/i,
|
|
241
|
+
/^wget/i,
|
|
242
|
+
/^whatsapp/i,
|
|
243
|
+
/^wordpress/i,
|
|
244
|
+
/^xenu link sleuth/i,
|
|
245
|
+
/^yahoo/i,
|
|
246
|
+
/^yandex/i,
|
|
247
|
+
/^zdm\/\d/i,
|
|
248
|
+
/^zoom marketplace\//i,
|
|
249
|
+
/advisor/i,
|
|
250
|
+
/agent\b/i,
|
|
251
|
+
/analyzer/i,
|
|
252
|
+
/archive/i,
|
|
253
|
+
/ask jeeves\/teoma/i,
|
|
254
|
+
/audit/i,
|
|
255
|
+
/bit\.ly\//i,
|
|
256
|
+
/bluecoat drtr/i,
|
|
257
|
+
/browsex/i,
|
|
258
|
+
/burpcollaborator/i,
|
|
259
|
+
/capture/i,
|
|
260
|
+
/catch/i,
|
|
261
|
+
/check\b/i,
|
|
262
|
+
/checker/i,
|
|
263
|
+
/chrome-lighthouse/i,
|
|
264
|
+
/chromeframe/i,
|
|
265
|
+
/classifier/i,
|
|
266
|
+
/cloudflare/i,
|
|
267
|
+
/convertify/i,
|
|
268
|
+
/crawl/i,
|
|
269
|
+
/cypress\//i,
|
|
270
|
+
/dareboost/i,
|
|
271
|
+
/datanyze/i,
|
|
272
|
+
/dejaclick/i,
|
|
273
|
+
/detect/i,
|
|
274
|
+
/dmbrowser/i,
|
|
275
|
+
/download/i,
|
|
276
|
+
/exaleadcloudview/i,
|
|
277
|
+
/feed/i,
|
|
278
|
+
/fetcher/i,
|
|
279
|
+
/firephp/i,
|
|
280
|
+
/functionize/i,
|
|
281
|
+
/grab/i,
|
|
282
|
+
/headless/i,
|
|
283
|
+
/httrack/i,
|
|
284
|
+
/hubspot marketing grader/i,
|
|
285
|
+
/ibisbrowser/i,
|
|
286
|
+
/infrawatch/i,
|
|
287
|
+
/insight/i,
|
|
288
|
+
/inspect/i,
|
|
289
|
+
/iplabel/i,
|
|
290
|
+
/java(?!;)/i,
|
|
291
|
+
/library/i,
|
|
292
|
+
/linkcheck/i,
|
|
293
|
+
/mail\.ru\//i,
|
|
294
|
+
/manager/i,
|
|
295
|
+
/measure/i,
|
|
296
|
+
/neustar wpm/i,
|
|
297
|
+
/node\b/i,
|
|
298
|
+
/nutch/i,
|
|
299
|
+
/offbyone/i,
|
|
300
|
+
/onetrust/i,
|
|
301
|
+
/optimize/i,
|
|
302
|
+
/pageburst/i,
|
|
303
|
+
/pagespeed/i,
|
|
304
|
+
/parser/i,
|
|
305
|
+
/phantomjs/i,
|
|
306
|
+
/pingdom/i,
|
|
307
|
+
/powermarks/i,
|
|
308
|
+
/preview/i,
|
|
309
|
+
/proxy/i,
|
|
310
|
+
/ptst[ /]\d/i,
|
|
311
|
+
/retriever/i,
|
|
312
|
+
/rexx;/i,
|
|
313
|
+
/rigor/i,
|
|
314
|
+
/rss\b/i,
|
|
315
|
+
/scrape/i,
|
|
316
|
+
/server/i,
|
|
317
|
+
/sogou/i,
|
|
318
|
+
/sparkler\//i,
|
|
319
|
+
/speedcurve/i,
|
|
320
|
+
/spider/i,
|
|
321
|
+
/splash/i,
|
|
322
|
+
/statuscake/i,
|
|
323
|
+
/supercleaner/i,
|
|
324
|
+
/synapse/i,
|
|
325
|
+
/synthetic/i,
|
|
326
|
+
/tools/i,
|
|
327
|
+
/torrent/i,
|
|
328
|
+
/transcoder/i,
|
|
329
|
+
/url/i,
|
|
330
|
+
/validator/i,
|
|
331
|
+
/virtuoso/i,
|
|
332
|
+
/wappalyzer/i,
|
|
333
|
+
/webglance/i,
|
|
334
|
+
/webkit2png/i,
|
|
335
|
+
/whatcms\//i,
|
|
336
|
+
/xtate\//i
|
|
337
|
+
];
|
|
338
|
+
|
|
339
|
+
var userAgent = USER_AGENT;
|
|
340
|
+
var Platform = {
|
|
341
|
+
get os() {
|
|
342
|
+
return getOS();
|
|
343
|
+
},
|
|
344
|
+
get engine() {
|
|
345
|
+
return getEngine();
|
|
346
|
+
},
|
|
347
|
+
get browser() {
|
|
348
|
+
return getBrowser();
|
|
349
|
+
},
|
|
350
|
+
get userAgent() {
|
|
351
|
+
return userAgent;
|
|
352
|
+
},
|
|
353
|
+
set userAgent(value) {
|
|
354
|
+
userAgent = value;
|
|
355
|
+
},
|
|
356
|
+
get locale() {
|
|
357
|
+
return getLocale();
|
|
358
|
+
},
|
|
359
|
+
get device() {
|
|
360
|
+
return getDevice();
|
|
361
|
+
},
|
|
362
|
+
get renderer() {
|
|
363
|
+
return getRenderer();
|
|
364
|
+
},
|
|
365
|
+
get isWebview() {
|
|
366
|
+
return getIsWebview();
|
|
367
|
+
},
|
|
368
|
+
get isNode() {
|
|
369
|
+
return getIsNode();
|
|
370
|
+
},
|
|
371
|
+
get isStandalone() {
|
|
372
|
+
return getIsStandalone();
|
|
373
|
+
},
|
|
374
|
+
get isBot() {
|
|
375
|
+
return getIsBot();
|
|
376
|
+
},
|
|
377
|
+
Constants: {
|
|
378
|
+
OS: OS,
|
|
379
|
+
Engines: Engines,
|
|
380
|
+
Browsers: Browsers,
|
|
381
|
+
Devices: Devices,
|
|
382
|
+
},
|
|
383
|
+
Errors: {},
|
|
384
|
+
};
|
|
385
|
+
var parsedFromHighEntropyValuesOS = {};
|
|
386
|
+
var parsedFromHighEntropyValuesBrowser = {};
|
|
387
|
+
var parsedFromHighEntropyValuesEngine = {};
|
|
388
|
+
var parsedFromHighEntropyValuesDevice = null;
|
|
364
389
|
function resolveVersion(string, resolver) {
|
|
365
390
|
if (typeof resolver === 'function')
|
|
366
391
|
return resolver(string);
|
|
@@ -377,54 +402,6 @@ function normalizeBrand(entry) {
|
|
|
377
402
|
return { brand: entry, version: '' };
|
|
378
403
|
return { brand: entry.brand, version: entry.version };
|
|
379
404
|
}
|
|
380
|
-
function getSemanticVersion(string) {
|
|
381
|
-
var parts = string.split('.');
|
|
382
|
-
return {
|
|
383
|
-
major: parseInt(parts[0] || '0'),
|
|
384
|
-
minor: parseInt(parts[1] || '0'),
|
|
385
|
-
build: parseInt(parts[2] || '0')
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
function parseOSFromCordova() {
|
|
389
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
|
|
390
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
391
|
-
switch (globalThis.device.platform) {
|
|
392
|
-
case 'Android':
|
|
393
|
-
Platform.os = {
|
|
394
|
-
name: OS.Android,
|
|
395
|
-
version: globalThis.device.version,
|
|
396
|
-
};
|
|
397
|
-
break;
|
|
398
|
-
case 'iOS':
|
|
399
|
-
Platform.os = {
|
|
400
|
-
name: OS.iOS,
|
|
401
|
-
version: globalThis.device.version,
|
|
402
|
-
};
|
|
403
|
-
break;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
decrementPendingTasks();
|
|
407
|
-
}
|
|
408
|
-
function getRenderer() {
|
|
409
|
-
if (typeof globalThis.document === 'undefined')
|
|
410
|
-
return '';
|
|
411
|
-
var canvas = globalThis.document.createElement('canvas');
|
|
412
|
-
if (typeof canvas.getContext !== 'function')
|
|
413
|
-
return '';
|
|
414
|
-
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
415
|
-
if (context === null)
|
|
416
|
-
return '';
|
|
417
|
-
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
418
|
-
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
419
|
-
if (extension === null)
|
|
420
|
-
return context.getParameter(context.RENDERER);
|
|
421
|
-
else
|
|
422
|
-
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
return '';
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
405
|
function normalizeLocale(locale) {
|
|
429
406
|
if (locale === null || typeof locale === 'undefined')
|
|
430
407
|
return locale;
|
|
@@ -447,13 +424,35 @@ function normalizeLocale(locale) {
|
|
|
447
424
|
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
448
425
|
return parts.join('-');
|
|
449
426
|
}
|
|
427
|
+
function getRenderer() {
|
|
428
|
+
if (typeof globalThis.document === 'undefined')
|
|
429
|
+
return '';
|
|
430
|
+
var canvas = globalThis.document.createElement('canvas');
|
|
431
|
+
if (typeof canvas.getContext !== 'function')
|
|
432
|
+
return '';
|
|
433
|
+
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
434
|
+
if (context === null)
|
|
435
|
+
return '';
|
|
436
|
+
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
437
|
+
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
438
|
+
if (extension === null)
|
|
439
|
+
return context.getParameter(context.RENDERER);
|
|
440
|
+
else
|
|
441
|
+
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
return '';
|
|
445
|
+
}
|
|
446
|
+
}
|
|
450
447
|
function getLocale() {
|
|
451
448
|
var locale = {
|
|
452
449
|
language: null,
|
|
453
450
|
languages: [],
|
|
454
451
|
timezone: null,
|
|
455
452
|
timezoneOffset: 0,
|
|
453
|
+
isRTL: false,
|
|
456
454
|
};
|
|
455
|
+
var isRTL = null;
|
|
457
456
|
function addLanguages(language) {
|
|
458
457
|
for (var i = 0; i < language.length; i++)
|
|
459
458
|
addLanguage(language[i]);
|
|
@@ -466,53 +465,6 @@ function getLocale() {
|
|
|
466
465
|
locale.languages.push(language);
|
|
467
466
|
}
|
|
468
467
|
}
|
|
469
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
470
|
-
try {
|
|
471
|
-
var reactNative = require('react-native');
|
|
472
|
-
var nativeModules = reactNative.NativeModules;
|
|
473
|
-
if (typeof nativeModules.SettingsManager !== 'undefined') {
|
|
474
|
-
var settingManager = nativeModules.SettingsManager;
|
|
475
|
-
if (typeof settingManager !== 'undefined') {
|
|
476
|
-
var constant = typeof settingManager.getConstants === 'function'
|
|
477
|
-
? settingManager.getConstants()
|
|
478
|
-
: settingManager;
|
|
479
|
-
if (typeof constant !== 'undefined' && typeof constant.settings !== 'undefined') {
|
|
480
|
-
var settings = constant.settings;
|
|
481
|
-
if (typeof settings.AppleLocale === 'string')
|
|
482
|
-
addLanguage(settings.AppleLocale);
|
|
483
|
-
if (Array.isArray(settings.AppleLanguages) && settings.AppleLanguages.length > 0)
|
|
484
|
-
addLanguages(settings.AppleLanguages);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
if (typeof nativeModules.I18nManager !== 'undefined') {
|
|
489
|
-
var i18nManager = nativeModules.I18nManager;
|
|
490
|
-
if (typeof i18nManager !== 'undefined') {
|
|
491
|
-
var constant = typeof i18nManager.getConstants === 'function'
|
|
492
|
-
? i18nManager.getConstants()
|
|
493
|
-
: i18nManager;
|
|
494
|
-
if (typeof constant !== 'undefined' && typeof constant.localeIdentifier !== 'undefined')
|
|
495
|
-
addLanguage(constant.localeIdentifier);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
catch (_) {
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
503
|
-
try {
|
|
504
|
-
var electron = require('electron');
|
|
505
|
-
var app = electron.app;
|
|
506
|
-
if (typeof app.getLocale !== 'undefined')
|
|
507
|
-
addLanguage(app.getLocale());
|
|
508
|
-
if (typeof app.getSystemLocale !== 'undefined')
|
|
509
|
-
addLanguage(app.getSystemLocale());
|
|
510
|
-
if (typeof app.getPreferredSystemLanguages !== 'undefined')
|
|
511
|
-
addLanguages(app.getPreferredSystemLanguages());
|
|
512
|
-
}
|
|
513
|
-
catch (_) {
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
468
|
if (typeof Intl !== 'undefined') {
|
|
517
469
|
try {
|
|
518
470
|
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
@@ -542,13 +494,37 @@ function getLocale() {
|
|
|
542
494
|
}
|
|
543
495
|
catch (_) {
|
|
544
496
|
}
|
|
497
|
+
if (typeof locale.language === 'string') {
|
|
498
|
+
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
499
|
+
try {
|
|
500
|
+
var intlLocale = new Intl.Locale(locale.language);
|
|
501
|
+
if (typeof intlLocale.getTextInfo === 'function')
|
|
502
|
+
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
503
|
+
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
504
|
+
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
505
|
+
}
|
|
506
|
+
catch (_) {
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
if (typeof isRTL !== 'boolean') {
|
|
510
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
511
|
+
if (matched !== null) {
|
|
512
|
+
var language = matched[1].toLowerCase();
|
|
513
|
+
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
514
|
+
if (RTL_LANGUAGES[i] === language) {
|
|
515
|
+
isRTL = true;
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
if (typeof isRTL === 'boolean')
|
|
523
|
+
locale.isRTL = isRTL;
|
|
545
524
|
return locale;
|
|
546
525
|
}
|
|
547
|
-
function
|
|
548
|
-
|
|
549
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
550
|
-
if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative')
|
|
551
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
|
|
526
|
+
function getOS() {
|
|
527
|
+
var result = { name: OS.Unknown, version: '' };
|
|
552
528
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
553
529
|
var map = OS_RESOLVER_MAP[i];
|
|
554
530
|
var regexp = map[0];
|
|
@@ -556,18 +532,26 @@ function init() {
|
|
|
556
532
|
var resolver = map[2];
|
|
557
533
|
var matched = Platform.userAgent.match(regexp);
|
|
558
534
|
if (matched !== null) {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
version: resolveVersion(matched[1], resolver),
|
|
562
|
-
};
|
|
535
|
+
result.name = os;
|
|
536
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
563
537
|
break;
|
|
564
538
|
}
|
|
565
539
|
}
|
|
566
|
-
if (
|
|
540
|
+
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
567
541
|
var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
|
|
568
542
|
if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
|
|
569
|
-
|
|
543
|
+
result.version = version[1];
|
|
544
|
+
}
|
|
545
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
546
|
+
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
547
|
+
result.name = parsedFromHighEntropyValuesOS.name;
|
|
548
|
+
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
549
|
+
result.version = parsedFromHighEntropyValuesOS.version;
|
|
570
550
|
}
|
|
551
|
+
return result;
|
|
552
|
+
}
|
|
553
|
+
function getEngine() {
|
|
554
|
+
var result = { name: Engines.Unknown, version: '' };
|
|
571
555
|
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
572
556
|
var map = ENGINE_RESOLVER_MAP[i];
|
|
573
557
|
var regexp = map[0];
|
|
@@ -575,13 +559,21 @@ function init() {
|
|
|
575
559
|
var resolver = map[2];
|
|
576
560
|
var matched = Platform.userAgent.match(regexp);
|
|
577
561
|
if (matched !== null) {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
version: resolveVersion(matched[1], resolver),
|
|
581
|
-
};
|
|
562
|
+
result.name = engine;
|
|
563
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
582
564
|
break;
|
|
583
565
|
}
|
|
584
566
|
}
|
|
567
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
568
|
+
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
569
|
+
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
570
|
+
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
571
|
+
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
572
|
+
}
|
|
573
|
+
return result;
|
|
574
|
+
}
|
|
575
|
+
function getBrowser() {
|
|
576
|
+
var result = { name: Browsers.Unknown, version: '' };
|
|
585
577
|
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
586
578
|
var map = BROWSER_RESOLVER_MAP[i];
|
|
587
579
|
var regexp = map[0];
|
|
@@ -589,102 +581,49 @@ function init() {
|
|
|
589
581
|
var resolver = map[2];
|
|
590
582
|
var matched = Platform.userAgent.match(regexp);
|
|
591
583
|
if (matched !== null) {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
version: resolveVersion(matched[1], resolver),
|
|
595
|
-
};
|
|
584
|
+
result.name = browser;
|
|
585
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
596
586
|
break;
|
|
597
587
|
}
|
|
598
588
|
}
|
|
599
|
-
if (Platform.
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
var release = '' + platform.Version;
|
|
605
|
-
var version = getSemanticVersion(release);
|
|
606
|
-
switch (os) {
|
|
607
|
-
case 'android':
|
|
608
|
-
Platform.os = {
|
|
609
|
-
name: OS.Android,
|
|
610
|
-
version: resolveSemanticAndroidVersion(version, release),
|
|
611
|
-
};
|
|
612
|
-
break;
|
|
613
|
-
case 'ios':
|
|
614
|
-
Platform.os = {
|
|
615
|
-
name: OS.iOS,
|
|
616
|
-
version: release,
|
|
617
|
-
};
|
|
618
|
-
break;
|
|
619
|
-
case 'windows':
|
|
620
|
-
Platform.os = {
|
|
621
|
-
name: OS.Windows,
|
|
622
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
623
|
-
};
|
|
624
|
-
break;
|
|
625
|
-
case 'macos':
|
|
626
|
-
Platform.os = {
|
|
627
|
-
name: OS.MacOS,
|
|
628
|
-
version: release,
|
|
629
|
-
};
|
|
630
|
-
break;
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
catch (_) {
|
|
634
|
-
}
|
|
635
|
-
finally {
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
if (Platform.isNode) {
|
|
639
|
-
try {
|
|
640
|
-
var os = require('os');
|
|
641
|
-
var platform = os.platform();
|
|
642
|
-
var release = os.release();
|
|
643
|
-
var version = getSemanticVersion(release);
|
|
644
|
-
switch (platform) {
|
|
645
|
-
case 'win32':
|
|
646
|
-
Platform.os = {
|
|
647
|
-
name: OS.Windows,
|
|
648
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
649
|
-
};
|
|
650
|
-
break;
|
|
651
|
-
case 'darwin':
|
|
652
|
-
Platform.os = {
|
|
653
|
-
name: OS.MacOS,
|
|
654
|
-
version: resolveSemanticDarwinVersion(version, release),
|
|
655
|
-
};
|
|
656
|
-
break;
|
|
657
|
-
case 'android':
|
|
658
|
-
Platform.os = {
|
|
659
|
-
name: OS.Android,
|
|
660
|
-
version: release,
|
|
661
|
-
};
|
|
662
|
-
break;
|
|
663
|
-
case 'linux':
|
|
664
|
-
if (/android/i.test(release)) {
|
|
665
|
-
Platform.os = {
|
|
666
|
-
name: OS.Android,
|
|
667
|
-
version: release,
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
break;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
catch (_) {
|
|
674
|
-
}
|
|
675
|
-
finally {
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
if (typeof globalThis.document !== 'undefined') {
|
|
679
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
680
|
-
parseOSFromCordova();
|
|
681
|
-
}
|
|
682
|
-
else {
|
|
683
|
-
globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
|
|
684
|
-
}
|
|
589
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
590
|
+
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
591
|
+
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
592
|
+
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
593
|
+
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
685
594
|
}
|
|
595
|
+
return result;
|
|
596
|
+
}
|
|
597
|
+
function getDevice() {
|
|
598
|
+
if (Platform.userAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
599
|
+
return parsedFromHighEntropyValuesDevice;
|
|
600
|
+
if (Platform.os.name === OS.iOS || Platform.os.name === OS.Android)
|
|
601
|
+
return Devices.Mobile;
|
|
602
|
+
if (Platform.os.name === OS.Windows || Platform.os.name === OS.MacOS)
|
|
603
|
+
return Devices.Desktop;
|
|
604
|
+
return Devices.Unknown;
|
|
605
|
+
}
|
|
606
|
+
function getIsWebview() {
|
|
607
|
+
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
608
|
+
}
|
|
609
|
+
function getIsNode() {
|
|
610
|
+
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
611
|
+
}
|
|
612
|
+
function getIsStandalone() {
|
|
613
|
+
if (Platform.os.name === OS.iOS)
|
|
614
|
+
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
615
|
+
if (!('matchMedia' in globalThis))
|
|
616
|
+
return false;
|
|
617
|
+
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
618
|
+
}
|
|
619
|
+
function getIsBot() {
|
|
620
|
+
for (var i = 0; i < BOT_REGEXP.length; i++)
|
|
621
|
+
if (BOT_REGEXP[i].test(Platform.userAgent))
|
|
622
|
+
return true;
|
|
623
|
+
return false;
|
|
624
|
+
}
|
|
625
|
+
function parseFromHighEntropyValues() {
|
|
686
626
|
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
687
|
-
incrementPendingTasks();
|
|
688
627
|
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
689
628
|
.then(function (result) {
|
|
690
629
|
try {
|
|
@@ -705,47 +644,43 @@ function init() {
|
|
|
705
644
|
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
706
645
|
browserName = brandName;
|
|
707
646
|
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
708
|
-
|
|
647
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
709
648
|
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
710
|
-
|
|
649
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
711
650
|
else if (browserName === 'Opera Mobi')
|
|
712
|
-
|
|
713
|
-
|
|
651
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
652
|
+
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
714
653
|
}
|
|
715
654
|
prevBrandName = brandName;
|
|
716
655
|
}
|
|
717
656
|
if (brandName === 'Chromium')
|
|
718
|
-
|
|
657
|
+
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
719
658
|
}
|
|
720
659
|
if (typeof platformVersion === 'string') {
|
|
721
660
|
if (Platform.os.name === OS.Windows)
|
|
722
|
-
|
|
661
|
+
parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
723
662
|
else
|
|
724
|
-
|
|
663
|
+
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
725
664
|
}
|
|
726
665
|
if (typeof platform === 'string') {
|
|
727
666
|
if (/android/i.test(platform))
|
|
728
|
-
|
|
667
|
+
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
729
668
|
else if (/ios|iphone|ipad/i.test(platform))
|
|
730
|
-
|
|
669
|
+
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
731
670
|
else if (/windows|win32/i.test(platform))
|
|
732
|
-
|
|
671
|
+
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
733
672
|
else if (/macos|macintel/i.test(platform))
|
|
734
|
-
|
|
673
|
+
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
735
674
|
}
|
|
736
675
|
if (result.mobile === true)
|
|
737
|
-
|
|
676
|
+
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
738
677
|
}
|
|
739
678
|
catch (_) {
|
|
740
679
|
}
|
|
741
|
-
finally {
|
|
742
|
-
decrementPendingTasks();
|
|
743
|
-
}
|
|
744
680
|
});
|
|
745
681
|
}
|
|
746
|
-
checkReady();
|
|
747
682
|
}
|
|
748
|
-
|
|
683
|
+
parseFromHighEntropyValues();
|
|
749
684
|
|
|
750
685
|
var Fullscreen = {
|
|
751
686
|
get enabled() {
|
|
@@ -762,12 +697,11 @@ var Fullscreen = {
|
|
|
762
697
|
toggle: toggle,
|
|
763
698
|
onchange: onchange,
|
|
764
699
|
onerror: onerror,
|
|
700
|
+
Constants: {},
|
|
701
|
+
Errors: {},
|
|
765
702
|
};
|
|
766
703
|
var lastIOSVideo = null;
|
|
767
|
-
var lastElectronBrowserWindow = null;
|
|
768
|
-
var lastElectronBrowserWindowOptions = null;
|
|
769
704
|
var eventsBridged = false;
|
|
770
|
-
var api = detectApi();
|
|
771
705
|
var API_VARIANTS = {
|
|
772
706
|
standard: {
|
|
773
707
|
enabled: 'fullscreenEnabled',
|
|
@@ -798,9 +732,8 @@ var API_VARIANTS = {
|
|
|
798
732
|
events: { change: 'MSFullscreenChange', error: 'MSFullscreenError' },
|
|
799
733
|
},
|
|
800
734
|
};
|
|
735
|
+
var api = detectApi();
|
|
801
736
|
function detectApi() {
|
|
802
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron)
|
|
803
|
-
return null;
|
|
804
737
|
var element = globalThis.document.documentElement;
|
|
805
738
|
if ('fullscreenEnabled' in globalThis.document || 'exitFullscreen' in globalThis.document) {
|
|
806
739
|
return API_VARIANTS.standard;
|
|
@@ -830,14 +763,6 @@ function detectApi() {
|
|
|
830
763
|
return null;
|
|
831
764
|
}
|
|
832
765
|
function getDefaultTarget() {
|
|
833
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
834
|
-
var electron = require('electron');
|
|
835
|
-
var browserWindow = electron.BrowserWindow;
|
|
836
|
-
var focusedWindow = browserWindow.getFocusedWindow() || browserWindow.getAllWindows()[0];
|
|
837
|
-
if (typeof focusedWindow === 'undefined')
|
|
838
|
-
throw new Error();
|
|
839
|
-
return focusedWindow;
|
|
840
|
-
}
|
|
841
766
|
if (Platform.os.name === OS.iOS) {
|
|
842
767
|
var video = globalThis.document.querySelector('video');
|
|
843
768
|
if (video === null)
|
|
@@ -846,16 +771,6 @@ function getDefaultTarget() {
|
|
|
846
771
|
}
|
|
847
772
|
return globalThis.document.documentElement;
|
|
848
773
|
}
|
|
849
|
-
function restoreElectronBrowserWindowOptions() {
|
|
850
|
-
if (lastElectronBrowserWindowOptions !== null) {
|
|
851
|
-
if (lastElectronBrowserWindow !== null) {
|
|
852
|
-
lastElectronBrowserWindow.fullScreenable = lastElectronBrowserWindowOptions.fullScreenable;
|
|
853
|
-
lastElectronBrowserWindow.autoHideMenuBar = lastElectronBrowserWindowOptions.autoHideMenuBar;
|
|
854
|
-
}
|
|
855
|
-
lastElectronBrowserWindowOptions = null;
|
|
856
|
-
}
|
|
857
|
-
lastElectronBrowserWindow = null;
|
|
858
|
-
}
|
|
859
774
|
function bridgeEvents() {
|
|
860
775
|
if (eventsBridged)
|
|
861
776
|
return;
|
|
@@ -877,41 +792,6 @@ function bridgeEvents() {
|
|
|
877
792
|
function emitError() {
|
|
878
793
|
emit('fullscreenerror');
|
|
879
794
|
}
|
|
880
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
881
|
-
try {
|
|
882
|
-
var electron = require('electron');
|
|
883
|
-
var browserWindow = electron.BrowserWindow;
|
|
884
|
-
var allWindows = browserWindow.getAllWindows();
|
|
885
|
-
var _loop_1 = function (i) {
|
|
886
|
-
var currentWindow = allWindows[i];
|
|
887
|
-
currentWindow.on('enter-full-screen', function () {
|
|
888
|
-
lastElectronBrowserWindow = currentWindow;
|
|
889
|
-
emitChange();
|
|
890
|
-
});
|
|
891
|
-
currentWindow.on('leave-full-screen', function () {
|
|
892
|
-
restoreElectronBrowserWindowOptions();
|
|
893
|
-
emitChange();
|
|
894
|
-
});
|
|
895
|
-
};
|
|
896
|
-
for (var i = 0; i < allWindows.length; i++) {
|
|
897
|
-
_loop_1(i);
|
|
898
|
-
}
|
|
899
|
-
if (typeof browserWindow.on === 'function') {
|
|
900
|
-
browserWindow.on('browser-window-created', function (_, currentWindow) {
|
|
901
|
-
currentWindow.on('enter-full-screen', function () {
|
|
902
|
-
lastElectronBrowserWindow = currentWindow;
|
|
903
|
-
emitChange();
|
|
904
|
-
});
|
|
905
|
-
currentWindow.on('leave-full-screen', function () {
|
|
906
|
-
restoreElectronBrowserWindowOptions();
|
|
907
|
-
emitChange();
|
|
908
|
-
});
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
catch (_) {
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
795
|
var changeEvents = ['webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
|
|
916
796
|
var errorEvents = ['webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
|
|
917
797
|
for (var i = 0; i < changeEvents.length; i++) {
|
|
@@ -948,16 +828,6 @@ function bridgeIOSVideoEvents() {
|
|
|
948
828
|
}
|
|
949
829
|
}
|
|
950
830
|
function getEnabled() {
|
|
951
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
952
|
-
try {
|
|
953
|
-
var electron = require('electron');
|
|
954
|
-
var browserWindow = electron.BrowserWindow;
|
|
955
|
-
return typeof browserWindow.prototype.setFullScreen === 'function';
|
|
956
|
-
}
|
|
957
|
-
catch (_) {
|
|
958
|
-
return false;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
831
|
if (api === null) {
|
|
962
832
|
if (Platform.os.name !== OS.iOS)
|
|
963
833
|
return false;
|
|
@@ -975,24 +845,6 @@ function getEnabled() {
|
|
|
975
845
|
return typeof globalThis.document[api.element] !== 'undefined';
|
|
976
846
|
}
|
|
977
847
|
function getElement() {
|
|
978
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
979
|
-
if (lastElectronBrowserWindow !== null)
|
|
980
|
-
return lastElectronBrowserWindow;
|
|
981
|
-
try {
|
|
982
|
-
var electron = require('electron');
|
|
983
|
-
var browserWindow = electron.BrowserWindow;
|
|
984
|
-
var allWindows = browserWindow.getAllWindows();
|
|
985
|
-
for (var i = 0; i < allWindows.length; i++) {
|
|
986
|
-
var currentWindow = allWindows[i];
|
|
987
|
-
if (currentWindow.isFullScreen() || (Platform.os.name === OS.MacOS && typeof currentWindow.isSimpleFullScreen === 'function' && currentWindow.isSimpleFullScreen()))
|
|
988
|
-
return currentWindow;
|
|
989
|
-
}
|
|
990
|
-
return null;
|
|
991
|
-
}
|
|
992
|
-
catch (_) {
|
|
993
|
-
return null;
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
848
|
if (api === null) {
|
|
997
849
|
if (lastIOSVideo && lastIOSVideo.webkitDisplayingFullscreen)
|
|
998
850
|
return lastIOSVideo;
|
|
@@ -1008,28 +860,6 @@ function getIsFullscreen() {
|
|
|
1008
860
|
}
|
|
1009
861
|
function request(target, options) {
|
|
1010
862
|
if (target === void 0) { target = getDefaultTarget(); }
|
|
1011
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
1012
|
-
var browserWindow_1 = target;
|
|
1013
|
-
return new Promise(function (resolve, reject) {
|
|
1014
|
-
try {
|
|
1015
|
-
if (lastElectronBrowserWindow === null) {
|
|
1016
|
-
lastElectronBrowserWindowOptions = {
|
|
1017
|
-
fullScreenable: browserWindow_1.fullScreenable,
|
|
1018
|
-
autoHideMenuBar: browserWindow_1.autoHideMenuBar,
|
|
1019
|
-
};
|
|
1020
|
-
browserWindow_1.fullScreenable = true;
|
|
1021
|
-
browserWindow_1.autoHideMenuBar = true;
|
|
1022
|
-
}
|
|
1023
|
-
browserWindow_1.setFullScreen(true);
|
|
1024
|
-
lastElectronBrowserWindow = browserWindow_1;
|
|
1025
|
-
resolve();
|
|
1026
|
-
return;
|
|
1027
|
-
}
|
|
1028
|
-
catch (_) {
|
|
1029
|
-
reject();
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
|
-
}
|
|
1033
863
|
return new Promise(function (resolve, reject) {
|
|
1034
864
|
if (api !== null) {
|
|
1035
865
|
var method = target[api.request];
|
|
@@ -1080,25 +910,6 @@ function request(target, options) {
|
|
|
1080
910
|
});
|
|
1081
911
|
}
|
|
1082
912
|
function exit() {
|
|
1083
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
1084
|
-
return new Promise(function (resolve, reject) {
|
|
1085
|
-
try {
|
|
1086
|
-
if (lastElectronBrowserWindow !== null) {
|
|
1087
|
-
lastElectronBrowserWindow.setFullScreen(false);
|
|
1088
|
-
restoreElectronBrowserWindowOptions();
|
|
1089
|
-
}
|
|
1090
|
-
else {
|
|
1091
|
-
var browserWindow = getElement();
|
|
1092
|
-
if (browserWindow !== null)
|
|
1093
|
-
browserWindow.setFullScreen(false);
|
|
1094
|
-
}
|
|
1095
|
-
resolve();
|
|
1096
|
-
}
|
|
1097
|
-
catch (_) {
|
|
1098
|
-
reject();
|
|
1099
|
-
}
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
913
|
return new Promise(function (resolve, reject) {
|
|
1103
914
|
if (api !== null) {
|
|
1104
915
|
var method = globalThis.document[api.exit];
|
|
@@ -1192,12 +1003,4 @@ function onerror(handler) {
|
|
|
1192
1003
|
}
|
|
1193
1004
|
bridgeEvents();
|
|
1194
1005
|
|
|
1195
|
-
|
|
1196
|
-
installed: false,
|
|
1197
|
-
name: 'Fullscreen',
|
|
1198
|
-
module: Fullscreen,
|
|
1199
|
-
Constants: {},
|
|
1200
|
-
Errors: {}
|
|
1201
|
-
};
|
|
1202
|
-
|
|
1203
|
-
export { NativeFullscreenPlugin as default };
|
|
1006
|
+
export { Fullscreen as default };
|