cafe-video-player 2.4.2 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/{VideoHighLighter-3U5XWMWJ.js → VideoHighLighter-IDBU2SKL.js} +2 -2
  2. package/{VideoHighLighter-3U5XWMWJ.js.map → VideoHighLighter-IDBU2SKL.js.map} +1 -1
  3. package/{VideoHighLighter-VEYEES5O.mjs → VideoHighLighter-YGR4EQDP.mjs} +2 -2
  4. package/{VideoHighLighter-VEYEES5O.mjs.map → VideoHighLighter-YGR4EQDP.mjs.map} +1 -1
  5. package/backwardForward-KGYL4SOY.js +2 -0
  6. package/{backwardForward-E2NLBMMH.js.map → backwardForward-KGYL4SOY.js.map} +1 -1
  7. package/backwardForward-RXOZ6EMH.mjs +2 -0
  8. package/{backwardForward-N75PBTWN.mjs.map → backwardForward-RXOZ6EMH.mjs.map} +1 -1
  9. package/{chunk-L2M274SY.mjs → chunk-537GNASP.mjs} +2 -2
  10. package/{chunk-L2M274SY.mjs.map → chunk-537GNASP.mjs.map} +1 -1
  11. package/chunk-5IQJT3DM.js +3 -0
  12. package/{chunk-CIBMAE3N.js.map → chunk-5IQJT3DM.js.map} +1 -1
  13. package/{chunk-HME64W2O.js → chunk-6CGGPC2I.js} +3 -3
  14. package/chunk-6CGGPC2I.js.map +1 -0
  15. package/chunk-6VAYPXEA.js +2 -0
  16. package/{chunk-4SNO3QVC.js.map → chunk-6VAYPXEA.js.map} +1 -1
  17. package/{chunk-K4TUYQMW.js → chunk-CSUWWM6N.js} +5 -5
  18. package/{chunk-K4TUYQMW.js.map → chunk-CSUWWM6N.js.map} +1 -1
  19. package/{chunk-4I3S32RN.mjs → chunk-DCDHZHCP.mjs} +2 -2
  20. package/{chunk-4I3S32RN.mjs.map → chunk-DCDHZHCP.mjs.map} +1 -1
  21. package/{chunk-5LJKRSJU.js → chunk-DDJP7SVH.js} +2 -2
  22. package/{chunk-5LJKRSJU.js.map → chunk-DDJP7SVH.js.map} +1 -1
  23. package/{chunk-YZYTKWCY.mjs → chunk-GT7NHW3Y.mjs} +3 -3
  24. package/chunk-GT7NHW3Y.mjs.map +1 -0
  25. package/{chunk-KIC75NSX.mjs → chunk-HF5Z4TEE.mjs} +2 -2
  26. package/{chunk-KIC75NSX.mjs.map → chunk-HF5Z4TEE.mjs.map} +1 -1
  27. package/chunk-KTOGYJ4H.js +2 -0
  28. package/{chunk-D7CTAABP.js.map → chunk-KTOGYJ4H.js.map} +1 -1
  29. package/{chunk-MZP43FH7.mjs → chunk-MJC6YUD3.mjs} +2 -2
  30. package/{chunk-MZP43FH7.mjs.map → chunk-MJC6YUD3.mjs.map} +1 -1
  31. package/{chunk-M4NZ4V5H.mjs → chunk-OUXHISO6.mjs} +3 -3
  32. package/{chunk-M4NZ4V5H.mjs.map → chunk-OUXHISO6.mjs.map} +1 -1
  33. package/{chunk-BOS4UPEA.js → chunk-PHSEUKRI.js} +2 -2
  34. package/{chunk-BOS4UPEA.js.map → chunk-PHSEUKRI.js.map} +1 -1
  35. package/chunk-QSFIYXO4.js +2 -0
  36. package/{chunk-5DVPBBOD.js.map → chunk-QSFIYXO4.js.map} +1 -1
  37. package/chunk-QZBK73JD.mjs +2 -0
  38. package/{chunk-ZMWH4RA6.mjs.map → chunk-QZBK73JD.mjs.map} +1 -1
  39. package/chunk-SD2CSI42.js +2 -0
  40. package/{chunk-BBWNG7HP.js.map → chunk-SD2CSI42.js.map} +1 -1
  41. package/{chunk-SUV7NR2J.mjs → chunk-ZBCISOHJ.mjs} +2 -2
  42. package/{chunk-SUV7NR2J.mjs.map → chunk-ZBCISOHJ.mjs.map} +1 -1
  43. package/{chunk-UBKDWPP7.mjs → chunk-ZMGVOJ4B.mjs} +4 -4
  44. package/{chunk-UBKDWPP7.mjs.map → chunk-ZMGVOJ4B.mjs.map} +1 -1
  45. package/index.js +1 -1
  46. package/index.js.map +1 -1
  47. package/index.mjs +1 -1
  48. package/index.mjs.map +1 -1
  49. package/{nonStaticVideoTag-RO6C2T36.mjs → nonStaticVideoTag-T2VIV6QZ.mjs} +2 -2
  50. package/{nonStaticVideoTag-RO6C2T36.mjs.map → nonStaticVideoTag-T2VIV6QZ.mjs.map} +1 -1
  51. package/nonStaticVideoTag-XVBHCTWJ.js +2 -0
  52. package/{nonStaticVideoTag-T4CIWREL.js.map → nonStaticVideoTag-XVBHCTWJ.js.map} +1 -1
  53. package/package.json +1 -1
  54. package/staticPlayer-2AHEKGRW.mjs +2 -0
  55. package/{staticPlayer-NXOOJTWO.mjs.map → staticPlayer-2AHEKGRW.mjs.map} +1 -1
  56. package/staticPlayer-KK2BYQ5H.js +2 -0
  57. package/{staticPlayer-DMILO6PN.js.map → staticPlayer-KK2BYQ5H.js.map} +1 -1
  58. package/staticVideoTag-MBOOBFS4.js +2 -0
  59. package/{staticVideoTag-KT6PBJ7V.js.map → staticVideoTag-MBOOBFS4.js.map} +1 -1
  60. package/{staticVideoTag-IZI7PG7M.mjs → staticVideoTag-THGU6TMW.mjs} +2 -2
  61. package/{staticVideoTag-IZI7PG7M.mjs.map → staticVideoTag-THGU6TMW.mjs.map} +1 -1
  62. package/{touchVolumeBrightness-KAAGMQWI.js → touchVolumeBrightness-6GVZBWPB.js} +3 -3
  63. package/{touchVolumeBrightness-KAAGMQWI.js.map → touchVolumeBrightness-6GVZBWPB.js.map} +1 -1
  64. package/{touchVolumeBrightness-27EBEX5W.mjs → touchVolumeBrightness-REPKPDVV.mjs} +3 -3
  65. package/{touchVolumeBrightness-27EBEX5W.mjs.map → touchVolumeBrightness-REPKPDVV.mjs.map} +1 -1
  66. package/videoArea-EH6VNBG5.mjs +2 -0
  67. package/{videoArea-D5XF44HR.mjs.map → videoArea-EH6VNBG5.mjs.map} +1 -1
  68. package/videoArea-JLZOD6RH.js +2 -0
  69. package/{videoArea-HORYPBAZ.js.map → videoArea-JLZOD6RH.js.map} +1 -1
  70. package/vodPlayer-EE2DQBHX.js +2 -0
  71. package/{vodPlayer-VTPZZILH.js.map → vodPlayer-EE2DQBHX.js.map} +1 -1
  72. package/{vodPlayer-7IQILQHX.mjs → vodPlayer-TT43CTCL.mjs} +2 -2
  73. package/{vodPlayer-7IQILQHX.mjs.map → vodPlayer-TT43CTCL.mjs.map} +1 -1
  74. package/backwardForward-E2NLBMMH.js +0 -2
  75. package/backwardForward-N75PBTWN.mjs +0 -2
  76. package/chunk-4SNO3QVC.js +0 -2
  77. package/chunk-5DVPBBOD.js +0 -2
  78. package/chunk-BBWNG7HP.js +0 -2
  79. package/chunk-CIBMAE3N.js +0 -3
  80. package/chunk-D7CTAABP.js +0 -2
  81. package/chunk-HME64W2O.js.map +0 -1
  82. package/chunk-YZYTKWCY.mjs.map +0 -1
  83. package/chunk-ZMWH4RA6.mjs +0 -2
  84. package/nonStaticVideoTag-T4CIWREL.js +0 -2
  85. package/staticPlayer-DMILO6PN.js +0 -2
  86. package/staticPlayer-NXOOJTWO.mjs +0 -2
  87. package/staticVideoTag-KT6PBJ7V.js +0 -2
  88. package/videoArea-D5XF44HR.mjs +0 -2
  89. package/videoArea-HORYPBAZ.js +0 -2
  90. package/vodPlayer-VTPZZILH.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/fullScreen/fullScreen.tsx","../src/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbarTooltip.tsx","../src/videoPlayerLibrary/components/custom-components/soundVolume/soundVolume.tsx","../src/videoPlayerLibrary/helpers/hooks/useFullScreen.tsx"],"names":["init_esm_shims","ControllbarTooltip","title","className","jsx","conditions","controllbarTooltip_default","FullScreen","isFullScreen","useAppSelector","firstPlay","shallowEqual","showTooltip","setShowTooltip","useState","dispatch","useAppDispatch","useEffect","setActiveElements","jsxs","Image","importImages_default","handleFullScreen","handleLockOrientation","fullScreen_default","SoundVolume","settings","primaryVolumeRef","useRef","handleMouseUp","store_default","sendFluentLog","volumeLog","setUserSettings","handleMute","type","handleChangeSoundVolume","event","soundVolume_default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,CAAAA,CAAS2B,CAAAA,CAAgB,IAAI,CAAC,CAAA,EAE9C3B,CAAAA,CAAS2B,CAAAA,CAAgB,KAAK,CAAC,CAAA,CAC/BC,CAAAA,EAA2B,CAC3BZ,EAAAA,CAAca,EAAAA,CAAc,gBAAgB,CAAC,CAAA,CAC7C,QAAA,CAAS,IAAA,CAAK,KAAA,CAAM,SAAW,MAAA,EAEnC,CAAA,CAEI,QAAA,CAAS,gBAAA,GACX,QAAA,CAAS,gBAAA,CAAiB,wBAAA,CAA0BH,CAAAA,CAAwB,KAAK,CAAA,CACjF,QAAA,CAAS,gBAAA,CAAiB,qBAAA,CAAuBA,CAAAA,CAAwB,KAAK,CAAA,CAC9E,QAAA,CAAS,gBAAA,CAAiB,kBAAA,CAAoBA,CAAAA,CAAwB,KAAK,CAAA,CAC3E,QAAA,CAAS,gBAAA,CAAiB,oBAAA,CAAsBA,CAAAA,CAAwB,KAAK,CAAA,EASjF,CAAA,CAAG,EAAE,EACP,EAEOI,EAAAA,CAAQN","file":"chunk-SUV7NR2J.mjs","sourcesContent":["import { useEffect, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleFullScreen, handleLockOrientation } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/legacy/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\n\r\nconst FullScreen = () => {\r\n const { isFullScreen } = useAppSelector(({ controller: { firstPlay, isFullScreen } }) => ({ firstPlay, isFullScreen }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useEffect(() => {\r\n if (!conditions(ConditionName.isFirstPlay)) dispatch(setActiveElements(false));\r\n }, [isFullScreen]);\r\n\r\n return (\r\n <div className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={conditions(ConditionName.isFullScreen) ? IMAGES.nonFullScreen : IMAGES.fullScreen}\r\n alt=\"fullScreen-icon\"\r\n className={`pl-cursor-pointer`}\r\n width={20}\r\n height={20}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onClick={() => {\r\n handleFullScreen();\r\n handleLockOrientation();\r\n }}\r\n id={conditions(ConditionName.isFullScreen) ? \"exit-full-s\" : \"full-s\"}\r\n />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n title={`${conditions(ConditionName.isFullScreen) ? \"خروج از\" : \"\"} تمام صفحه`}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default FullScreen;\r\n","import { conditions } from \"../../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../../helpers/interfaces/enums\";\r\nimport { IControllbarTooltipProps } from \"../../../../helpers/interfaces/interfaces\";\r\n\r\nconst ControllbarTooltip = ({ title, className }: IControllbarTooltipProps) => (\r\n <span\r\n className={`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${conditions(ConditionName.isFullScreen) ? \"pl-bottom-[300%]\" : \"pl-bottom-[270%]\"} pl-rounded-[8px] pl-text-[10px] pl-px-4 pl-py-[13px] pl-font-normal ${className}`}\r\n >\r\n {title}\r\n </span>\r\n);\r\n\r\nexport default ControllbarTooltip;\r\n","import { useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport Image from \"next/legacy/image\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport store from \"../../../helpers/redux/store\";\r\nimport { volumeLog } from \"../../../helpers/logs/logs\";\r\nimport { sendFluentLog } from \"../../../helpers/logs/fluentdLogger\";\r\nimport { setUserSettings } from \"../../../helpers/redux/slices/userSlice\";\r\nimport { handleChangeSoundVolume } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport IMAGES from \"../../../images/importImages\";\r\n\r\nconst SoundVolume = () => {\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\r\n const { settings } = useAppSelector(({ user: { settings } }) => ({ settings }), shallowEqual);\r\n\r\n const primaryVolumeRef = useRef<number>(settings.volume);\r\n\r\n const handleMouseUp = () => {\r\n if (primaryVolumeRef.current !== settings.volume) {\r\n const { settings } = store.getState().user;\r\n sendFluentLog(volumeLog(primaryVolumeRef.current, settings.volume));\r\n primaryVolumeRef.current = settings.volume;\r\n // createSettings({ ...settings, volume: settings.volume });\r\n dispatch(setUserSettings({ ...settings, volume: settings.volume }));\r\n }\r\n };\r\n\r\n const handleMute = (type: string) => {\r\n const { settings } = store.getState().user;\r\n if (type === \"mute\") {\r\n handleChangeSoundVolume(0);\r\n sendFluentLog(volumeLog(settings.volume, 0));\r\n // createSettings({ ...settings, volume: 0 });\r\n } else {\r\n sendFluentLog(volumeLog(settings.volume, 100));\r\n handleChangeSoundVolume(100);\r\n // createSettings({ ...settings, volume: 100 });\r\n }\r\n };\r\n\r\n return (\r\n <div className={`pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon`}>\r\n {!conditions(ConditionName.isTouchScreen) && (\r\n <input\r\n onMouseUp={handleMouseUp}\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"100\"\r\n value={settings.volume}\r\n onChange={(event) => handleChangeSoundVolume(+event.target.value)}\r\n className=\"pl-soundVolume pl-cursor-pointer rounded-full\"\r\n style={{ background: `linear-gradient(to right, white ${settings.volume}%, rgba(255,255,255,0.3) 0)` }}\r\n />\r\n )}\r\n <div className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={conditions(ConditionName.hasSound) ? IMAGES.unMute : IMAGES.mute}\r\n alt={conditions(ConditionName.hasSound) ? \"unmute-icon\" : \"mute-icon\"}\r\n className={`pl-flex pl-items-center pl-cursor-pointer`}\r\n width={20}\r\n height={20}\r\n onClick={() => (conditions(ConditionName.hasSound) ? handleMute(\"mute\") : handleMute(\"unmute\"))}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n id={conditions(ConditionName.hasSound) ? \"mute\" : \"unmute\"}\r\n />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n className=\"pl-left-0\"\r\n title={conditions(ConditionName.hasSound) ? \"صدا\" : \"بی‌صدا\"}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolume;\r\n","import { useEffect } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\r\nimport { setIsFullScreen } from \"../redux/slices/controllerSlice\";\r\nimport { handleVideoElementSizeInfo } from \"../redux/actions/controller.actions\";\r\nimport { fullscreenLog } from \"../logs/logs\";\r\nimport { sendFluentLog } from \"../logs/fluentdLogger\";\r\n\r\nconst useFullScreen = () => {\r\n const dispatch = useAppDispatch();\r\n useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n\r\n useEffect(() => {\r\n const handleChangeFullScreen = () => {\r\n const isFullScreen = document.fullscreenElement;\r\n\r\n if (isFullScreen) dispatch(setIsFullScreen(true));\r\n else {\r\n dispatch(setIsFullScreen(false));\r\n handleVideoElementSizeInfo();\r\n sendFluentLog(fullscreenLog(\"exitFullScreen\"));\r\n document.body.style.overflow = \"auto\"\r\n }\r\n };\r\n\r\n if (document.addEventListener) {\r\n document.addEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\r\n }\r\n\r\n () => {\r\n document.removeEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\r\n };\r\n }, []);\r\n};\r\n\r\nexport default useFullScreen;\r\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/fullScreen/fullScreen.tsx","../src/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbarTooltip.tsx","../src/videoPlayerLibrary/components/custom-components/soundVolume/soundVolume.tsx","../src/videoPlayerLibrary/helpers/hooks/useFullScreen.tsx"],"names":["init_esm_shims","ControllbarTooltip","title","className","jsx","conditions","controllbarTooltip_default","FullScreen","isFullScreen","useAppSelector","firstPlay","shallowEqual","showTooltip","setShowTooltip","useState","dispatch","useAppDispatch","useEffect","setActiveElements","jsxs","Image","importImages_default","handleFullScreen","handleLockOrientation","fullScreen_default","SoundVolume","settings","primaryVolumeRef","useRef","handleMouseUp","store_default","sendFluentLog","volumeLog","setUserSettings","handleMute","type","handleChangeSoundVolume","event","soundVolume_default","useFullScreen","params","handleChangeFullScreen","setIsFullScreen","handleVideoElementSizeInfo","fullscreenLog","useFullScreen_default"],"mappings":"+VAAAA,CAAAA,EAAAA,CCAAA,CAAAA,EAAAA,CAIA,IAAMC,CAAAA,CAAqB,CAAC,CAAE,KAAA,CAAAC,CAAAA,CAAO,SAAA,CAAAC,CAAU,CAAA,GAC3CC,GAAAA,CAAC,MAAA,CAAA,CACG,SAAA,CAAW,CAAA,qDAAA,EAAwDC,EAAAA,CAAAA,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CAAiB,wBAAA,CAA0BH,CAAAA,CAAwB,KAAK,CAAA,CACjF,QAAA,CAAS,gBAAA,CAAiB,qBAAA,CAAuBA,CAAAA,CAAwB,KAAK,CAAA,CAC9E,QAAA,CAAS,gBAAA,CAAiB,kBAAA,CAAoBA,CAAAA,CAAwB,KAAK,CAAA,CAC3E,QAAA,CAAS,gBAAA,CAAiB,oBAAA,CAAsBA,CAAAA,CAAwB,KAAK,CAAA,EASjF,CAAA,CAAG,EAAE,EACP,EAEOI,EAAAA,CAAQN","file":"chunk-ZBCISOHJ.mjs","sourcesContent":["import { useEffect, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleFullScreen, handleLockOrientation } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/legacy/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\n\r\nconst FullScreen = () => {\r\n const { isFullScreen } = useAppSelector(({ controller: { firstPlay, isFullScreen } }) => ({ firstPlay, isFullScreen }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useEffect(() => {\r\n if (!conditions(ConditionName.isFirstPlay)) dispatch(setActiveElements(false));\r\n }, [isFullScreen]);\r\n\r\n return (\r\n <div className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={conditions(ConditionName.isFullScreen) ? IMAGES.nonFullScreen : IMAGES.fullScreen}\r\n alt=\"fullScreen-icon\"\r\n className={`pl-cursor-pointer`}\r\n width={20}\r\n height={20}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onClick={() => {\r\n handleFullScreen();\r\n handleLockOrientation();\r\n }}\r\n id={conditions(ConditionName.isFullScreen) ? \"exit-full-s\" : \"full-s\"}\r\n />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n title={`${conditions(ConditionName.isFullScreen) ? \"خروج از\" : \"\"} تمام صفحه`}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default FullScreen;\r\n","import { conditions } from \"../../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../../helpers/interfaces/enums\";\r\nimport { IControllbarTooltipProps } from \"../../../../helpers/interfaces/interfaces\";\r\n\r\nconst ControllbarTooltip = ({ title, className }: IControllbarTooltipProps) => (\r\n <span\r\n className={`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${conditions(ConditionName.isFullScreen) ? \"pl-bottom-[300%]\" : \"pl-bottom-[270%]\"} pl-rounded-[8px] pl-text-[10px] pl-px-4 pl-py-[13px] pl-font-normal ${className}`}\r\n >\r\n {title}\r\n </span>\r\n);\r\n\r\nexport default ControllbarTooltip;\r\n","import { useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport Image from \"next/legacy/image\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport store from \"../../../helpers/redux/store\";\r\nimport { volumeLog } from \"../../../helpers/logs/logs\";\r\nimport { sendFluentLog } from \"../../../helpers/logs/fluentdLogger\";\r\nimport { setUserSettings } from \"../../../helpers/redux/slices/userSlice\";\r\nimport { handleChangeSoundVolume } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport IMAGES from \"../../../images/importImages\";\r\n\r\nconst SoundVolume = () => {\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\r\n const { settings } = useAppSelector(({ user: { settings } }) => ({ settings }), shallowEqual);\r\n\r\n const primaryVolumeRef = useRef<number>(settings.volume);\r\n\r\n const handleMouseUp = () => {\r\n if (primaryVolumeRef.current !== settings.volume) {\r\n const { settings } = store.getState().user;\r\n sendFluentLog(volumeLog(primaryVolumeRef.current, settings.volume));\r\n primaryVolumeRef.current = settings.volume;\r\n // createSettings({ ...settings, volume: settings.volume });\r\n dispatch(setUserSettings({ ...settings, volume: settings.volume }));\r\n }\r\n };\r\n\r\n const handleMute = (type: string) => {\r\n const { settings } = store.getState().user;\r\n if (type === \"mute\") {\r\n handleChangeSoundVolume(0);\r\n sendFluentLog(volumeLog(settings.volume, 0));\r\n // createSettings({ ...settings, volume: 0 });\r\n } else {\r\n sendFluentLog(volumeLog(settings.volume, 100));\r\n handleChangeSoundVolume(100);\r\n // createSettings({ ...settings, volume: 100 });\r\n }\r\n };\r\n\r\n return (\r\n <div className={`pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon`}>\r\n {!conditions(ConditionName.isTouchScreen) && (\r\n <input\r\n onMouseUp={handleMouseUp}\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"100\"\r\n value={settings.volume}\r\n onChange={(event) => handleChangeSoundVolume(+event.target.value)}\r\n className=\"pl-soundVolume pl-cursor-pointer rounded-full\"\r\n style={{ background: `linear-gradient(to right, white ${settings.volume}%, rgba(255,255,255,0.3) 0)` }}\r\n />\r\n )}\r\n <div className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={conditions(ConditionName.hasSound) ? IMAGES.unMute : IMAGES.mute}\r\n alt={conditions(ConditionName.hasSound) ? \"unmute-icon\" : \"mute-icon\"}\r\n className={`pl-flex pl-items-center pl-cursor-pointer`}\r\n width={20}\r\n height={20}\r\n onClick={() => (conditions(ConditionName.hasSound) ? handleMute(\"mute\") : handleMute(\"unmute\"))}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n id={conditions(ConditionName.hasSound) ? \"mute\" : \"unmute\"}\r\n />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n className=\"pl-left-0\"\r\n title={conditions(ConditionName.hasSound) ? \"صدا\" : \"بی‌صدا\"}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolume;\r\n","import { useEffect } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\r\nimport { setIsFullScreen } from \"../redux/slices/controllerSlice\";\r\nimport { handleVideoElementSizeInfo } from \"../redux/actions/controller.actions\";\r\nimport { fullscreenLog } from \"../logs/logs\";\r\nimport { sendFluentLog } from \"../logs/fluentdLogger\";\r\n\r\nconst useFullScreen = () => {\r\n const dispatch = useAppDispatch();\r\n useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n\r\n useEffect(() => {\r\n const handleChangeFullScreen = () => {\r\n const isFullScreen = document.fullscreenElement;\r\n\r\n if (isFullScreen) dispatch(setIsFullScreen(true));\r\n else {\r\n dispatch(setIsFullScreen(false));\r\n handleVideoElementSizeInfo();\r\n sendFluentLog(fullscreenLog(\"exitFullScreen\"));\r\n document.body.style.overflow = \"auto\"\r\n }\r\n };\r\n\r\n if (document.addEventListener) {\r\n document.addEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\r\n }\r\n\r\n () => {\r\n document.removeEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\r\n };\r\n }, []);\r\n};\r\n\r\nexport default useFullScreen;\r\n"]}
@@ -1,9 +1,9 @@
1
- import {a as a$1,b as b$1,c,d}from'./chunk-SUV7NR2J.mjs';import {a as a$4}from'./chunk-OEFD3YXU.mjs';import {b}from'./chunk-M4NZ4V5H.mjs';import {a as a$5}from'./chunk-4I3S32RN.mjs';import {b as b$2,a as a$6}from'./chunk-SIUJSGLY.mjs';import {i,h,k,a as a$3,j}from'./chunk-ZMWH4RA6.mjs';import {ha,fa,ga,da,oa,qa,f,D,F,J,A,ia,z,Da,C,H,P,r,la,ma,ka,Ea,E,pa,a as a$2,S,G,q,R as R$1,U,ca,ea,ra,k as k$1,l}from'./chunk-YZYTKWCY.mjs';import {a}from'./chunk-TM66GJCG.mjs';import {e}from'./chunk-NXC6LNWJ.mjs';import {memo,forwardRef,useState,useRef,useEffect}from'react';import {shallowEqual}from'react-redux';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import re from'next/legacy/image';import {createPortal}from'react-dom';import Vo from'next/dynamic';e();e();e();var Jo=()=>{let{details:e,params:l}=ha(({videoData:{details:o,params:i}})=>({details:o,params:i}),shallowEqual);return jsx("div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${fa("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:fa("hasTitle")?e.title:l.id})},Nt=Jo;e();var el=()=>jsxs("div",{className:`pl-relative animate__animated animate__faster ${fa("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsx(re,{src:a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>h("unlock")}),!localStorage.getItem("unlock-click")&&jsx("p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),Mt=el;var ll=()=>(ha(({controller:{lock:e,activeElements:l}})=>({lock:e,activeElements:l}),shallowEqual),jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-8 pl-pt-8 ${fa("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[fa("showTitle")&&jsx(Nt,{}),fa("isLock")&&jsx(Mt,{})]})),At=ll;e();e();var pl=()=>(ha(({controller:{play:e}})=>({play:e}),shallowEqual),ha(({videoData:{videoElementSizeInfo:e,params:l}})=>({videoElementSizeInfo:e,params:l}),shallowEqual),jsx("div",{className:`${!fa("isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:jsx(re,{alt:"",src:fa("isPlay")?a.bigPause:a.bigPlay,width:40,height:40,onClick:e=>a$3(e),onDoubleClick:e=>e.stopPropagation(),className:`${fa("isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),_t=pl;var sl=()=>{let[e,l]=useState(false),[o,i]=useState(false),{firstPlay:r}=ha(({controller:{lock:a,firstPlay:f}})=>({lock:a,firstPlay:f}),shallowEqual),{activeElements:p,isLoading:u}=ha(({controller:{activeElements:a,isLoading:f}})=>({activeElements:a,isLoading:f}),shallowEqual);return useEffect(()=>{let a=null;return fa("isFirstPlay")||fa("isActiveElements")?a=setTimeout(()=>i(true),100):i(false),()=>clearTimeout(a)},[p]),useEffect(()=>{let a;return fa("isLoading")?a=setTimeout(()=>l(true),fa("isFirstPlay")?0:b$2):l(false),()=>{clearTimeout(a),l(false);}},[u,r]),jsx("main",{className:"pl-flex-1 pl-mt-1",children:e?jsx(a$4,{}):jsx(Fragment,{children:o&&!fa("isLock")&&jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${fa("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxs("div",{onClick:a=>a.stopPropagation(),className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:4},children:[!fa("isFirstPlay")&&jsx(a$5,{type:"forward"}),jsx(_t,{}),!fa("isFirstPlay")&&jsx(a$5,{type:"backward"})]})})})})},Vt=sl;e();e();e();e();var Qe=e=>{let{videoElementSizeInfo:l}=P.getState().videoData,{duration:o}=P.getState().controller,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(i<=l.right&&i>0)return (i-l.left)/l.width*o},K=e=>{let{videoElementSizeInfo:l}=P.getState().videoData,o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(o<=l.right&&o>0)return o-l.left},qt=e=>{let{duration:l}=P.getState().controller;return e*la()/l},he=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2);},ml=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=P.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out";},cl=(e,l)=>{let{videoElementSizeInfo:o}=P.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(K(e)>i.getBoundingClientRect().width/2&&K(e)<o.right-o.left-i.getBoundingClientRect().width/2?l.style.left=`${K(e)-i.offsetWidth/2}px`:K(e)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?l.style.left="0px":ia().offsetLeft+ia().offsetWidth<K(e)+i.offsetWidth&&(l.style.left=`${ia().offsetWidth-i.offsetWidth}px`));},dl=(e,l,o)=>{l&&ml(l),P.getState().videoData.details.vtt?cl(e,l):l.style.left=`${K(e)-30}px`,P.dispatch(q(Number(Qe(e)))),o.textContent=`${S(Qe(e))}`;},ve=(e,l=false)=>{let{videoElementSizeInfo:o}=P.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i&&r&&p<=o.right&&p>o.left?(dl(e,i,r),l&&setTimeout(()=>he(i),2e3)):he(i);},Rt=e=>{let l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;ka()&&(l<=e.view.innerWidth&&l>0?ka().style.width=`${K(e)}px`:l<=e.view.innerWidth?ka().style.width=0:l>0&&(ka().style.width="100%"));},Xt=(e,l$1,o)=>{e.preventDefault(),e.stopPropagation(),o(true);let i=P.dispatch,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r<=e.view.innerWidth&&r>0&&(i(k$1(true)),i(l(true)),sessionStorage.setItem("previousVideoTime",String(ia().currentTime)),e.target.setPointerCapture(e.pointerId),l$1.length>0&&l$1.map(p=>clearTimeout(p)));},Ge=e=>{e.preventDefault(),e.stopPropagation();let l$1=P.dispatch,{activePointerProgressBar:o}=P.getState().controller,{left:i}=P.getState().videoData.videoElementSizeInfo,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),o&&(l$1(l(true)),ve(e),Rt(e),ia()?.pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Ht=(e,l$1,o,i$1)=>{i$1(false),e.preventDefault(),e.stopPropagation();let r=P.dispatch,{duration:p}=P.getState().controller,{left:u,right:a}=P.getState().videoData.videoElementSizeInfo,f=P.getState().videoData.params;e.target.removeEventListener("pointermove",Ge);let d=e.clientX!==void 0?e.clientX:e.touches[0].clientX,h=0;d>u&&d<a?h=Qe(e):d<u?h=0:d>0&&(h=p),fa("isStaticFormat")||i(ia().currentTime,h),ia().currentTime=h,fa("hasOnChangeCurrentTime")&&f.onChangeCurrentTime(h),P.getState().controller.activePointerProgressBar&&(r(k$1(false)),r(l(false)),ia().play(),ve(e,true),sessionStorage.setItem("current-time",String(h)),Rt(e),ul(e,r,l$1,o));},ul=(e,l,o,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:u}=P.getState().popovers,{delayTurnOffControlbar:a}=P.getState().controller;e.pointerType==="touch"&&!u&&a&&l(f(false));},a$6);r.push(p),o(r);},Ut=()=>{let e=Date.now();ia().play().then(()=>oa(ra(Date.now()-e)));},Wt=e=>ve(e),Qt=()=>{let e=document.querySelector(".pl-progressTooltip");he(e);},fl=e=>{let l=e.split("."),i=l[0].split(":");return {milliseconds:parseInt(l[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},zt=e=>{let l=fl(e);return parseInt(l.hours*3600+l.minutes*60+l.seconds+l.milliseconds/1e3,10)},hl=e=>{let l=e.split(/#xywh=/i),o=l[0],r=l[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:o}},vl=(e,l)=>e.indexOf("//")>=0?e:l.indexOf("//")===0?[l.replace(/\/$/gi,""),e.trim()].join("/"):l.indexOf("//")>0?[l.trim(),e.trim()].join("/"):e,gl=(e,l)=>{let o={},i=l.split(/\/\w+\.vtt\s?/)[0];if(e=vl(e,i),!e.match(/#xywh=/i))return o.background='url("'+e+l.split(/\/\w+\.vtt\s?/)[1]+'")',o;let r=hl(e);return o.background='url("'+r.image+l.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",o.width=r.w+"px",o.height=r.h+"px",o.url=r.image,o},Gt=(e,l)=>{fetch(e).then(o=>{if(!o.ok)throw P.dispatch(r({...P.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return o.text()}).then(o=>{let i=[];o.split(/[\r\n][\r\n]/i).forEach(p=>{if(p.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let u=p.split(/[\r\n]/i),f=u[0].split(/ ?--> ?/i),d=f[0],h=f[1],c=u[1],S=gl(c,e);i.push({start:zt(d),end:zt(h),css:S});}}),l(i);}).catch(o=>{console.error("Error fetching file:",o);});},Zt=(e,l,o)=>{for(let i=0;i<l.length;++i){let r=l[i];if(e>=r.start&&e<r.end){if(r.css.url&&!o[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return o[r.css.url]=p,p}else if(r.css.url)return o[r.css.url]}}};var bl=()=>{let{details:e}=ha(({videoData:{details:a}})=>({details:a}),shallowEqual),{tooltipTime:l}=ha(({controller:{tooltipTime:a,activeElements:f,isFullScreen:d}})=>({tooltipTime:a,activeElements:f,isFullScreen:d}),shallowEqual),o={},[i,r]=useState(void 0),[p,u]=useState(fa("isTouchScreen")?e.vtt_mobile:e.vtt);return useEffect(()=>{u(e.vtt_mobile);},[e.vtt_mobile]),useEffect(()=>{p&&Gt(e.vtt_mobile,r);},[p]),fa("isActiveElements")?jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-px-[10px] pl-pt-[5px] pl-mr-[-25px] pl-text-white pl-text-[14px] ${p&&i?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[p&&!!i&&jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px] pl-mb-2",children:jsx("div",{className:"pl-rounded-[8px]",style:Zt(l,i,o)})}),jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsx(Fragment,{})},jt=memo(bl);e();e();var Tl=(e,l)=>{useEffect(()=>{let o=i=>{!e.current||e.current.contains(i.target)||l(i);};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o);}},[e,l]);},B=Tl;e();var Pl=({name:e,className:l,dataMarker:o})=>jsx("img",{"data-marker":o,src:`${ma()}/${e}.png`,alt:e,className:l}),ge=Pl;var Nl=()=>{ga();let {duration:l,activeElements:o}=ha(({controller:{duration:m,activeElements:b,isFullScreen:W}})=>({duration:m,activeElements:b,isFullScreen:W}),shallowEqual),{markers:i$1}=ha(({videoData:{markers:m,videoElementSizeInfo:b}})=>({markers:m,videoElementSizeInfo:b}),shallowEqual),[r,p]=useState(void 0),[u,a]=useState([]),[f,d]=useState({}),[h,c]=useState(false),S=m=>l?la()*m/l:0,A=(m,b,W,ne,j,Q,ae,qe)=>{m.stopPropagation();let $=24*b/(la()+5),ee=[],Zo=0;qe.map(ye=>{ye.time>b-$&&ye.time<b+$&&(ee.push(ye),Zo+=ye.time);}),ee.length>1?a(ee):(ee=[],a([]),v(m,b,W,ne,j,Q,ae));},v=(m,b,W,ne,j,Q,ae)=>{m.stopPropagation(),ve(m,ae),i(ia().currentTime,b),ia().currentTime=b,ka()&&(ka().style.width=S(b)),oa(Ea(W,b,ne,j,Q));};useEffect(()=>{fa("isActiveElements")||a([]);},[o]);let I=useRef(null);B(I,()=>a([])),useEffect(()=>{if(u.length>0){let m=da(document.getElementsByClassName("pl-overlapMarkers")[0]);if(m==="inViewport")return c(true),d({left:S(u[0].time)});if(m==="OutViewPortFromLeft")return c(false),d({left:0});if(m==="OutViewPortFromRight")return c(false),d({right:0})}},[u,document.getElementsByClassName("pl-overlapMarkers")[0]]);let E=m=>{m.preventDefault(),fa("isTouchScreen")&&p(Number(m.target.getAttribute("data-marker")));};return jsxs(Fragment,{children:[i$1.map(m=>jsx("div",{onContextMenu:E,"data-marker":m.time,onClick:b=>A(b,m.time,m.id,m.title,m.description,m.sticker,true,i$1),onDoubleClick:b=>b.stopPropagation(),children:jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-p-1 ${fa("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:S(m.time),zIndex:6},"data-marker":m.time,children:[m.isPersonal!==null&&m.isPersonal!==void 0&&jsx("div",{className:"pl-absolute pl-rounded-full pl-top-[-2px] pl-right-[-1px] pl-bg-main pl-w-2 pl-h-2"}),jsx(ge,{dataMarker:m.time,name:m.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},m.id)),u.length>0&&jsx("div",{className:`pl-overlapMarkers ${h?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} pl-absolute pl-bottom-[45px] pl-px-1 pl-py-2 pl-flex pl-gap-3 pl-flex-row-reverse pl-justify-end pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-ml-[-10px] animate__animated animate__fadeInUp pl-opacity-100`,ref:I,style:f,children:u.map(m=>jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":m.time,onClick:b=>v(b,m.time,m.id,m.title,m.description,m.sticker,true),onDoubleClick:b=>b.stopPropagation(),children:jsx(ge,{dataMarker:m.time,name:m.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},m.id))})]})},lo=memo(Nl);var Ll=()=>{let[e,l]=useState(false);useEffect(()=>{he(document.querySelector(".progressTooltip"));},[]);let{duration:o,currentTime:i,bufferedTimeWidth:r}=ha(({controller:{duration:a,currentTime:f,bufferedTimeWidth:d}})=>({duration:a,currentTime:f,bufferedTimeWidth:d}),shallowEqual);ha(({videoData:{params:a,videoElementSizeInfo:f}})=>({params:a,videoElementSizeInfo:f}),shallowEqual);let[p,u]=useState([]);return jsxs("div",{className:`${fa("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxs("div",{className:"pl-relative",children:[jsx(jt,{}),jsx(lo,{})]}),jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:a=>Xt(a,p,l),onPointerMove:Ge,onPointerUp:a=>Ht(a,u,p,l),onMouseMove:Wt,onMouseOut:Qt,onClick:Ut,onDoubleClick:a=>a.stopPropagation(),children:jsxs("div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxs("div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${r}%`}}),jsx("div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/o*la()}px`}})]})]})})]})},po=Ll;e();e();var _l=()=>{let[e,l]=useState(false),o=ga(),{params:i,details:r}=ha(({videoData:{params:p,details:u}})=>({params:p,details:u}),shallowEqual);return jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(re,{alt:"",onMouseOver:()=>!fa("isTouchScreen")&&l(true),onMouseLeave:()=>!fa("isTouchScreen")&&l(false),src:a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),ia()?.pause(),o(a$2(false)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:ia().currentTime}));}}),e&&jsx(a$1,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631 "})]})},no=_l;e();e();var mo=forwardRef(({children:e,status:l,onClose:o,type:i,classNames:r,parentClassNames:p,styles:u,isBlurBackground:a,isFullHeight:f=false,isHeader:d,isHasCatchUpLineOnTop:h=false,animation:c,scrollbar:S=false,isFocusOnInput:A=false},v)=>{let[I,E]=useState(l),[m,b]=useState(0),[W,ne]=useState(0),{videoElementSizeInfo:j}=ha(({videoData:{videoElementSizeInfo:$}})=>({videoElementSizeInfo:$}),shallowEqual),Q=useRef(0);useEffect(()=>{let $;return l?E(true):$=setTimeout(()=>{o(false),b(0),E(false);},500),()=>clearTimeout($)},[l]);let ae=$=>{let ee=document.getElementById("popover-content");Q.current||(Q.current=window.innerHeight-j.top-ee?.getBoundingClientRect().top),$.stopPropagation(),window.innerHeight-j.top-$.touches[0].clientY<Q.current&&b(window.innerHeight-$.touches[0].clientY),ne(1000005);},qe=()=>{o();},Re=jsxs(Fragment,{children:[a&&jsx("div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${l?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),jsx("div",{className:`${i==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${p}`,style:{zIndex:f&&!A?W:1000004},children:jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
1
+ import {a as a$1,b as b$1,c,d}from'./chunk-ZBCISOHJ.mjs';import {a as a$4}from'./chunk-OEFD3YXU.mjs';import {b}from'./chunk-OUXHISO6.mjs';import {a as a$5}from'./chunk-DCDHZHCP.mjs';import {b as b$2,a as a$6}from'./chunk-SIUJSGLY.mjs';import {i,h,k,a as a$3,j}from'./chunk-QZBK73JD.mjs';import {ha,fa,ga,da,ka,qa,f,D,F,J,A,la,z,Da,C,H,P,r,oa,ia,na,Ea,E,pa,a as a$2,S,G,q,R as R$1,U,ca,ea,ra,k as k$1,l}from'./chunk-GT7NHW3Y.mjs';import {a}from'./chunk-TM66GJCG.mjs';import {e}from'./chunk-NXC6LNWJ.mjs';import {memo,forwardRef,useState,useRef,useEffect}from'react';import {shallowEqual}from'react-redux';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import re from'next/legacy/image';import {createPortal}from'react-dom';import Vo from'next/dynamic';e();e();e();var Jo=()=>{let{details:e,params:l}=ha(({videoData:{details:o,params:i}})=>({details:o,params:i}),shallowEqual);return jsx("div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${fa("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:fa("hasTitle")?e.title:l.id})},Nt=Jo;e();var el=()=>jsxs("div",{className:`pl-relative animate__animated animate__faster ${fa("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsx(re,{src:a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>h("unlock")}),!localStorage.getItem("unlock-click")&&jsx("p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),Mt=el;var ll=()=>(ha(({controller:{lock:e,activeElements:l}})=>({lock:e,activeElements:l}),shallowEqual),jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-8 pl-pt-8 ${fa("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[fa("showTitle")&&jsx(Nt,{}),fa("isLock")&&jsx(Mt,{})]})),At=ll;e();e();var pl=()=>(ha(({controller:{play:e}})=>({play:e}),shallowEqual),ha(({videoData:{videoElementSizeInfo:e,params:l}})=>({videoElementSizeInfo:e,params:l}),shallowEqual),jsx("div",{className:`${!fa("isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:jsx(re,{alt:"",src:fa("isPlay")?a.bigPause:a.bigPlay,width:40,height:40,onClick:e=>a$3(e),onDoubleClick:e=>e.stopPropagation(),className:`${fa("isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),_t=pl;var sl=()=>{let[e,l]=useState(false),[o,i]=useState(false),{firstPlay:r}=ha(({controller:{lock:a,firstPlay:f}})=>({lock:a,firstPlay:f}),shallowEqual),{activeElements:p,isLoading:u}=ha(({controller:{activeElements:a,isLoading:f}})=>({activeElements:a,isLoading:f}),shallowEqual);return useEffect(()=>{let a=null;return fa("isFirstPlay")||fa("isActiveElements")?a=setTimeout(()=>i(true),100):i(false),()=>clearTimeout(a)},[p]),useEffect(()=>{let a;return fa("isLoading")?a=setTimeout(()=>l(true),fa("isFirstPlay")?0:b$2):l(false),()=>{clearTimeout(a),l(false);}},[u,r]),jsx("main",{className:"pl-flex-1 pl-mt-1",children:e?jsx(a$4,{}):jsx(Fragment,{children:o&&!fa("isLock")&&jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${fa("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxs("div",{onClick:a=>a.stopPropagation(),className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:4},children:[!fa("isFirstPlay")&&jsx(a$5,{type:"forward"}),jsx(_t,{}),!fa("isFirstPlay")&&jsx(a$5,{type:"backward"})]})})})})},Vt=sl;e();e();e();e();var Qe=e=>{let{videoElementSizeInfo:l}=P.getState().videoData,{duration:o}=P.getState().controller,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(i<=l.right&&i>0)return (i-l.left)/l.width*o},K=e=>{let{videoElementSizeInfo:l}=P.getState().videoData,o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(o<=l.right&&o>0)return o-l.left},qt=e=>{let{duration:l}=P.getState().controller;return e*oa()/l},he=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2);},ml=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=P.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out";},cl=(e,l)=>{let{videoElementSizeInfo:o}=P.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(K(e)>i.getBoundingClientRect().width/2&&K(e)<o.right-o.left-i.getBoundingClientRect().width/2?l.style.left=`${K(e)-i.offsetWidth/2}px`:K(e)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?l.style.left="0px":la().offsetLeft+la().offsetWidth<K(e)+i.offsetWidth&&(l.style.left=`${la().offsetWidth-i.offsetWidth}px`));},dl=(e,l,o)=>{l&&ml(l),P.getState().videoData.details.vtt?cl(e,l):l.style.left=`${K(e)-30}px`,P.dispatch(q(Number(Qe(e)))),o.textContent=`${S(Qe(e))}`;},ve=(e,l=false)=>{let{videoElementSizeInfo:o}=P.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i&&r&&p<=o.right&&p>o.left?(dl(e,i,r),l&&setTimeout(()=>he(i),2e3)):he(i);},Rt=e=>{let l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;na()&&(l<=e.view.innerWidth&&l>0?na().style.width=`${K(e)}px`:l<=e.view.innerWidth?na().style.width=0:l>0&&(na().style.width="100%"));},Xt=(e,l$1,o)=>{e.preventDefault(),e.stopPropagation(),o(true);let i=P.dispatch,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r<=e.view.innerWidth&&r>0&&(i(k$1(true)),i(l(true)),sessionStorage.setItem("previousVideoTime",String(la().currentTime)),e.target.setPointerCapture(e.pointerId),l$1.length>0&&l$1.map(p=>clearTimeout(p)));},Ge=e=>{e.preventDefault(),e.stopPropagation();let l$1=P.dispatch,{activePointerProgressBar:o}=P.getState().controller,{left:i}=P.getState().videoData.videoElementSizeInfo,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),o&&(l$1(l(true)),ve(e),Rt(e),la()?.pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Ht=(e,l$1,o,i$1)=>{i$1(false),e.preventDefault(),e.stopPropagation();let r=P.dispatch,{duration:p}=P.getState().controller,{left:u,right:a}=P.getState().videoData.videoElementSizeInfo,f=P.getState().videoData.params;e.target.removeEventListener("pointermove",Ge);let d=e.clientX!==void 0?e.clientX:e.touches[0].clientX,h=0;d>u&&d<a?h=Qe(e):d<u?h=0:d>0&&(h=p),fa("isStaticFormat")||i(la().currentTime,h),la().currentTime=h,fa("hasOnChangeCurrentTime")&&f.onChangeCurrentTime(h),P.getState().controller.activePointerProgressBar&&(r(k$1(false)),r(l(false)),la().play(),ve(e,true),sessionStorage.setItem("current-time",String(h)),Rt(e),ul(e,r,l$1,o));},ul=(e,l,o,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:u}=P.getState().popovers,{delayTurnOffControlbar:a}=P.getState().controller;e.pointerType==="touch"&&!u&&a&&l(f(false));},a$6);r.push(p),o(r);},Ut=()=>{let e=Date.now();la().play().then(()=>ka(ra(Date.now()-e)));},Wt=e=>ve(e),Qt=()=>{let e=document.querySelector(".pl-progressTooltip");he(e);},fl=e=>{let l=e.split("."),i=l[0].split(":");return {milliseconds:parseInt(l[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},zt=e=>{let l=fl(e);return parseInt(l.hours*3600+l.minutes*60+l.seconds+l.milliseconds/1e3,10)},hl=e=>{let l=e.split(/#xywh=/i),o=l[0],r=l[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:o}},vl=(e,l)=>e.indexOf("//")>=0?e:l.indexOf("//")===0?[l.replace(/\/$/gi,""),e.trim()].join("/"):l.indexOf("//")>0?[l.trim(),e.trim()].join("/"):e,gl=(e,l)=>{let o={},i=l.split(/\/\w+\.vtt\s?/)[0];if(e=vl(e,i),!e.match(/#xywh=/i))return o.background='url("'+e+l.split(/\/\w+\.vtt\s?/)[1]+'")',o;let r=hl(e);return o.background='url("'+r.image+l.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",o.width=r.w+"px",o.height=r.h+"px",o.url=r.image,o},Gt=(e,l)=>{fetch(e).then(o=>{if(!o.ok)throw P.dispatch(r({...P.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return o.text()}).then(o=>{let i=[];o.split(/[\r\n][\r\n]/i).forEach(p=>{if(p.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let u=p.split(/[\r\n]/i),f=u[0].split(/ ?--> ?/i),d=f[0],h=f[1],c=u[1],S=gl(c,e);i.push({start:zt(d),end:zt(h),css:S});}}),l(i);}).catch(o=>{console.error("Error fetching file:",o);});},Zt=(e,l,o)=>{for(let i=0;i<l.length;++i){let r=l[i];if(e>=r.start&&e<r.end){if(r.css.url&&!o[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return o[r.css.url]=p,p}else if(r.css.url)return o[r.css.url]}}};var bl=()=>{let{details:e}=ha(({videoData:{details:a}})=>({details:a}),shallowEqual),{tooltipTime:l}=ha(({controller:{tooltipTime:a,activeElements:f,isFullScreen:d}})=>({tooltipTime:a,activeElements:f,isFullScreen:d}),shallowEqual),o={},[i,r]=useState(void 0),[p,u]=useState(fa("isTouchScreen")?e.vtt_mobile:e.vtt);return useEffect(()=>{u(e.vtt_mobile);},[e.vtt_mobile]),useEffect(()=>{p&&Gt(e.vtt_mobile,r);},[p]),fa("isActiveElements")?jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-px-[10px] pl-pt-[5px] pl-mr-[-25px] pl-text-white pl-text-[14px] ${p&&i?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[p&&!!i&&jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px] pl-mb-2",children:jsx("div",{className:"pl-rounded-[8px]",style:Zt(l,i,o)})}),jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsx(Fragment,{})},jt=memo(bl);e();e();var Tl=(e,l)=>{useEffect(()=>{let o=i=>{!e.current||e.current.contains(i.target)||l(i);};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o);}},[e,l]);},B=Tl;e();var Pl=({name:e,className:l,dataMarker:o})=>jsx("img",{"data-marker":o,src:`${ia()}/${e}.png`,alt:e,className:l}),ge=Pl;var Nl=()=>{ga();let {duration:l,activeElements:o}=ha(({controller:{duration:m,activeElements:b,isFullScreen:W}})=>({duration:m,activeElements:b,isFullScreen:W}),shallowEqual),{markers:i$1}=ha(({videoData:{markers:m,videoElementSizeInfo:b}})=>({markers:m,videoElementSizeInfo:b}),shallowEqual),[r,p]=useState(void 0),[u,a]=useState([]),[f,d]=useState({}),[h,c]=useState(false),S=m=>l?oa()*m/l:0,A=(m,b,W,ne,j,Q,ae,qe)=>{m.stopPropagation();let $=24*b/(oa()+5),ee=[],Zo=0;qe.map(ye=>{ye.time>b-$&&ye.time<b+$&&(ee.push(ye),Zo+=ye.time);}),ee.length>1?a(ee):(ee=[],a([]),v(m,b,W,ne,j,Q,ae));},v=(m,b,W,ne,j,Q,ae)=>{m.stopPropagation(),ve(m,ae),i(la().currentTime,b),la().currentTime=b,na()&&(na().style.width=S(b)),ka(Ea(W,b,ne,j,Q));};useEffect(()=>{fa("isActiveElements")||a([]);},[o]);let I=useRef(null);B(I,()=>a([])),useEffect(()=>{if(u.length>0){let m=da(document.getElementsByClassName("pl-overlapMarkers")[0]);if(m==="inViewport")return c(true),d({left:S(u[0].time)});if(m==="OutViewPortFromLeft")return c(false),d({left:0});if(m==="OutViewPortFromRight")return c(false),d({right:0})}},[u,document.getElementsByClassName("pl-overlapMarkers")[0]]);let E=m=>{m.preventDefault(),fa("isTouchScreen")&&p(Number(m.target.getAttribute("data-marker")));};return jsxs(Fragment,{children:[i$1.map(m=>jsx("div",{onContextMenu:E,"data-marker":m.time,onClick:b=>A(b,m.time,m.id,m.title,m.description,m.sticker,true,i$1),onDoubleClick:b=>b.stopPropagation(),children:jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-p-1 ${fa("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:S(m.time),zIndex:6},"data-marker":m.time,children:[m.isPersonal!==null&&m.isPersonal!==void 0&&jsx("div",{className:"pl-absolute pl-rounded-full pl-top-[-2px] pl-right-[-1px] pl-bg-main pl-w-2 pl-h-2"}),jsx(ge,{dataMarker:m.time,name:m.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},m.id)),u.length>0&&jsx("div",{className:`pl-overlapMarkers ${h?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} pl-absolute pl-bottom-[45px] pl-px-1 pl-py-2 pl-flex pl-gap-3 pl-flex-row-reverse pl-justify-end pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-ml-[-10px] animate__animated animate__fadeInUp pl-opacity-100`,ref:I,style:f,children:u.map(m=>jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":m.time,onClick:b=>v(b,m.time,m.id,m.title,m.description,m.sticker,true),onDoubleClick:b=>b.stopPropagation(),children:jsx(ge,{dataMarker:m.time,name:m.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},m.id))})]})},lo=memo(Nl);var Ll=()=>{let[e,l]=useState(false);useEffect(()=>{he(document.querySelector(".progressTooltip"));},[]);let{duration:o,currentTime:i,bufferedTimeWidth:r}=ha(({controller:{duration:a,currentTime:f,bufferedTimeWidth:d}})=>({duration:a,currentTime:f,bufferedTimeWidth:d}),shallowEqual);ha(({videoData:{params:a,videoElementSizeInfo:f}})=>({params:a,videoElementSizeInfo:f}),shallowEqual);let[p,u]=useState([]);return jsxs("div",{className:`${fa("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxs("div",{className:"pl-relative",children:[jsx(jt,{}),jsx(lo,{})]}),jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:a=>Xt(a,p,l),onPointerMove:Ge,onPointerUp:a=>Ht(a,u,p,l),onMouseMove:Wt,onMouseOut:Qt,onClick:Ut,onDoubleClick:a=>a.stopPropagation(),children:jsxs("div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxs("div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${r}%`}}),jsx("div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/o*oa()}px`}})]})]})})]})},po=Ll;e();e();var _l=()=>{let[e,l]=useState(false),o=ga(),{params:i,details:r}=ha(({videoData:{params:p,details:u}})=>({params:p,details:u}),shallowEqual);return jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(re,{alt:"",onMouseOver:()=>!fa("isTouchScreen")&&l(true),onMouseLeave:()=>!fa("isTouchScreen")&&l(false),src:a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),la()?.pause(),o(a$2(false)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:la().currentTime}));}}),e&&jsx(a$1,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631 "})]})},no=_l;e();e();var mo=forwardRef(({children:e,status:l,onClose:o,type:i,classNames:r,parentClassNames:p,styles:u,isBlurBackground:a,isFullHeight:f=false,isHeader:d,isHasCatchUpLineOnTop:h=false,animation:c,scrollbar:S=false,isFocusOnInput:A=false},v)=>{let[I,E]=useState(l),[m,b]=useState(0),[W,ne]=useState(0),{videoElementSizeInfo:j}=ha(({videoData:{videoElementSizeInfo:$}})=>({videoElementSizeInfo:$}),shallowEqual),Q=useRef(0);useEffect(()=>{let $;return l?E(true):$=setTimeout(()=>{o(false),b(0),E(false);},500),()=>clearTimeout($)},[l]);let ae=$=>{let ee=document.getElementById("popover-content");Q.current||(Q.current=window.innerHeight-j.top-ee?.getBoundingClientRect().top),$.stopPropagation(),window.innerHeight-j.top-$.touches[0].clientY<Q.current&&b(window.innerHeight-$.touches[0].clientY),ne(1000005);},qe=()=>{o();},Re=jsxs(Fragment,{children:[a&&jsx("div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${l?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),jsx("div",{className:`${i==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${p}`,style:{zIndex:f&&!A?W:1000004},children:jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
2
2
  ${f&&"pl-h-full"}
3
3
  ${c||(window.innerWidth>768&&i==="modal"?l?"animate__fadeIn":"animate__fadeOut":l?"animate__fadeInUp":"animate__fadeOutDown")}
4
4
  ${fa("isTouchScreenPortrait")?"!pl-fixed !pl-right-0 !pl-left-0 !pl-bottom-0 !pl-w-full !pl-mb-0 pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white":"before:pl-hidden"}
5
5
  ${i!=="modal"&&"pl-absolute pl-bottom-[130%] pl-overflow-auto no-scrollbar"}
6
6
  ${r}
7
- `,style:{height:m||"max-content",maxHeight:"80vh",zIndex:1000004,...u},ref:v,id:"popover-content",children:jsxs(Fragment,{children:[d&&jsx("div",{onTouchMove:h?ae:()=>{},onTouchEndCapture:h?qe:()=>{},className:"pl-py-4",children:h&&jsx("div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"})}),jsx("div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!S&&"no-scrollbar"}`,onTouchMove:$=>$.stopPropagation(),children:e})]})})})]});return jsx(Fragment,{children:I&&jsx(Fragment,{children:i==="modal"?createPortal(jsx(Fragment,{children:Re}),document.getElementById("dialog-react-root-videoPlayer")):jsx("div",{id:"player-popover",children:Re})})})});mo.displayName="popover";var R=mo;e();var Ul=({setSection:e,showQualityLevelsIcon:l})=>{let o=ga(),{qualityLevels:i}=ha(({controller:{qualityLevels:c,manualQuality:S,autoQuality:A}})=>({qualityLevels:c,manualQuality:S,autoQuality:A}),shallowEqual),{settings:r}=ha(({user:{settings:c}})=>({settings:c}),shallowEqual),{qualityLevelsPopover:p}=ha(({popovers:{qualityLevelsPopover:c}})=>({qualityLevelsPopover:c}),shallowEqual);ha(({videoData:{params:c,videoElementSizeInfo:S}})=>({params:c,videoElementSizeInfo:S}),shallowEqual);let[u,a$2]=useState(false);i=[-1,...i];let f$1=(c,S)=>fa("isAutoQuality")&&S===-1?true:!fa("isAutoQuality")&&r.quality===c,d=useRef(null);B(d,()=>o(F(false)));let h=jsx("div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:i.map((c,S)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${f$1(S-1,c)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${fa("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:f$1(S-1,c)?()=>{}:()=>{oa(qa(c===-1?"auto":`${c}P`)),o(f(false)),o(D(false)),o(F(false)),o(J({...r,quality:c===-1?-1:S-1})),e&&e("main");},children:[!fa("isTouchScreen")&&f$1(S-1,c)&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(re,{src:a.tick,alt:"",width:12,height:9})}),fa("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${f$1(S-1,c)&&"pl-border-primary"}`,children:f$1(S-1,c)&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("span",{className:`pl-w-full pl-text-[14px] pl-text-black/[0.87] ${fa("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:c===-1?jsxs("span",{children:[jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsx("span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.5]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${c}p`})]},S))})});return jsx(Fragment,{children:l?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:d,children:[jsx(re,{src:a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>o(F(!p)),onMouseOver:()=>!fa("isTouchScreen")&&!fa("showQualityLevelsPopover")&&a$2(true),onMouseLeave:()=>!fa("isTouchScreen")&&a$2(false),className:"pl-cursor-pointer"}),u&&jsx(a$1,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsx(R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>o(F(false)),type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?d:void 0,isHeader:fa("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:h})]}):jsx(Fragment,{children:h})})},Ae=memo(Ul);e();e();var Wl=({className:e,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:l,onMouseOver:o,onMouseLeave:i,children:[jsx("path",{d:"M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"})]}),$e=Wl;var Kl=[.5,.75,1,1.25,1.5,1.75,2],jl=({setSection:e,showSpeedIcon:l})=>{let o=ga();ha(({videoData:{videoElementSizeInfo:d,params:h}})=>({videoElementSizeInfo:d,params:h}),shallowEqual);let{speedPopover:i}=ha(({popovers:{speedPopover:d}})=>({speedPopover:d}),shallowEqual),{settings:r}=ha(({user:{settings:d}})=>({settings:d}),shallowEqual),p=useRef(null),[u,a$2]=useState(false);B(p,()=>o(E(false))),useEffect(()=>{ia()&&(ia().playbackRate=r.speed);},[]);let f$1=jsx("div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:Kl.map((d,h)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${r.speed===d&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${fa("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:r.speed===d?()=>{}:()=>{fa("isStaticFormat")||oa(pa(d)),o(f(false)),o(D(false)),o(E(false)),o(J({...r,speed:d})),ia().playbackRate=d,e&&e("main");},children:[!fa("isTouchScreen")&&r.speed===d&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(re,{src:a.tick,alt:"",width:12,height:9})}),fa("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${r.speed===d&&"pl-border-primary"}`,children:r.speed===d&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("p",{className:`pl-w-full pl-flex pl-items-center pl-gap-2 pl-text-black/[0.87] ${fa("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:d})]},h))})});return jsx(Fragment,{children:l?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:p,children:[jsx($e,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>o(E(!i)),onMouseOver:()=>!fa("isTouchScreen")&&!fa("showSpeedPopover")&&a$2(true),onMouseLeave:()=>!fa("isTouchScreen")&&a$2(false)}),u&&jsx(a$1,{title:"\u0633\u0631\u0639\u062A"}),jsx(R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>o(E(false)),type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?p:void 0,isHeader:fa("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:f$1})]}):jsx(Fragment,{children:f$1})})},De=jl;e();var ei=({enabled:e,setEnabled:l})=>jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:l,children:jsx("div",{className:`pl-absolute pl-left-1 pl-top-[2px] pl-w-[16px] pl-h-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),vo=ei;e();var li=({setSection:e})=>{let l=ga(),{subtitles:o,selectedSubtitle:i}=ha(({videoData:{subtitles:r,selectedSubtitle:p}})=>({subtitles:r,selectedSubtitle:p}),shallowEqual);return jsx("div",{id:"subtitles",className:"animate__animated animate__fadeIn pl-p-[14px]",children:jsxs("ul",{className:"pl-flex pl-flex-col pl-p-0 pl-m-0",children:[jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${!i&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{l(f(false)),l(D(false)),l(A(void 0)),e("main");let r=Object.values(ia().textTracks).find(p=>p.mode==="showing");r&&(r.mode="disabled"),l(z("")),oa(Da("empty"));},children:"\u0628\u062F\u0648\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),o.map((r,p)=>jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${i&&i.language===r.language&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{l(f(false)),l(D(false)),l(A(r)),ia().textTracks[p].mode="showing",e("main"),oa(Da(r.language));},children:jsx("span",{children:r.label})},p))]})})},go=memo(li);e();var ri=({className:e,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:l,onMouseOver:o,onMouseLeave:i,children:[jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 2.29395C10.3314 2.29395 10.6 2.56257 10.6 2.89395V17.1052C10.6 17.4366 10.3314 17.7052 10 17.7052C9.66866 17.7052 9.40002 17.4366 9.40002 17.1052V2.89395C9.40002 2.56257 9.66866 2.29395 10 2.29395Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.41258 4.95498C6.74396 4.95498 7.01258 5.22361 7.01258 5.55498V14.5565C7.01258 14.8879 6.74396 15.1565 6.41258 15.1565C6.08121 15.1565 5.81258 14.8879 5.81258 14.5565V5.55498C5.81258 5.22361 6.08121 4.95498 6.41258 4.95498Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5858 4.84247C13.9172 4.84247 14.1858 5.1111 14.1858 5.44247V14.444C14.1858 14.7754 13.9172 15.044 13.5858 15.044C13.2545 15.044 12.9858 14.7754 12.9858 14.444V5.44247C12.9858 5.1111 13.2545 4.84247 13.5858 4.84247Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.1735 7.60177C17.5048 7.60177 17.7735 7.8704 17.7735 8.20177V11.5709C17.7735 11.9023 17.5048 12.1709 17.1735 12.1709C16.8421 12.1709 16.5735 11.9023 16.5735 11.5709V8.20177C16.5735 7.8704 16.8421 7.60177 17.1735 7.60177Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.82656 7.82841C3.15794 7.82841 3.42656 8.09703 3.42656 8.42844V11.7976C3.42656 12.1289 3.15794 12.3976 2.82656 12.3976C2.49519 12.3976 2.22656 12.1289 2.22656 11.7976V8.42844C2.22656 8.09703 2.49519 7.82841 2.82656 7.82841Z"})]}),Fe=ri;e();var ci=({setSection:e,showMultiAudioIcon:l})=>{let o=ga(),{multiAudioPopover:i}=ha(({popovers:{multiAudioPopover:h}})=>({multiAudioPopover:h}),shallowEqual),[r,p]=useState(false),u=useRef(null),{multiAudio:a$2,selectedAudioId:f$1}=ha(({videoData:{multiAudio:h,selectedAudioId:c}})=>({multiAudio:h,selectedAudioId:c}),shallowEqual);B(u,()=>o(H(false)));let d=jsx("ul",{className:`pl-flex pl-flex-col pl-m-0 !pl-py-2 ${fa("isTouchScreen")?"pl-pb-4 pl-gap-2":"pl-gap-1"}`,children:fa("hasMultiAudio")&&a$2.map((h,c)=>jsxs("li",{className:`pl-flex pl-items-center pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 ${fa("isTouchScreen")?"pl-pr-[26px] pl-gap-[18px] pl-py-3 pl-text-[14px]":"pl-pr-2 pl-gap-2 pl-py-2 pl-text-[12px] pl-font-medium"} ${f$1===c&&"pl-bg-primary/[0.08]"}`,onClick:()=>{o(C(c)),o(f(false)),o(D(false)),o(H(false)),e&&e("main");},children:[jsxs("div",{className:`${fa("isTouchScreen")?"pl-size-5":"pl-size-3"} pl-flex pl-items-center`,children:[!fa("isTouchScreen")&&f$1===c&&jsx(re,{src:a.tick,alt:"",width:12,height:9}),fa("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${f$1===c&&"pl-border-primary"}`,children:f$1===c&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})})]}),jsxs("span",{children:["\u0632\u0628\u0627\u0646 ",h.name]})]},h.id))});return jsx(Fragment,{children:l?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:u,children:[jsx(Fe,{className:"pl-size-5 pl-fill-white pl-cursor-pointer",onClick:()=>o(H(!i)),onMouseOver:()=>!fa("isTouchScreen")&&p(true),onMouseLeave:()=>!fa("isTouchScreen")&&p(false)}),r&&jsx(a$1,{title:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(R,{classNames:`!pl-px-0 pl-overflow-hidden !pl-bg-white !pl-pb-0 ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[200px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>o(H(false)),type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?u:void 0,isHeader:fa("isTouchScreen"),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:d})]}):jsx(Fragment,{children:d})})},Be=memo(ci);var fi=()=>{let e=ga(),{selectedSubtitle:l}=ha(({videoData:{params:f,subtitles:d,selectedSubtitle:h}})=>({params:f,subtitles:d,selectedSubtitle:h}),shallowEqual),{settingPopover:o}=ha(({popovers:{settingPopover:f}})=>({settingPopover:f}),shallowEqual),[i,r]=useState("main"),[p,u]=useState(false),a$2=useRef(null);return B(a$2,()=>{e(D(false)),setTimeout(()=>r("main"),500);}),jsxs("div",{className:`pl-inline-flex ${fa("isLandscape")&&"pl-relative"}`,ref:a$2,children:[jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(D(!o)),onMouseOver:()=>!fa("isTouchScreen")&&!fa("showSettingPopover")&&u(true),onMouseLeave:()=>!fa("isTouchScreen")&&u(false),children:[jsx(re,{src:a.settings,alt:"",width:20,height:20}),p&&jsx(a$1,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A "})]}),jsx(R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:o,onClose:()=>{e(D(false)),setTimeout(()=>r("main"),500);},type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?a$2:void 0,isHeader:fa("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:jsxs(Fragment,{children:[i==="main"&&jsxs("div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!fa("isStaticFormat")&&jsx(Fragment,{children:jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("qualityLevels"),children:[jsx(re,{src:a.qualitySetting,alt:"",width:16,height:16}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsx(re,{src:a.chevronLeft,alt:"",width:16,height:16})]})}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("speed"),children:[jsx($e,{className:"size-5 pl-fill-black/[0.5]"}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0633\u0631\u0639\u062A"}),jsx(re,{src:a.chevronLeft,alt:"",width:16,height:16})]}),fa("hasSubtitles")&&fa("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsx(re,{src:a.subtitleOutlineGray,alt:"subtitle-icon",width:20,height:20}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsx(vo,{enabled:!!l,setEnabled:b})]}),fa("hasMultiAudio")&&fa("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("multiAudio"),children:[jsx(Fe,{className:"size-5 pl-fill-black/[0.5]"}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(re,{src:a.chevronLeft,alt:"",width:16,height:16})]})]}),i==="qualityLevels"&&jsx(Ae,{setSection:r}),i==="speed"&&jsx(De,{setSection:r}),i==="subtitles"&&jsx(go,{setSection:r}),i==="multiAudio"&&jsx(Be,{setSection:r})]})})]})},wo=memo(fi);e();var hi=()=>{let{duration:e,currentTime:l}=ha(({controller:{duration:o,currentTime:i}})=>({duration:o,currentTime:i}),shallowEqual);return ha(({videoData:{videoElementSizeInfo:o,params:i}})=>({videoElementSizeInfo:o,params:i}),shallowEqual),jsx(Fragment,{children:jsxs("div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${fa("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${fa("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsx("span",{children:S(e)}),jsx("span",{children:" / "}),jsx("span",{children:S(l)})]})})},ze=hi;e();var bi=()=>jsx(re,{src:a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>h("lock")}),Po=bi;e();var Pi=()=>{let[e,l]=useState(false);return ha(({videoData:{selectedSubtitle:o,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:o,videoElementSizeInfo:i,params:r}),shallowEqual),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(re,{alt:"subtitle-icon",src:fa("isSelectedSubtitle")?a.subtitleFill:a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:b,onDoubleClick:o=>o.stopPropagation(),onMouseOver:()=>!fa("isTouchScreen")&&l(true),onMouseLeave:()=>!fa("isTouchScreen")&&l(false)}),e&&jsx(a$1,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},ko=Pi;e();e();var Ii=e=>(ha(({videoData:{videoElementSizeInfo:l,params:o}})=>({videoElementSizeInfo:l,params:o}),shallowEqual),jsxs("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]})),Io=Ii;var Li=()=>{let [e,l]=useState(0),[o,i$1]=useState(void 0),[r,p]=useState(false),{markers:u,params:a}=ha(({videoData:{markers:v,params:I,videoElementSizeInfo:E}})=>({markers:v,params:I,videoElementSizeInfo:E}),shallowEqual),{markersListPopover:f}=ha(({popovers:{markersListPopover:v}})=>({markersListPopover:v}),shallowEqual),d=useRef(null),h=ga();B(d,()=>h(G(false)));let S$1=(v,I,E,m,b)=>{ka()&&(ka().style.width=`${qt(v)}px`),i(ia().currentTime,v),ia().currentTime=v,h(G(false)),oa(Ea(I,v,E,m,b));},A=()=>{h(G(!f));};return jsxs("div",{className:`pl-flex pl-items-center pl-p-1 pl-relative ${fa("showMarkerListPopover")&&"pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,ref:d,children:[jsx(Io,{className:"pl-cursor-pointer pl-fill-dark-5",onClick:A,onMouseOver:()=>!fa("isTouchScreen")&&p(true),onMouseLeave:()=>!fa("isTouchScreen")&&p(false)}),r&&jsx(a$1,{title:"\u0644\u06CC\u0633\u062A \u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627 (e)",className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsx(R,{classNames:"!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",status:fa("showMarkerListPopover"),onClose:()=>{h(G(false));},headerTitle:"\u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627",isHeader:true,type:"popover",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-6 pl-mx-2 pl-mt-2",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:u.map(v=>jsx("div",{onClick:()=>S$1(v.time,v.id,v.title,v.description,v.sticker),className:"odd:dark:pl-bg-dark-1 odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px]",children:jsxs("div",{className:"pl-flex pl-item-center pl-gap-2 pl-cursor-pointer pl-rounded-[4px] pl-relative pl-p-2 pl-mx-2",children:[v.banner||!v.sticker?jsx(re,{src:v.banner?v.banner:"IMAGES.defaultMarkersListItemIcon",width:40,height:40,alt:v.title}):jsx("div",{className:"pl-w-[40px] pl-h-[40px] pl-bg-secondary dark:pl-bg-secondary-50 pl-rounded-[6px] pl-flex pl-items-center",children:jsx(ge,{name:v.sticker,className:"pl-w-[20px] pl-h-[20px] pl-mx-auto"})}),jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsx("p",{className:"pl-flex pl-items-center pl-mb-1 pl-text-[14px] pl-font-bold pl-w-[130px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:jsx("div",{children:v.title})}),jsx("p",{className:"pl-text-[13px] pl-font-normal pl-w-[200px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:v.description})]}),jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-text-[12px] pl-font-bold pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-text-gray-800 dark:pl-text-white pl-rounded-[4px] pl-p-[3px]",children:S(v.time)})]})},v.id))})})})]})},Eo=Li;var $i=()=>{ha(({controller:{isFullScreen:l}})=>({isFullScreen:l}),shallowEqual),ha(({videoData:{videoElementSizeInfo:l,params:o}})=>({videoElementSizeInfo:l,params:o}),shallowEqual);let e="";return fa("isTouchScreen")?fa("isFullScreen")?e="pl-mx-4 tablet:pl-mx-6":e="pl-mx-4":fa("isFullScreen")?e="pl-mx-8":e="pl-mx-4",jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsx(b$1,{}),fa("isTouchScreenLandscape")&&jsx(Po,{}),fa("showPictureInPicture")&&jsx(no,{}),fa("showSettingIcon")&&jsx(wo,{}),fa("isFullScreen")&&!fa("isStaticFormat")&&jsx(Ae,{showQualityLevelsIcon:true}),(fa("isFullScreen")||fa("isStaticFormat"))&&jsx(De,{showSpeedIcon:true}),fa("hasSubtitles")&&!fa("isTouchScreenPortrait")&&jsx(ko,{}),fa("hasMultiAudio")&&!fa("isTouchScreenPortrait")&&jsx(Be,{showMultiAudioIcon:true})]}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[fa("isTouchScreenPortrait")&&jsx(ze,{}),!fa("isIOS")&&jsx(c,{}),fa("hasMarkers")&&jsx(Eo,{})]})]})},Lo=memo($i);e();var Di=()=>{let{subtitleText:e}=ha(({videoData:{subtitleText:o,selectedSubtitle:i}})=>({subtitleText:o,selectedSubtitle:i}),shallowEqual);return ha(({controller:{isFullScreen:o}})=>({isFullScreen:o}),shallowEqual),jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-z-0 pl-absolute pl-w-full pl-text-center pl-text-[18px] pl-px-4 pl-text-white pl-font-medium ${(()=>{let o="";return fa("isLock")?o="pl-bottom-4":fa("isActiveElements")?fa("isTouchScreenPortrait")?o="pl-bottom-4 tablet:pl-bottom-[65px]":fa("isFullScreen")?o="pl-bottom-[104px] tablet:pl-bottom-[137px] desktop:pl-bottom-[146px]":o="pl-bottom-[120px]":fa("isActiveElements")||(o="pl-bottom-4"),o})()}`,children:ca(e).map((o,i)=>jsx("p",{className:`pl-mx-auto pl-bg-Common-black-overlay-2 ${fa("isTouchScreen")&&fa("isActiveElements")&&"pl-opacity-50 tablet:pl-opacity-100"} pl-text-wrap pl-max-w-full pl-w-max pl-px-1`,children:ea(o)},i))})},Do=Di;var _i=()=>{ha(({controller:{lock:l,isFullScreen:o,isLoading:i,activeElements:r}})=>({lock:l,isFullScreen:o,isLoading:i,activeElements:r}),shallowEqual),ha(({videoData:{subtitles:l,selectedSubtitle:o}})=>({subtitles:l,selectedSubtitle:o}),shallowEqual);let e="";return fa("isTouchScreen")?fa("isFullScreen")?e="pl-gap-4 table:pl-gap-6 pl-mb-4 tablet:pl-mb-6 ":e="pl-gap-6 pl-mb-0":fa("isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:3},onClick:l=>l.stopPropagation(),children:jsxs(Fragment,{children:[fa("showSubtitle")&&jsx(Do,{}),!fa("isLock")&&jsx(Fragment,{children:jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${fa("isActiveElements")&&!fa("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!fa("isTouchScreenPortrait")&&jsx(ze,{}),fa("showProgressbar")&&jsx(po,{}),jsx(Lo,{})]})})]})})},Bo=_i;e();var Fi=Vo(()=>import('./staticVideoTag-IZI7PG7M.mjs')),Oi=Vo(()=>import('./nonStaticVideoTag-RO6C2T36.mjs')),Bi=()=>jsx(Fragment,{children:fa("isStaticFormat")?jsx(Fi,{}):jsx(Oi,{})}),zo=Bi;e();var qi=(e,l)=>{let o=ga(),{activeElements:i}=ha(({controller:{activeElements:a}})=>({activeElements:a}),shallowEqual),r=useRef(null),p=useRef(e),u=useRef(l);useEffect(()=>{p.current=e;},[e]),useEffect(()=>{u.current=l;},[l]),useEffect(()=>{let a=false,f$1=c=>{let{activeElements:S,isEnded:A}=P.getState().controller;A?o(f(true)):c.pointerType==="mouse"&&(clearTimeout(r.current),S?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(c.target.id)&&(a=true):o(f(true)),r.current=setTimeout(()=>{let{settingPopover:v,speedPopover:I,qualityLevelsPopover:E,multiAudioPopover:m}=P.getState().popovers,{play:b}=P.getState().controller;!v&&!I&&!E&&!m&&b&&a&&o(f(false));},a$6));},d=c=>{setTimeout(()=>{let{activeElements:S,isEnded:A,firstPlay:v}=P.getState().controller;if(clearTimeout(r.current),A)return o(f(true));R$1()&&!v&&!p.current&&!u.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(c.target.id)||U(c,"playerElements")?(o(f(!S)),r.current=setTimeout(()=>{let{settingPopover:I,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=P.getState().popovers;!I&&!E&&!m&&!b&&o(f(false));},a$6)):r.current=setTimeout(()=>{let{settingPopover:I,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=P.getState().popovers;!I&&!E&&!m&&!b&&o(f(false));},a$6));},200);},h=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:c,isEnded:S}=P.getState().controller,{settingPopover:A,speedPopover:v,qualityLevelsPopover:I}=P.getState().popovers;S?o(f(true)):!A&&!v&&!I&&c&&!S&&o(f(!c));},a$6);};return document.getElementById("video-area").addEventListener("touchstart",d),document.getElementById("video-area").addEventListener("touchmove",h),document.getElementById("video-area").addEventListener("pointermove",f$1),()=>{let c=document.getElementById("video-area");c&&(c.removeEventListener("touchstart",d),c.removeEventListener("touchmove",h),c.removeEventListener("pointermove",f$1));}},[i,e,l]);},qo=qi;e();var Hi=()=>{let{firstPlay:e,isFullScreen:l}=ha(({controller:{firstPlay:o,isFullScreen:i}})=>({firstPlay:o,isFullScreen:i}),shallowEqual);useEffect(()=>{if(ia()){let o,i=()=>{o=setTimeout(()=>{j();},R$1()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(o);}}},[e,l,ia()]);},Ro=Hi;e();var Wi=()=>{let{firstPlay:e}=ha(({controller:{firstPlay:l}})=>({firstPlay:l}),shallowEqual);ha(({videoData:{details:l}})=>({details:l}),shallowEqual),useEffect(()=>{fa("setSubtitleFirstPlay")&&b();},[e]);},Ho=Wi;var Qi=Vo(()=>import('./touchVolumeBrightness-27EBEX5W.mjs')),Qo=Vo(()=>import('./backwardForward-N75PBTWN.mjs')),Gi=()=>{let[e,l]=useState(false),[o,i]=useState(false);return ha(({videoData:{details:r,params:p,videoElementSizeInfo:u}})=>({details:r,params:p,videoElementSizeInfo:u}),shallowEqual),ha(({controller:{firstPlay:r,isFullScreen:p,isLoading:u,canPlayVideo:a}})=>({firstPlay:r,isFullScreen:p,isLoading:u,canPlayVideo:a}),shallowEqual),d(),Ro(),qo(e,o),Ho(),jsx(Fragment,{children:jsxs("div",{id:"video-area",style:{zIndex:fa("isFullScreen")?1e6:"unset"},onClick:r=>{let p=document.getElementById("player-popover");(fa("isFirstPlay")||!fa("isTouchScreen")&&!p)&&a$3(r);},onDoubleClick:r=>k(r),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!fa("isTouchScreen")&&!fa("isFullScreen")&&"!pl-rounded-[12px]"} ${fa("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!fa("isActiveElements")&&"pl-cursor-none"}`,children:[jsx("div",{id:"video-opacity",className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!fa("isTouchScreen")&&!fa("isFullScreen")&&"!pl-rounded-[12px]"} ${fa("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),fa("showTouchVolumeBrightness")&&jsx(Qi,{}),fa("showBackwardForward")&&jsxs("div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:o||e?1000002:1},children:[jsx(Qo,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:l}),jsx(Qo,{type:"touchBackward",isLeftDoubleTouched:o,setIsLeftDoubleTouched:i})]}),jsx(zo,{}),jsx("div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[fa("showHeader")&&jsx(At,{}),fa("showMain")&&jsx(Vt,{}),fa("showFooter")&&jsx(Bo,{})]})})]})})},Bc=Gi;
8
- export{Bc as a};//# sourceMappingURL=chunk-UBKDWPP7.mjs.map
9
- //# sourceMappingURL=chunk-UBKDWPP7.mjs.map
7
+ `,style:{height:m||"max-content",maxHeight:"80vh",zIndex:1000004,...u},ref:v,id:"popover-content",children:jsxs(Fragment,{children:[d&&jsx("div",{onTouchMove:h?ae:()=>{},onTouchEndCapture:h?qe:()=>{},className:"pl-py-4",children:h&&jsx("div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"})}),jsx("div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!S&&"no-scrollbar"}`,onTouchMove:$=>$.stopPropagation(),children:e})]})})})]});return jsx(Fragment,{children:I&&jsx(Fragment,{children:i==="modal"?createPortal(jsx(Fragment,{children:Re}),document.getElementById("dialog-react-root-videoPlayer")):jsx("div",{id:"player-popover",children:Re})})})});mo.displayName="popover";var R=mo;e();var Ul=({setSection:e,showQualityLevelsIcon:l})=>{let o=ga(),{qualityLevels:i}=ha(({controller:{qualityLevels:c,manualQuality:S,autoQuality:A}})=>({qualityLevels:c,manualQuality:S,autoQuality:A}),shallowEqual),{settings:r}=ha(({user:{settings:c}})=>({settings:c}),shallowEqual),{qualityLevelsPopover:p}=ha(({popovers:{qualityLevelsPopover:c}})=>({qualityLevelsPopover:c}),shallowEqual);ha(({videoData:{params:c,videoElementSizeInfo:S}})=>({params:c,videoElementSizeInfo:S}),shallowEqual);let[u,a$2]=useState(false);i=[-1,...i];let f$1=(c,S)=>fa("isAutoQuality")&&S===-1?true:!fa("isAutoQuality")&&r.quality===c,d=useRef(null);B(d,()=>o(F(false)));let h=jsx("div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:i.map((c,S)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${f$1(S-1,c)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${fa("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:f$1(S-1,c)?()=>{}:()=>{ka(qa(c===-1?"auto":`${c}P`)),o(f(false)),o(D(false)),o(F(false)),o(J({...r,quality:c===-1?-1:S-1})),e&&e("main");},children:[!fa("isTouchScreen")&&f$1(S-1,c)&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(re,{src:a.tick,alt:"",width:12,height:9})}),fa("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${f$1(S-1,c)&&"pl-border-primary"}`,children:f$1(S-1,c)&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("span",{className:`pl-w-full pl-text-[14px] pl-text-black/[0.87] ${fa("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:c===-1?jsxs("span",{children:[jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsx("span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.5]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${c}p`})]},S))})});return jsx(Fragment,{children:l?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:d,children:[jsx(re,{src:a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>o(F(!p)),onMouseOver:()=>!fa("isTouchScreen")&&!fa("showQualityLevelsPopover")&&a$2(true),onMouseLeave:()=>!fa("isTouchScreen")&&a$2(false),className:"pl-cursor-pointer"}),u&&jsx(a$1,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsx(R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>o(F(false)),type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?d:void 0,isHeader:fa("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:h})]}):jsx(Fragment,{children:h})})},Ae=memo(Ul);e();e();var Wl=({className:e,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:l,onMouseOver:o,onMouseLeave:i,children:[jsx("path",{d:"M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"})]}),$e=Wl;var Kl=[.5,.75,1,1.25,1.5,1.75,2],jl=({setSection:e,showSpeedIcon:l})=>{let o=ga();ha(({videoData:{videoElementSizeInfo:d,params:h}})=>({videoElementSizeInfo:d,params:h}),shallowEqual);let{speedPopover:i}=ha(({popovers:{speedPopover:d}})=>({speedPopover:d}),shallowEqual),{settings:r}=ha(({user:{settings:d}})=>({settings:d}),shallowEqual),p=useRef(null),[u,a$2]=useState(false);B(p,()=>o(E(false))),useEffect(()=>{la()&&(la().playbackRate=r.speed);},[]);let f$1=jsx("div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:Kl.map((d,h)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${r.speed===d&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${fa("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:r.speed===d?()=>{}:()=>{fa("isStaticFormat")||ka(pa(d)),o(f(false)),o(D(false)),o(E(false)),o(J({...r,speed:d})),la().playbackRate=d,e&&e("main");},children:[!fa("isTouchScreen")&&r.speed===d&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(re,{src:a.tick,alt:"",width:12,height:9})}),fa("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${r.speed===d&&"pl-border-primary"}`,children:r.speed===d&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("p",{className:`pl-w-full pl-flex pl-items-center pl-gap-2 pl-text-black/[0.87] ${fa("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:d})]},h))})});return jsx(Fragment,{children:l?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:p,children:[jsx($e,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>o(E(!i)),onMouseOver:()=>!fa("isTouchScreen")&&!fa("showSpeedPopover")&&a$2(true),onMouseLeave:()=>!fa("isTouchScreen")&&a$2(false)}),u&&jsx(a$1,{title:"\u0633\u0631\u0639\u062A"}),jsx(R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>o(E(false)),type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?p:void 0,isHeader:fa("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:f$1})]}):jsx(Fragment,{children:f$1})})},De=jl;e();var ei=({enabled:e,setEnabled:l})=>jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:l,children:jsx("div",{className:`pl-absolute pl-left-1 pl-top-[2px] pl-w-[16px] pl-h-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),vo=ei;e();var li=({setSection:e})=>{let l=ga(),{subtitles:o,selectedSubtitle:i}=ha(({videoData:{subtitles:r,selectedSubtitle:p}})=>({subtitles:r,selectedSubtitle:p}),shallowEqual);return jsx("div",{id:"subtitles",className:"animate__animated animate__fadeIn pl-p-[14px]",children:jsxs("ul",{className:"pl-flex pl-flex-col pl-p-0 pl-m-0",children:[jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${!i&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{l(f(false)),l(D(false)),l(A(void 0)),e("main");let r=Object.values(la().textTracks).find(p=>p.mode==="showing");r&&(r.mode="disabled"),l(z("")),ka(Da("empty"));},children:"\u0628\u062F\u0648\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),o.map((r,p)=>jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${i&&i.language===r.language&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{l(f(false)),l(D(false)),l(A(r)),la().textTracks[p].mode="showing",e("main"),ka(Da(r.language));},children:jsx("span",{children:r.label})},p))]})})},go=memo(li);e();var ri=({className:e,onClick:l,onMouseOver:o,onMouseLeave:i})=>jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:l,onMouseOver:o,onMouseLeave:i,children:[jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 2.29395C10.3314 2.29395 10.6 2.56257 10.6 2.89395V17.1052C10.6 17.4366 10.3314 17.7052 10 17.7052C9.66866 17.7052 9.40002 17.4366 9.40002 17.1052V2.89395C9.40002 2.56257 9.66866 2.29395 10 2.29395Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.41258 4.95498C6.74396 4.95498 7.01258 5.22361 7.01258 5.55498V14.5565C7.01258 14.8879 6.74396 15.1565 6.41258 15.1565C6.08121 15.1565 5.81258 14.8879 5.81258 14.5565V5.55498C5.81258 5.22361 6.08121 4.95498 6.41258 4.95498Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5858 4.84247C13.9172 4.84247 14.1858 5.1111 14.1858 5.44247V14.444C14.1858 14.7754 13.9172 15.044 13.5858 15.044C13.2545 15.044 12.9858 14.7754 12.9858 14.444V5.44247C12.9858 5.1111 13.2545 4.84247 13.5858 4.84247Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.1735 7.60177C17.5048 7.60177 17.7735 7.8704 17.7735 8.20177V11.5709C17.7735 11.9023 17.5048 12.1709 17.1735 12.1709C16.8421 12.1709 16.5735 11.9023 16.5735 11.5709V8.20177C16.5735 7.8704 16.8421 7.60177 17.1735 7.60177Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.82656 7.82841C3.15794 7.82841 3.42656 8.09703 3.42656 8.42844V11.7976C3.42656 12.1289 3.15794 12.3976 2.82656 12.3976C2.49519 12.3976 2.22656 12.1289 2.22656 11.7976V8.42844C2.22656 8.09703 2.49519 7.82841 2.82656 7.82841Z"})]}),Fe=ri;e();var ci=({setSection:e,showMultiAudioIcon:l})=>{let o=ga(),{multiAudioPopover:i}=ha(({popovers:{multiAudioPopover:h}})=>({multiAudioPopover:h}),shallowEqual),[r,p]=useState(false),u=useRef(null),{multiAudio:a$2,selectedAudioId:f$1}=ha(({videoData:{multiAudio:h,selectedAudioId:c}})=>({multiAudio:h,selectedAudioId:c}),shallowEqual);B(u,()=>o(H(false)));let d=jsx("ul",{className:`pl-flex pl-flex-col pl-m-0 !pl-py-2 ${fa("isTouchScreen")?"pl-pb-4 pl-gap-2":"pl-gap-1"}`,children:fa("hasMultiAudio")&&a$2.map((h,c)=>jsxs("li",{className:`pl-flex pl-items-center pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 ${fa("isTouchScreen")?"pl-pr-[26px] pl-gap-[18px] pl-py-3 pl-text-[14px]":"pl-pr-2 pl-gap-2 pl-py-2 pl-text-[12px] pl-font-medium"} ${f$1===c&&"pl-bg-primary/[0.08]"}`,onClick:()=>{o(C(c)),o(f(false)),o(D(false)),o(H(false)),e&&e("main");},children:[jsxs("div",{className:`${fa("isTouchScreen")?"pl-size-5":"pl-size-3"} pl-flex pl-items-center`,children:[!fa("isTouchScreen")&&f$1===c&&jsx(re,{src:a.tick,alt:"",width:12,height:9}),fa("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${f$1===c&&"pl-border-primary"}`,children:f$1===c&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})})]}),jsxs("span",{children:["\u0632\u0628\u0627\u0646 ",h.name]})]},h.id))});return jsx(Fragment,{children:l?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:u,children:[jsx(Fe,{className:"pl-size-5 pl-fill-white pl-cursor-pointer",onClick:()=>o(H(!i)),onMouseOver:()=>!fa("isTouchScreen")&&p(true),onMouseLeave:()=>!fa("isTouchScreen")&&p(false)}),r&&jsx(a$1,{title:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(R,{classNames:`!pl-px-0 pl-overflow-hidden !pl-bg-white !pl-pb-0 ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[200px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>o(H(false)),type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?u:void 0,isHeader:fa("isTouchScreen"),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:d})]}):jsx(Fragment,{children:d})})},Be=memo(ci);var fi=()=>{let e=ga(),{selectedSubtitle:l}=ha(({videoData:{params:f,subtitles:d,selectedSubtitle:h}})=>({params:f,subtitles:d,selectedSubtitle:h}),shallowEqual),{settingPopover:o}=ha(({popovers:{settingPopover:f}})=>({settingPopover:f}),shallowEqual),[i,r]=useState("main"),[p,u]=useState(false),a$2=useRef(null);return B(a$2,()=>{e(D(false)),setTimeout(()=>r("main"),500);}),jsxs("div",{className:`pl-inline-flex ${fa("isLandscape")&&"pl-relative"}`,ref:a$2,children:[jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(D(!o)),onMouseOver:()=>!fa("isTouchScreen")&&!fa("showSettingPopover")&&u(true),onMouseLeave:()=>!fa("isTouchScreen")&&u(false),children:[jsx(re,{src:a.settings,alt:"",width:20,height:20}),p&&jsx(a$1,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A "})]}),jsx(R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${fa("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${fa("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${fa("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:o,onClose:()=>{e(D(false)),setTimeout(()=>r("main"),500);},type:fa("isTouchScreen")?"modal":"popover",isBlurBackground:fa("isTouchScreenPortrait"),ref:fa("isTouchScreenPortrait")?a$2:void 0,isHeader:fa("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:fa("isTouchScreen"),children:jsxs(Fragment,{children:[i==="main"&&jsxs("div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!fa("isStaticFormat")&&jsx(Fragment,{children:jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("qualityLevels"),children:[jsx(re,{src:a.qualitySetting,alt:"",width:16,height:16}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsx(re,{src:a.chevronLeft,alt:"",width:16,height:16})]})}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("speed"),children:[jsx($e,{className:"size-5 pl-fill-black/[0.5]"}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0633\u0631\u0639\u062A"}),jsx(re,{src:a.chevronLeft,alt:"",width:16,height:16})]}),fa("hasSubtitles")&&fa("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsx(re,{src:a.subtitleOutlineGray,alt:"subtitle-icon",width:20,height:20}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsx(vo,{enabled:!!l,setEnabled:b})]}),fa("hasMultiAudio")&&fa("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("multiAudio"),children:[jsx(Fe,{className:"size-5 pl-fill-black/[0.5]"}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(re,{src:a.chevronLeft,alt:"",width:16,height:16})]})]}),i==="qualityLevels"&&jsx(Ae,{setSection:r}),i==="speed"&&jsx(De,{setSection:r}),i==="subtitles"&&jsx(go,{setSection:r}),i==="multiAudio"&&jsx(Be,{setSection:r})]})})]})},wo=memo(fi);e();var hi=()=>{let{duration:e,currentTime:l}=ha(({controller:{duration:o,currentTime:i}})=>({duration:o,currentTime:i}),shallowEqual);return ha(({videoData:{videoElementSizeInfo:o,params:i}})=>({videoElementSizeInfo:o,params:i}),shallowEqual),jsx(Fragment,{children:jsxs("div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${fa("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${fa("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsx("span",{children:S(e)}),jsx("span",{children:" / "}),jsx("span",{children:S(l)})]})})},ze=hi;e();var bi=()=>jsx(re,{src:a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>h("lock")}),Po=bi;e();var Pi=()=>{let[e,l]=useState(false);return ha(({videoData:{selectedSubtitle:o,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:o,videoElementSizeInfo:i,params:r}),shallowEqual),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(re,{alt:"subtitle-icon",src:fa("isSelectedSubtitle")?a.subtitleFill:a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:b,onDoubleClick:o=>o.stopPropagation(),onMouseOver:()=>!fa("isTouchScreen")&&l(true),onMouseLeave:()=>!fa("isTouchScreen")&&l(false)}),e&&jsx(a$1,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},ko=Pi;e();e();var Ii=e=>(ha(({videoData:{videoElementSizeInfo:l,params:o}})=>({videoElementSizeInfo:l,params:o}),shallowEqual),jsxs("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]})),Io=Ii;var Li=()=>{let [e,l]=useState(0),[o,i$1]=useState(void 0),[r,p]=useState(false),{markers:u,params:a}=ha(({videoData:{markers:v,params:I,videoElementSizeInfo:E}})=>({markers:v,params:I,videoElementSizeInfo:E}),shallowEqual),{markersListPopover:f}=ha(({popovers:{markersListPopover:v}})=>({markersListPopover:v}),shallowEqual),d=useRef(null),h=ga();B(d,()=>h(G(false)));let S$1=(v,I,E,m,b)=>{na()&&(na().style.width=`${qt(v)}px`),i(la().currentTime,v),la().currentTime=v,h(G(false)),ka(Ea(I,v,E,m,b));},A=()=>{h(G(!f));};return jsxs("div",{className:`pl-flex pl-items-center pl-p-1 pl-relative ${fa("showMarkerListPopover")&&"pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,ref:d,children:[jsx(Io,{className:"pl-cursor-pointer pl-fill-dark-5",onClick:A,onMouseOver:()=>!fa("isTouchScreen")&&p(true),onMouseLeave:()=>!fa("isTouchScreen")&&p(false)}),r&&jsx(a$1,{title:"\u0644\u06CC\u0633\u062A \u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627 (e)",className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsx(R,{classNames:"!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",status:fa("showMarkerListPopover"),onClose:()=>{h(G(false));},headerTitle:"\u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627",isHeader:true,type:"popover",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-6 pl-mx-2 pl-mt-2",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:u.map(v=>jsx("div",{onClick:()=>S$1(v.time,v.id,v.title,v.description,v.sticker),className:"odd:dark:pl-bg-dark-1 odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px]",children:jsxs("div",{className:"pl-flex pl-item-center pl-gap-2 pl-cursor-pointer pl-rounded-[4px] pl-relative pl-p-2 pl-mx-2",children:[v.banner||!v.sticker?jsx(re,{src:v.banner?v.banner:"IMAGES.defaultMarkersListItemIcon",width:40,height:40,alt:v.title}):jsx("div",{className:"pl-w-[40px] pl-h-[40px] pl-bg-secondary dark:pl-bg-secondary-50 pl-rounded-[6px] pl-flex pl-items-center",children:jsx(ge,{name:v.sticker,className:"pl-w-[20px] pl-h-[20px] pl-mx-auto"})}),jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsx("p",{className:"pl-flex pl-items-center pl-mb-1 pl-text-[14px] pl-font-bold pl-w-[130px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:jsx("div",{children:v.title})}),jsx("p",{className:"pl-text-[13px] pl-font-normal pl-w-[200px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:v.description})]}),jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-text-[12px] pl-font-bold pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-text-gray-800 dark:pl-text-white pl-rounded-[4px] pl-p-[3px]",children:S(v.time)})]})},v.id))})})})]})},Eo=Li;var $i=()=>{ha(({controller:{isFullScreen:l}})=>({isFullScreen:l}),shallowEqual),ha(({videoData:{videoElementSizeInfo:l,params:o}})=>({videoElementSizeInfo:l,params:o}),shallowEqual);let e="";return fa("isTouchScreen")?fa("isFullScreen")?e="pl-mx-4 tablet:pl-mx-6":e="pl-mx-4":fa("isFullScreen")?e="pl-mx-8":e="pl-mx-4",jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsx(b$1,{}),fa("isTouchScreenLandscape")&&jsx(Po,{}),fa("showPictureInPicture")&&jsx(no,{}),fa("showSettingIcon")&&jsx(wo,{}),fa("isFullScreen")&&!fa("isStaticFormat")&&jsx(Ae,{showQualityLevelsIcon:true}),(fa("isFullScreen")||fa("isStaticFormat"))&&jsx(De,{showSpeedIcon:true}),fa("hasSubtitles")&&!fa("isTouchScreenPortrait")&&jsx(ko,{}),fa("hasMultiAudio")&&!fa("isTouchScreenPortrait")&&jsx(Be,{showMultiAudioIcon:true})]}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[fa("isTouchScreenPortrait")&&jsx(ze,{}),!fa("isIOS")&&jsx(c,{}),fa("hasMarkers")&&jsx(Eo,{})]})]})},Lo=memo($i);e();var Di=()=>{let{subtitleText:e}=ha(({videoData:{subtitleText:o,selectedSubtitle:i}})=>({subtitleText:o,selectedSubtitle:i}),shallowEqual);return ha(({controller:{isFullScreen:o}})=>({isFullScreen:o}),shallowEqual),jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-z-0 pl-absolute pl-w-full pl-text-center pl-text-[18px] pl-px-4 pl-text-white pl-font-medium ${(()=>{let o="";return fa("isLock")?o="pl-bottom-4":fa("isActiveElements")?fa("isTouchScreenPortrait")?o="pl-bottom-4 tablet:pl-bottom-[65px]":fa("isFullScreen")?o="pl-bottom-[104px] tablet:pl-bottom-[137px] desktop:pl-bottom-[146px]":o="pl-bottom-[120px]":fa("isActiveElements")||(o="pl-bottom-4"),o})()}`,children:ca(e).map((o,i)=>jsx("p",{className:`pl-mx-auto pl-bg-Common-black-overlay-2 ${fa("isTouchScreen")&&fa("isActiveElements")&&"pl-opacity-50 tablet:pl-opacity-100"} pl-text-wrap pl-max-w-full pl-w-max pl-px-1`,children:ea(o)},i))})},Do=Di;var _i=()=>{ha(({controller:{lock:l,isFullScreen:o,isLoading:i,activeElements:r}})=>({lock:l,isFullScreen:o,isLoading:i,activeElements:r}),shallowEqual),ha(({videoData:{subtitles:l,selectedSubtitle:o}})=>({subtitles:l,selectedSubtitle:o}),shallowEqual);let e="";return fa("isTouchScreen")?fa("isFullScreen")?e="pl-gap-4 table:pl-gap-6 pl-mb-4 tablet:pl-mb-6 ":e="pl-gap-6 pl-mb-0":fa("isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:3},onClick:l=>l.stopPropagation(),children:jsxs(Fragment,{children:[fa("showSubtitle")&&jsx(Do,{}),!fa("isLock")&&jsx(Fragment,{children:jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${fa("isActiveElements")&&!fa("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!fa("isTouchScreenPortrait")&&jsx(ze,{}),fa("showProgressbar")&&jsx(po,{}),jsx(Lo,{})]})})]})})},Bo=_i;e();var Fi=Vo(()=>import('./staticVideoTag-THGU6TMW.mjs')),Oi=Vo(()=>import('./nonStaticVideoTag-T2VIV6QZ.mjs')),Bi=()=>jsx(Fragment,{children:fa("isStaticFormat")?jsx(Fi,{}):jsx(Oi,{})}),zo=Bi;e();var qi=(e,l)=>{let o=ga(),{activeElements:i}=ha(({controller:{activeElements:a}})=>({activeElements:a}),shallowEqual),r=useRef(null),p=useRef(e),u=useRef(l);useEffect(()=>{p.current=e;},[e]),useEffect(()=>{u.current=l;},[l]),useEffect(()=>{let a=false,f$1=c=>{let{activeElements:S,isEnded:A}=P.getState().controller;A?o(f(true)):c.pointerType==="mouse"&&(clearTimeout(r.current),S?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(c.target.id)&&(a=true):o(f(true)),r.current=setTimeout(()=>{let{settingPopover:v,speedPopover:I,qualityLevelsPopover:E,multiAudioPopover:m}=P.getState().popovers,{play:b}=P.getState().controller;!v&&!I&&!E&&!m&&b&&a&&o(f(false));},a$6));},d=c=>{setTimeout(()=>{let{activeElements:S,isEnded:A,firstPlay:v}=P.getState().controller;if(clearTimeout(r.current),A)return o(f(true));R$1()&&!v&&!p.current&&!u.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(c.target.id)||U(c,"playerElements")?(o(f(!S)),r.current=setTimeout(()=>{let{settingPopover:I,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=P.getState().popovers;!I&&!E&&!m&&!b&&o(f(false));},a$6)):r.current=setTimeout(()=>{let{settingPopover:I,speedPopover:E,qualityLevelsPopover:m,multiAudioPopover:b}=P.getState().popovers;!I&&!E&&!m&&!b&&o(f(false));},a$6));},200);},h=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:c,isEnded:S}=P.getState().controller,{settingPopover:A,speedPopover:v,qualityLevelsPopover:I}=P.getState().popovers;S?o(f(true)):!A&&!v&&!I&&c&&!S&&o(f(!c));},a$6);};return document.getElementById("video-area").addEventListener("touchstart",d),document.getElementById("video-area").addEventListener("touchmove",h),document.getElementById("video-area").addEventListener("pointermove",f$1),()=>{let c=document.getElementById("video-area");c&&(c.removeEventListener("touchstart",d),c.removeEventListener("touchmove",h),c.removeEventListener("pointermove",f$1));}},[i,e,l]);},qo=qi;e();var Hi=()=>{let{firstPlay:e,isFullScreen:l}=ha(({controller:{firstPlay:o,isFullScreen:i}})=>({firstPlay:o,isFullScreen:i}),shallowEqual);useEffect(()=>{if(la()){let o,i=()=>{o=setTimeout(()=>{j();},R$1()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(o);}}},[e,l,la()]);},Ro=Hi;e();var Wi=()=>{let{firstPlay:e}=ha(({controller:{firstPlay:l}})=>({firstPlay:l}),shallowEqual);ha(({videoData:{details:l}})=>({details:l}),shallowEqual),useEffect(()=>{fa("setSubtitleFirstPlay")&&b();},[e]);},Ho=Wi;var Qi=Vo(()=>import('./touchVolumeBrightness-REPKPDVV.mjs')),Qo=Vo(()=>import('./backwardForward-RXOZ6EMH.mjs')),Gi=()=>{let[e,l]=useState(false),[o,i]=useState(false);return ha(({videoData:{details:r,params:p,videoElementSizeInfo:u}})=>({details:r,params:p,videoElementSizeInfo:u}),shallowEqual),ha(({controller:{firstPlay:r,isFullScreen:p,isLoading:u,canPlayVideo:a}})=>({firstPlay:r,isFullScreen:p,isLoading:u,canPlayVideo:a}),shallowEqual),d(),Ro(),qo(e,o),Ho(),jsx(Fragment,{children:jsxs("div",{id:"video-area",style:{zIndex:fa("isFullScreen")?1e6:"unset"},onClick:r=>{let p=document.getElementById("player-popover");(fa("isFirstPlay")||!fa("isTouchScreen")&&!p)&&a$3(r);},onDoubleClick:r=>k(r),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!fa("isTouchScreen")&&!fa("isFullScreen")&&"!pl-rounded-[12px]"} ${fa("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!fa("isActiveElements")&&"pl-cursor-none"}`,children:[jsx("div",{id:"video-opacity",className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!fa("isTouchScreen")&&!fa("isFullScreen")&&"!pl-rounded-[12px]"} ${fa("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),fa("showTouchVolumeBrightness")&&jsx(Qi,{}),fa("showBackwardForward")&&jsxs("div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:o||e?1000002:1},children:[jsx(Qo,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:l}),jsx(Qo,{type:"touchBackward",isLeftDoubleTouched:o,setIsLeftDoubleTouched:i})]}),jsx(zo,{}),jsx("div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[fa("showHeader")&&jsx(At,{}),fa("showMain")&&jsx(Vt,{}),fa("showFooter")&&jsx(Bo,{})]})})]})})},Bc=Gi;
8
+ export{Bc as a};//# sourceMappingURL=chunk-ZMGVOJ4B.mjs.map
9
+ //# sourceMappingURL=chunk-ZMGVOJ4B.mjs.map