native-fn 1.1.0 → 1.1.2
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 +57 -45
- package/dist/native.cjs +1029 -930
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +1029 -930
- package/dist/native.umd.js +1029 -930
- package/dist/native.umd.min.js +1 -1
- package/dist/src/plugin/fullscreen/cores/index.d.ts +3 -3
- package/dist/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/src/plugin/open/constants/index.d.ts +12 -0
- package/dist/src/plugin/open/types/open.d.ts +4 -4
- package/dist/src/plugin/pip/cores/index.d.ts +3 -3
- package/dist/src/plugin/platform/cores/index.d.ts +1 -1
- package/dist/src/plugin/platform/types/platform.d.ts +2 -3
- package/dist/src/plugin/vibration/types/vibration.d.ts +1 -0
- package/dist/src/types/native.d.ts +15 -1
- package/package.json +1 -50
- package/dist/plugin/app/index.cjs +0 -1800
- package/dist/plugin/app/index.d.ts +0 -4
- package/dist/plugin/app/index.min.cjs +0 -1
- package/dist/plugin/app/index.min.mjs +0 -1
- package/dist/plugin/app/index.mjs +0 -1798
- package/dist/plugin/app/index.umd.js +0 -1806
- package/dist/plugin/app/index.umd.min.js +0 -1
- package/dist/plugin/app/src/constants/platform.d.ts +0 -67
- package/dist/plugin/app/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/app/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/app/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/app/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/app/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/app/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/app/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/app/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/app/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/app/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/app/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/app/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/app/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/app/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/app/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/app/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/app/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/app/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/app/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/app/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/app/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/app/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/app/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/app/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/app/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/app/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/app/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/app/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/app/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/app/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/app/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/app/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/app/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/app/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/app/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/app/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/app/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/app/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/app/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/app/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/app/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/app/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/app/src/types/index.d.ts +0 -1
- package/dist/plugin/app/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/app/src/types/native.d.ts +0 -17
- package/dist/plugin/app/src/types/platform.d.ts +0 -16
- package/dist/plugin/app/src/utils/assign.d.ts +0 -1
- package/dist/plugin/app/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/app/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/app/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/app/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/app/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/app/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/app/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/app/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/app/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/app/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/app/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/app/src/utils/request.d.ts +0 -6
- package/dist/plugin/app/src/utils/require.d.ts +0 -1
- package/dist/plugin/appearance/index.cjs +0 -857
- package/dist/plugin/appearance/index.d.ts +0 -4
- package/dist/plugin/appearance/index.min.cjs +0 -1
- package/dist/plugin/appearance/index.min.mjs +0 -1
- package/dist/plugin/appearance/index.mjs +0 -855
- package/dist/plugin/appearance/index.umd.js +0 -863
- package/dist/plugin/appearance/index.umd.min.js +0 -1
- package/dist/plugin/appearance/src/constants/platform.d.ts +0 -67
- package/dist/plugin/appearance/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/appearance/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/appearance/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/appearance/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/appearance/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/appearance/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/appearance/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/appearance/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/appearance/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/appearance/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/appearance/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/appearance/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/appearance/src/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/appearance/src/types/native.d.ts +0 -17
- package/dist/plugin/appearance/src/types/platform.d.ts +0 -16
- package/dist/plugin/appearance/src/utils/assign.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/appearance/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/appearance/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/request.d.ts +0 -6
- package/dist/plugin/camera/index.cjs +0 -653
- package/dist/plugin/camera/index.d.ts +0 -34
- package/dist/plugin/camera/index.min.cjs +0 -1
- package/dist/plugin/camera/index.min.mjs +0 -1
- package/dist/plugin/camera/index.mjs +0 -651
- package/dist/plugin/camera/index.umd.js +0 -659
- package/dist/plugin/camera/index.umd.min.js +0 -1
- package/dist/plugin/camera/src/constants/platform.d.ts +0 -67
- package/dist/plugin/camera/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/camera/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/camera/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/app/constants/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/app/cores/index.d.ts +0 -13
- package/dist/plugin/camera/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/app/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/app/types/app.d.ts +0 -54
- package/dist/plugin/camera/src/plugin/app/types/index.d.ts +0 -16
- package/dist/plugin/camera/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/camera/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/appearance/index.d.ts +0 -8
- package/dist/plugin/camera/src/plugin/appearance/types/appearance.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/appearance/types/index.d.ts +0 -13
- package/dist/plugin/camera/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/camera/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/camera/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/clipboard/index.d.ts +0 -5
- package/dist/plugin/camera/src/plugin/clipboard/types/clipboard.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/clipboard/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/camera/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/camera/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/camera/src/plugin/fullscreen/index.d.ts +0 -5
- package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen.d.ts +0 -10
- package/dist/plugin/camera/src/plugin/fullscreen/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/platform/constants/index.d.ts +0 -42
- package/dist/plugin/camera/src/plugin/platform/cores/index.d.ts +0 -28
- package/dist/plugin/camera/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/platform/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/platform/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/platform/types/platform.d.ts +0 -18
- package/dist/plugin/camera/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/camera/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/camera/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/theme/index.d.ts +0 -5
- package/dist/plugin/camera/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/camera/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/camera/src/plugin/theme/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/theme/types/theme.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/camera/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/camera/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/camera/src/types/index.d.ts +0 -1
- package/dist/plugin/camera/src/types/native.d.ts +0 -27
- package/dist/plugin/camera/src/types/platform.d.ts +0 -16
- package/dist/plugin/camera/src/utils/assign.d.ts +0 -1
- package/dist/plugin/camera/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/camera/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/camera/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/camera/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/camera/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/camera/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/camera/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/camera/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/camera/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/camera/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/camera/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/camera/src/utils/require.d.ts +0 -1
- package/dist/plugin/clipboard/index.cjs +0 -512
- package/dist/plugin/clipboard/index.d.ts +0 -4
- package/dist/plugin/clipboard/index.min.cjs +0 -1
- package/dist/plugin/clipboard/index.min.mjs +0 -1
- package/dist/plugin/clipboard/index.mjs +0 -510
- package/dist/plugin/clipboard/index.umd.js +0 -518
- package/dist/plugin/clipboard/index.umd.min.js +0 -1
- package/dist/plugin/clipboard/src/constants/platform.d.ts +0 -67
- package/dist/plugin/clipboard/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/clipboard/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/clipboard/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/clipboard/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/clipboard/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/clipboard/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/clipboard/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/clipboard/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/clipboard/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/clipboard/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/clipboard/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/clipboard/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/clipboard/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/clipboard/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/clipboard/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/clipboard/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/clipboard/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/clipboard/src/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/clipboard/src/types/native.d.ts +0 -17
- package/dist/plugin/clipboard/src/types/platform.d.ts +0 -16
- package/dist/plugin/clipboard/src/utils/assign.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/clipboard/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/clipboard/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/clipboard/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/clipboard/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/request.d.ts +0 -6
- package/dist/plugin/clipboard/src/utils/require.d.ts +0 -1
- package/dist/plugin/dimension/index.cjs +0 -110
- package/dist/plugin/dimension/index.d.ts +0 -4
- package/dist/plugin/dimension/index.min.cjs +0 -1
- package/dist/plugin/dimension/index.min.mjs +0 -1
- package/dist/plugin/dimension/index.mjs +0 -108
- package/dist/plugin/dimension/index.umd.js +0 -116
- package/dist/plugin/dimension/index.umd.min.js +0 -1
- package/dist/plugin/dimension/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/dimension/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/dimension/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/dimension/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/dimension/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/dimension/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/dimension/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/dimension/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/dimension/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/dimension/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/dimension/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/dimension/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/dimension/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/dimension/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/dimension/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/dimension/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/dimension/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/dimension/src/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/dimension/src/types/native.d.ts +0 -17
- package/dist/plugin/dimension/src/utils/assign.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/dimension/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/dimension/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/request.d.ts +0 -6
- package/dist/plugin/fullscreen/index.cjs +0 -1008
- package/dist/plugin/fullscreen/index.d.ts +0 -4
- package/dist/plugin/fullscreen/index.min.cjs +0 -1
- package/dist/plugin/fullscreen/index.min.mjs +0 -1
- package/dist/plugin/fullscreen/index.mjs +0 -1006
- package/dist/plugin/fullscreen/index.umd.js +0 -1014
- package/dist/plugin/fullscreen/index.umd.min.js +0 -1
- package/dist/plugin/fullscreen/src/constants/platform.d.ts +0 -67
- package/dist/plugin/fullscreen/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/fullscreen/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/fullscreen/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/fullscreen/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/fullscreen/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/fullscreen/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/fullscreen/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/fullscreen/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/fullscreen/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/fullscreen/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/fullscreen/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/fullscreen/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/fullscreen/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/fullscreen/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/fullscreen/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/fullscreen/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/fullscreen/src/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/fullscreen/src/types/native.d.ts +0 -17
- package/dist/plugin/fullscreen/src/types/platform.d.ts +0 -16
- package/dist/plugin/fullscreen/src/utils/assign.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/fullscreen/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/fullscreen/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/fullscreen/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/fullscreen/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/request.d.ts +0 -6
- package/dist/plugin/fullscreen/src/utils/require.d.ts +0 -1
- package/dist/plugin/media/index.cjs +0 -241
- package/dist/plugin/media/index.d.ts +0 -33
- package/dist/plugin/media/index.min.cjs +0 -1
- package/dist/plugin/media/index.min.mjs +0 -1
- package/dist/plugin/media/index.mjs +0 -239
- package/dist/plugin/media/index.umd.js +0 -247
- package/dist/plugin/media/index.umd.min.js +0 -1
- package/dist/plugin/media/src/constants/platform.d.ts +0 -35
- package/dist/plugin/media/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/media/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/media/src/plugin/app/constants/app.d.ts +0 -13
- package/dist/plugin/media/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/media/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/media/src/plugin/app/index.d.ts +0 -12
- package/dist/plugin/media/src/plugin/app/types/app.d.ts +0 -43
- package/dist/plugin/media/src/plugin/app/types/index.d.ts +0 -16
- package/dist/plugin/media/src/plugin/app/utils/try-open-url.d.ts +0 -1
- package/dist/plugin/media/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/media/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/media/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/media/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/media/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/media/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/media/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/media/src/plugin/platform/index.d.ts +0 -5
- package/dist/plugin/media/src/plugin/platform/types/index.d.ts +0 -7
- package/dist/plugin/media/src/plugin/platform/types/platform.d.ts +0 -13
- package/dist/plugin/media/src/plugin/theme/constants/theme.d.ts +0 -16
- package/dist/plugin/media/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/media/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/media/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/media/src/plugin/theme/index.d.ts +0 -17
- package/dist/plugin/media/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/media/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/media/src/plugin/theme/types/index.d.ts +0 -23
- package/dist/plugin/media/src/plugin/theme/types/theme.d.ts +0 -23
- package/dist/plugin/media/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/media/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/media/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/media/src/types/index.d.ts +0 -2
- package/dist/plugin/media/src/types/native.d.ts +0 -27
- package/dist/plugin/media/src/utils/assign.d.ts +0 -1
- package/dist/plugin/media/src/utils/create-custom-error.d.ts +0 -1
- package/dist/plugin/media/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/media/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/media/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/platform/index.cjs +0 -687
- package/dist/plugin/platform/index.d.ts +0 -4
- package/dist/plugin/platform/index.min.cjs +0 -1
- package/dist/plugin/platform/index.min.mjs +0 -1
- package/dist/plugin/platform/index.mjs +0 -685
- package/dist/plugin/platform/index.umd.js +0 -693
- package/dist/plugin/platform/index.umd.min.js +0 -1
- package/dist/plugin/platform/src/constants/platform.d.ts +0 -66
- package/dist/plugin/platform/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/platform/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/platform/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/platform/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/platform/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/app/utils/try-open-url.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/platform/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/platform/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/platform/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/platform/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/platform/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/platform/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/platform/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/platform/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/platform/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/platform/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/platform/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/platform/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/platform/src/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/platform/src/types/native.d.ts +0 -17
- package/dist/plugin/platform/src/utils/assign.d.ts +0 -1
- package/dist/plugin/platform/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/platform/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/platform/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/platform/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/platform/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/platform/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/platform/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/platform/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/platform/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/platform/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/platform/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/platform/src/utils/request.d.ts +0 -6
- package/dist/plugin/theme/index.cjs +0 -742
- package/dist/plugin/theme/index.d.ts +0 -4
- package/dist/plugin/theme/index.min.cjs +0 -1
- package/dist/plugin/theme/index.min.mjs +0 -1
- package/dist/plugin/theme/index.mjs +0 -740
- package/dist/plugin/theme/index.umd.js +0 -748
- package/dist/plugin/theme/index.umd.min.js +0 -1
- package/dist/plugin/theme/src/constants/platform.d.ts +0 -67
- package/dist/plugin/theme/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/theme/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/theme/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/theme/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/theme/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/theme/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/theme/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/theme/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/theme/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/theme/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/theme/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/theme/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/theme/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/theme/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/theme/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/theme/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/theme/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/theme/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/theme/src/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/theme/src/types/native.d.ts +0 -17
- package/dist/plugin/theme/src/types/platform.d.ts +0 -16
- package/dist/plugin/theme/src/utils/assign.d.ts +0 -1
- package/dist/plugin/theme/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/theme/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/theme/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/theme/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/theme/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/theme/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/theme/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/theme/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/theme/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/theme/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/theme/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/theme/src/utils/request.d.ts +0 -6
- package/dist/plugin/theme/src/utils/require.d.ts +0 -1
- package/dist/src/constants/platform.d.ts +0 -67
- package/dist/src/constants/user-agent.d.ts +0 -1
- package/dist/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/src/errors/url-open-error.d.ts +0 -2
- package/dist/src/plugin/Display/constants/index.d.ts +0 -4
- package/dist/src/plugin/Display/cores/index.d.ts +0 -3
- package/dist/src/plugin/Display/index.d.ts +0 -3
- package/dist/src/plugin/Display/types/display.d.ts +0 -13
- package/dist/src/plugin/Display/types/index.d.ts +0 -1
- package/dist/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/src/plugin/app/constants/index.d.ts +0 -33
- package/dist/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/src/plugin/app/cores/index.d.ts +0 -21
- package/dist/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/src/plugin/app/index.d.ts +0 -3
- package/dist/src/plugin/app/types/app.d.ts +0 -132
- package/dist/src/plugin/app/types/index.d.ts +0 -1
- package/dist/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/src/plugin/appearance/types/appearanceInstance.d.ts +0 -9
- package/dist/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/src/plugin/camera/index.d.ts +0 -8
- package/dist/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/src/plugin/geolocation/constants/index.d.ts +0 -2
- package/dist/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/src/plugin/media/index.d.ts +0 -5
- package/dist/src/plugin/media/types/index.d.ts +0 -13
- package/dist/src/plugin/media/types/media.d.ts +0 -4
- package/dist/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/src/plugin/network/cores/index.d.ts +0 -15
- package/dist/src/plugin/network/index.d.ts +0 -3
- package/dist/src/plugin/network/types/index.d.ts +0 -1
- package/dist/src/plugin/network/types/network.d.ts +0 -4
- package/dist/src/plugin/open/errors/not-supported-error.d.ts +0 -2
- package/dist/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/src/plugin/pwa/cores/index.d.ts +0 -3
- package/dist/src/plugin/pwa/index.d.ts +0 -3
- package/dist/src/plugin/pwa/types/index.d.ts +0 -1
- package/dist/src/plugin/pwa/types/pwa.d.ts +0 -8
- package/dist/src/plugin/speech/cores/index.d.ts +0 -53
- package/dist/src/plugin/speech/index.d.ts +0 -3
- package/dist/src/plugin/speech/types/index.d.ts +0 -1
- package/dist/src/plugin/speech/types/speech.d.ts +0 -9
- package/dist/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/src/types/clipboard-utils.d.ts +0 -4
- package/dist/src/types/event-listener-util.d.ts +0 -11
- package/dist/src/types/platform.d.ts +0 -16
- package/dist/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/src/utils/create-env-observer.d.ts +0 -8
- package/dist/src/utils/dynamic-import.d.ts +0 -1
- package/dist/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/src/utils/get-tag-name.d.ts +0 -1
- package/dist/src/utils/require.d.ts +0 -1
package/dist/native.umd.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Native = factory());
|
|
5
5
|
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
|
-
var version = "1.1.
|
|
7
|
+
var version = "1.1.2";
|
|
8
8
|
var packageJSON = {
|
|
9
9
|
version: version};
|
|
10
10
|
|
|
@@ -201,383 +201,6 @@
|
|
|
201
201
|
[/firefox\/([\w.]+)/i, Browsers.Firefox],
|
|
202
202
|
];
|
|
203
203
|
|
|
204
|
-
var userAgent = USER_AGENT;
|
|
205
|
-
var Platform = {
|
|
206
|
-
get os() {
|
|
207
|
-
return getOS();
|
|
208
|
-
},
|
|
209
|
-
get engine() {
|
|
210
|
-
return getEngine();
|
|
211
|
-
},
|
|
212
|
-
get browser() {
|
|
213
|
-
return getBrowser();
|
|
214
|
-
},
|
|
215
|
-
get userAgent() {
|
|
216
|
-
return userAgent;
|
|
217
|
-
},
|
|
218
|
-
set userAgent(value) {
|
|
219
|
-
userAgent = value;
|
|
220
|
-
},
|
|
221
|
-
get locale() {
|
|
222
|
-
return getLocale();
|
|
223
|
-
},
|
|
224
|
-
get device() {
|
|
225
|
-
return getDevice();
|
|
226
|
-
},
|
|
227
|
-
get gpu() {
|
|
228
|
-
return getGPU();
|
|
229
|
-
},
|
|
230
|
-
get isWebview() {
|
|
231
|
-
return getIsWebview();
|
|
232
|
-
},
|
|
233
|
-
get isNode() {
|
|
234
|
-
return getIsNode();
|
|
235
|
-
},
|
|
236
|
-
get isStandalone() {
|
|
237
|
-
return getIsStandalone();
|
|
238
|
-
},
|
|
239
|
-
Constants: {
|
|
240
|
-
OS: OS,
|
|
241
|
-
Engines: Engines,
|
|
242
|
-
Browsers: Browsers,
|
|
243
|
-
Devices: Devices,
|
|
244
|
-
},
|
|
245
|
-
Errors: {},
|
|
246
|
-
};
|
|
247
|
-
var parsedFromHighEntropyValuesOS = {};
|
|
248
|
-
var parsedFromHighEntropyValuesBrowser = {};
|
|
249
|
-
var parsedFromHighEntropyValuesEngine = {};
|
|
250
|
-
var parsedFromHighEntropyValuesDevice = null;
|
|
251
|
-
var parsedFromNavigatorGPU = {};
|
|
252
|
-
function resolveVersion(string, resolver) {
|
|
253
|
-
if (typeof resolver === 'function')
|
|
254
|
-
return resolver(string);
|
|
255
|
-
if (typeof resolver === 'string')
|
|
256
|
-
return resolver;
|
|
257
|
-
if (typeof string === 'undefined')
|
|
258
|
-
return '';
|
|
259
|
-
return string;
|
|
260
|
-
}
|
|
261
|
-
function normalizeBrand(entry) {
|
|
262
|
-
if (entry === null || typeof entry === 'undefined')
|
|
263
|
-
return { brand: '', version: '' };
|
|
264
|
-
if (typeof entry === 'string')
|
|
265
|
-
return { brand: entry, version: '' };
|
|
266
|
-
return { brand: entry.brand, version: entry.version };
|
|
267
|
-
}
|
|
268
|
-
function normalizeLocale(locale) {
|
|
269
|
-
if (locale === null || typeof locale === 'undefined')
|
|
270
|
-
return locale;
|
|
271
|
-
if (locale.length === 0)
|
|
272
|
-
return null;
|
|
273
|
-
locale = locale.replace(/_/g, '-');
|
|
274
|
-
if (locale === 'C' || locale.toLowerCase() === 'posix')
|
|
275
|
-
return 'en-US';
|
|
276
|
-
if (locale.indexOf('.') !== -1)
|
|
277
|
-
return normalizeLocale(locale.split('.')[0]);
|
|
278
|
-
if (locale.indexOf('@') !== -1)
|
|
279
|
-
return normalizeLocale(locale.split('@')[0]);
|
|
280
|
-
var parts = locale.split('-');
|
|
281
|
-
if (parts.length === 0)
|
|
282
|
-
return null;
|
|
283
|
-
parts[0] = parts[0].toLowerCase();
|
|
284
|
-
if (parts.length > 1 && parts[1].length === 2)
|
|
285
|
-
parts[1] = parts[1].toUpperCase();
|
|
286
|
-
if (parts.length > 2 && parts[1].length === 4)
|
|
287
|
-
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
288
|
-
return parts.join('-');
|
|
289
|
-
}
|
|
290
|
-
function getWebGLRenderer() {
|
|
291
|
-
var canvas = globalThis.document.createElement('canvas');
|
|
292
|
-
if (typeof canvas.getContext !== 'function')
|
|
293
|
-
return '';
|
|
294
|
-
var context = (function () {
|
|
295
|
-
var ctx1 = canvas.getContext('webgl2');
|
|
296
|
-
if (ctx1 !== null)
|
|
297
|
-
return ctx1;
|
|
298
|
-
var ctx2 = canvas.getContext('experimental-webgl');
|
|
299
|
-
if (ctx2 !== null)
|
|
300
|
-
return ctx2;
|
|
301
|
-
var ctx3 = canvas.getContext('webgl');
|
|
302
|
-
if (ctx3 !== null)
|
|
303
|
-
return ctx3;
|
|
304
|
-
return null;
|
|
305
|
-
})();
|
|
306
|
-
if (context === null)
|
|
307
|
-
return '';
|
|
308
|
-
if (typeof context.getExtension !== 'undefined' && typeof context.getParameter !== 'undefined') {
|
|
309
|
-
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
310
|
-
if (extension === null)
|
|
311
|
-
return context.getParameter(context.RENDERER);
|
|
312
|
-
else
|
|
313
|
-
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
return '';
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
function getGPU() {
|
|
320
|
-
return {
|
|
321
|
-
architecture: parsedFromNavigatorGPU.architecture,
|
|
322
|
-
description: parsedFromNavigatorGPU.description,
|
|
323
|
-
device: parsedFromNavigatorGPU.device,
|
|
324
|
-
vendor: parsedFromNavigatorGPU.vendor,
|
|
325
|
-
webglRenderer: getWebGLRenderer(),
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
function getLocale() {
|
|
329
|
-
var locale = {
|
|
330
|
-
language: null,
|
|
331
|
-
languages: [],
|
|
332
|
-
timezone: null,
|
|
333
|
-
offset: 0,
|
|
334
|
-
isRTL: false,
|
|
335
|
-
};
|
|
336
|
-
var isRTL = null;
|
|
337
|
-
function addLanguages(language) {
|
|
338
|
-
for (var i = 0; i < language.length; i++)
|
|
339
|
-
addLanguage(language[i]);
|
|
340
|
-
}
|
|
341
|
-
function addLanguage(language) {
|
|
342
|
-
language = normalizeLocale(language);
|
|
343
|
-
if (typeof language === "string" && locale.languages.indexOf(language) === -1) {
|
|
344
|
-
if (locale.language === null)
|
|
345
|
-
locale.language = language;
|
|
346
|
-
locale.languages.push(language);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
if (typeof Intl !== 'undefined') {
|
|
350
|
-
try {
|
|
351
|
-
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
352
|
-
}
|
|
353
|
-
catch (_) {
|
|
354
|
-
}
|
|
355
|
-
try {
|
|
356
|
-
locale.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
357
|
-
}
|
|
358
|
-
catch (_) {
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
if (typeof globalThis.navigator !== 'undefined') {
|
|
362
|
-
if (typeof globalThis.navigator.languages !== 'undefined')
|
|
363
|
-
addLanguages(globalThis.navigator.languages);
|
|
364
|
-
if (typeof globalThis.navigator.language !== 'undefined')
|
|
365
|
-
addLanguage(globalThis.navigator.language);
|
|
366
|
-
if (typeof globalThis.navigator.userLanguage !== 'undefined')
|
|
367
|
-
addLanguage(globalThis.navigator.userLanguage);
|
|
368
|
-
if (typeof globalThis.navigator.browserLanguage !== 'undefined')
|
|
369
|
-
addLanguage(globalThis.navigator.browserLanguage);
|
|
370
|
-
if (typeof globalThis.navigator.systemLanguage !== 'undefined')
|
|
371
|
-
addLanguage(globalThis.navigator.systemLanguage);
|
|
372
|
-
}
|
|
373
|
-
try {
|
|
374
|
-
locale.offset = new Date().getTimezoneOffset() * -1;
|
|
375
|
-
}
|
|
376
|
-
catch (_) {
|
|
377
|
-
}
|
|
378
|
-
if (typeof locale.language === 'string') {
|
|
379
|
-
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
380
|
-
try {
|
|
381
|
-
var intlLocale = new Intl.Locale(locale.language);
|
|
382
|
-
if (typeof intlLocale.getTextInfo === 'function')
|
|
383
|
-
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
384
|
-
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
385
|
-
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
386
|
-
}
|
|
387
|
-
catch (_) {
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
if (typeof isRTL !== 'boolean') {
|
|
391
|
-
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
392
|
-
if (matched !== null) {
|
|
393
|
-
var language = matched[1].toLowerCase();
|
|
394
|
-
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
395
|
-
if (RTL_LANGUAGES[i] === language) {
|
|
396
|
-
isRTL = true;
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
if (typeof isRTL === 'boolean')
|
|
404
|
-
locale.isRTL = isRTL;
|
|
405
|
-
return locale;
|
|
406
|
-
}
|
|
407
|
-
function getOS() {
|
|
408
|
-
var result = { name: OS.Unknown, version: '' };
|
|
409
|
-
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
410
|
-
var map = OS_RESOLVER_MAP[i];
|
|
411
|
-
var regexp = map[0];
|
|
412
|
-
var os = map[1];
|
|
413
|
-
var resolver = map[2];
|
|
414
|
-
var matched = Platform.userAgent.match(regexp);
|
|
415
|
-
if (matched !== null) {
|
|
416
|
-
result.name = os;
|
|
417
|
-
result.version = resolveVersion(matched[1], resolver);
|
|
418
|
-
break;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
422
|
-
var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
|
|
423
|
-
if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
|
|
424
|
-
result.version = version[1];
|
|
425
|
-
}
|
|
426
|
-
if (Platform.userAgent === USER_AGENT) {
|
|
427
|
-
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
428
|
-
result.name = parsedFromHighEntropyValuesOS.name;
|
|
429
|
-
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
430
|
-
result.version = parsedFromHighEntropyValuesOS.version;
|
|
431
|
-
if (result.name === OS.MacOS && typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.maxTouchPoints > 2)
|
|
432
|
-
result.name = OS.iOS;
|
|
433
|
-
}
|
|
434
|
-
return result;
|
|
435
|
-
}
|
|
436
|
-
function getEngine() {
|
|
437
|
-
var result = { name: Engines.Unknown, version: '' };
|
|
438
|
-
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
439
|
-
var map = ENGINE_RESOLVER_MAP[i];
|
|
440
|
-
var regexp = map[0];
|
|
441
|
-
var engine = map[1];
|
|
442
|
-
var resolver = map[2];
|
|
443
|
-
var matched = Platform.userAgent.match(regexp);
|
|
444
|
-
if (matched !== null) {
|
|
445
|
-
result.name = engine;
|
|
446
|
-
result.version = resolveVersion(matched[1], resolver);
|
|
447
|
-
break;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
if (Platform.userAgent === USER_AGENT) {
|
|
451
|
-
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
452
|
-
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
453
|
-
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
454
|
-
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
455
|
-
}
|
|
456
|
-
return result;
|
|
457
|
-
}
|
|
458
|
-
function getBrowser() {
|
|
459
|
-
var result = { name: Browsers.Unknown, version: '' };
|
|
460
|
-
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
461
|
-
var map = BROWSER_RESOLVER_MAP[i];
|
|
462
|
-
var regexp = map[0];
|
|
463
|
-
var browser = map[1];
|
|
464
|
-
var resolver = map[2];
|
|
465
|
-
var matched = Platform.userAgent.match(regexp);
|
|
466
|
-
if (matched !== null) {
|
|
467
|
-
result.name = browser;
|
|
468
|
-
result.version = resolveVersion(matched[1], resolver);
|
|
469
|
-
break;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
if (Platform.userAgent === USER_AGENT) {
|
|
473
|
-
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
474
|
-
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
475
|
-
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
476
|
-
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
477
|
-
}
|
|
478
|
-
return result;
|
|
479
|
-
}
|
|
480
|
-
function getDevice() {
|
|
481
|
-
if (Platform.userAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
482
|
-
return parsedFromHighEntropyValuesDevice;
|
|
483
|
-
if (Platform.os.name === OS.iOS || Platform.os.name === OS.Android)
|
|
484
|
-
return Devices.Mobile;
|
|
485
|
-
if (Platform.os.name === OS.Windows || Platform.os.name === OS.MacOS)
|
|
486
|
-
return Devices.Desktop;
|
|
487
|
-
return Devices.Unknown;
|
|
488
|
-
}
|
|
489
|
-
function getIsWebview() {
|
|
490
|
-
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
491
|
-
}
|
|
492
|
-
function getIsNode() {
|
|
493
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
494
|
-
}
|
|
495
|
-
function getIsStandalone() {
|
|
496
|
-
if (Platform.os.name === OS.iOS)
|
|
497
|
-
return typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.standalone;
|
|
498
|
-
if (typeof globalThis.matchMedia === 'undefined')
|
|
499
|
-
return false;
|
|
500
|
-
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
501
|
-
}
|
|
502
|
-
function parseFromHighEntropyValues() {
|
|
503
|
-
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
504
|
-
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
505
|
-
.then(function (result) {
|
|
506
|
-
try {
|
|
507
|
-
var brands = result.fullVersionList || result.brands || [];
|
|
508
|
-
var platformVersion = result.platformVersion;
|
|
509
|
-
var platform = result.platform;
|
|
510
|
-
var browserName = Platform.browser.name;
|
|
511
|
-
var prevBrandName = null;
|
|
512
|
-
for (var i = 0; i < brands.length; i++) {
|
|
513
|
-
var brand = normalizeBrand(brands[i]);
|
|
514
|
-
var brandVersion = brand.version;
|
|
515
|
-
var brandName = brand.brand;
|
|
516
|
-
if (/not.a.brand/i.test(brandName))
|
|
517
|
-
continue;
|
|
518
|
-
if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
|
|
519
|
-
brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
|
|
520
|
-
prevBrandName = browserName;
|
|
521
|
-
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
522
|
-
browserName = brandName;
|
|
523
|
-
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
524
|
-
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
525
|
-
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
526
|
-
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
527
|
-
else if (browserName === 'Opera Mobi')
|
|
528
|
-
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
529
|
-
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
530
|
-
}
|
|
531
|
-
prevBrandName = brandName;
|
|
532
|
-
}
|
|
533
|
-
if (brandName === 'Chromium')
|
|
534
|
-
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
535
|
-
}
|
|
536
|
-
if (typeof platformVersion === 'string') {
|
|
537
|
-
if (Platform.os.name === OS.Windows) {
|
|
538
|
-
if (parseInt(platformVersion.split('.')[0], 10) >= 13)
|
|
539
|
-
parsedFromHighEntropyValuesOS.version = '11';
|
|
540
|
-
else
|
|
541
|
-
parsedFromHighEntropyValuesOS.version = '10';
|
|
542
|
-
}
|
|
543
|
-
else
|
|
544
|
-
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
545
|
-
}
|
|
546
|
-
if (typeof platform === 'string') {
|
|
547
|
-
if (/android/i.test(platform))
|
|
548
|
-
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
549
|
-
else if (/ios|iphone|ipad/i.test(platform))
|
|
550
|
-
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
551
|
-
else if (/windows|win32/i.test(platform))
|
|
552
|
-
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
553
|
-
else if (/macos|macintel/i.test(platform))
|
|
554
|
-
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
555
|
-
}
|
|
556
|
-
if (result.mobile === true)
|
|
557
|
-
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
558
|
-
}
|
|
559
|
-
catch (_) {
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
function parseFromNavigatorGPU() {
|
|
565
|
-
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.gpu !== 'undefined') {
|
|
566
|
-
globalThis.navigator.gpu.requestAdapter()
|
|
567
|
-
.then(function (adapter) {
|
|
568
|
-
if (adapter !== null) {
|
|
569
|
-
var info = adapter.info;
|
|
570
|
-
parsedFromNavigatorGPU.architecture = info.architecture;
|
|
571
|
-
parsedFromNavigatorGPU.description = info.description;
|
|
572
|
-
parsedFromNavigatorGPU.device = info.device;
|
|
573
|
-
parsedFromNavigatorGPU.vendor = info.vendor;
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
parseFromHighEntropyValues();
|
|
579
|
-
parseFromNavigatorGPU();
|
|
580
|
-
|
|
581
204
|
var IE_WRAPPER_STORE = [];
|
|
582
205
|
var MEDIA_QUERY_LIST_WRAPPER_STORE = [];
|
|
583
206
|
function isEventListenerCallback(callback) {
|
|
@@ -710,78 +333,472 @@
|
|
|
710
333
|
}
|
|
711
334
|
}
|
|
712
335
|
}
|
|
713
|
-
if (typeof target.addEventListener === 'function') {
|
|
336
|
+
if (typeof target.addEventListener === 'function') {
|
|
337
|
+
try {
|
|
338
|
+
if (isEventListenerCallback(callback)) {
|
|
339
|
+
return target.addEventListener(type, callback, options);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
catch (_) {
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (typeof target.attachEvent === 'function') {
|
|
346
|
+
var existing = findIEWrapper(target, type, callback);
|
|
347
|
+
if (typeof existing === 'function')
|
|
348
|
+
return;
|
|
349
|
+
var wrapper = function (event) {
|
|
350
|
+
if (typeof event === 'undefined')
|
|
351
|
+
event = globalThis.event;
|
|
352
|
+
if (typeof event === 'undefined')
|
|
353
|
+
return;
|
|
354
|
+
try {
|
|
355
|
+
Object.defineProperty(event, 'currentTarget', { value: target, configurable: true });
|
|
356
|
+
}
|
|
357
|
+
catch (_) {
|
|
358
|
+
}
|
|
359
|
+
if (typeof event.preventDefault !== 'function')
|
|
360
|
+
event.preventDefault = preventDefaultPolyfill.bind(event);
|
|
361
|
+
if (typeof event.stopPropagation !== 'function')
|
|
362
|
+
event.stopPropagation = stopPropagationPolyfill.bind(event);
|
|
363
|
+
if (typeof callback === 'function')
|
|
364
|
+
callback.call(target, event);
|
|
365
|
+
else if (callback && typeof callback.handleEvent === 'function')
|
|
366
|
+
callback.handleEvent(event);
|
|
367
|
+
};
|
|
368
|
+
setIEWrapper(target, type, callback, wrapper);
|
|
369
|
+
return target.attachEvent('on' + type, wrapper);
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
remove: function (target, eventListenerOptions) {
|
|
373
|
+
if (typeof eventListenerOptions.type === 'undefined')
|
|
374
|
+
return;
|
|
375
|
+
if (typeof target === 'undefined')
|
|
376
|
+
return;
|
|
377
|
+
var callback = eventListenerOptions.callback;
|
|
378
|
+
var type = withVendor(target, eventListenerOptions.type);
|
|
379
|
+
var options = eventListenerOptions.options;
|
|
380
|
+
if (isMediaQueryListTarget(target)) {
|
|
381
|
+
if (typeof target.removeListener === 'function') {
|
|
382
|
+
try {
|
|
383
|
+
var wrapper = removeMediaQueryListWrapper(target, type, callback);
|
|
384
|
+
if (typeof wrapper === 'function')
|
|
385
|
+
return target.removeListener(wrapper);
|
|
386
|
+
}
|
|
387
|
+
catch (_) {
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
if (typeof target.removeEventListener === 'function') {
|
|
393
|
+
try {
|
|
394
|
+
if (isEventListenerCallback(callback)) {
|
|
395
|
+
return target.removeEventListener(type, callback, options);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
catch (_) {
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
if (typeof target.detachEvent === 'function') {
|
|
402
|
+
var wrapper = removeIEWrapper(target, type, callback);
|
|
403
|
+
if (typeof wrapper === 'function')
|
|
404
|
+
target.detachEvent('on' + type, wrapper);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
var currentUserAgent = USER_AGENT;
|
|
411
|
+
var parsedCache = null;
|
|
412
|
+
var parsedFromHighEntropyValuesOS = {};
|
|
413
|
+
var parsedFromHighEntropyValuesBrowser = {};
|
|
414
|
+
var parsedFromHighEntropyValuesEngine = {};
|
|
415
|
+
var parsedFromHighEntropyValuesDevice = null;
|
|
416
|
+
var parsedFromNavigatorGPU = {};
|
|
417
|
+
var cachedLocale = null;
|
|
418
|
+
var ready;
|
|
419
|
+
function resolveVersion(string, resolver) {
|
|
420
|
+
if (typeof resolver === 'function')
|
|
421
|
+
return resolver(string);
|
|
422
|
+
if (typeof resolver === 'string')
|
|
423
|
+
return resolver;
|
|
424
|
+
if (typeof string === 'undefined')
|
|
425
|
+
return '';
|
|
426
|
+
return string;
|
|
427
|
+
}
|
|
428
|
+
function normalizeBrand(entry) {
|
|
429
|
+
if (entry === null || typeof entry === 'undefined')
|
|
430
|
+
return { brand: '', version: '' };
|
|
431
|
+
if (typeof entry === 'string')
|
|
432
|
+
return { brand: entry, version: '' };
|
|
433
|
+
return { brand: entry.brand, version: entry.version };
|
|
434
|
+
}
|
|
435
|
+
function normalizeLocale(locale) {
|
|
436
|
+
if (locale === null || typeof locale === 'undefined')
|
|
437
|
+
return locale;
|
|
438
|
+
if (locale.length === 0)
|
|
439
|
+
return null;
|
|
440
|
+
locale = locale.replace(/_/g, '-');
|
|
441
|
+
if (locale === 'C' || locale.toLowerCase() === 'posix')
|
|
442
|
+
return 'en-US';
|
|
443
|
+
if (locale.indexOf('.') !== -1)
|
|
444
|
+
return normalizeLocale(locale.split('.')[0]);
|
|
445
|
+
if (locale.indexOf('@') !== -1)
|
|
446
|
+
return normalizeLocale(locale.split('@')[0]);
|
|
447
|
+
var parts = locale.split('-');
|
|
448
|
+
if (parts.length === 0)
|
|
449
|
+
return null;
|
|
450
|
+
parts[0] = parts[0].toLowerCase();
|
|
451
|
+
if (parts.length > 1 && parts[1].length === 2)
|
|
452
|
+
parts[1] = parts[1].toUpperCase();
|
|
453
|
+
if (parts.length > 2 && parts[1].length === 4) {
|
|
454
|
+
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
455
|
+
}
|
|
456
|
+
return parts.join('-');
|
|
457
|
+
}
|
|
458
|
+
function invalidateCache() {
|
|
459
|
+
parsedCache = null;
|
|
460
|
+
cachedLocale = null;
|
|
461
|
+
parsedFromHighEntropyValuesOS = {};
|
|
462
|
+
parsedFromHighEntropyValuesBrowser = {};
|
|
463
|
+
parsedFromHighEntropyValuesEngine = {};
|
|
464
|
+
parsedFromHighEntropyValuesDevice = null;
|
|
465
|
+
parsedFromNavigatorGPU = {};
|
|
466
|
+
}
|
|
467
|
+
function getParsedCache() {
|
|
468
|
+
if (parsedCache !== null && parsedCache.userAgent === currentUserAgent)
|
|
469
|
+
return parsedCache;
|
|
470
|
+
parsedCache = {
|
|
471
|
+
userAgent: currentUserAgent,
|
|
472
|
+
os: parseOS(),
|
|
473
|
+
browser: parseBrowser(),
|
|
474
|
+
engine: parseEngine(),
|
|
475
|
+
};
|
|
476
|
+
return parsedCache;
|
|
477
|
+
}
|
|
478
|
+
function parseOS() {
|
|
479
|
+
var result = { name: OS.Unknown, version: '' };
|
|
480
|
+
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
481
|
+
var map = OS_RESOLVER_MAP[i];
|
|
482
|
+
var matched = currentUserAgent.match(map[0]);
|
|
483
|
+
if (matched !== null) {
|
|
484
|
+
result.name = map[1];
|
|
485
|
+
result.version = resolveVersion(matched[1], map[2]);
|
|
486
|
+
break;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
490
|
+
var version = /\) Version\/([\d.]+)/.exec(currentUserAgent);
|
|
491
|
+
if (version !== null) {
|
|
492
|
+
var major = parseInt(version[1].split('.')[0], 10);
|
|
493
|
+
if (major >= 26)
|
|
494
|
+
result.version = version[1];
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (currentUserAgent === USER_AGENT) {
|
|
498
|
+
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
499
|
+
result.name = parsedFromHighEntropyValuesOS.name;
|
|
500
|
+
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
501
|
+
result.version = parsedFromHighEntropyValuesOS.version;
|
|
502
|
+
if (result.name === OS.MacOS && typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.maxTouchPoints > 2)
|
|
503
|
+
result.name = OS.iOS;
|
|
504
|
+
}
|
|
505
|
+
return result;
|
|
506
|
+
}
|
|
507
|
+
function parseBrowser() {
|
|
508
|
+
var result = { name: Browsers.Unknown, version: '' };
|
|
509
|
+
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
510
|
+
var map = BROWSER_RESOLVER_MAP[i];
|
|
511
|
+
var matched = currentUserAgent.match(map[0]);
|
|
512
|
+
if (matched !== null) {
|
|
513
|
+
result.name = map[1];
|
|
514
|
+
result.version = resolveVersion(matched[1], map[2]);
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
if (currentUserAgent === USER_AGENT) {
|
|
519
|
+
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
520
|
+
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
521
|
+
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
522
|
+
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
523
|
+
}
|
|
524
|
+
return result;
|
|
525
|
+
}
|
|
526
|
+
function parseEngine() {
|
|
527
|
+
var result = { name: Engines.Unknown, version: '' };
|
|
528
|
+
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
529
|
+
var map = ENGINE_RESOLVER_MAP[i];
|
|
530
|
+
var matched = currentUserAgent.match(map[0]);
|
|
531
|
+
if (matched !== null) {
|
|
532
|
+
result.name = map[1];
|
|
533
|
+
result.version = resolveVersion(matched[1], map[2]);
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
if (currentUserAgent === USER_AGENT) {
|
|
538
|
+
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
539
|
+
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
540
|
+
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
541
|
+
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
542
|
+
}
|
|
543
|
+
return result;
|
|
544
|
+
}
|
|
545
|
+
function getGPU() {
|
|
546
|
+
return {
|
|
547
|
+
architecture: parsedFromNavigatorGPU.architecture,
|
|
548
|
+
description: parsedFromNavigatorGPU.description,
|
|
549
|
+
device: parsedFromNavigatorGPU.device,
|
|
550
|
+
vendor: parsedFromNavigatorGPU.vendor,
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
function getLocale() {
|
|
554
|
+
if (cachedLocale !== null)
|
|
555
|
+
return cachedLocale;
|
|
556
|
+
var locale = {
|
|
557
|
+
language: null,
|
|
558
|
+
languages: [],
|
|
559
|
+
timezone: null,
|
|
560
|
+
offset: 0,
|
|
561
|
+
isRTL: false,
|
|
562
|
+
};
|
|
563
|
+
var isRTL = null;
|
|
564
|
+
function addLanguages(language) {
|
|
565
|
+
for (var i = 0; i < language.length; i++)
|
|
566
|
+
addLanguage(language[i]);
|
|
567
|
+
}
|
|
568
|
+
function addLanguage(language) {
|
|
569
|
+
language = normalizeLocale(language);
|
|
570
|
+
if (typeof language === 'string' && locale.languages.indexOf(language) === -1) {
|
|
571
|
+
if (locale.language === null)
|
|
572
|
+
locale.language = language;
|
|
573
|
+
locale.languages.push(language);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
if (typeof Intl !== 'undefined') {
|
|
577
|
+
try {
|
|
578
|
+
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
579
|
+
}
|
|
580
|
+
catch (_) {
|
|
581
|
+
}
|
|
582
|
+
try {
|
|
583
|
+
locale.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
584
|
+
}
|
|
585
|
+
catch (_) {
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if (typeof globalThis.navigator !== 'undefined') {
|
|
589
|
+
if (typeof globalThis.navigator.languages !== 'undefined')
|
|
590
|
+
addLanguages(globalThis.navigator.languages);
|
|
591
|
+
if (typeof globalThis.navigator.language !== 'undefined')
|
|
592
|
+
addLanguage(globalThis.navigator.language);
|
|
593
|
+
if (typeof globalThis.navigator.userLanguage !== 'undefined')
|
|
594
|
+
addLanguage(globalThis.navigator.userLanguage);
|
|
595
|
+
if (typeof globalThis.navigator.browserLanguage !== 'undefined')
|
|
596
|
+
addLanguage(globalThis.navigator.browserLanguage);
|
|
597
|
+
if (typeof globalThis.navigator.systemLanguage !== 'undefined')
|
|
598
|
+
addLanguage(globalThis.navigator.systemLanguage);
|
|
599
|
+
}
|
|
600
|
+
try {
|
|
601
|
+
locale.offset = new Date().getTimezoneOffset() * -1;
|
|
602
|
+
}
|
|
603
|
+
catch (_) {
|
|
604
|
+
}
|
|
605
|
+
if (typeof locale.language === 'string') {
|
|
606
|
+
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
714
607
|
try {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
608
|
+
var intlLocale = new Intl.Locale(locale.language);
|
|
609
|
+
if (typeof intlLocale.getTextInfo === 'function')
|
|
610
|
+
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
611
|
+
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
612
|
+
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
718
613
|
}
|
|
719
614
|
catch (_) {
|
|
720
615
|
}
|
|
721
616
|
}
|
|
722
|
-
if (typeof
|
|
723
|
-
var
|
|
724
|
-
if (
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
try {
|
|
732
|
-
Object.defineProperty(event, 'currentTarget', { value: target, configurable: true });
|
|
733
|
-
}
|
|
734
|
-
catch (_) {
|
|
735
|
-
}
|
|
736
|
-
if (typeof event.preventDefault !== 'function')
|
|
737
|
-
event.preventDefault = preventDefaultPolyfill.bind(event);
|
|
738
|
-
if (typeof event.stopPropagation !== 'function')
|
|
739
|
-
event.stopPropagation = stopPropagationPolyfill.bind(event);
|
|
740
|
-
if (typeof callback === 'function')
|
|
741
|
-
callback.call(target, event);
|
|
742
|
-
else if (callback && typeof callback.handleEvent === 'function')
|
|
743
|
-
callback.handleEvent(event);
|
|
744
|
-
};
|
|
745
|
-
setIEWrapper(target, type, callback, wrapper);
|
|
746
|
-
return target.attachEvent('on' + type, wrapper);
|
|
747
|
-
}
|
|
748
|
-
},
|
|
749
|
-
remove: function (target, eventListenerOptions) {
|
|
750
|
-
if (typeof eventListenerOptions.type === 'undefined')
|
|
751
|
-
return;
|
|
752
|
-
if (typeof target === 'undefined')
|
|
753
|
-
return;
|
|
754
|
-
var callback = eventListenerOptions.callback;
|
|
755
|
-
var type = withVendor(target, eventListenerOptions.type);
|
|
756
|
-
var options = eventListenerOptions.options;
|
|
757
|
-
if (isMediaQueryListTarget(target)) {
|
|
758
|
-
if (typeof target.removeListener === 'function') {
|
|
759
|
-
try {
|
|
760
|
-
var wrapper = removeMediaQueryListWrapper(target, type, callback);
|
|
761
|
-
if (typeof wrapper === 'function')
|
|
762
|
-
return target.removeListener(wrapper);
|
|
763
|
-
}
|
|
764
|
-
catch (_) {
|
|
617
|
+
if (typeof isRTL !== 'boolean') {
|
|
618
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
619
|
+
if (matched !== null) {
|
|
620
|
+
var language = matched[1].toLowerCase();
|
|
621
|
+
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
622
|
+
if (RTL_LANGUAGES[i] === language) {
|
|
623
|
+
isRTL = true;
|
|
624
|
+
break;
|
|
625
|
+
}
|
|
765
626
|
}
|
|
766
627
|
}
|
|
767
|
-
return;
|
|
768
628
|
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
629
|
+
}
|
|
630
|
+
if (typeof isRTL === 'boolean')
|
|
631
|
+
locale.isRTL = isRTL;
|
|
632
|
+
cachedLocale = locale;
|
|
633
|
+
return cachedLocale;
|
|
634
|
+
}
|
|
635
|
+
function getDevice() {
|
|
636
|
+
if (currentUserAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
637
|
+
return parsedFromHighEntropyValuesDevice;
|
|
638
|
+
var osName = getParsedCache().os.name;
|
|
639
|
+
if (osName === OS.iOS || osName === OS.Android)
|
|
640
|
+
return Devices.Mobile;
|
|
641
|
+
if (osName === OS.Windows || osName === OS.MacOS)
|
|
642
|
+
return Devices.Desktop;
|
|
643
|
+
return Devices.Unknown;
|
|
644
|
+
}
|
|
645
|
+
function getIsWebview() {
|
|
646
|
+
return /; ?wv|applewebkit(?!.*safari)/i.test(currentUserAgent);
|
|
647
|
+
}
|
|
648
|
+
function getIsNode() {
|
|
649
|
+
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
650
|
+
}
|
|
651
|
+
function getIsStandalone() {
|
|
652
|
+
var osName = getParsedCache().os.name;
|
|
653
|
+
if (osName === OS.iOS)
|
|
654
|
+
return globalThis.navigator.standalone === true;
|
|
655
|
+
if (typeof globalThis.matchMedia === 'undefined')
|
|
656
|
+
return false;
|
|
657
|
+
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
658
|
+
}
|
|
659
|
+
function parseFromHighEntropyValues() {
|
|
660
|
+
if (typeof globalThis.navigator === 'undefined' || typeof globalThis.navigator.userAgentData === 'undefined' || typeof globalThis.navigator.userAgentData.getHighEntropyValues === 'undefined')
|
|
661
|
+
return Promise.resolve();
|
|
662
|
+
return globalThis.navigator.userAgentData
|
|
663
|
+
.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
664
|
+
.then(function (result) {
|
|
665
|
+
try {
|
|
666
|
+
var brands = result.fullVersionList || result.brands || [];
|
|
667
|
+
var platformVersion = result.platformVersion;
|
|
668
|
+
var platform = result.platform;
|
|
669
|
+
var browserName = getParsedCache().browser.name;
|
|
670
|
+
var prevBrandName = null;
|
|
671
|
+
for (var i = 0; i < brands.length; i++) {
|
|
672
|
+
var brand = normalizeBrand(brands[i]);
|
|
673
|
+
var brandVersion = brand.version;
|
|
674
|
+
var brandName = brand.brand;
|
|
675
|
+
if (/not.a.brand/i.test(brandName))
|
|
676
|
+
continue;
|
|
677
|
+
if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
|
|
678
|
+
brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
|
|
679
|
+
prevBrandName = browserName;
|
|
680
|
+
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
681
|
+
browserName = brandName;
|
|
682
|
+
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
683
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
684
|
+
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
685
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
686
|
+
else if (browserName === 'Opera Mobi')
|
|
687
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
688
|
+
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
689
|
+
}
|
|
690
|
+
prevBrandName = brandName;
|
|
773
691
|
}
|
|
692
|
+
if (brandName === 'Chromium')
|
|
693
|
+
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
774
694
|
}
|
|
775
|
-
|
|
695
|
+
if (typeof platformVersion === 'string') {
|
|
696
|
+
if (getParsedCache().os.name === OS.Windows)
|
|
697
|
+
parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
698
|
+
else
|
|
699
|
+
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
700
|
+
}
|
|
701
|
+
if (typeof platform === 'string') {
|
|
702
|
+
if (/android/i.test(platform))
|
|
703
|
+
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
704
|
+
else if (/ios|iphone|ipad/i.test(platform))
|
|
705
|
+
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
706
|
+
else if (/windows|win32/i.test(platform))
|
|
707
|
+
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
708
|
+
else if (/macos|macintel/i.test(platform))
|
|
709
|
+
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
776
710
|
}
|
|
711
|
+
if (result.mobile === true)
|
|
712
|
+
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
713
|
+
parsedCache = null;
|
|
777
714
|
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
715
|
+
catch (_) {
|
|
716
|
+
}
|
|
717
|
+
})
|
|
718
|
+
.catch(function () {
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
function parseFromNavigatorGPU() {
|
|
722
|
+
if (typeof globalThis.navigator === 'undefined' || typeof globalThis.navigator.gpu === 'undefined')
|
|
723
|
+
return Promise.resolve();
|
|
724
|
+
return globalThis.navigator.gpu
|
|
725
|
+
.requestAdapter()
|
|
726
|
+
.then(function (adapter) {
|
|
727
|
+
if (adapter !== null) {
|
|
728
|
+
var info = adapter.info;
|
|
729
|
+
parsedFromNavigatorGPU.architecture = info.architecture;
|
|
730
|
+
parsedFromNavigatorGPU.description = info.description;
|
|
731
|
+
parsedFromNavigatorGPU.device = info.device;
|
|
732
|
+
parsedFromNavigatorGPU.vendor = info.vendor;
|
|
733
|
+
}
|
|
734
|
+
})
|
|
735
|
+
.catch(function () {
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
ready = Promise.all([
|
|
739
|
+
parseFromHighEntropyValues(),
|
|
740
|
+
parseFromNavigatorGPU(),
|
|
741
|
+
]).then(function () {
|
|
742
|
+
});
|
|
743
|
+
EventListener.add(globalThis, {
|
|
744
|
+
type: 'languagechange', callback: function () {
|
|
745
|
+
cachedLocale = null;
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
var Platform = {
|
|
749
|
+
get ready() {
|
|
750
|
+
return ready;
|
|
751
|
+
},
|
|
752
|
+
get os() {
|
|
753
|
+
return getParsedCache().os;
|
|
754
|
+
},
|
|
755
|
+
get engine() {
|
|
756
|
+
return getParsedCache().engine;
|
|
757
|
+
},
|
|
758
|
+
get browser() {
|
|
759
|
+
return getParsedCache().browser;
|
|
760
|
+
},
|
|
761
|
+
get userAgent() {
|
|
762
|
+
return currentUserAgent;
|
|
763
|
+
},
|
|
764
|
+
set userAgent(value) {
|
|
765
|
+
if (currentUserAgent === value)
|
|
782
766
|
return;
|
|
767
|
+
currentUserAgent = value;
|
|
768
|
+
invalidateCache();
|
|
769
|
+
if (value === USER_AGENT) {
|
|
770
|
+
ready = Promise.all([
|
|
771
|
+
parseFromHighEntropyValues(),
|
|
772
|
+
parseFromNavigatorGPU(),
|
|
773
|
+
]).then(function () {
|
|
774
|
+
});
|
|
783
775
|
}
|
|
784
776
|
},
|
|
777
|
+
get locale() {
|
|
778
|
+
return getLocale();
|
|
779
|
+
},
|
|
780
|
+
get device() {
|
|
781
|
+
return getDevice();
|
|
782
|
+
},
|
|
783
|
+
get gpu() {
|
|
784
|
+
return getGPU();
|
|
785
|
+
},
|
|
786
|
+
get isWebview() {
|
|
787
|
+
return getIsWebview();
|
|
788
|
+
},
|
|
789
|
+
get isNode() {
|
|
790
|
+
return getIsNode();
|
|
791
|
+
},
|
|
792
|
+
get isStandalone() {
|
|
793
|
+
return getIsStandalone();
|
|
794
|
+
},
|
|
795
|
+
Constants: {
|
|
796
|
+
OS: OS,
|
|
797
|
+
Engines: Engines,
|
|
798
|
+
Browsers: Browsers,
|
|
799
|
+
Devices: Devices,
|
|
800
|
+
},
|
|
801
|
+
Errors: {},
|
|
785
802
|
};
|
|
786
803
|
|
|
787
804
|
function createSubscriptionManager(attach, detach) {
|
|
@@ -842,14 +859,14 @@
|
|
|
842
859
|
};
|
|
843
860
|
}
|
|
844
861
|
|
|
845
|
-
var onChangeSubscriptionManager$
|
|
862
|
+
var onChangeSubscriptionManager$3 = createSubscriptionManager(attachOnChange$3, detachOnChange$3);
|
|
846
863
|
var appearanceRef = null;
|
|
847
864
|
var pollingIntervalId = null;
|
|
848
865
|
var Appearance = {
|
|
849
866
|
get value() {
|
|
850
867
|
return getAppearance();
|
|
851
868
|
},
|
|
852
|
-
onChange: onChangeSubscriptionManager$
|
|
869
|
+
onChange: onChangeSubscriptionManager$3.subscribe,
|
|
853
870
|
Constants: {
|
|
854
871
|
Appearances: Appearances
|
|
855
872
|
},
|
|
@@ -885,7 +902,7 @@
|
|
|
885
902
|
var appearance = getAppearanceFromEngine();
|
|
886
903
|
if (appearance !== appearanceRef) {
|
|
887
904
|
appearanceRef = appearance;
|
|
888
|
-
onChangeSubscriptionManager$
|
|
905
|
+
onChangeSubscriptionManager$3.emit(appearance);
|
|
889
906
|
}
|
|
890
907
|
}, 2000);
|
|
891
908
|
}
|
|
@@ -896,13 +913,13 @@
|
|
|
896
913
|
pollingIntervalId = null;
|
|
897
914
|
}
|
|
898
915
|
}
|
|
899
|
-
function attachOnChange$
|
|
916
|
+
function attachOnChange$3() {
|
|
900
917
|
appearanceRef = getAppearanceFromMediaQuery();
|
|
901
918
|
EventListener.add(MEDIA_QUERY_LIST$1, { type: 'change', callback: onMediaChange });
|
|
902
919
|
if (Platform.browser.name === Browsers.SamsungInternet)
|
|
903
920
|
startPolling();
|
|
904
921
|
}
|
|
905
|
-
function detachOnChange$
|
|
922
|
+
function detachOnChange$3() {
|
|
906
923
|
appearanceRef = null;
|
|
907
924
|
EventListener.remove(MEDIA_QUERY_LIST$1, { type: 'change', callback: onMediaChange });
|
|
908
925
|
if (Platform.browser.name === Browsers.SamsungInternet)
|
|
@@ -915,7 +932,7 @@
|
|
|
915
932
|
else
|
|
916
933
|
appearance = Appearances.Light;
|
|
917
934
|
if (appearance !== appearanceRef)
|
|
918
|
-
onChangeSubscriptionManager$
|
|
935
|
+
onChangeSubscriptionManager$3.emit(appearanceRef = appearance);
|
|
919
936
|
}
|
|
920
937
|
|
|
921
938
|
function isSecureContext() {
|
|
@@ -1651,14 +1668,14 @@
|
|
|
1651
1668
|
var keyboardInsetObserver = createEnvObserver('keyboard-inset');
|
|
1652
1669
|
var titlebarAreaObserver = createEnvObserver('titlebar-area');
|
|
1653
1670
|
var viewportSegmentObserver = createEnvObserver('viewport-segment');
|
|
1654
|
-
var onChangeSubscriptionManager$
|
|
1671
|
+
var onChangeSubscriptionManager$2 = createSubscriptionManager(attachOnChange$2, detachOnChange$2);
|
|
1655
1672
|
var dimensionRef = null;
|
|
1656
1673
|
var Dimension = {
|
|
1657
1674
|
get value() {
|
|
1658
1675
|
return getDimension();
|
|
1659
1676
|
},
|
|
1660
1677
|
environment: getEnvironment(),
|
|
1661
|
-
onChange: onChangeSubscriptionManager$
|
|
1678
|
+
onChange: onChangeSubscriptionManager$2.subscribe,
|
|
1662
1679
|
Constants: {
|
|
1663
1680
|
Orientation: Orientation,
|
|
1664
1681
|
},
|
|
@@ -1744,7 +1761,7 @@
|
|
|
1744
1761
|
}
|
|
1745
1762
|
return FALLBACK_DIMENSION;
|
|
1746
1763
|
}
|
|
1747
|
-
function attachOnChange$
|
|
1764
|
+
function attachOnChange$2() {
|
|
1748
1765
|
dimensionRef = getDimension();
|
|
1749
1766
|
EventListener.add(globalThis, { type: 'resize', callback: onResize });
|
|
1750
1767
|
if (typeof globalThis.screen.orientation.addEventListener === 'function')
|
|
@@ -1754,7 +1771,7 @@
|
|
|
1754
1771
|
else if (MEDIA_QUERY_LIST.media !== 'not all')
|
|
1755
1772
|
EventListener.add(MEDIA_QUERY_LIST, { type: 'change', callback: onResize });
|
|
1756
1773
|
}
|
|
1757
|
-
function detachOnChange$
|
|
1774
|
+
function detachOnChange$2() {
|
|
1758
1775
|
dimensionRef = null;
|
|
1759
1776
|
EventListener.remove(globalThis, { type: 'resize', callback: onResize });
|
|
1760
1777
|
if (typeof globalThis.screen.orientation.removeEventListener === 'function')
|
|
@@ -1767,7 +1784,7 @@
|
|
|
1767
1784
|
function onResize() {
|
|
1768
1785
|
var dimension = getDimension();
|
|
1769
1786
|
if (dimensionRef === null || dimension.innerWidth !== dimensionRef.innerWidth || dimension.innerHeight !== dimensionRef.innerHeight || dimension.outerWidth !== dimensionRef.outerWidth || dimension.outerHeight !== dimensionRef.outerHeight || dimension.scale !== dimensionRef.scale || dimension.orientation !== dimensionRef.orientation)
|
|
1770
|
-
onChangeSubscriptionManager$
|
|
1787
|
+
onChangeSubscriptionManager$2.emit(dimensionRef = dimension);
|
|
1771
1788
|
}
|
|
1772
1789
|
|
|
1773
1790
|
function createCustomError(name, Base) {
|
|
@@ -1854,13 +1871,7 @@
|
|
|
1854
1871
|
|
|
1855
1872
|
var NotSupportedError = createCustomError('NotSupportedError');
|
|
1856
1873
|
|
|
1857
|
-
var
|
|
1858
|
-
var eventsBridged$1 = false;
|
|
1859
|
-
var activeOperation$1 = null;
|
|
1860
|
-
var pendingOperation$1 = null;
|
|
1861
|
-
var pendingTarget$1 = undefined;
|
|
1862
|
-
var pendingOptions = undefined;
|
|
1863
|
-
var expectedIsFullscreen = false;
|
|
1874
|
+
var FS_BRIDGED_KEY = Symbol('fsBridged');
|
|
1864
1875
|
var API_VARIANTS = {
|
|
1865
1876
|
standard: {
|
|
1866
1877
|
enabled: 'fullscreenEnabled',
|
|
@@ -1892,28 +1903,6 @@
|
|
|
1892
1903
|
},
|
|
1893
1904
|
};
|
|
1894
1905
|
var api = detectApi();
|
|
1895
|
-
var onChangeSubscriptionManager$3 = createSubscriptionManager(attachOnChange$3, detachOnChange$3);
|
|
1896
|
-
var onErrorSubscriptionManager$1 = createSubscriptionManager(attachOnError$1, detachOnError$1);
|
|
1897
|
-
var Fullscreen = {
|
|
1898
|
-
get supported() {
|
|
1899
|
-
return getEnabled$1();
|
|
1900
|
-
},
|
|
1901
|
-
get element() {
|
|
1902
|
-
return getElement$1();
|
|
1903
|
-
},
|
|
1904
|
-
get isFullscreen() {
|
|
1905
|
-
return getIsFullscreen();
|
|
1906
|
-
},
|
|
1907
|
-
request: request$3,
|
|
1908
|
-
exit: exit$1,
|
|
1909
|
-
toggle: toggle$1,
|
|
1910
|
-
onChange: onChangeSubscriptionManager$3.subscribe,
|
|
1911
|
-
onError: onErrorSubscriptionManager$1.subscribe,
|
|
1912
|
-
Constants: {},
|
|
1913
|
-
Errors: {
|
|
1914
|
-
NotSupportedError: NotSupportedError,
|
|
1915
|
-
},
|
|
1916
|
-
};
|
|
1917
1906
|
function detectApi() {
|
|
1918
1907
|
var element = globalThis.document.documentElement;
|
|
1919
1908
|
if (typeof globalThis.document.fullscreenEnabled !== 'undefined' || typeof globalThis.document.exitFullscreen !== 'undefined')
|
|
@@ -1930,232 +1919,287 @@
|
|
|
1930
1919
|
}
|
|
1931
1920
|
return null;
|
|
1932
1921
|
}
|
|
1933
|
-
function
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1922
|
+
function createFullscreen() {
|
|
1923
|
+
var lastIOSVideo = null;
|
|
1924
|
+
var eventsBridged = false;
|
|
1925
|
+
var activeOperation = null;
|
|
1926
|
+
var pendingQueue = [];
|
|
1927
|
+
var lastIntendedOperation = 'exit';
|
|
1928
|
+
var onChangeSubscriptionManager = createSubscriptionManager(attachOnChange, detachOnChange);
|
|
1929
|
+
var onErrorSubscriptionManager = createSubscriptionManager(attachOnError, detachOnError);
|
|
1930
|
+
function getDefaultTarget() {
|
|
1931
|
+
if (Platform.os.name === OS.iOS) {
|
|
1932
|
+
var video = globalThis.document.querySelector('video');
|
|
1933
|
+
if (video === null)
|
|
1934
|
+
return undefined;
|
|
1935
|
+
return video;
|
|
1936
|
+
}
|
|
1937
|
+
return globalThis.document.documentElement;
|
|
1939
1938
|
}
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1939
|
+
function bridgeEvents() {
|
|
1940
|
+
if (eventsBridged)
|
|
1941
|
+
return;
|
|
1942
|
+
eventsBridged = true;
|
|
1943
|
+
if (Platform.os.name === OS.iOS) {
|
|
1944
|
+
bridgeIOSVideoEvents();
|
|
1945
|
+
if (typeof globalThis.MutationObserver !== 'undefined') {
|
|
1946
|
+
var observer = new MutationObserver(function () {
|
|
1947
|
+
bridgeIOSVideoEvents();
|
|
1948
|
+
});
|
|
1949
|
+
observer.observe(globalThis.document.documentElement, {
|
|
1950
|
+
childList: true,
|
|
1951
|
+
subtree: true,
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1953
1954
|
}
|
|
1954
1955
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
if (typeof globalThis.document === 'undefined')
|
|
1958
|
-
return;
|
|
1959
|
-
var videos = globalThis.document.querySelectorAll('video');
|
|
1960
|
-
videos.forEach(function (video) {
|
|
1961
|
-
if (video.__fsBridged__ || !(typeof video.webkitEnterFullscreen !== 'undefined' || typeof video.onwebkitbeginfullscreen !== 'undefined'))
|
|
1956
|
+
function bridgeIOSVideoEvents() {
|
|
1957
|
+
if (typeof globalThis.document === 'undefined')
|
|
1962
1958
|
return;
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1959
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
1960
|
+
videos.forEach(function (video) {
|
|
1961
|
+
if (video[FS_BRIDGED_KEY] === true || !(typeof video.webkitEnterFullscreen !== 'undefined' || typeof video.onwebkitbeginfullscreen !== 'undefined'))
|
|
1962
|
+
return;
|
|
1963
|
+
EventListener.add(video, {
|
|
1964
|
+
type: 'webkitbeginfullscreen',
|
|
1965
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1966
|
+
options: false,
|
|
1967
|
+
});
|
|
1968
|
+
EventListener.add(video, {
|
|
1969
|
+
type: 'webkitendfullscreen',
|
|
1970
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1971
|
+
options: false,
|
|
1972
|
+
});
|
|
1973
|
+
video[FS_BRIDGED_KEY] = true;
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
function attachOnChange() {
|
|
1977
|
+
var events = ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
|
|
1978
|
+
for (var i = 0; i < events.length; i++) {
|
|
1979
|
+
EventListener.add(globalThis.document, {
|
|
1980
|
+
type: events[i],
|
|
1981
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1982
|
+
options: false,
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
function detachOnChange() {
|
|
1987
|
+
var events = ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
|
|
1988
|
+
for (var i = 0; i < events.length; i++) {
|
|
1989
|
+
EventListener.remove(globalThis.document, {
|
|
1990
|
+
type: events[i],
|
|
1991
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1992
|
+
options: false,
|
|
1993
|
+
});
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
function attachOnError() {
|
|
1997
|
+
var events = ['fullscreenerror', 'webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
|
|
1998
|
+
for (var i = 0; i < events.length; i++) {
|
|
1999
|
+
EventListener.add(globalThis.document, {
|
|
2000
|
+
type: events[i],
|
|
2001
|
+
callback: onErrorSubscriptionManager.emit,
|
|
2002
|
+
options: false,
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
function detachOnError() {
|
|
2007
|
+
var events = ['fullscreenerror', 'webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
|
|
2008
|
+
for (var i = 0; i < events.length; i++) {
|
|
2009
|
+
EventListener.remove(globalThis.document, {
|
|
2010
|
+
type: events[i],
|
|
2011
|
+
callback: onErrorSubscriptionManager.emit,
|
|
2012
|
+
options: false,
|
|
2013
|
+
});
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
function getEnabled() {
|
|
2017
|
+
if (api === null)
|
|
2018
|
+
return (Platform.os.name === OS.iOS && globalThis.HTMLVideoElement.prototype.webkitSupportsFullscreen === true);
|
|
2019
|
+
return globalThis.document[api.enabled] === true;
|
|
2020
|
+
}
|
|
2021
|
+
function getElement() {
|
|
2022
|
+
if (api === null) {
|
|
2023
|
+
if (lastIOSVideo !== null && lastIOSVideo.webkitDisplayingFullscreen === true)
|
|
2024
|
+
return lastIOSVideo;
|
|
2025
|
+
return null;
|
|
2026
|
+
}
|
|
2027
|
+
var currentElement = globalThis.document[api.element];
|
|
2028
|
+
if (typeof currentElement !== 'undefined')
|
|
2029
|
+
return currentElement;
|
|
1997
2030
|
return null;
|
|
1998
2031
|
}
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2032
|
+
function getIsFullscreen() {
|
|
2033
|
+
return getElement() !== null;
|
|
2034
|
+
}
|
|
2035
|
+
function drainPendingOperation() {
|
|
2036
|
+
var entry = pendingQueue.shift();
|
|
2037
|
+
if (typeof entry === 'undefined') {
|
|
2038
|
+
activeOperation = null;
|
|
2039
|
+
return;
|
|
2040
|
+
}
|
|
2041
|
+
var next;
|
|
2042
|
+
if (entry.operation === 'request')
|
|
2043
|
+
next = requestImmediately(entry.target, entry.options);
|
|
2044
|
+
else
|
|
2045
|
+
next = exitImmediately();
|
|
2046
|
+
activeOperation = next
|
|
2047
|
+
.then(function () {
|
|
2048
|
+
entry.resolve();
|
|
2049
|
+
drainPendingOperation();
|
|
2050
|
+
})
|
|
2051
|
+
.catch(function (error) {
|
|
2052
|
+
entry.reject(error);
|
|
2053
|
+
drainPendingOperation();
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
function request(target, options) {
|
|
2057
|
+
lastIntendedOperation = 'request';
|
|
2058
|
+
if (activeOperation === null) {
|
|
2059
|
+
var next = requestImmediately(target, options);
|
|
2060
|
+
activeOperation = next
|
|
2061
|
+
.then(drainPendingOperation)
|
|
2062
|
+
.catch(drainPendingOperation);
|
|
2063
|
+
return next;
|
|
2064
|
+
}
|
|
2065
|
+
return new Promise(function (resolve, reject) {
|
|
2066
|
+
pendingQueue.push({
|
|
2067
|
+
operation: 'request',
|
|
2068
|
+
target: target,
|
|
2069
|
+
options: options,
|
|
2070
|
+
resolve: resolve,
|
|
2071
|
+
reject: reject,
|
|
2072
|
+
});
|
|
2015
2073
|
});
|
|
2016
|
-
return;
|
|
2017
2074
|
}
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
next = requestImmediately$1(target, options);
|
|
2027
|
-
else
|
|
2028
|
-
next = exitImmediately$1();
|
|
2029
|
-
activeOperation$1 = next
|
|
2030
|
-
.then(drainPendingOperation$1)
|
|
2031
|
-
.catch(drainPendingOperation$1);
|
|
2032
|
-
}
|
|
2033
|
-
function request$3(target, options) {
|
|
2034
|
-
expectedIsFullscreen = true;
|
|
2035
|
-
if (activeOperation$1 === null) {
|
|
2036
|
-
var next = requestImmediately$1(target, options);
|
|
2037
|
-
activeOperation$1 = next
|
|
2038
|
-
.then(drainPendingOperation$1)
|
|
2039
|
-
.catch(drainPendingOperation$1);
|
|
2040
|
-
return next;
|
|
2041
|
-
}
|
|
2042
|
-
pendingOperation$1 = 'request';
|
|
2043
|
-
pendingTarget$1 = target;
|
|
2044
|
-
pendingOptions = options;
|
|
2045
|
-
return activeOperation$1.then(function () {
|
|
2046
|
-
return Promise.resolve();
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
function exit$1() {
|
|
2050
|
-
expectedIsFullscreen = false;
|
|
2051
|
-
if (activeOperation$1 === null) {
|
|
2052
|
-
var next = exitImmediately$1();
|
|
2053
|
-
activeOperation$1 = next
|
|
2054
|
-
.then(drainPendingOperation$1)
|
|
2055
|
-
.catch(drainPendingOperation$1);
|
|
2056
|
-
return next;
|
|
2057
|
-
}
|
|
2058
|
-
pendingOperation$1 = 'exit';
|
|
2059
|
-
pendingTarget$1 = undefined;
|
|
2060
|
-
pendingOptions = undefined;
|
|
2061
|
-
return activeOperation$1.then(function () {
|
|
2062
|
-
return Promise.resolve();
|
|
2063
|
-
});
|
|
2064
|
-
}
|
|
2065
|
-
function requestImmediately$1(target, options) {
|
|
2066
|
-
return new Promise(function (resolve, reject) {
|
|
2067
|
-
if (typeof target === 'undefined')
|
|
2068
|
-
target = getDefaultTarget$1();
|
|
2069
|
-
if (typeof target === 'undefined')
|
|
2070
|
-
return reject(new NotSupportedError('Failed to enter fullscreen mode.'));
|
|
2071
|
-
var tagName = target.tagName.toLowerCase();
|
|
2072
|
-
if (api !== null) {
|
|
2073
|
-
var method = target[api.request];
|
|
2074
|
-
if (typeof method === 'function') {
|
|
2075
|
-
var result = method.call(target, options);
|
|
2076
|
-
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
2077
|
-
result
|
|
2078
|
-
.then(resolve)
|
|
2079
|
-
.catch(function () {
|
|
2080
|
-
if (Platform.os.name !== OS.iOS)
|
|
2081
|
-
return reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
2082
|
-
fallbackToIOSVideo();
|
|
2083
|
-
});
|
|
2084
|
-
return;
|
|
2085
|
-
}
|
|
2086
|
-
else {
|
|
2087
|
-
return resolve();
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2075
|
+
function exit() {
|
|
2076
|
+
lastIntendedOperation = 'exit';
|
|
2077
|
+
if (activeOperation === null) {
|
|
2078
|
+
var next = exitImmediately();
|
|
2079
|
+
activeOperation = next
|
|
2080
|
+
.then(drainPendingOperation)
|
|
2081
|
+
.catch(drainPendingOperation);
|
|
2082
|
+
return next;
|
|
2090
2083
|
}
|
|
2091
|
-
function
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2084
|
+
return new Promise(function (resolve, reject) {
|
|
2085
|
+
pendingQueue.push({
|
|
2086
|
+
operation: 'exit',
|
|
2087
|
+
target: undefined,
|
|
2088
|
+
options: undefined,
|
|
2089
|
+
resolve: resolve,
|
|
2090
|
+
reject: reject,
|
|
2091
|
+
});
|
|
2092
|
+
});
|
|
2093
|
+
}
|
|
2094
|
+
function requestImmediately(target, options) {
|
|
2095
|
+
return new Promise(function (resolve, reject) {
|
|
2096
|
+
if (typeof target === 'undefined')
|
|
2097
|
+
target = getDefaultTarget();
|
|
2098
|
+
if (typeof target === 'undefined')
|
|
2099
|
+
return reject(new NotSupportedError('Failed to enter fullscreen mode.'));
|
|
2100
|
+
var tagName = target.tagName.toLowerCase();
|
|
2101
|
+
function fallbackToIOSVideo() {
|
|
2102
|
+
if (Platform.os.name === OS.iOS && typeof target !== 'undefined' && target.tagName.toUpperCase() === 'VIDEO') {
|
|
2103
|
+
var video = target;
|
|
2104
|
+
if (video.webkitSupportsFullscreen === true && typeof video.webkitEnterFullscreen === 'function') {
|
|
2105
|
+
lastIOSVideo = video;
|
|
2106
|
+
bridgeIOSVideoEvents();
|
|
2107
|
+
video.webkitEnterFullscreen();
|
|
2108
|
+
return resolve();
|
|
2109
|
+
}
|
|
2099
2110
|
}
|
|
2111
|
+
reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
2100
2112
|
}
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
.catch(function () {
|
|
2116
|
-
if (Platform.os.name !== OS.iOS)
|
|
2117
|
-
return reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
2118
|
-
fallbackToIOSVideo();
|
|
2119
|
-
});
|
|
2120
|
-
return;
|
|
2121
|
-
}
|
|
2122
|
-
else {
|
|
2113
|
+
if (api !== null) {
|
|
2114
|
+
var method = target[api.request];
|
|
2115
|
+
if (typeof method === 'function') {
|
|
2116
|
+
var result = method.call(target, options);
|
|
2117
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
2118
|
+
result
|
|
2119
|
+
.then(resolve)
|
|
2120
|
+
.catch(function () {
|
|
2121
|
+
if (Platform.os.name !== OS.iOS)
|
|
2122
|
+
return reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
2123
|
+
fallbackToIOSVideo();
|
|
2124
|
+
});
|
|
2125
|
+
return;
|
|
2126
|
+
}
|
|
2123
2127
|
return resolve();
|
|
2124
2128
|
}
|
|
2125
2129
|
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2130
|
+
fallbackToIOSVideo();
|
|
2131
|
+
});
|
|
2132
|
+
}
|
|
2133
|
+
function exitImmediately() {
|
|
2134
|
+
return new Promise(function (resolve, reject) {
|
|
2135
|
+
if (getElement() === null && lastIOSVideo === null)
|
|
2136
|
+
return resolve();
|
|
2137
|
+
function fallbackToIOSVideo() {
|
|
2138
|
+
if (Platform.os.name === OS.iOS) {
|
|
2139
|
+
var candidates = void 0;
|
|
2140
|
+
if (lastIOSVideo !== null)
|
|
2141
|
+
candidates = [lastIOSVideo];
|
|
2142
|
+
else
|
|
2143
|
+
candidates = globalThis.document.querySelectorAll('video');
|
|
2144
|
+
for (var i = 0; i < candidates.length; i++) {
|
|
2145
|
+
var video = candidates[i];
|
|
2146
|
+
if (typeof video.webkitExitFullscreen === 'function' && video.webkitDisplayingFullscreen === true) {
|
|
2147
|
+
video.webkitExitFullscreen();
|
|
2148
|
+
lastIOSVideo = null;
|
|
2149
|
+
return resolve();
|
|
2150
|
+
}
|
|
2134
2151
|
}
|
|
2135
2152
|
}
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2153
|
+
reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
2154
|
+
}
|
|
2155
|
+
if (api !== null) {
|
|
2156
|
+
var method = globalThis.document[api.exit];
|
|
2157
|
+
if (typeof method === 'function') {
|
|
2158
|
+
var result = method.call(globalThis.document);
|
|
2159
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
2160
|
+
result
|
|
2161
|
+
.then(resolve)
|
|
2162
|
+
.catch(function () {
|
|
2163
|
+
if (Platform.os.name !== OS.iOS)
|
|
2164
|
+
return reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
2165
|
+
fallbackToIOSVideo();
|
|
2166
|
+
});
|
|
2167
|
+
return;
|
|
2143
2168
|
}
|
|
2169
|
+
return resolve();
|
|
2144
2170
|
}
|
|
2145
2171
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2172
|
+
fallbackToIOSVideo();
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
function toggle(target, options) {
|
|
2176
|
+
if (lastIntendedOperation === 'request')
|
|
2177
|
+
return exit();
|
|
2178
|
+
return request(target, options);
|
|
2179
|
+
}
|
|
2180
|
+
bridgeEvents();
|
|
2181
|
+
return {
|
|
2182
|
+
get supported() {
|
|
2183
|
+
return getEnabled();
|
|
2184
|
+
},
|
|
2185
|
+
get element() {
|
|
2186
|
+
return getElement();
|
|
2187
|
+
},
|
|
2188
|
+
get isFullscreen() {
|
|
2189
|
+
return getIsFullscreen();
|
|
2190
|
+
},
|
|
2191
|
+
request: request,
|
|
2192
|
+
exit: exit,
|
|
2193
|
+
toggle: toggle,
|
|
2194
|
+
onChange: onChangeSubscriptionManager.subscribe,
|
|
2195
|
+
onError: onErrorSubscriptionManager.subscribe,
|
|
2196
|
+
Constants: {},
|
|
2197
|
+
Errors: {
|
|
2198
|
+
NotSupportedError: NotSupportedError,
|
|
2199
|
+
},
|
|
2200
|
+
};
|
|
2157
2201
|
}
|
|
2158
|
-
|
|
2202
|
+
var Fullscreen = createFullscreen();
|
|
2159
2203
|
|
|
2160
2204
|
var PermissionType;
|
|
2161
2205
|
(function (PermissionType) {
|
|
@@ -2196,7 +2240,7 @@
|
|
|
2196
2240
|
})();
|
|
2197
2241
|
|
|
2198
2242
|
var Permission = {
|
|
2199
|
-
request: request$
|
|
2243
|
+
request: request$1,
|
|
2200
2244
|
check: check,
|
|
2201
2245
|
Constants: {
|
|
2202
2246
|
PermissionType: PermissionType,
|
|
@@ -2204,7 +2248,7 @@
|
|
|
2204
2248
|
},
|
|
2205
2249
|
Errors: {},
|
|
2206
2250
|
};
|
|
2207
|
-
function request$
|
|
2251
|
+
function request$1(type) {
|
|
2208
2252
|
var instance = this;
|
|
2209
2253
|
return new Promise(function (resolve) {
|
|
2210
2254
|
function resolveAfterCheck() {
|
|
@@ -2287,7 +2331,7 @@
|
|
|
2287
2331
|
|
|
2288
2332
|
var PermissionNotGrantedError = createCustomError('PermissionNotGrantedError');
|
|
2289
2333
|
|
|
2290
|
-
function request
|
|
2334
|
+
function request(url, options) {
|
|
2291
2335
|
return new Promise(function (resolve) {
|
|
2292
2336
|
var method = 'GET';
|
|
2293
2337
|
var headers = {};
|
|
@@ -2369,7 +2413,7 @@
|
|
|
2369
2413
|
return to;
|
|
2370
2414
|
}
|
|
2371
2415
|
|
|
2372
|
-
var onChangeSubscriptionManager$
|
|
2416
|
+
var onChangeSubscriptionManager$1 = createSubscriptionManager(attachOnChange$1, detachOnChange$1);
|
|
2373
2417
|
var watchIdRef = null;
|
|
2374
2418
|
var Geolocation = {
|
|
2375
2419
|
get value() {
|
|
@@ -2378,7 +2422,7 @@
|
|
|
2378
2422
|
get supported() {
|
|
2379
2423
|
return supported$4();
|
|
2380
2424
|
},
|
|
2381
|
-
onChange: onChangeSubscriptionManager$
|
|
2425
|
+
onChange: onChangeSubscriptionManager$1.subscribe,
|
|
2382
2426
|
Constants: {},
|
|
2383
2427
|
Errors: {
|
|
2384
2428
|
NotSupportedError: NotSupportedError,
|
|
@@ -2415,7 +2459,7 @@
|
|
|
2415
2459
|
}
|
|
2416
2460
|
function getFallbackValue(error) {
|
|
2417
2461
|
return new Promise(function (resolve, reject) {
|
|
2418
|
-
request
|
|
2462
|
+
request('http://ip-api.com/json?fields=lat,lon')
|
|
2419
2463
|
.then(function (response) {
|
|
2420
2464
|
if (typeof response !== 'undefined') {
|
|
2421
2465
|
var coordinate_1 = {
|
|
@@ -2454,7 +2498,7 @@
|
|
|
2454
2498
|
return new NotSupportedError('Unknown error.');
|
|
2455
2499
|
}
|
|
2456
2500
|
}
|
|
2457
|
-
function attachOnChange$
|
|
2501
|
+
function attachOnChange$1() {
|
|
2458
2502
|
if (!supported$4())
|
|
2459
2503
|
return;
|
|
2460
2504
|
Permission
|
|
@@ -2467,13 +2511,13 @@
|
|
|
2467
2511
|
}
|
|
2468
2512
|
});
|
|
2469
2513
|
}
|
|
2470
|
-
function detachOnChange$
|
|
2514
|
+
function detachOnChange$1() {
|
|
2471
2515
|
if (!supported$4() || watchIdRef === null)
|
|
2472
2516
|
return;
|
|
2473
2517
|
globalThis.navigator.geolocation.clearWatch(watchIdRef);
|
|
2474
2518
|
}
|
|
2475
2519
|
function onGeolocationCoordinatesChange(coordinates) {
|
|
2476
|
-
onChangeSubscriptionManager$
|
|
2520
|
+
onChangeSubscriptionManager$1.emit(coordinates);
|
|
2477
2521
|
}
|
|
2478
2522
|
function supported$4() {
|
|
2479
2523
|
return typeof globalThis.navigator.geolocation !== 'undefined';
|
|
@@ -2511,6 +2555,20 @@
|
|
|
2511
2555
|
CaptureType["User"] = "user";
|
|
2512
2556
|
CaptureType["Environment"] = "environment";
|
|
2513
2557
|
})(CaptureType || (CaptureType = {}));
|
|
2558
|
+
var ExplorerStartIn;
|
|
2559
|
+
(function (ExplorerStartIn) {
|
|
2560
|
+
ExplorerStartIn["Desktop"] = "desktop";
|
|
2561
|
+
ExplorerStartIn["Documents"] = "documents";
|
|
2562
|
+
ExplorerStartIn["Downloads"] = "downloads";
|
|
2563
|
+
ExplorerStartIn["Music"] = "music";
|
|
2564
|
+
ExplorerStartIn["Pictures"] = "pictures";
|
|
2565
|
+
ExplorerStartIn["Videos"] = "videos";
|
|
2566
|
+
})(ExplorerStartIn || (ExplorerStartIn = {}));
|
|
2567
|
+
var DirectoryExploreMode;
|
|
2568
|
+
(function (DirectoryExploreMode) {
|
|
2569
|
+
DirectoryExploreMode["Read"] = "read";
|
|
2570
|
+
DirectoryExploreMode["ReadWrite"] = "readwrite";
|
|
2571
|
+
})(DirectoryExploreMode || (DirectoryExploreMode = {}));
|
|
2514
2572
|
var SETTING_URL = (_a = {},
|
|
2515
2573
|
_a[OS.Android] = (_b = {},
|
|
2516
2574
|
_b[SettingType.General] = 'intent:#Intent;action=android.settings.SETTINGS;end',
|
|
@@ -2962,15 +3020,15 @@
|
|
|
2962
3020
|
if (allDay) {
|
|
2963
3021
|
return date.getUTCFullYear()
|
|
2964
3022
|
+ padStart(date.getUTCMonth() + 1, 2, '0')
|
|
2965
|
-
+ padStart(date.getUTCDate()
|
|
3023
|
+
+ padStart(date.getUTCDate(), 2, '0');
|
|
2966
3024
|
}
|
|
2967
3025
|
return date.getUTCFullYear()
|
|
2968
3026
|
+ padStart(date.getUTCMonth() + 1, 2, '0')
|
|
2969
|
-
+ padStart(date.getUTCDate()
|
|
3027
|
+
+ padStart(date.getUTCDate(), 2, '0')
|
|
2970
3028
|
+ 'T'
|
|
2971
|
-
+ padStart(date.getUTCHours()
|
|
2972
|
-
+ padStart(date.getUTCMinutes()
|
|
2973
|
-
+ padStart(date.getUTCSeconds()
|
|
3029
|
+
+ padStart(date.getUTCHours(), 2, '0')
|
|
3030
|
+
+ padStart(date.getUTCMinutes(), 2, '0')
|
|
3031
|
+
+ padStart(date.getUTCSeconds(), 2, '0')
|
|
2974
3032
|
+ 'Z';
|
|
2975
3033
|
}
|
|
2976
3034
|
function getURLOpenError(tried) {
|
|
@@ -3911,6 +3969,7 @@
|
|
|
3911
3969
|
|
|
3912
3970
|
var Vibration = {
|
|
3913
3971
|
run: run,
|
|
3972
|
+
stop: stop,
|
|
3914
3973
|
get supported() {
|
|
3915
3974
|
return supported$3();
|
|
3916
3975
|
},
|
|
@@ -3924,269 +3983,309 @@
|
|
|
3924
3983
|
return globalThis.navigator.vibrate(pattern);
|
|
3925
3984
|
throw new NotSupportedError('\'navigator.vibrate\' does not supported.');
|
|
3926
3985
|
}
|
|
3986
|
+
function stop() {
|
|
3987
|
+
return this.run(0);
|
|
3988
|
+
}
|
|
3927
3989
|
function supported$3() {
|
|
3928
3990
|
return typeof globalThis.navigator.vibrate !== 'undefined';
|
|
3929
3991
|
}
|
|
3930
3992
|
|
|
3931
|
-
var
|
|
3932
|
-
var eventsBridged = false;
|
|
3933
|
-
var activeOperation = null;
|
|
3934
|
-
var pendingOperation = null;
|
|
3935
|
-
var pendingTarget = undefined;
|
|
3936
|
-
var expectedIsPip = false;
|
|
3993
|
+
var PIP_BRIDGED_KEY = Symbol('pipBridged');
|
|
3937
3994
|
var PIP_PRESENTATION_MODE = 'picture-in-picture';
|
|
3938
3995
|
var INLINE_PRESENTATION_MODE = 'inline';
|
|
3939
|
-
var onChangeSubscriptionManager$1 = createSubscriptionManager(attachOnChange$1, detachOnChange$1);
|
|
3940
|
-
var onErrorSubscriptionManager = createSubscriptionManager(attachOnError, detachOnError);
|
|
3941
|
-
var Pip = {
|
|
3942
|
-
get supported() {
|
|
3943
|
-
return getEnabled();
|
|
3944
|
-
},
|
|
3945
|
-
get element() {
|
|
3946
|
-
return getElement();
|
|
3947
|
-
},
|
|
3948
|
-
get isPip() {
|
|
3949
|
-
return getIsPip();
|
|
3950
|
-
},
|
|
3951
|
-
request: request,
|
|
3952
|
-
exit: exit,
|
|
3953
|
-
toggle: toggle,
|
|
3954
|
-
onChange: onChangeSubscriptionManager$1.subscribe,
|
|
3955
|
-
onError: onErrorSubscriptionManager.subscribe,
|
|
3956
|
-
Constants: {},
|
|
3957
|
-
Errors: {
|
|
3958
|
-
NotSupportedError: NotSupportedError,
|
|
3959
|
-
},
|
|
3960
|
-
};
|
|
3961
3996
|
function hasStandardPipEvents() {
|
|
3962
3997
|
return typeof globalThis.document.pictureInPictureEnabled !== 'undefined';
|
|
3963
3998
|
}
|
|
3964
|
-
function
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3999
|
+
function createPip() {
|
|
4000
|
+
var lastPipVideo = null;
|
|
4001
|
+
var eventsBridged = false;
|
|
4002
|
+
var activeOperation = null;
|
|
4003
|
+
var pendingQueue = [];
|
|
4004
|
+
var lastIntendedOperation = 'exit';
|
|
4005
|
+
var onChangeSubscriptionManager = createSubscriptionManager(attachOnChange, detachOnChange);
|
|
4006
|
+
var onErrorSubscriptionManager = createSubscriptionManager(attachOnError, detachOnError);
|
|
4007
|
+
function getEnabled() {
|
|
4008
|
+
if (typeof globalThis.document.pictureInPictureEnabled === 'boolean')
|
|
4009
|
+
return globalThis.document.pictureInPictureEnabled;
|
|
4010
|
+
if (typeof HTMLVideoElement === 'undefined')
|
|
4011
|
+
return false;
|
|
4012
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
4013
|
+
for (var i = 0; i < videos.length; i++) {
|
|
4014
|
+
var video = videos[i];
|
|
4015
|
+
if (typeof video.webkitSupportsPresentationMode === 'function' && video.webkitSupportsPresentationMode(PIP_PRESENTATION_MODE))
|
|
4016
|
+
return true;
|
|
4017
|
+
}
|
|
3968
4018
|
return false;
|
|
3969
|
-
var videos = globalThis.document.querySelectorAll('video');
|
|
3970
|
-
for (var i = 0; i < videos.length; i++) {
|
|
3971
|
-
var video = videos[i];
|
|
3972
|
-
if (typeof video.webkitSupportsPresentationMode === 'function' && video.webkitSupportsPresentationMode(PIP_PRESENTATION_MODE))
|
|
3973
|
-
return true;
|
|
3974
4019
|
}
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
return lastPipVideo;
|
|
3983
|
-
return null;
|
|
3984
|
-
}
|
|
3985
|
-
function getIsPip() {
|
|
3986
|
-
return getElement() !== null;
|
|
3987
|
-
}
|
|
3988
|
-
function getDefaultTarget() {
|
|
3989
|
-
var video = globalThis.document.querySelector('video');
|
|
3990
|
-
if (video === null)
|
|
3991
|
-
return undefined;
|
|
3992
|
-
return video;
|
|
3993
|
-
}
|
|
3994
|
-
function onWebkitPresentationModeChanged(event) {
|
|
3995
|
-
if (this.webkitPresentationMode === PIP_PRESENTATION_MODE || this.webkitPresentationMode === INLINE_PRESENTATION_MODE && lastPipVideo === this)
|
|
3996
|
-
onChangeSubscriptionManager$1.emit(event);
|
|
3997
|
-
}
|
|
3998
|
-
function bridgeEvents() {
|
|
3999
|
-
if (eventsBridged)
|
|
4000
|
-
return;
|
|
4001
|
-
eventsBridged = true;
|
|
4002
|
-
if (!hasStandardPipEvents()) {
|
|
4003
|
-
bridgeWebkitVideoEvents();
|
|
4004
|
-
if (typeof globalThis.MutationObserver !== 'undefined') {
|
|
4005
|
-
var observer = new MutationObserver(function () {
|
|
4006
|
-
bridgeWebkitVideoEvents();
|
|
4007
|
-
});
|
|
4008
|
-
observer.observe(globalThis.document.documentElement, { childList: true, subtree: true });
|
|
4009
|
-
}
|
|
4020
|
+
function getElement() {
|
|
4021
|
+
var currentElement = globalThis.document.pictureInPictureElement;
|
|
4022
|
+
if (currentElement !== null && typeof currentElement !== 'undefined')
|
|
4023
|
+
return currentElement;
|
|
4024
|
+
if (lastPipVideo !== null && lastPipVideo.webkitPresentationMode === PIP_PRESENTATION_MODE)
|
|
4025
|
+
return lastPipVideo;
|
|
4026
|
+
return null;
|
|
4010
4027
|
}
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
if (typeof globalThis.document === 'undefined')
|
|
4014
|
-
return;
|
|
4015
|
-
var videos = globalThis.document.querySelectorAll('video');
|
|
4016
|
-
videos.forEach(function (video) {
|
|
4017
|
-
if (video.__pipBridged__ || !(typeof video.webkitSetPresentationMode !== 'undefined' || typeof video.onwebkitpresentationmodechanged !== 'undefined'))
|
|
4018
|
-
return;
|
|
4019
|
-
EventListener.add(video, { type: 'webkitpresentationmodechanged', callback: onWebkitPresentationModeChanged, options: false });
|
|
4020
|
-
video.__pipBridged__ = true;
|
|
4021
|
-
});
|
|
4022
|
-
}
|
|
4023
|
-
function attachOnChange$1() {
|
|
4024
|
-
if (hasStandardPipEvents()) {
|
|
4025
|
-
var changeEvents = ['enterpictureinpicture', 'leavepictureinpicture'];
|
|
4026
|
-
for (var i = 0; i < changeEvents.length; i++)
|
|
4027
|
-
EventListener.add(globalThis.document, { type: changeEvents[i], callback: onChangeSubscriptionManager$1.emit, options: false });
|
|
4028
|
-
return;
|
|
4028
|
+
function getIsPip() {
|
|
4029
|
+
return getElement() !== null;
|
|
4029
4030
|
}
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
for (var i = 0; i < changeEvents.length; i++)
|
|
4036
|
-
EventListener.remove(globalThis.document, { type: changeEvents[i], callback: onChangeSubscriptionManager$1.emit, options: false });
|
|
4037
|
-
return;
|
|
4031
|
+
function getDefaultTarget() {
|
|
4032
|
+
var video = globalThis.document.querySelector('video');
|
|
4033
|
+
if (video === null)
|
|
4034
|
+
return undefined;
|
|
4035
|
+
return video;
|
|
4038
4036
|
}
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
video.__pipBridged__ = false;
|
|
4043
|
-
});
|
|
4044
|
-
}
|
|
4045
|
-
function attachOnError() {
|
|
4046
|
-
EventListener.add(globalThis.document, { type: 'pictureinpictureerror', callback: onErrorSubscriptionManager.emit, options: false });
|
|
4047
|
-
}
|
|
4048
|
-
function detachOnError() {
|
|
4049
|
-
EventListener.remove(globalThis.document, { type: 'pictureinpictureerror', callback: onErrorSubscriptionManager.emit, options: false });
|
|
4050
|
-
}
|
|
4051
|
-
function drainPendingOperation() {
|
|
4052
|
-
if (pendingOperation === null) {
|
|
4053
|
-
activeOperation = Promise.resolve().then(function () {
|
|
4054
|
-
if (pendingOperation === null) {
|
|
4055
|
-
activeOperation = null;
|
|
4056
|
-
return;
|
|
4057
|
-
}
|
|
4058
|
-
drainPendingOperation();
|
|
4059
|
-
});
|
|
4060
|
-
return;
|
|
4037
|
+
function onWebkitPresentationModeChanged(event) {
|
|
4038
|
+
if (this.webkitPresentationMode === PIP_PRESENTATION_MODE || (this.webkitPresentationMode === INLINE_PRESENTATION_MODE && lastPipVideo === this))
|
|
4039
|
+
onChangeSubscriptionManager.emit(event);
|
|
4061
4040
|
}
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
var next = requestImmediately(target);
|
|
4079
|
-
activeOperation = next
|
|
4080
|
-
.then(drainPendingOperation)
|
|
4081
|
-
.catch(drainPendingOperation);
|
|
4082
|
-
return next;
|
|
4041
|
+
function bridgeEvents() {
|
|
4042
|
+
if (eventsBridged)
|
|
4043
|
+
return;
|
|
4044
|
+
eventsBridged = true;
|
|
4045
|
+
if (!hasStandardPipEvents()) {
|
|
4046
|
+
bridgeWebkitVideoEvents();
|
|
4047
|
+
if (typeof globalThis.MutationObserver !== 'undefined') {
|
|
4048
|
+
var observer = new MutationObserver(function () {
|
|
4049
|
+
bridgeWebkitVideoEvents();
|
|
4050
|
+
});
|
|
4051
|
+
observer.observe(globalThis.document.documentElement, {
|
|
4052
|
+
childList: true,
|
|
4053
|
+
subtree: true,
|
|
4054
|
+
});
|
|
4055
|
+
}
|
|
4056
|
+
}
|
|
4083
4057
|
}
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4058
|
+
function bridgeWebkitVideoEvents() {
|
|
4059
|
+
if (typeof globalThis.document === 'undefined')
|
|
4060
|
+
return;
|
|
4061
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
4062
|
+
videos.forEach(function (video) {
|
|
4063
|
+
if (video[PIP_BRIDGED_KEY] === true || !(typeof video.webkitSetPresentationMode !== 'undefined' || typeof video.onwebkitpresentationmodechanged !== 'undefined'))
|
|
4064
|
+
return;
|
|
4065
|
+
EventListener.add(video, {
|
|
4066
|
+
type: 'webkitpresentationmodechanged',
|
|
4067
|
+
callback: onWebkitPresentationModeChanged,
|
|
4068
|
+
options: false,
|
|
4069
|
+
});
|
|
4070
|
+
video[PIP_BRIDGED_KEY] = true;
|
|
4071
|
+
});
|
|
4098
4072
|
}
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
if (typeof target === 'undefined')
|
|
4108
|
-
target = getDefaultTarget();
|
|
4109
|
-
if (typeof target === 'undefined')
|
|
4110
|
-
return reject(new NotSupportedError('Failed to enter Picture-in-Picture mode.'));
|
|
4111
|
-
var tagName = target.tagName.toLowerCase();
|
|
4112
|
-
if (tagName !== 'video')
|
|
4113
|
-
return reject(new NotSupportedError('The "' + tagName + '" element does not support Picture-in-Picture requests.'));
|
|
4114
|
-
var method = target.requestPictureInPicture;
|
|
4115
|
-
if (typeof method === 'function') {
|
|
4116
|
-
var result = method.call(target);
|
|
4117
|
-
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
4118
|
-
result
|
|
4119
|
-
.then(function () { resolve(); })
|
|
4120
|
-
.catch(function () {
|
|
4121
|
-
fallbackToWebkitVideo();
|
|
4073
|
+
function attachOnChange() {
|
|
4074
|
+
if (hasStandardPipEvents()) {
|
|
4075
|
+
var changeEvents = ['enterpictureinpicture', 'leavepictureinpicture'];
|
|
4076
|
+
for (var i = 0; i < changeEvents.length; i++) {
|
|
4077
|
+
EventListener.add(globalThis.document, {
|
|
4078
|
+
type: changeEvents[i],
|
|
4079
|
+
callback: onChangeSubscriptionManager.emit,
|
|
4080
|
+
options: false,
|
|
4122
4081
|
});
|
|
4123
|
-
return;
|
|
4124
|
-
}
|
|
4125
|
-
else {
|
|
4126
|
-
return resolve();
|
|
4127
4082
|
}
|
|
4083
|
+
return;
|
|
4128
4084
|
}
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4085
|
+
bridgeWebkitVideoEvents();
|
|
4086
|
+
}
|
|
4087
|
+
function detachOnChange() {
|
|
4088
|
+
if (hasStandardPipEvents()) {
|
|
4089
|
+
var changeEvents = ['enterpictureinpicture', 'leavepictureinpicture'];
|
|
4090
|
+
for (var i = 0; i < changeEvents.length; i++) {
|
|
4091
|
+
EventListener.remove(globalThis.document, {
|
|
4092
|
+
type: changeEvents[i],
|
|
4093
|
+
callback: onChangeSubscriptionManager.emit,
|
|
4094
|
+
options: false,
|
|
4095
|
+
});
|
|
4137
4096
|
}
|
|
4138
|
-
|
|
4097
|
+
return;
|
|
4139
4098
|
}
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
result
|
|
4150
|
-
.then(resolve)
|
|
4151
|
-
.catch(function () {
|
|
4152
|
-
fallbackToWebkitVideo();
|
|
4153
|
-
});
|
|
4154
|
-
return;
|
|
4099
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
4100
|
+
videos.forEach(function (video) {
|
|
4101
|
+
EventListener.remove(video, {
|
|
4102
|
+
type: 'webkitpresentationmodechanged',
|
|
4103
|
+
callback: onWebkitPresentationModeChanged,
|
|
4104
|
+
options: false,
|
|
4105
|
+
});
|
|
4106
|
+
try {
|
|
4107
|
+
delete video[PIP_BRIDGED_KEY];
|
|
4155
4108
|
}
|
|
4156
|
-
|
|
4157
|
-
|
|
4109
|
+
catch (_) {
|
|
4110
|
+
video[PIP_BRIDGED_KEY] = undefined;
|
|
4158
4111
|
}
|
|
4112
|
+
});
|
|
4113
|
+
}
|
|
4114
|
+
function attachOnError() {
|
|
4115
|
+
EventListener.add(globalThis.document, {
|
|
4116
|
+
type: 'pictureinpictureerror',
|
|
4117
|
+
callback: onErrorSubscriptionManager.emit,
|
|
4118
|
+
options: false,
|
|
4119
|
+
});
|
|
4120
|
+
}
|
|
4121
|
+
function detachOnError() {
|
|
4122
|
+
EventListener.remove(globalThis.document, {
|
|
4123
|
+
type: 'pictureinpictureerror',
|
|
4124
|
+
callback: onErrorSubscriptionManager.emit,
|
|
4125
|
+
options: false,
|
|
4126
|
+
});
|
|
4127
|
+
}
|
|
4128
|
+
function drainPendingOperation() {
|
|
4129
|
+
var entry = pendingQueue.shift();
|
|
4130
|
+
if (typeof entry === 'undefined') {
|
|
4131
|
+
activeOperation = null;
|
|
4132
|
+
return;
|
|
4133
|
+
}
|
|
4134
|
+
var next;
|
|
4135
|
+
if (entry.operation === 'request')
|
|
4136
|
+
next = requestImmediately(entry.target);
|
|
4137
|
+
else
|
|
4138
|
+
next = exitImmediately();
|
|
4139
|
+
activeOperation = next
|
|
4140
|
+
.then(function () {
|
|
4141
|
+
entry.resolve();
|
|
4142
|
+
drainPendingOperation();
|
|
4143
|
+
})
|
|
4144
|
+
.catch(function (error) {
|
|
4145
|
+
entry.reject(error);
|
|
4146
|
+
drainPendingOperation();
|
|
4147
|
+
});
|
|
4148
|
+
}
|
|
4149
|
+
function request(target) {
|
|
4150
|
+
lastIntendedOperation = 'request';
|
|
4151
|
+
if (activeOperation === null) {
|
|
4152
|
+
var next = requestImmediately(target);
|
|
4153
|
+
activeOperation = next
|
|
4154
|
+
.then(drainPendingOperation)
|
|
4155
|
+
.catch(drainPendingOperation);
|
|
4156
|
+
return next;
|
|
4157
|
+
}
|
|
4158
|
+
return new Promise(function (resolve, reject) {
|
|
4159
|
+
pendingQueue.push({
|
|
4160
|
+
operation: 'request',
|
|
4161
|
+
target: target,
|
|
4162
|
+
resolve: resolve,
|
|
4163
|
+
reject: reject,
|
|
4164
|
+
});
|
|
4165
|
+
});
|
|
4166
|
+
}
|
|
4167
|
+
function exit() {
|
|
4168
|
+
lastIntendedOperation = 'exit';
|
|
4169
|
+
if (activeOperation === null) {
|
|
4170
|
+
var next = exitImmediately();
|
|
4171
|
+
activeOperation = next
|
|
4172
|
+
.then(drainPendingOperation)
|
|
4173
|
+
.catch(drainPendingOperation);
|
|
4174
|
+
return next;
|
|
4159
4175
|
}
|
|
4160
|
-
function
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4176
|
+
return new Promise(function (resolve, reject) {
|
|
4177
|
+
pendingQueue.push({
|
|
4178
|
+
operation: 'exit',
|
|
4179
|
+
target: undefined,
|
|
4180
|
+
resolve: resolve,
|
|
4181
|
+
reject: reject,
|
|
4182
|
+
});
|
|
4183
|
+
});
|
|
4184
|
+
}
|
|
4185
|
+
function requestImmediately(target) {
|
|
4186
|
+
return new Promise(function (resolve, reject) {
|
|
4187
|
+
if (typeof target === 'undefined')
|
|
4188
|
+
target = getDefaultTarget();
|
|
4189
|
+
if (typeof target === 'undefined')
|
|
4190
|
+
return reject(new NotSupportedError('Failed to enter Picture-in-Picture mode.'));
|
|
4191
|
+
var tagName = target.tagName.toLowerCase();
|
|
4192
|
+
if (tagName !== 'video')
|
|
4193
|
+
return reject(new NotSupportedError('The "' + tagName + '" element does not support Picture-in-Picture requests.'));
|
|
4194
|
+
function fallbackToWebkitVideo() {
|
|
4195
|
+
if (typeof target !== 'undefined' && typeof target.webkitSupportsPresentationMode === 'function' && target.webkitSupportsPresentationMode(PIP_PRESENTATION_MODE) && typeof target.webkitSetPresentationMode === 'function') {
|
|
4196
|
+
if (target.disablePictureInPicture)
|
|
4197
|
+
return reject(new NotSupportedError('Picture-in-Picture is disabled on this video element.'));
|
|
4198
|
+
lastPipVideo = target;
|
|
4199
|
+
bridgeWebkitVideoEvents();
|
|
4200
|
+
target.webkitSetPresentationMode(PIP_PRESENTATION_MODE);
|
|
4165
4201
|
return resolve();
|
|
4166
4202
|
}
|
|
4203
|
+
reject(new NotSupportedError('The "' + tagName + '" element does not support Picture-in-Picture requests.'));
|
|
4167
4204
|
}
|
|
4168
|
-
var
|
|
4169
|
-
|
|
4170
|
-
var
|
|
4171
|
-
if (typeof
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4205
|
+
var method = target.requestPictureInPicture;
|
|
4206
|
+
if (typeof method === 'function') {
|
|
4207
|
+
var result = method.call(target);
|
|
4208
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
4209
|
+
result
|
|
4210
|
+
.then(function () {
|
|
4211
|
+
resolve();
|
|
4212
|
+
})
|
|
4213
|
+
.catch(function () {
|
|
4214
|
+
fallbackToWebkitVideo();
|
|
4215
|
+
});
|
|
4216
|
+
return;
|
|
4217
|
+
}
|
|
4218
|
+
return resolve();
|
|
4219
|
+
}
|
|
4220
|
+
fallbackToWebkitVideo();
|
|
4221
|
+
});
|
|
4222
|
+
}
|
|
4223
|
+
function exitImmediately() {
|
|
4224
|
+
return new Promise(function (resolve, reject) {
|
|
4225
|
+
if (getElement() === null && lastPipVideo === null)
|
|
4226
|
+
return resolve();
|
|
4227
|
+
function fallbackToWebkitVideo() {
|
|
4228
|
+
var candidates;
|
|
4229
|
+
if (lastPipVideo !== null && lastPipVideo.webkitPresentationMode === PIP_PRESENTATION_MODE)
|
|
4230
|
+
candidates = [lastPipVideo];
|
|
4231
|
+
else
|
|
4232
|
+
candidates = globalThis.document.querySelectorAll('video');
|
|
4233
|
+
for (var i = 0; i < candidates.length; i++) {
|
|
4234
|
+
var video = candidates[i];
|
|
4235
|
+
if (typeof video.webkitSetPresentationMode === 'function' && video.webkitPresentationMode === PIP_PRESENTATION_MODE) {
|
|
4236
|
+
video.webkitSetPresentationMode(INLINE_PRESENTATION_MODE);
|
|
4237
|
+
lastPipVideo = null;
|
|
4238
|
+
return resolve();
|
|
4239
|
+
}
|
|
4175
4240
|
}
|
|
4241
|
+
if (getElement() === null)
|
|
4242
|
+
return resolve();
|
|
4243
|
+
reject(new NotSupportedError('Failed to exit Picture-in-Picture mode.'));
|
|
4176
4244
|
}
|
|
4177
|
-
|
|
4245
|
+
var method = globalThis.document.exitPictureInPicture;
|
|
4246
|
+
if (typeof method === 'function') {
|
|
4247
|
+
var result = method.call(globalThis.document);
|
|
4248
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
4249
|
+
result
|
|
4250
|
+
.then(resolve)
|
|
4251
|
+
.catch(function () {
|
|
4252
|
+
fallbackToWebkitVideo();
|
|
4253
|
+
});
|
|
4254
|
+
return;
|
|
4255
|
+
}
|
|
4178
4256
|
return resolve();
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
}
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
return
|
|
4187
|
-
|
|
4257
|
+
}
|
|
4258
|
+
fallbackToWebkitVideo();
|
|
4259
|
+
});
|
|
4260
|
+
}
|
|
4261
|
+
function toggle(target) {
|
|
4262
|
+
if (lastIntendedOperation === 'request')
|
|
4263
|
+
return exit();
|
|
4264
|
+
return request(target);
|
|
4265
|
+
}
|
|
4266
|
+
bridgeEvents();
|
|
4267
|
+
return {
|
|
4268
|
+
get supported() {
|
|
4269
|
+
return getEnabled();
|
|
4270
|
+
},
|
|
4271
|
+
get element() {
|
|
4272
|
+
return getElement();
|
|
4273
|
+
},
|
|
4274
|
+
get isPip() {
|
|
4275
|
+
return getIsPip();
|
|
4276
|
+
},
|
|
4277
|
+
request: request,
|
|
4278
|
+
exit: exit,
|
|
4279
|
+
toggle: toggle,
|
|
4280
|
+
onChange: onChangeSubscriptionManager.subscribe,
|
|
4281
|
+
onError: onErrorSubscriptionManager.subscribe,
|
|
4282
|
+
Constants: {},
|
|
4283
|
+
Errors: {
|
|
4284
|
+
NotSupportedError: NotSupportedError,
|
|
4285
|
+
},
|
|
4286
|
+
};
|
|
4188
4287
|
}
|
|
4189
|
-
|
|
4288
|
+
var Pip = createPip();
|
|
4190
4289
|
|
|
4191
4290
|
var Badge = {
|
|
4192
4291
|
set: set,
|
|
@@ -4300,10 +4399,10 @@
|
|
|
4300
4399
|
function detachOnChange() {
|
|
4301
4400
|
if (!supported() || batteryRef === null)
|
|
4302
4401
|
return;
|
|
4303
|
-
EventListener.
|
|
4304
|
-
EventListener.
|
|
4305
|
-
EventListener.
|
|
4306
|
-
EventListener.
|
|
4402
|
+
EventListener.remove(batteryRef, { type: 'chargingchange', callback: onBatteryChange });
|
|
4403
|
+
EventListener.remove(batteryRef, { type: 'levelchange', callback: onBatteryChange });
|
|
4404
|
+
EventListener.remove(batteryRef, { type: 'chargingtimechange', callback: onBatteryChange });
|
|
4405
|
+
EventListener.remove(batteryRef, { type: 'dischargingtimechange', callback: onBatteryChange });
|
|
4307
4406
|
batteryRef = null;
|
|
4308
4407
|
}
|
|
4309
4408
|
function onBatteryChange() {
|