@gravity-ui/page-constructor 8.0.0-beta.2 → 8.1.0

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 (595) hide show
  1. package/README.md +39 -2
  2. package/build/cjs/_vendor/swiper-modules.js +1309 -0
  3. package/build/cjs/_vendor/swiper-modules.js.map +7 -0
  4. package/build/cjs/_vendor/swiper-react.js +4651 -0
  5. package/build/cjs/_vendor/swiper-react.js.map +7 -0
  6. package/build/cjs/_vendor/swiper.js +3822 -0
  7. package/build/cjs/_vendor/swiper.js.map +7 -0
  8. package/build/cjs/blocks/CardLayout/CardLayout.css +6 -0
  9. package/build/cjs/blocks/CardLayout/CardLayout.d.ts +1 -1
  10. package/build/cjs/blocks/CardLayout/CardLayout.js +2 -2
  11. package/build/cjs/blocks/CardLayout/CardLayout.js.map +1 -1
  12. package/build/cjs/blocks/Companies/schema.d.ts +1 -0
  13. package/build/cjs/blocks/Companies/schema.js +2 -1
  14. package/build/cjs/blocks/Companies/schema.js.map +1 -1
  15. package/build/cjs/blocks/ContentLayout/ContentLayout.js +4 -2
  16. package/build/cjs/blocks/ContentLayout/ContentLayout.js.map +1 -1
  17. package/build/cjs/blocks/ContentLayout/schema.d.ts +11 -0
  18. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.css +5 -5
  19. package/build/cjs/blocks/FilterBlock/FilterBlock.d.ts +1 -2
  20. package/build/cjs/blocks/FilterBlock/FilterBlock.js.map +1 -1
  21. package/build/cjs/blocks/FoldableList/schema.d.ts +11 -0
  22. package/build/cjs/blocks/Form/Form.css +5 -2
  23. package/build/cjs/blocks/Form/Form.d.ts +2 -3
  24. package/build/cjs/blocks/Form/Form.js +14 -11
  25. package/build/cjs/blocks/Form/Form.js.map +1 -1
  26. package/build/cjs/blocks/Form/schema.d.ts +12 -4
  27. package/build/cjs/blocks/Form/schema.js +1 -4
  28. package/build/cjs/blocks/Form/schema.js.map +1 -1
  29. package/build/cjs/blocks/Form/utils.d.ts +3 -0
  30. package/build/cjs/blocks/Form/utils.js +20 -0
  31. package/build/cjs/blocks/Form/utils.js.map +1 -0
  32. package/build/cjs/blocks/Header/Header.css +13 -0
  33. package/build/cjs/blocks/Header/Header.d.ts +7 -1
  34. package/build/cjs/blocks/Header/Header.js +11 -18
  35. package/build/cjs/blocks/Header/Header.js.map +1 -1
  36. package/build/cjs/blocks/Header/schema.d.ts +77 -0
  37. package/build/cjs/blocks/Header/schema.js +13 -1
  38. package/build/cjs/blocks/Header/schema.js.map +1 -1
  39. package/build/cjs/blocks/HeaderSlider/schema.d.ts +29 -0
  40. package/build/cjs/blocks/Info/schema.d.ts +22 -0
  41. package/build/cjs/blocks/Map/Map.js.map +1 -1
  42. package/build/cjs/blocks/Map/schema.d.ts +101 -0
  43. package/build/cjs/blocks/Media/Media.js +1 -1
  44. package/build/cjs/blocks/Media/Media.js.map +1 -1
  45. package/build/cjs/blocks/Media/schema.d.ts +22 -0
  46. package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +3 -4
  47. package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js.map +1 -1
  48. package/build/cjs/blocks/Questions/Questions.js +32 -7
  49. package/build/cjs/blocks/Questions/Questions.js.map +1 -1
  50. package/build/cjs/blocks/Questions/schema.d.ts +11 -0
  51. package/build/cjs/blocks/Share/Share.js +1 -3
  52. package/build/cjs/blocks/Share/Share.js.map +1 -1
  53. package/build/cjs/blocks/Slider/Slider.css +62 -1
  54. package/build/cjs/blocks/Slider/Slider.d.ts +6 -4
  55. package/build/cjs/blocks/Slider/Slider.js +7 -7
  56. package/build/cjs/blocks/Slider/Slider.js.map +1 -1
  57. package/build/cjs/blocks/Slider/useSlider.d.ts +1 -2
  58. package/build/cjs/blocks/Slider/useSlider.js +3 -7
  59. package/build/cjs/blocks/Slider/useSlider.js.map +1 -1
  60. package/build/cjs/blocks/Slider/useSliderPagination.d.ts +1 -1
  61. package/build/cjs/blocks/Slider/useSliderPagination.js.map +1 -1
  62. package/build/cjs/blocks/Slider/utils.d.ts +1 -1
  63. package/build/cjs/blocks/Slider/utils.js.map +1 -1
  64. package/build/cjs/blocks/Table/Table.js +16 -3
  65. package/build/cjs/blocks/Table/Table.js.map +1 -1
  66. package/build/cjs/blocks/Tabs/TabContent/TabContent.js +12 -12
  67. package/build/cjs/blocks/Tabs/TabContent/TabContent.js.map +1 -1
  68. package/build/cjs/blocks/Tabs/Tabs.js +1 -1
  69. package/build/cjs/blocks/Tabs/Tabs.js.map +1 -1
  70. package/build/cjs/blocks/Tabs/schema.d.ts +11 -0
  71. package/build/cjs/components/Button/Button.css +2 -7
  72. package/build/cjs/components/Button/Button.js +29 -4
  73. package/build/cjs/components/Button/Button.js.map +1 -1
  74. package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +1 -1
  75. package/build/cjs/components/ButtonTabs/ButtonTabs.js.map +1 -1
  76. package/build/cjs/components/Buttons/Buttons.css +3 -0
  77. package/build/cjs/components/Buttons/Buttons.d.ts +1 -2
  78. package/build/cjs/components/Buttons/Buttons.js +1 -1
  79. package/build/cjs/components/Buttons/Buttons.js.map +1 -1
  80. package/build/cjs/components/CardBase/CardBase.css +15 -0
  81. package/build/cjs/components/CardBase/CardBase.d.ts +3 -5
  82. package/build/cjs/components/CardBase/CardBase.js.map +1 -1
  83. package/build/cjs/components/ContentIcon/ContentIcon.d.ts +8 -0
  84. package/build/cjs/components/ContentIcon/ContentIcon.js +22 -0
  85. package/build/cjs/components/ContentIcon/ContentIcon.js.map +1 -0
  86. package/build/cjs/components/ContentLabels/ContentLabels.css +53 -0
  87. package/build/cjs/components/ContentLabels/ContentLabels.d.ts +3 -0
  88. package/build/cjs/components/ContentLabels/ContentLabels.js +16 -0
  89. package/build/cjs/components/ContentLabels/ContentLabels.js.map +1 -0
  90. package/build/cjs/components/ContentList/ContentList.js +3 -3
  91. package/build/cjs/components/ContentList/ContentList.js.map +1 -1
  92. package/build/cjs/components/DefaultVideo/DefaultVideo.js +23 -2
  93. package/build/cjs/components/DefaultVideo/DefaultVideo.js.map +1 -1
  94. package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +3 -1
  95. package/build/cjs/components/Icon/Icon.css +10 -0
  96. package/build/cjs/components/Icon/Icon.d.ts +9 -0
  97. package/build/cjs/components/Icon/Icon.js +24 -0
  98. package/build/cjs/components/Icon/Icon.js.map +1 -0
  99. package/build/cjs/components/IconWrapper/IconWrapper.css +16 -1
  100. package/build/cjs/components/IconWrapper/IconWrapper.js +10 -6
  101. package/build/cjs/components/IconWrapper/IconWrapper.js.map +1 -1
  102. package/build/cjs/components/InnerForm/InnerForm.d.ts +1 -2
  103. package/build/cjs/components/InnerForm/InnerForm.js.map +1 -1
  104. package/build/cjs/components/Link/Link.d.ts +2 -2
  105. package/build/cjs/components/Link/Link.js +2 -2
  106. package/build/cjs/components/Link/Link.js.map +1 -1
  107. package/build/cjs/components/Links/Links.d.ts +1 -1
  108. package/build/cjs/components/Links/Links.js +1 -1
  109. package/build/cjs/components/Links/Links.js.map +1 -1
  110. package/build/cjs/components/Map/GoogleMap.d.ts +1 -2
  111. package/build/cjs/components/Map/GoogleMap.js +19 -3
  112. package/build/cjs/components/Map/GoogleMap.js.map +1 -1
  113. package/build/cjs/components/Map/YMap/YMap.d.ts +4 -4
  114. package/build/cjs/components/Map/YMap/YMap.js +46 -15
  115. package/build/cjs/components/Map/YMap/YMap.js.map +1 -1
  116. package/build/cjs/components/Map/YMap/YandexMap.d.ts +1 -2
  117. package/build/cjs/components/Map/YMap/YandexMap.js +73 -7
  118. package/build/cjs/components/Map/YMap/YandexMap.js.map +1 -1
  119. package/build/cjs/components/Map/YMap/utils.d.ts +8 -0
  120. package/build/cjs/components/Map/YMap/utils.js +96 -0
  121. package/build/cjs/components/Map/YMap/utils.js.map +1 -0
  122. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.d.ts +1 -2
  123. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.js.map +1 -1
  124. package/build/cjs/components/Media/Video/Video.js +2 -13
  125. package/build/cjs/components/Media/Video/Video.js.map +1 -1
  126. package/build/cjs/components/MediaBase/MediaBase.d.ts +1 -3
  127. package/build/cjs/components/MediaBase/MediaBase.js.map +1 -1
  128. package/build/cjs/components/ReactPlayer/ReactPlayer.d.ts +1 -2
  129. package/build/cjs/components/ReactPlayer/ReactPlayer.js +19 -13
  130. package/build/cjs/components/ReactPlayer/ReactPlayer.js.map +1 -1
  131. package/build/cjs/components/Title/Title.d.ts +3 -2
  132. package/build/cjs/components/Title/Title.js +2 -2
  133. package/build/cjs/components/Title/Title.js.map +1 -1
  134. package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js.map +1 -1
  135. package/build/cjs/components/YandexForm/YandexForm.js +1 -1
  136. package/build/cjs/components/YandexForm/YandexForm.js.map +1 -1
  137. package/build/cjs/components/index.d.ts +2 -0
  138. package/build/cjs/components/index.js +5 -1
  139. package/build/cjs/components/index.js.map +1 -1
  140. package/build/cjs/constructor-items.d.ts +7 -7
  141. package/build/cjs/containers/PageConstructor/PageConstructor.css +0 -1
  142. package/build/cjs/containers/PageConstructor/Provider.js +2 -0
  143. package/build/cjs/containers/PageConstructor/Provider.js.map +1 -1
  144. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +1 -2
  145. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js.map +1 -1
  146. package/build/cjs/context/locationContext/locationContext.d.ts +1 -1
  147. package/build/cjs/context/locationContext/locationContext.js.map +1 -1
  148. package/build/cjs/context/mapsContext/mapsProvider.d.ts +1 -1
  149. package/build/cjs/context/mapsContext/mapsProvider.js.map +1 -1
  150. package/build/cjs/context/windowWidthContext/WindowWidthContext.d.ts +4 -0
  151. package/build/cjs/context/windowWidthContext/WindowWidthContext.js +28 -0
  152. package/build/cjs/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  153. package/build/cjs/context/windowWidthContext/index.d.ts +1 -0
  154. package/build/cjs/context/windowWidthContext/index.js +5 -0
  155. package/build/cjs/context/windowWidthContext/index.js.map +1 -0
  156. package/build/cjs/editor/components/AddBlock/AddBlock.d.ts +1 -2
  157. package/build/cjs/editor/components/AddBlock/AddBlock.js.map +1 -1
  158. package/build/cjs/editor/components/Layout/Layout.d.ts +2 -6
  159. package/build/cjs/editor/components/Layout/Layout.js.map +1 -1
  160. package/build/cjs/editor/data/previews/default-preview.d.ts +1 -1
  161. package/build/cjs/editor/data/previews/default-preview.js.map +1 -1
  162. package/build/cjs/editor/data/previews/header-block.d.ts +1 -1
  163. package/build/cjs/editor/data/previews/header-block.js.map +1 -1
  164. package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +2 -3
  165. package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +1 -1
  166. package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js.map +1 -1
  167. package/build/cjs/editor/icons/Tablet.d.ts +1 -1
  168. package/build/cjs/editor/icons/Tablet.js.map +1 -1
  169. package/build/cjs/grid/Grid/Grid.js.map +1 -1
  170. package/build/cjs/grid/Row/Row.d.ts +1 -1
  171. package/build/cjs/grid/Row/Row.js.map +1 -1
  172. package/build/cjs/hooks/useDeviceValue.d.ts +2 -0
  173. package/build/cjs/hooks/useDeviceValue.js +33 -0
  174. package/build/cjs/hooks/useDeviceValue.js.map +1 -0
  175. package/build/cjs/icons/BrandIconDark.d.ts +1 -1
  176. package/build/cjs/icons/BrandIconDark.js.map +1 -1
  177. package/build/cjs/icons/BrandIconLight.d.ts +1 -1
  178. package/build/cjs/icons/BrandIconLight.js.map +1 -1
  179. package/build/cjs/icons/BrandName.d.ts +1 -1
  180. package/build/cjs/icons/BrandName.js.map +1 -1
  181. package/build/cjs/icons/Chevron.d.ts +1 -1
  182. package/build/cjs/icons/Chevron.js.map +1 -1
  183. package/build/cjs/icons/Facebook.d.ts +1 -1
  184. package/build/cjs/icons/Facebook.js.map +1 -1
  185. package/build/cjs/icons/Github.d.ts +1 -1
  186. package/build/cjs/icons/Github.js.map +1 -1
  187. package/build/cjs/icons/Linkedin.d.ts +1 -1
  188. package/build/cjs/icons/Linkedin.js.map +1 -1
  189. package/build/cjs/icons/NavigationArrow.d.ts +1 -1
  190. package/build/cjs/icons/NavigationArrow.js.map +1 -1
  191. package/build/cjs/icons/NavigationChevron.d.ts +1 -1
  192. package/build/cjs/icons/NavigationChevron.js.map +1 -1
  193. package/build/cjs/icons/Telegram.d.ts +1 -1
  194. package/build/cjs/icons/Telegram.js.map +1 -1
  195. package/build/cjs/icons/Twitter.d.ts +1 -1
  196. package/build/cjs/icons/Twitter.js.map +1 -1
  197. package/build/cjs/icons/Vk.d.ts +1 -1
  198. package/build/cjs/icons/Vk.js.map +1 -1
  199. package/build/cjs/internal-typings/global.d.ts +4 -2
  200. package/build/cjs/models/constructor-items/blocks.d.ts +42 -17
  201. package/build/cjs/models/constructor-items/blocks.js.map +1 -1
  202. package/build/cjs/models/constructor-items/common.d.ts +42 -4
  203. package/build/cjs/models/constructor-items/common.js.map +1 -1
  204. package/build/cjs/models/constructor-items/sub-blocks.d.ts +17 -6
  205. package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
  206. package/build/cjs/models/navigation.d.ts +2 -1
  207. package/build/cjs/models/navigation.js.map +1 -1
  208. package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.d.ts +1 -2
  209. package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.js.map +1 -1
  210. package/build/cjs/navigation/components/Logo/Logo.d.ts +1 -2
  211. package/build/cjs/navigation/components/Logo/Logo.js.map +1 -1
  212. package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.d.ts +1 -2
  213. package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.js.map +1 -1
  214. package/build/cjs/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -2
  215. package/build/cjs/navigation/components/MobileNavigation/MobileNavigation.js.map +1 -1
  216. package/build/cjs/navigation/components/Navigation/Navigation.d.ts +2 -1
  217. package/build/cjs/navigation/components/Navigation/Navigation.js +5 -2
  218. package/build/cjs/navigation/components/Navigation/Navigation.js.map +1 -1
  219. package/build/cjs/navigation/components/NavigationItem/NavigationItem.d.ts +1 -2
  220. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js.map +1 -1
  221. package/build/cjs/navigation/components/NavigationItem/components/ContentWrapper/ContentWrapper.d.ts +1 -2
  222. package/build/cjs/navigation/components/NavigationItem/components/ContentWrapper/ContentWrapper.js.map +1 -1
  223. package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.d.ts +1 -2
  224. package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js.map +1 -1
  225. package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.d.ts +1 -2
  226. package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +12 -3
  227. package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js.map +1 -1
  228. package/build/cjs/navigation/components/NavigationItem/hooks/useNavigationItemMap.d.ts +3 -4
  229. package/build/cjs/navigation/components/NavigationList/NavigationList.d.ts +1 -2
  230. package/build/cjs/navigation/components/NavigationList/NavigationList.js.map +1 -1
  231. package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.d.ts +1 -2
  232. package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.js.map +1 -1
  233. package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.d.ts +1 -2
  234. package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
  235. package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js.map +1 -1
  236. package/build/cjs/navigation/components/SocialIcon/SocialIcon.d.ts +1 -2
  237. package/build/cjs/navigation/components/SocialIcon/SocialIcon.js.map +1 -1
  238. package/build/cjs/navigation/containers/Layout/Layout.d.ts +1 -1
  239. package/build/cjs/navigation/containers/Layout/Layout.js.map +1 -1
  240. package/build/cjs/navigation/hooks/useActiveNavItem.d.ts +8 -7
  241. package/build/cjs/navigation/utils.d.ts +4 -3
  242. package/build/cjs/node_modules/swiper/modules/a11y.css +9 -0
  243. package/build/cjs/node_modules/swiper/modules/autoplay.css +0 -0
  244. package/build/cjs/node_modules/swiper/modules/index.js +1309 -0
  245. package/build/cjs/node_modules/swiper/modules/pagination.css +181 -0
  246. package/build/cjs/node_modules/swiper/package.json +14 -0
  247. package/build/cjs/node_modules/swiper/swiper-react.d.ts +497 -0
  248. package/build/cjs/node_modules/swiper/swiper-react.js +4651 -0
  249. package/build/cjs/node_modules/swiper/swiper.css +229 -0
  250. package/build/cjs/node_modules/swiper/swiper.d.ts +5 -0
  251. package/build/cjs/node_modules/swiper/swiper.js +3822 -0
  252. package/build/cjs/node_modules/swiper/types/index.d.ts +6 -0
  253. package/build/cjs/node_modules/swiper/types/modules/index.d.ts +53 -0
  254. package/build/cjs/schema/constants.d.ts +62 -0
  255. package/build/cjs/schema/validators/common.d.ts +156 -1
  256. package/build/cjs/schema/validators/common.js +74 -1
  257. package/build/cjs/schema/validators/common.js.map +1 -1
  258. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  259. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js.map +1 -1
  260. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +16 -0
  261. package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -0
  262. package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
  263. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +15 -2
  264. package/build/cjs/sub-blocks/BasicCard/BasicCard.js.map +1 -1
  265. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +38 -0
  266. package/build/cjs/sub-blocks/BasicCard/schema.js +7 -0
  267. package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
  268. package/build/cjs/sub-blocks/Content/Content.css +16 -2
  269. package/build/cjs/sub-blocks/Content/Content.js +12 -3
  270. package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
  271. package/build/cjs/sub-blocks/Content/schema.d.ts +134 -1
  272. package/build/cjs/sub-blocks/Content/schema.js +23 -2
  273. package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
  274. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +11 -0
  275. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +2 -2
  276. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js.map +1 -1
  277. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +11 -0
  278. package/build/cjs/text-transform/common.d.ts +2 -1
  279. package/build/cjs/text-transform/common.js +2 -2
  280. package/build/cjs/text-transform/common.js.map +1 -1
  281. package/build/cjs/text-transform/config.js +16 -11
  282. package/build/cjs/text-transform/config.js.map +1 -1
  283. package/build/cjs/utils/breakpoint.d.ts +7 -0
  284. package/build/cjs/utils/breakpoint.js +12 -0
  285. package/build/cjs/utils/breakpoint.js.map +1 -0
  286. package/build/cjs/utils/icons.d.ts +3 -0
  287. package/build/cjs/utils/icons.js +16 -0
  288. package/build/cjs/utils/icons.js.map +1 -0
  289. package/build/cjs/utils/index.d.ts +2 -0
  290. package/build/cjs/utils/index.js +2 -0
  291. package/build/cjs/utils/index.js.map +1 -1
  292. package/build/esm/blocks/CardLayout/CardLayout.css +6 -0
  293. package/build/esm/blocks/CardLayout/CardLayout.d.ts +1 -1
  294. package/build/esm/blocks/CardLayout/CardLayout.js +3 -3
  295. package/build/esm/blocks/CardLayout/CardLayout.js.map +1 -1
  296. package/build/esm/blocks/Companies/schema.d.ts +1 -0
  297. package/build/esm/blocks/Companies/schema.js +2 -1
  298. package/build/esm/blocks/Companies/schema.js.map +1 -1
  299. package/build/esm/blocks/ContentLayout/ContentLayout.js +4 -2
  300. package/build/esm/blocks/ContentLayout/ContentLayout.js.map +1 -1
  301. package/build/esm/blocks/ContentLayout/schema.d.ts +11 -0
  302. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.css +5 -5
  303. package/build/esm/blocks/FilterBlock/FilterBlock.d.ts +1 -2
  304. package/build/esm/blocks/FilterBlock/FilterBlock.js.map +1 -1
  305. package/build/esm/blocks/FoldableList/schema.d.ts +11 -0
  306. package/build/esm/blocks/Form/Form.css +5 -2
  307. package/build/esm/blocks/Form/Form.d.ts +2 -3
  308. package/build/esm/blocks/Form/Form.js +14 -11
  309. package/build/esm/blocks/Form/Form.js.map +1 -1
  310. package/build/esm/blocks/Form/schema.d.ts +12 -4
  311. package/build/esm/blocks/Form/schema.js +1 -4
  312. package/build/esm/blocks/Form/schema.js.map +1 -1
  313. package/build/esm/blocks/Form/utils.d.ts +3 -0
  314. package/build/esm/blocks/Form/utils.js +16 -0
  315. package/build/esm/blocks/Form/utils.js.map +1 -0
  316. package/build/esm/blocks/Header/Header.css +13 -0
  317. package/build/esm/blocks/Header/Header.d.ts +7 -1
  318. package/build/esm/blocks/Header/Header.js +11 -18
  319. package/build/esm/blocks/Header/Header.js.map +1 -1
  320. package/build/esm/blocks/Header/schema.d.ts +77 -0
  321. package/build/esm/blocks/Header/schema.js +12 -0
  322. package/build/esm/blocks/Header/schema.js.map +1 -1
  323. package/build/esm/blocks/HeaderSlider/schema.d.ts +29 -0
  324. package/build/esm/blocks/Info/schema.d.ts +22 -0
  325. package/build/esm/blocks/Map/Map.js.map +1 -1
  326. package/build/esm/blocks/Map/schema.d.ts +101 -0
  327. package/build/esm/blocks/Media/Media.js +1 -1
  328. package/build/esm/blocks/Media/Media.js.map +1 -1
  329. package/build/esm/blocks/Media/schema.d.ts +22 -0
  330. package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +3 -4
  331. package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js.map +1 -1
  332. package/build/esm/blocks/Questions/Questions.js +32 -7
  333. package/build/esm/blocks/Questions/Questions.js.map +1 -1
  334. package/build/esm/blocks/Questions/schema.d.ts +11 -0
  335. package/build/esm/blocks/Share/Share.js +1 -3
  336. package/build/esm/blocks/Share/Share.js.map +1 -1
  337. package/build/esm/blocks/Slider/Slider.css +62 -1
  338. package/build/esm/blocks/Slider/Slider.d.ts +6 -4
  339. package/build/esm/blocks/Slider/Slider.js +7 -7
  340. package/build/esm/blocks/Slider/Slider.js.map +1 -1
  341. package/build/esm/blocks/Slider/useSlider.d.ts +2 -3
  342. package/build/esm/blocks/Slider/useSlider.js +3 -7
  343. package/build/esm/blocks/Slider/useSlider.js.map +1 -1
  344. package/build/esm/blocks/Slider/useSliderPagination.d.ts +1 -1
  345. package/build/esm/blocks/Slider/useSliderPagination.js.map +1 -1
  346. package/build/esm/blocks/Slider/utils.d.ts +1 -1
  347. package/build/esm/blocks/Slider/utils.js.map +1 -1
  348. package/build/esm/blocks/Table/Table.js +15 -3
  349. package/build/esm/blocks/Table/Table.js.map +1 -1
  350. package/build/esm/blocks/Tabs/TabContent/TabContent.js +7 -7
  351. package/build/esm/blocks/Tabs/TabContent/TabContent.js.map +1 -1
  352. package/build/esm/blocks/Tabs/Tabs.js +2 -2
  353. package/build/esm/blocks/Tabs/Tabs.js.map +1 -1
  354. package/build/esm/blocks/Tabs/schema.d.ts +11 -0
  355. package/build/esm/components/Button/Button.css +2 -7
  356. package/build/esm/components/Button/Button.js +29 -4
  357. package/build/esm/components/Button/Button.js.map +1 -1
  358. package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +1 -1
  359. package/build/esm/components/ButtonTabs/ButtonTabs.js.map +1 -1
  360. package/build/esm/components/Buttons/Buttons.css +3 -0
  361. package/build/esm/components/Buttons/Buttons.d.ts +1 -2
  362. package/build/esm/components/Buttons/Buttons.js +1 -1
  363. package/build/esm/components/Buttons/Buttons.js.map +1 -1
  364. package/build/esm/components/CardBase/CardBase.css +15 -0
  365. package/build/esm/components/CardBase/CardBase.d.ts +3 -5
  366. package/build/esm/components/CardBase/CardBase.js.map +1 -1
  367. package/build/esm/components/ContentIcon/ContentIcon.d.ts +8 -0
  368. package/build/esm/components/ContentIcon/ContentIcon.js +19 -0
  369. package/build/esm/components/ContentIcon/ContentIcon.js.map +1 -0
  370. package/build/esm/components/ContentLabels/ContentLabels.css +53 -0
  371. package/build/esm/components/ContentLabels/ContentLabels.d.ts +4 -0
  372. package/build/esm/components/ContentLabels/ContentLabels.js +14 -0
  373. package/build/esm/components/ContentLabels/ContentLabels.js.map +1 -0
  374. package/build/esm/components/ContentList/ContentList.js +3 -3
  375. package/build/esm/components/ContentList/ContentList.js.map +1 -1
  376. package/build/esm/components/DefaultVideo/DefaultVideo.js +23 -2
  377. package/build/esm/components/DefaultVideo/DefaultVideo.js.map +1 -1
  378. package/build/esm/components/FullscreenMedia/FullscreenMedia.css +3 -1
  379. package/build/esm/components/Icon/Icon.css +10 -0
  380. package/build/esm/components/Icon/Icon.d.ts +10 -0
  381. package/build/esm/components/Icon/Icon.js +22 -0
  382. package/build/esm/components/Icon/Icon.js.map +1 -0
  383. package/build/esm/components/IconWrapper/IconWrapper.css +16 -1
  384. package/build/esm/components/IconWrapper/IconWrapper.js +10 -6
  385. package/build/esm/components/IconWrapper/IconWrapper.js.map +1 -1
  386. package/build/esm/components/InnerForm/InnerForm.d.ts +1 -2
  387. package/build/esm/components/InnerForm/InnerForm.js.map +1 -1
  388. package/build/esm/components/Link/Link.d.ts +2 -2
  389. package/build/esm/components/Link/Link.js +2 -2
  390. package/build/esm/components/Link/Link.js.map +1 -1
  391. package/build/esm/components/Links/Links.d.ts +1 -1
  392. package/build/esm/components/Links/Links.js +1 -1
  393. package/build/esm/components/Links/Links.js.map +1 -1
  394. package/build/esm/components/Map/GoogleMap.d.ts +1 -2
  395. package/build/esm/components/Map/GoogleMap.js +19 -3
  396. package/build/esm/components/Map/GoogleMap.js.map +1 -1
  397. package/build/esm/components/Map/YMap/YMap.d.ts +4 -4
  398. package/build/esm/components/Map/YMap/YMap.js +46 -15
  399. package/build/esm/components/Map/YMap/YMap.js.map +1 -1
  400. package/build/esm/components/Map/YMap/YandexMap.d.ts +1 -2
  401. package/build/esm/components/Map/YMap/YandexMap.js +73 -7
  402. package/build/esm/components/Map/YMap/YandexMap.js.map +1 -1
  403. package/build/esm/components/Map/YMap/utils.d.ts +8 -0
  404. package/build/esm/components/Map/YMap/utils.js +90 -0
  405. package/build/esm/components/Map/YMap/utils.js.map +1 -0
  406. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.d.ts +1 -2
  407. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.js.map +1 -1
  408. package/build/esm/components/Media/Video/Video.js +2 -13
  409. package/build/esm/components/Media/Video/Video.js.map +1 -1
  410. package/build/esm/components/MediaBase/MediaBase.d.ts +1 -3
  411. package/build/esm/components/MediaBase/MediaBase.js.map +1 -1
  412. package/build/esm/components/ReactPlayer/ReactPlayer.d.ts +1 -2
  413. package/build/esm/components/ReactPlayer/ReactPlayer.js +19 -13
  414. package/build/esm/components/ReactPlayer/ReactPlayer.js.map +1 -1
  415. package/build/esm/components/Title/Title.d.ts +3 -2
  416. package/build/esm/components/Title/Title.js +2 -2
  417. package/build/esm/components/Title/Title.js.map +1 -1
  418. package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js.map +1 -1
  419. package/build/esm/components/YandexForm/YandexForm.js +1 -1
  420. package/build/esm/components/YandexForm/YandexForm.js.map +1 -1
  421. package/build/esm/components/index.d.ts +2 -0
  422. package/build/esm/components/index.js +2 -0
  423. package/build/esm/components/index.js.map +1 -1
  424. package/build/esm/constructor-items.d.ts +7 -7
  425. package/build/esm/containers/PageConstructor/PageConstructor.css +0 -1
  426. package/build/esm/containers/PageConstructor/Provider.js +2 -0
  427. package/build/esm/containers/PageConstructor/Provider.js.map +1 -1
  428. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +1 -2
  429. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js.map +1 -1
  430. package/build/esm/context/locationContext/locationContext.d.ts +1 -1
  431. package/build/esm/context/locationContext/locationContext.js.map +1 -1
  432. package/build/esm/context/mapsContext/mapsProvider.d.ts +1 -1
  433. package/build/esm/context/mapsContext/mapsProvider.js.map +1 -1
  434. package/build/esm/context/windowWidthContext/WindowWidthContext.d.ts +4 -0
  435. package/build/esm/context/windowWidthContext/WindowWidthContext.js +22 -0
  436. package/build/esm/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  437. package/build/esm/context/windowWidthContext/index.d.ts +1 -0
  438. package/build/esm/context/windowWidthContext/index.js +2 -0
  439. package/build/esm/context/windowWidthContext/index.js.map +1 -0
  440. package/build/esm/editor/components/AddBlock/AddBlock.d.ts +1 -2
  441. package/build/esm/editor/components/AddBlock/AddBlock.js.map +1 -1
  442. package/build/esm/editor/components/Layout/Layout.d.ts +2 -6
  443. package/build/esm/editor/components/Layout/Layout.js.map +1 -1
  444. package/build/esm/editor/data/previews/default-preview.d.ts +1 -1
  445. package/build/esm/editor/data/previews/default-preview.js.map +1 -1
  446. package/build/esm/editor/data/previews/header-block.d.ts +1 -1
  447. package/build/esm/editor/data/previews/header-block.js.map +1 -1
  448. package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +2 -3
  449. package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +1 -1
  450. package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js.map +1 -1
  451. package/build/esm/editor/icons/Tablet.d.ts +1 -1
  452. package/build/esm/editor/icons/Tablet.js.map +1 -1
  453. package/build/esm/grid/Grid/Grid.d.ts +1 -1
  454. package/build/esm/grid/Grid/Grid.js +1 -1
  455. package/build/esm/grid/Grid/Grid.js.map +1 -1
  456. package/build/esm/grid/Row/Row.d.ts +1 -1
  457. package/build/esm/grid/Row/Row.js.map +1 -1
  458. package/build/esm/hooks/useDeviceValue.d.ts +2 -0
  459. package/build/esm/hooks/useDeviceValue.js +29 -0
  460. package/build/esm/hooks/useDeviceValue.js.map +1 -0
  461. package/build/esm/icons/BrandIconDark.d.ts +1 -1
  462. package/build/esm/icons/BrandIconDark.js.map +1 -1
  463. package/build/esm/icons/BrandIconLight.d.ts +1 -1
  464. package/build/esm/icons/BrandIconLight.js.map +1 -1
  465. package/build/esm/icons/BrandName.d.ts +1 -1
  466. package/build/esm/icons/BrandName.js.map +1 -1
  467. package/build/esm/icons/Chevron.d.ts +1 -1
  468. package/build/esm/icons/Chevron.js.map +1 -1
  469. package/build/esm/icons/Facebook.d.ts +1 -1
  470. package/build/esm/icons/Facebook.js.map +1 -1
  471. package/build/esm/icons/Github.d.ts +1 -1
  472. package/build/esm/icons/Github.js.map +1 -1
  473. package/build/esm/icons/Linkedin.d.ts +1 -1
  474. package/build/esm/icons/Linkedin.js.map +1 -1
  475. package/build/esm/icons/NavigationArrow.d.ts +1 -1
  476. package/build/esm/icons/NavigationArrow.js.map +1 -1
  477. package/build/esm/icons/NavigationChevron.d.ts +1 -1
  478. package/build/esm/icons/NavigationChevron.js.map +1 -1
  479. package/build/esm/icons/Telegram.d.ts +1 -1
  480. package/build/esm/icons/Telegram.js.map +1 -1
  481. package/build/esm/icons/Twitter.d.ts +1 -1
  482. package/build/esm/icons/Twitter.js.map +1 -1
  483. package/build/esm/icons/Vk.d.ts +1 -1
  484. package/build/esm/icons/Vk.js.map +1 -1
  485. package/build/esm/internal-typings/global.d.ts +4 -2
  486. package/build/esm/models/constructor-items/blocks.d.ts +42 -17
  487. package/build/esm/models/constructor-items/blocks.js.map +1 -1
  488. package/build/esm/models/constructor-items/common.d.ts +42 -4
  489. package/build/esm/models/constructor-items/common.js.map +1 -1
  490. package/build/esm/models/constructor-items/sub-blocks.d.ts +17 -6
  491. package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
  492. package/build/esm/models/navigation.d.ts +2 -1
  493. package/build/esm/models/navigation.js.map +1 -1
  494. package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.d.ts +1 -2
  495. package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.js.map +1 -1
  496. package/build/esm/navigation/components/Logo/Logo.d.ts +1 -2
  497. package/build/esm/navigation/components/Logo/Logo.js.map +1 -1
  498. package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.d.ts +1 -2
  499. package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.js.map +1 -1
  500. package/build/esm/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -2
  501. package/build/esm/navigation/components/MobileNavigation/MobileNavigation.js.map +1 -1
  502. package/build/esm/navigation/components/Navigation/Navigation.d.ts +2 -1
  503. package/build/esm/navigation/components/Navigation/Navigation.js +5 -2
  504. package/build/esm/navigation/components/Navigation/Navigation.js.map +1 -1
  505. package/build/esm/navigation/components/NavigationItem/NavigationItem.d.ts +1 -2
  506. package/build/esm/navigation/components/NavigationItem/NavigationItem.js.map +1 -1
  507. package/build/esm/navigation/components/NavigationItem/components/ContentWrapper/ContentWrapper.d.ts +1 -2
  508. package/build/esm/navigation/components/NavigationItem/components/ContentWrapper/ContentWrapper.js.map +1 -1
  509. package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.d.ts +1 -2
  510. package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js.map +1 -1
  511. package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.d.ts +1 -2
  512. package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +12 -3
  513. package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js.map +1 -1
  514. package/build/esm/navigation/components/NavigationItem/hooks/useNavigationItemMap.d.ts +3 -4
  515. package/build/esm/navigation/components/NavigationList/NavigationList.d.ts +1 -2
  516. package/build/esm/navigation/components/NavigationList/NavigationList.js.map +1 -1
  517. package/build/esm/navigation/components/NavigationListItem/NavigationListItem.d.ts +1 -2
  518. package/build/esm/navigation/components/NavigationListItem/NavigationListItem.js.map +1 -1
  519. package/build/esm/navigation/components/NavigationPopup/NavigationPopup.d.ts +1 -2
  520. package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
  521. package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js.map +1 -1
  522. package/build/esm/navigation/components/SocialIcon/SocialIcon.d.ts +1 -2
  523. package/build/esm/navigation/components/SocialIcon/SocialIcon.js.map +1 -1
  524. package/build/esm/navigation/containers/Layout/Layout.d.ts +1 -1
  525. package/build/esm/navigation/containers/Layout/Layout.js.map +1 -1
  526. package/build/esm/navigation/hooks/useActiveNavItem.d.ts +8 -7
  527. package/build/esm/navigation/utils.d.ts +4 -3
  528. package/build/esm/schema/constants.d.ts +62 -0
  529. package/build/esm/schema/validators/common.d.ts +156 -1
  530. package/build/esm/schema/validators/common.js +73 -2
  531. package/build/esm/schema/validators/common.js.map +1 -1
  532. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  533. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js.map +1 -1
  534. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +16 -0
  535. package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -1
  536. package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
  537. package/build/esm/sub-blocks/BasicCard/BasicCard.js +15 -2
  538. package/build/esm/sub-blocks/BasicCard/BasicCard.js.map +1 -1
  539. package/build/esm/sub-blocks/BasicCard/schema.d.ts +38 -0
  540. package/build/esm/sub-blocks/BasicCard/schema.js +8 -1
  541. package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
  542. package/build/esm/sub-blocks/Content/Content.css +16 -2
  543. package/build/esm/sub-blocks/Content/Content.js +11 -3
  544. package/build/esm/sub-blocks/Content/Content.js.map +1 -1
  545. package/build/esm/sub-blocks/Content/schema.d.ts +134 -1
  546. package/build/esm/sub-blocks/Content/schema.js +23 -2
  547. package/build/esm/sub-blocks/Content/schema.js.map +1 -1
  548. package/build/esm/sub-blocks/ImageCard/schema.d.ts +11 -0
  549. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +2 -2
  550. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js.map +1 -1
  551. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +11 -0
  552. package/build/esm/text-transform/common.d.ts +2 -1
  553. package/build/esm/text-transform/common.js +2 -2
  554. package/build/esm/text-transform/common.js.map +1 -1
  555. package/build/esm/text-transform/config.js +16 -11
  556. package/build/esm/text-transform/config.js.map +1 -1
  557. package/build/esm/utils/breakpoint.d.ts +7 -0
  558. package/build/esm/utils/breakpoint.js +9 -0
  559. package/build/esm/utils/breakpoint.js.map +1 -0
  560. package/build/esm/utils/icons.d.ts +3 -0
  561. package/build/esm/utils/icons.js +11 -0
  562. package/build/esm/utils/icons.js.map +1 -0
  563. package/build/esm/utils/index.d.ts +2 -0
  564. package/build/esm/utils/index.js +2 -0
  565. package/build/esm/utils/index.js.map +1 -1
  566. package/package.json +7 -5
  567. package/schema/index.js +1 -1
  568. package/server/models/constructor-items/blocks.d.ts +42 -17
  569. package/server/models/constructor-items/common.d.ts +42 -4
  570. package/server/models/constructor-items/sub-blocks.d.ts +17 -6
  571. package/server/models/navigation.d.ts +2 -1
  572. package/server/text-transform/common.d.ts +2 -1
  573. package/server/text-transform/common.js +2 -2
  574. package/server/text-transform/config.js +16 -11
  575. package/server/utils/breakpoint.d.ts +7 -0
  576. package/server/utils/breakpoint.js +11 -0
  577. package/server/utils/icons.d.ts +3 -0
  578. package/server/utils/icons.js +47 -0
  579. package/server/utils/index.d.ts +2 -0
  580. package/server/utils/index.js +2 -0
  581. package/styles/mixins.scss +20 -0
  582. package/styles/root.scss +0 -1
  583. package/styles/storybook/index.scss +1 -0
  584. package/build/cjs/blocks/Questions/models.d.ts +0 -11
  585. package/build/cjs/blocks/Questions/models.js +0 -15
  586. package/build/cjs/blocks/Questions/models.js.map +0 -1
  587. package/build/cjs/components/ContentList/ContentListItemIcon.d.ts +0 -7
  588. package/build/cjs/components/ContentList/ContentListItemIcon.js +0 -23
  589. package/build/cjs/components/ContentList/ContentListItemIcon.js.map +0 -1
  590. package/build/esm/blocks/Questions/models.d.ts +0 -11
  591. package/build/esm/blocks/Questions/models.js +0 -12
  592. package/build/esm/blocks/Questions/models.js.map +0 -1
  593. package/build/esm/components/ContentList/ContentListItemIcon.d.ts +0 -7
  594. package/build/esm/components/ContentList/ContentListItemIcon.js +0 -20
  595. package/build/esm/components/ContentList/ContentListItemIcon.js.map +0 -1
@@ -0,0 +1,4651 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // node_modules/swiper/swiper-react.mjs
30
+ var swiper_react_exports = {};
31
+ __export(swiper_react_exports, {
32
+ Swiper: () => Swiper2,
33
+ SwiperSlide: () => SwiperSlide,
34
+ useSwiper: () => useSwiper,
35
+ useSwiperSlide: () => useSwiperSlide
36
+ });
37
+ module.exports = __toCommonJS(swiper_react_exports);
38
+ var import_react = __toESM(require("react"), 1);
39
+
40
+ // node_modules/swiper/shared/ssr-window.esm.mjs
41
+ function isObject(obj) {
42
+ return obj !== null && typeof obj === "object" && "constructor" in obj && obj.constructor === Object;
43
+ }
44
+ function extend(target, src) {
45
+ if (target === void 0) {
46
+ target = {};
47
+ }
48
+ if (src === void 0) {
49
+ src = {};
50
+ }
51
+ Object.keys(src).forEach((key) => {
52
+ if (typeof target[key] === "undefined") target[key] = src[key];
53
+ else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {
54
+ extend(target[key], src[key]);
55
+ }
56
+ });
57
+ }
58
+ var ssrDocument = {
59
+ body: {},
60
+ addEventListener() {
61
+ },
62
+ removeEventListener() {
63
+ },
64
+ activeElement: {
65
+ blur() {
66
+ },
67
+ nodeName: ""
68
+ },
69
+ querySelector() {
70
+ return null;
71
+ },
72
+ querySelectorAll() {
73
+ return [];
74
+ },
75
+ getElementById() {
76
+ return null;
77
+ },
78
+ createEvent() {
79
+ return {
80
+ initEvent() {
81
+ }
82
+ };
83
+ },
84
+ createElement() {
85
+ return {
86
+ children: [],
87
+ childNodes: [],
88
+ style: {},
89
+ setAttribute() {
90
+ },
91
+ getElementsByTagName() {
92
+ return [];
93
+ }
94
+ };
95
+ },
96
+ createElementNS() {
97
+ return {};
98
+ },
99
+ importNode() {
100
+ return null;
101
+ },
102
+ location: {
103
+ hash: "",
104
+ host: "",
105
+ hostname: "",
106
+ href: "",
107
+ origin: "",
108
+ pathname: "",
109
+ protocol: "",
110
+ search: ""
111
+ }
112
+ };
113
+ function getDocument() {
114
+ const doc = typeof document !== "undefined" ? document : {};
115
+ extend(doc, ssrDocument);
116
+ return doc;
117
+ }
118
+ var ssrWindow = {
119
+ document: ssrDocument,
120
+ navigator: {
121
+ userAgent: ""
122
+ },
123
+ location: {
124
+ hash: "",
125
+ host: "",
126
+ hostname: "",
127
+ href: "",
128
+ origin: "",
129
+ pathname: "",
130
+ protocol: "",
131
+ search: ""
132
+ },
133
+ history: {
134
+ replaceState() {
135
+ },
136
+ pushState() {
137
+ },
138
+ go() {
139
+ },
140
+ back() {
141
+ }
142
+ },
143
+ CustomEvent: function CustomEvent() {
144
+ return this;
145
+ },
146
+ addEventListener() {
147
+ },
148
+ removeEventListener() {
149
+ },
150
+ getComputedStyle() {
151
+ return {
152
+ getPropertyValue() {
153
+ return "";
154
+ }
155
+ };
156
+ },
157
+ Image() {
158
+ },
159
+ Date() {
160
+ },
161
+ screen: {},
162
+ setTimeout() {
163
+ },
164
+ clearTimeout() {
165
+ },
166
+ matchMedia() {
167
+ return {};
168
+ },
169
+ requestAnimationFrame(callback) {
170
+ if (typeof setTimeout === "undefined") {
171
+ callback();
172
+ return null;
173
+ }
174
+ return setTimeout(callback, 0);
175
+ },
176
+ cancelAnimationFrame(id) {
177
+ if (typeof setTimeout === "undefined") {
178
+ return;
179
+ }
180
+ clearTimeout(id);
181
+ }
182
+ };
183
+ function getWindow() {
184
+ const win = typeof window !== "undefined" ? window : {};
185
+ extend(win, ssrWindow);
186
+ return win;
187
+ }
188
+
189
+ // node_modules/swiper/shared/utils.mjs
190
+ function deleteProps(obj) {
191
+ const object = obj;
192
+ Object.keys(object).forEach((key) => {
193
+ try {
194
+ object[key] = null;
195
+ } catch (e) {
196
+ }
197
+ try {
198
+ delete object[key];
199
+ } catch (e) {
200
+ }
201
+ });
202
+ }
203
+ function nextTick(callback, delay) {
204
+ if (delay === void 0) {
205
+ delay = 0;
206
+ }
207
+ return setTimeout(callback, delay);
208
+ }
209
+ function now() {
210
+ return Date.now();
211
+ }
212
+ function getComputedStyle2(el) {
213
+ const window2 = getWindow();
214
+ let style;
215
+ if (window2.getComputedStyle) {
216
+ style = window2.getComputedStyle(el, null);
217
+ }
218
+ if (!style && el.currentStyle) {
219
+ style = el.currentStyle;
220
+ }
221
+ if (!style) {
222
+ style = el.style;
223
+ }
224
+ return style;
225
+ }
226
+ function getTranslate(el, axis) {
227
+ if (axis === void 0) {
228
+ axis = "x";
229
+ }
230
+ const window2 = getWindow();
231
+ let matrix;
232
+ let curTransform;
233
+ let transformMatrix;
234
+ const curStyle = getComputedStyle2(el);
235
+ if (window2.WebKitCSSMatrix) {
236
+ curTransform = curStyle.transform || curStyle.webkitTransform;
237
+ if (curTransform.split(",").length > 6) {
238
+ curTransform = curTransform.split(", ").map((a) => a.replace(",", ".")).join(", ");
239
+ }
240
+ transformMatrix = new window2.WebKitCSSMatrix(curTransform === "none" ? "" : curTransform);
241
+ } else {
242
+ transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,");
243
+ matrix = transformMatrix.toString().split(",");
244
+ }
245
+ if (axis === "x") {
246
+ if (window2.WebKitCSSMatrix) curTransform = transformMatrix.m41;
247
+ else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
248
+ else curTransform = parseFloat(matrix[4]);
249
+ }
250
+ if (axis === "y") {
251
+ if (window2.WebKitCSSMatrix) curTransform = transformMatrix.m42;
252
+ else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
253
+ else curTransform = parseFloat(matrix[5]);
254
+ }
255
+ return curTransform || 0;
256
+ }
257
+ function isObject2(o) {
258
+ return typeof o === "object" && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === "Object";
259
+ }
260
+ function isNode(node) {
261
+ if (typeof window !== "undefined" && typeof window.HTMLElement !== "undefined") {
262
+ return node instanceof HTMLElement;
263
+ }
264
+ return node && (node.nodeType === 1 || node.nodeType === 11);
265
+ }
266
+ function extend2() {
267
+ const to = Object(arguments.length <= 0 ? void 0 : arguments[0]);
268
+ const noExtend = ["__proto__", "constructor", "prototype"];
269
+ for (let i = 1; i < arguments.length; i += 1) {
270
+ const nextSource = i < 0 || arguments.length <= i ? void 0 : arguments[i];
271
+ if (nextSource !== void 0 && nextSource !== null && !isNode(nextSource)) {
272
+ const keysArray = Object.keys(Object(nextSource)).filter((key) => noExtend.indexOf(key) < 0);
273
+ for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
274
+ const nextKey = keysArray[nextIndex];
275
+ const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
276
+ if (desc !== void 0 && desc.enumerable) {
277
+ if (isObject2(to[nextKey]) && isObject2(nextSource[nextKey])) {
278
+ if (nextSource[nextKey].__swiper__) {
279
+ to[nextKey] = nextSource[nextKey];
280
+ } else {
281
+ extend2(to[nextKey], nextSource[nextKey]);
282
+ }
283
+ } else if (!isObject2(to[nextKey]) && isObject2(nextSource[nextKey])) {
284
+ to[nextKey] = {};
285
+ if (nextSource[nextKey].__swiper__) {
286
+ to[nextKey] = nextSource[nextKey];
287
+ } else {
288
+ extend2(to[nextKey], nextSource[nextKey]);
289
+ }
290
+ } else {
291
+ to[nextKey] = nextSource[nextKey];
292
+ }
293
+ }
294
+ }
295
+ }
296
+ }
297
+ return to;
298
+ }
299
+ function setCSSProperty(el, varName, varValue) {
300
+ el.style.setProperty(varName, varValue);
301
+ }
302
+ function animateCSSModeScroll(_ref) {
303
+ let {
304
+ swiper,
305
+ targetPosition,
306
+ side
307
+ } = _ref;
308
+ const window2 = getWindow();
309
+ const startPosition = -swiper.translate;
310
+ let startTime = null;
311
+ let time;
312
+ const duration = swiper.params.speed;
313
+ swiper.wrapperEl.style.scrollSnapType = "none";
314
+ window2.cancelAnimationFrame(swiper.cssModeFrameID);
315
+ const dir = targetPosition > startPosition ? "next" : "prev";
316
+ const isOutOfBound = (current, target) => {
317
+ return dir === "next" && current >= target || dir === "prev" && current <= target;
318
+ };
319
+ const animate = () => {
320
+ time = (/* @__PURE__ */ new Date()).getTime();
321
+ if (startTime === null) {
322
+ startTime = time;
323
+ }
324
+ const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);
325
+ const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;
326
+ let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);
327
+ if (isOutOfBound(currentPosition, targetPosition)) {
328
+ currentPosition = targetPosition;
329
+ }
330
+ swiper.wrapperEl.scrollTo({
331
+ [side]: currentPosition
332
+ });
333
+ if (isOutOfBound(currentPosition, targetPosition)) {
334
+ swiper.wrapperEl.style.overflow = "hidden";
335
+ swiper.wrapperEl.style.scrollSnapType = "";
336
+ setTimeout(() => {
337
+ swiper.wrapperEl.style.overflow = "";
338
+ swiper.wrapperEl.scrollTo({
339
+ [side]: currentPosition
340
+ });
341
+ });
342
+ window2.cancelAnimationFrame(swiper.cssModeFrameID);
343
+ return;
344
+ }
345
+ swiper.cssModeFrameID = window2.requestAnimationFrame(animate);
346
+ };
347
+ animate();
348
+ }
349
+ function elementChildren(element, selector) {
350
+ if (selector === void 0) {
351
+ selector = "";
352
+ }
353
+ return [...element.children].filter((el) => el.matches(selector));
354
+ }
355
+ function createElement(tag, classes2) {
356
+ if (classes2 === void 0) {
357
+ classes2 = [];
358
+ }
359
+ const el = document.createElement(tag);
360
+ el.classList.add(...Array.isArray(classes2) ? classes2 : [classes2]);
361
+ return el;
362
+ }
363
+ function elementPrevAll(el, selector) {
364
+ const prevEls = [];
365
+ while (el.previousElementSibling) {
366
+ const prev = el.previousElementSibling;
367
+ if (selector) {
368
+ if (prev.matches(selector)) prevEls.push(prev);
369
+ } else prevEls.push(prev);
370
+ el = prev;
371
+ }
372
+ return prevEls;
373
+ }
374
+ function elementNextAll(el, selector) {
375
+ const nextEls = [];
376
+ while (el.nextElementSibling) {
377
+ const next = el.nextElementSibling;
378
+ if (selector) {
379
+ if (next.matches(selector)) nextEls.push(next);
380
+ } else nextEls.push(next);
381
+ el = next;
382
+ }
383
+ return nextEls;
384
+ }
385
+ function elementStyle(el, prop) {
386
+ const window2 = getWindow();
387
+ return window2.getComputedStyle(el, null).getPropertyValue(prop);
388
+ }
389
+ function elementIndex(el) {
390
+ let child = el;
391
+ let i;
392
+ if (child) {
393
+ i = 0;
394
+ while ((child = child.previousSibling) !== null) {
395
+ if (child.nodeType === 1) i += 1;
396
+ }
397
+ return i;
398
+ }
399
+ return void 0;
400
+ }
401
+ function elementParents(el, selector) {
402
+ const parents = [];
403
+ let parent = el.parentElement;
404
+ while (parent) {
405
+ if (selector) {
406
+ if (parent.matches(selector)) parents.push(parent);
407
+ } else {
408
+ parents.push(parent);
409
+ }
410
+ parent = parent.parentElement;
411
+ }
412
+ return parents;
413
+ }
414
+ function elementOuterSize(el, size, includeMargins) {
415
+ const window2 = getWindow();
416
+ if (includeMargins) {
417
+ return el[size === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(window2.getComputedStyle(el, null).getPropertyValue(size === "width" ? "margin-right" : "margin-top")) + parseFloat(window2.getComputedStyle(el, null).getPropertyValue(size === "width" ? "margin-left" : "margin-bottom"));
418
+ }
419
+ return el.offsetWidth;
420
+ }
421
+
422
+ // node_modules/swiper/shared/swiper-core.mjs
423
+ var support;
424
+ function calcSupport() {
425
+ const window2 = getWindow();
426
+ const document2 = getDocument();
427
+ return {
428
+ smoothScroll: document2.documentElement && document2.documentElement.style && "scrollBehavior" in document2.documentElement.style,
429
+ touch: !!("ontouchstart" in window2 || window2.DocumentTouch && document2 instanceof window2.DocumentTouch)
430
+ };
431
+ }
432
+ function getSupport() {
433
+ if (!support) {
434
+ support = calcSupport();
435
+ }
436
+ return support;
437
+ }
438
+ var deviceCached;
439
+ function calcDevice(_temp) {
440
+ let {
441
+ userAgent
442
+ } = _temp === void 0 ? {} : _temp;
443
+ const support2 = getSupport();
444
+ const window2 = getWindow();
445
+ const platform = window2.navigator.platform;
446
+ const ua = userAgent || window2.navigator.userAgent;
447
+ const device = {
448
+ ios: false,
449
+ android: false
450
+ };
451
+ const screenWidth = window2.screen.width;
452
+ const screenHeight = window2.screen.height;
453
+ const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
454
+ let ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
455
+ const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
456
+ const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
457
+ const windows = platform === "Win32";
458
+ let macos = platform === "MacIntel";
459
+ const iPadScreens = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
460
+ if (!ipad && macos && support2.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {
461
+ ipad = ua.match(/(Version)\/([\d.]+)/);
462
+ if (!ipad) ipad = [0, 1, "13_0_0"];
463
+ macos = false;
464
+ }
465
+ if (android && !windows) {
466
+ device.os = "android";
467
+ device.android = true;
468
+ }
469
+ if (ipad || iphone || ipod) {
470
+ device.os = "ios";
471
+ device.ios = true;
472
+ }
473
+ return device;
474
+ }
475
+ function getDevice(overrides) {
476
+ if (overrides === void 0) {
477
+ overrides = {};
478
+ }
479
+ if (!deviceCached) {
480
+ deviceCached = calcDevice(overrides);
481
+ }
482
+ return deviceCached;
483
+ }
484
+ var browser;
485
+ function calcBrowser() {
486
+ const window2 = getWindow();
487
+ let needPerspectiveFix = false;
488
+ function isSafari() {
489
+ const ua = window2.navigator.userAgent.toLowerCase();
490
+ return ua.indexOf("safari") >= 0 && ua.indexOf("chrome") < 0 && ua.indexOf("android") < 0;
491
+ }
492
+ if (isSafari()) {
493
+ const ua = String(window2.navigator.userAgent);
494
+ if (ua.includes("Version/")) {
495
+ const [major, minor] = ua.split("Version/")[1].split(" ")[0].split(".").map((num) => Number(num));
496
+ needPerspectiveFix = major < 16 || major === 16 && minor < 2;
497
+ }
498
+ }
499
+ return {
500
+ isSafari: needPerspectiveFix || isSafari(),
501
+ needPerspectiveFix,
502
+ isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window2.navigator.userAgent)
503
+ };
504
+ }
505
+ function getBrowser() {
506
+ if (!browser) {
507
+ browser = calcBrowser();
508
+ }
509
+ return browser;
510
+ }
511
+ function Resize(_ref) {
512
+ let {
513
+ swiper,
514
+ on,
515
+ emit
516
+ } = _ref;
517
+ const window2 = getWindow();
518
+ let observer = null;
519
+ let animationFrame = null;
520
+ const resizeHandler = () => {
521
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
522
+ emit("beforeResize");
523
+ emit("resize");
524
+ };
525
+ const createObserver = () => {
526
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
527
+ observer = new ResizeObserver((entries) => {
528
+ animationFrame = window2.requestAnimationFrame(() => {
529
+ const {
530
+ width,
531
+ height
532
+ } = swiper;
533
+ let newWidth = width;
534
+ let newHeight = height;
535
+ entries.forEach((_ref2) => {
536
+ let {
537
+ contentBoxSize,
538
+ contentRect,
539
+ target
540
+ } = _ref2;
541
+ if (target && target !== swiper.el) return;
542
+ newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;
543
+ newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;
544
+ });
545
+ if (newWidth !== width || newHeight !== height) {
546
+ resizeHandler();
547
+ }
548
+ });
549
+ });
550
+ observer.observe(swiper.el);
551
+ };
552
+ const removeObserver = () => {
553
+ if (animationFrame) {
554
+ window2.cancelAnimationFrame(animationFrame);
555
+ }
556
+ if (observer && observer.unobserve && swiper.el) {
557
+ observer.unobserve(swiper.el);
558
+ observer = null;
559
+ }
560
+ };
561
+ const orientationChangeHandler = () => {
562
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
563
+ emit("orientationchange");
564
+ };
565
+ on("init", () => {
566
+ if (swiper.params.resizeObserver && typeof window2.ResizeObserver !== "undefined") {
567
+ createObserver();
568
+ return;
569
+ }
570
+ window2.addEventListener("resize", resizeHandler);
571
+ window2.addEventListener("orientationchange", orientationChangeHandler);
572
+ });
573
+ on("destroy", () => {
574
+ removeObserver();
575
+ window2.removeEventListener("resize", resizeHandler);
576
+ window2.removeEventListener("orientationchange", orientationChangeHandler);
577
+ });
578
+ }
579
+ function Observer(_ref) {
580
+ let {
581
+ swiper,
582
+ extendParams,
583
+ on,
584
+ emit
585
+ } = _ref;
586
+ const observers = [];
587
+ const window2 = getWindow();
588
+ const attach = function(target, options) {
589
+ if (options === void 0) {
590
+ options = {};
591
+ }
592
+ const ObserverFunc = window2.MutationObserver || window2.WebkitMutationObserver;
593
+ const observer = new ObserverFunc((mutations) => {
594
+ if (swiper.__preventObserver__) return;
595
+ if (mutations.length === 1) {
596
+ emit("observerUpdate", mutations[0]);
597
+ return;
598
+ }
599
+ const observerUpdate = function observerUpdate2() {
600
+ emit("observerUpdate", mutations[0]);
601
+ };
602
+ if (window2.requestAnimationFrame) {
603
+ window2.requestAnimationFrame(observerUpdate);
604
+ } else {
605
+ window2.setTimeout(observerUpdate, 0);
606
+ }
607
+ });
608
+ observer.observe(target, {
609
+ attributes: typeof options.attributes === "undefined" ? true : options.attributes,
610
+ childList: typeof options.childList === "undefined" ? true : options.childList,
611
+ characterData: typeof options.characterData === "undefined" ? true : options.characterData
612
+ });
613
+ observers.push(observer);
614
+ };
615
+ const init = () => {
616
+ if (!swiper.params.observer) return;
617
+ if (swiper.params.observeParents) {
618
+ const containerParents = elementParents(swiper.hostEl);
619
+ for (let i = 0; i < containerParents.length; i += 1) {
620
+ attach(containerParents[i]);
621
+ }
622
+ }
623
+ attach(swiper.hostEl, {
624
+ childList: swiper.params.observeSlideChildren
625
+ });
626
+ attach(swiper.wrapperEl, {
627
+ attributes: false
628
+ });
629
+ };
630
+ const destroy = () => {
631
+ observers.forEach((observer) => {
632
+ observer.disconnect();
633
+ });
634
+ observers.splice(0, observers.length);
635
+ };
636
+ extendParams({
637
+ observer: false,
638
+ observeParents: false,
639
+ observeSlideChildren: false
640
+ });
641
+ on("init", init);
642
+ on("destroy", destroy);
643
+ }
644
+ var eventsEmitter = {
645
+ on(events2, handler, priority) {
646
+ const self = this;
647
+ if (!self.eventsListeners || self.destroyed) return self;
648
+ if (typeof handler !== "function") return self;
649
+ const method = priority ? "unshift" : "push";
650
+ events2.split(" ").forEach((event) => {
651
+ if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
652
+ self.eventsListeners[event][method](handler);
653
+ });
654
+ return self;
655
+ },
656
+ once(events2, handler, priority) {
657
+ const self = this;
658
+ if (!self.eventsListeners || self.destroyed) return self;
659
+ if (typeof handler !== "function") return self;
660
+ function onceHandler() {
661
+ self.off(events2, onceHandler);
662
+ if (onceHandler.__emitterProxy) {
663
+ delete onceHandler.__emitterProxy;
664
+ }
665
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
666
+ args[_key] = arguments[_key];
667
+ }
668
+ handler.apply(self, args);
669
+ }
670
+ onceHandler.__emitterProxy = handler;
671
+ return self.on(events2, onceHandler, priority);
672
+ },
673
+ onAny(handler, priority) {
674
+ const self = this;
675
+ if (!self.eventsListeners || self.destroyed) return self;
676
+ if (typeof handler !== "function") return self;
677
+ const method = priority ? "unshift" : "push";
678
+ if (self.eventsAnyListeners.indexOf(handler) < 0) {
679
+ self.eventsAnyListeners[method](handler);
680
+ }
681
+ return self;
682
+ },
683
+ offAny(handler) {
684
+ const self = this;
685
+ if (!self.eventsListeners || self.destroyed) return self;
686
+ if (!self.eventsAnyListeners) return self;
687
+ const index = self.eventsAnyListeners.indexOf(handler);
688
+ if (index >= 0) {
689
+ self.eventsAnyListeners.splice(index, 1);
690
+ }
691
+ return self;
692
+ },
693
+ off(events2, handler) {
694
+ const self = this;
695
+ if (!self.eventsListeners || self.destroyed) return self;
696
+ if (!self.eventsListeners) return self;
697
+ events2.split(" ").forEach((event) => {
698
+ if (typeof handler === "undefined") {
699
+ self.eventsListeners[event] = [];
700
+ } else if (self.eventsListeners[event]) {
701
+ self.eventsListeners[event].forEach((eventHandler, index) => {
702
+ if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {
703
+ self.eventsListeners[event].splice(index, 1);
704
+ }
705
+ });
706
+ }
707
+ });
708
+ return self;
709
+ },
710
+ emit() {
711
+ const self = this;
712
+ if (!self.eventsListeners || self.destroyed) return self;
713
+ if (!self.eventsListeners) return self;
714
+ let events2;
715
+ let data;
716
+ let context;
717
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
718
+ args[_key2] = arguments[_key2];
719
+ }
720
+ if (typeof args[0] === "string" || Array.isArray(args[0])) {
721
+ events2 = args[0];
722
+ data = args.slice(1, args.length);
723
+ context = self;
724
+ } else {
725
+ events2 = args[0].events;
726
+ data = args[0].data;
727
+ context = args[0].context || self;
728
+ }
729
+ data.unshift(context);
730
+ const eventsArray = Array.isArray(events2) ? events2 : events2.split(" ");
731
+ eventsArray.forEach((event) => {
732
+ if (self.eventsAnyListeners && self.eventsAnyListeners.length) {
733
+ self.eventsAnyListeners.forEach((eventHandler) => {
734
+ eventHandler.apply(context, [event, ...data]);
735
+ });
736
+ }
737
+ if (self.eventsListeners && self.eventsListeners[event]) {
738
+ self.eventsListeners[event].forEach((eventHandler) => {
739
+ eventHandler.apply(context, data);
740
+ });
741
+ }
742
+ });
743
+ return self;
744
+ }
745
+ };
746
+ function updateSize() {
747
+ const swiper = this;
748
+ let width;
749
+ let height;
750
+ const el = swiper.el;
751
+ if (typeof swiper.params.width !== "undefined" && swiper.params.width !== null) {
752
+ width = swiper.params.width;
753
+ } else {
754
+ width = el.clientWidth;
755
+ }
756
+ if (typeof swiper.params.height !== "undefined" && swiper.params.height !== null) {
757
+ height = swiper.params.height;
758
+ } else {
759
+ height = el.clientHeight;
760
+ }
761
+ if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {
762
+ return;
763
+ }
764
+ width = width - parseInt(elementStyle(el, "padding-left") || 0, 10) - parseInt(elementStyle(el, "padding-right") || 0, 10);
765
+ height = height - parseInt(elementStyle(el, "padding-top") || 0, 10) - parseInt(elementStyle(el, "padding-bottom") || 0, 10);
766
+ if (Number.isNaN(width)) width = 0;
767
+ if (Number.isNaN(height)) height = 0;
768
+ Object.assign(swiper, {
769
+ width,
770
+ height,
771
+ size: swiper.isHorizontal() ? width : height
772
+ });
773
+ }
774
+ function updateSlides() {
775
+ const swiper = this;
776
+ function getDirectionLabel(property) {
777
+ if (swiper.isHorizontal()) {
778
+ return property;
779
+ }
780
+ return {
781
+ "width": "height",
782
+ "margin-top": "margin-left",
783
+ "margin-bottom ": "margin-right",
784
+ "margin-left": "margin-top",
785
+ "margin-right": "margin-bottom",
786
+ "padding-left": "padding-top",
787
+ "padding-right": "padding-bottom",
788
+ "marginRight": "marginBottom"
789
+ }[property];
790
+ }
791
+ function getDirectionPropertyValue(node, label) {
792
+ return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);
793
+ }
794
+ const params = swiper.params;
795
+ const {
796
+ wrapperEl,
797
+ slidesEl,
798
+ size: swiperSize,
799
+ rtlTranslate: rtl,
800
+ wrongRTL
801
+ } = swiper;
802
+ const isVirtual = swiper.virtual && params.virtual.enabled;
803
+ const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
804
+ const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);
805
+ const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
806
+ let snapGrid = [];
807
+ const slidesGrid = [];
808
+ const slidesSizesGrid = [];
809
+ let offsetBefore = params.slidesOffsetBefore;
810
+ if (typeof offsetBefore === "function") {
811
+ offsetBefore = params.slidesOffsetBefore.call(swiper);
812
+ }
813
+ let offsetAfter = params.slidesOffsetAfter;
814
+ if (typeof offsetAfter === "function") {
815
+ offsetAfter = params.slidesOffsetAfter.call(swiper);
816
+ }
817
+ const previousSnapGridLength = swiper.snapGrid.length;
818
+ const previousSlidesGridLength = swiper.slidesGrid.length;
819
+ let spaceBetween = params.spaceBetween;
820
+ let slidePosition = -offsetBefore;
821
+ let prevSlideSize = 0;
822
+ let index = 0;
823
+ if (typeof swiperSize === "undefined") {
824
+ return;
825
+ }
826
+ if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) {
827
+ spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiperSize;
828
+ } else if (typeof spaceBetween === "string") {
829
+ spaceBetween = parseFloat(spaceBetween);
830
+ }
831
+ swiper.virtualSize = -spaceBetween;
832
+ slides.forEach((slideEl) => {
833
+ if (rtl) {
834
+ slideEl.style.marginLeft = "";
835
+ } else {
836
+ slideEl.style.marginRight = "";
837
+ }
838
+ slideEl.style.marginBottom = "";
839
+ slideEl.style.marginTop = "";
840
+ });
841
+ if (params.centeredSlides && params.cssMode) {
842
+ setCSSProperty(wrapperEl, "--swiper-centered-offset-before", "");
843
+ setCSSProperty(wrapperEl, "--swiper-centered-offset-after", "");
844
+ }
845
+ const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;
846
+ if (gridEnabled) {
847
+ swiper.grid.initSlides(slidesLength);
848
+ }
849
+ let slideSize;
850
+ const shouldResetSlideSize = params.slidesPerView === "auto" && params.breakpoints && Object.keys(params.breakpoints).filter((key) => {
851
+ return typeof params.breakpoints[key].slidesPerView !== "undefined";
852
+ }).length > 0;
853
+ for (let i = 0; i < slidesLength; i += 1) {
854
+ slideSize = 0;
855
+ let slide2;
856
+ if (slides[i]) slide2 = slides[i];
857
+ if (gridEnabled) {
858
+ swiper.grid.updateSlide(i, slide2, slidesLength, getDirectionLabel);
859
+ }
860
+ if (slides[i] && elementStyle(slide2, "display") === "none") continue;
861
+ if (params.slidesPerView === "auto") {
862
+ if (shouldResetSlideSize) {
863
+ slides[i].style[getDirectionLabel("width")] = ``;
864
+ }
865
+ const slideStyles = getComputedStyle(slide2);
866
+ const currentTransform = slide2.style.transform;
867
+ const currentWebKitTransform = slide2.style.webkitTransform;
868
+ if (currentTransform) {
869
+ slide2.style.transform = "none";
870
+ }
871
+ if (currentWebKitTransform) {
872
+ slide2.style.webkitTransform = "none";
873
+ }
874
+ if (params.roundLengths) {
875
+ slideSize = swiper.isHorizontal() ? elementOuterSize(slide2, "width", true) : elementOuterSize(slide2, "height", true);
876
+ } else {
877
+ const width = getDirectionPropertyValue(slideStyles, "width");
878
+ const paddingLeft = getDirectionPropertyValue(slideStyles, "padding-left");
879
+ const paddingRight = getDirectionPropertyValue(slideStyles, "padding-right");
880
+ const marginLeft = getDirectionPropertyValue(slideStyles, "margin-left");
881
+ const marginRight = getDirectionPropertyValue(slideStyles, "margin-right");
882
+ const boxSizing = slideStyles.getPropertyValue("box-sizing");
883
+ if (boxSizing && boxSizing === "border-box") {
884
+ slideSize = width + marginLeft + marginRight;
885
+ } else {
886
+ const {
887
+ clientWidth,
888
+ offsetWidth
889
+ } = slide2;
890
+ slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);
891
+ }
892
+ }
893
+ if (currentTransform) {
894
+ slide2.style.transform = currentTransform;
895
+ }
896
+ if (currentWebKitTransform) {
897
+ slide2.style.webkitTransform = currentWebKitTransform;
898
+ }
899
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
900
+ } else {
901
+ slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;
902
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
903
+ if (slides[i]) {
904
+ slides[i].style[getDirectionLabel("width")] = `${slideSize}px`;
905
+ }
906
+ }
907
+ if (slides[i]) {
908
+ slides[i].swiperSlideSize = slideSize;
909
+ }
910
+ slidesSizesGrid.push(slideSize);
911
+ if (params.centeredSlides) {
912
+ slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;
913
+ if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
914
+ if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
915
+ if (Math.abs(slidePosition) < 1 / 1e3) slidePosition = 0;
916
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
917
+ if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
918
+ slidesGrid.push(slidePosition);
919
+ } else {
920
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
921
+ if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);
922
+ slidesGrid.push(slidePosition);
923
+ slidePosition = slidePosition + slideSize + spaceBetween;
924
+ }
925
+ swiper.virtualSize += slideSize + spaceBetween;
926
+ prevSlideSize = slideSize;
927
+ index += 1;
928
+ }
929
+ swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
930
+ if (rtl && wrongRTL && (params.effect === "slide" || params.effect === "coverflow")) {
931
+ wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;
932
+ }
933
+ if (params.setWrapperSize) {
934
+ wrapperEl.style[getDirectionLabel("width")] = `${swiper.virtualSize + spaceBetween}px`;
935
+ }
936
+ if (gridEnabled) {
937
+ swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);
938
+ }
939
+ if (!params.centeredSlides) {
940
+ const newSlidesGrid = [];
941
+ for (let i = 0; i < snapGrid.length; i += 1) {
942
+ let slidesGridItem = snapGrid[i];
943
+ if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
944
+ if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
945
+ newSlidesGrid.push(slidesGridItem);
946
+ }
947
+ }
948
+ snapGrid = newSlidesGrid;
949
+ if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
950
+ snapGrid.push(swiper.virtualSize - swiperSize);
951
+ }
952
+ }
953
+ if (isVirtual && params.loop) {
954
+ const size = slidesSizesGrid[0] + spaceBetween;
955
+ if (params.slidesPerGroup > 1) {
956
+ const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);
957
+ const groupSize = size * params.slidesPerGroup;
958
+ for (let i = 0; i < groups; i += 1) {
959
+ snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);
960
+ }
961
+ }
962
+ for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {
963
+ if (params.slidesPerGroup === 1) {
964
+ snapGrid.push(snapGrid[snapGrid.length - 1] + size);
965
+ }
966
+ slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);
967
+ swiper.virtualSize += size;
968
+ }
969
+ }
970
+ if (snapGrid.length === 0) snapGrid = [0];
971
+ if (spaceBetween !== 0) {
972
+ const key = swiper.isHorizontal() && rtl ? "marginLeft" : getDirectionLabel("marginRight");
973
+ slides.filter((_, slideIndex) => {
974
+ if (!params.cssMode || params.loop) return true;
975
+ if (slideIndex === slides.length - 1) {
976
+ return false;
977
+ }
978
+ return true;
979
+ }).forEach((slideEl) => {
980
+ slideEl.style[key] = `${spaceBetween}px`;
981
+ });
982
+ }
983
+ if (params.centeredSlides && params.centeredSlidesBounds) {
984
+ let allSlidesSize = 0;
985
+ slidesSizesGrid.forEach((slideSizeValue) => {
986
+ allSlidesSize += slideSizeValue + (spaceBetween || 0);
987
+ });
988
+ allSlidesSize -= spaceBetween;
989
+ const maxSnap = allSlidesSize - swiperSize;
990
+ snapGrid = snapGrid.map((snap) => {
991
+ if (snap <= 0) return -offsetBefore;
992
+ if (snap > maxSnap) return maxSnap + offsetAfter;
993
+ return snap;
994
+ });
995
+ }
996
+ if (params.centerInsufficientSlides) {
997
+ let allSlidesSize = 0;
998
+ slidesSizesGrid.forEach((slideSizeValue) => {
999
+ allSlidesSize += slideSizeValue + (spaceBetween || 0);
1000
+ });
1001
+ allSlidesSize -= spaceBetween;
1002
+ if (allSlidesSize < swiperSize) {
1003
+ const allSlidesOffset = (swiperSize - allSlidesSize) / 2;
1004
+ snapGrid.forEach((snap, snapIndex) => {
1005
+ snapGrid[snapIndex] = snap - allSlidesOffset;
1006
+ });
1007
+ slidesGrid.forEach((snap, snapIndex) => {
1008
+ slidesGrid[snapIndex] = snap + allSlidesOffset;
1009
+ });
1010
+ }
1011
+ }
1012
+ Object.assign(swiper, {
1013
+ slides,
1014
+ snapGrid,
1015
+ slidesGrid,
1016
+ slidesSizesGrid
1017
+ });
1018
+ if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {
1019
+ setCSSProperty(wrapperEl, "--swiper-centered-offset-before", `${-snapGrid[0]}px`);
1020
+ setCSSProperty(wrapperEl, "--swiper-centered-offset-after", `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);
1021
+ const addToSnapGrid = -swiper.snapGrid[0];
1022
+ const addToSlidesGrid = -swiper.slidesGrid[0];
1023
+ swiper.snapGrid = swiper.snapGrid.map((v) => v + addToSnapGrid);
1024
+ swiper.slidesGrid = swiper.slidesGrid.map((v) => v + addToSlidesGrid);
1025
+ }
1026
+ if (slidesLength !== previousSlidesLength) {
1027
+ swiper.emit("slidesLengthChange");
1028
+ }
1029
+ if (snapGrid.length !== previousSnapGridLength) {
1030
+ if (swiper.params.watchOverflow) swiper.checkOverflow();
1031
+ swiper.emit("snapGridLengthChange");
1032
+ }
1033
+ if (slidesGrid.length !== previousSlidesGridLength) {
1034
+ swiper.emit("slidesGridLengthChange");
1035
+ }
1036
+ if (params.watchSlidesProgress) {
1037
+ swiper.updateSlidesOffset();
1038
+ }
1039
+ if (!isVirtual && !params.cssMode && (params.effect === "slide" || params.effect === "fade")) {
1040
+ const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;
1041
+ const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);
1042
+ if (slidesLength <= params.maxBackfaceHiddenSlides) {
1043
+ if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);
1044
+ } else if (hasClassBackfaceClassAdded) {
1045
+ swiper.el.classList.remove(backFaceHiddenClass);
1046
+ }
1047
+ }
1048
+ }
1049
+ function updateAutoHeight(speed) {
1050
+ const swiper = this;
1051
+ const activeSlides = [];
1052
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
1053
+ let newHeight = 0;
1054
+ let i;
1055
+ if (typeof speed === "number") {
1056
+ swiper.setTransition(speed);
1057
+ } else if (speed === true) {
1058
+ swiper.setTransition(swiper.params.speed);
1059
+ }
1060
+ const getSlideByIndex = (index) => {
1061
+ if (isVirtual) {
1062
+ return swiper.slides[swiper.getSlideIndexByData(index)];
1063
+ }
1064
+ return swiper.slides[index];
1065
+ };
1066
+ if (swiper.params.slidesPerView !== "auto" && swiper.params.slidesPerView > 1) {
1067
+ if (swiper.params.centeredSlides) {
1068
+ (swiper.visibleSlides || []).forEach((slide2) => {
1069
+ activeSlides.push(slide2);
1070
+ });
1071
+ } else {
1072
+ for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
1073
+ const index = swiper.activeIndex + i;
1074
+ if (index > swiper.slides.length && !isVirtual) break;
1075
+ activeSlides.push(getSlideByIndex(index));
1076
+ }
1077
+ }
1078
+ } else {
1079
+ activeSlides.push(getSlideByIndex(swiper.activeIndex));
1080
+ }
1081
+ for (i = 0; i < activeSlides.length; i += 1) {
1082
+ if (typeof activeSlides[i] !== "undefined") {
1083
+ const height = activeSlides[i].offsetHeight;
1084
+ newHeight = height > newHeight ? height : newHeight;
1085
+ }
1086
+ }
1087
+ if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;
1088
+ }
1089
+ function updateSlidesOffset() {
1090
+ const swiper = this;
1091
+ const slides = swiper.slides;
1092
+ const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;
1093
+ for (let i = 0; i < slides.length; i += 1) {
1094
+ slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();
1095
+ }
1096
+ }
1097
+ function updateSlidesProgress(translate2) {
1098
+ if (translate2 === void 0) {
1099
+ translate2 = this && this.translate || 0;
1100
+ }
1101
+ const swiper = this;
1102
+ const params = swiper.params;
1103
+ const {
1104
+ slides,
1105
+ rtlTranslate: rtl,
1106
+ snapGrid
1107
+ } = swiper;
1108
+ if (slides.length === 0) return;
1109
+ if (typeof slides[0].swiperSlideOffset === "undefined") swiper.updateSlidesOffset();
1110
+ let offsetCenter = -translate2;
1111
+ if (rtl) offsetCenter = translate2;
1112
+ slides.forEach((slideEl) => {
1113
+ slideEl.classList.remove(params.slideVisibleClass);
1114
+ });
1115
+ swiper.visibleSlidesIndexes = [];
1116
+ swiper.visibleSlides = [];
1117
+ let spaceBetween = params.spaceBetween;
1118
+ if (typeof spaceBetween === "string" && spaceBetween.indexOf("%") >= 0) {
1119
+ spaceBetween = parseFloat(spaceBetween.replace("%", "")) / 100 * swiper.size;
1120
+ } else if (typeof spaceBetween === "string") {
1121
+ spaceBetween = parseFloat(spaceBetween);
1122
+ }
1123
+ for (let i = 0; i < slides.length; i += 1) {
1124
+ const slide2 = slides[i];
1125
+ let slideOffset = slide2.swiperSlideOffset;
1126
+ if (params.cssMode && params.centeredSlides) {
1127
+ slideOffset -= slides[0].swiperSlideOffset;
1128
+ }
1129
+ const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide2.swiperSlideSize + spaceBetween);
1130
+ const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide2.swiperSlideSize + spaceBetween);
1131
+ const slideBefore = -(offsetCenter - slideOffset);
1132
+ const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
1133
+ const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;
1134
+ if (isVisible) {
1135
+ swiper.visibleSlides.push(slide2);
1136
+ swiper.visibleSlidesIndexes.push(i);
1137
+ slides[i].classList.add(params.slideVisibleClass);
1138
+ }
1139
+ slide2.progress = rtl ? -slideProgress : slideProgress;
1140
+ slide2.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;
1141
+ }
1142
+ }
1143
+ function updateProgress(translate2) {
1144
+ const swiper = this;
1145
+ if (typeof translate2 === "undefined") {
1146
+ const multiplier = swiper.rtlTranslate ? -1 : 1;
1147
+ translate2 = swiper && swiper.translate && swiper.translate * multiplier || 0;
1148
+ }
1149
+ const params = swiper.params;
1150
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1151
+ let {
1152
+ progress,
1153
+ isBeginning,
1154
+ isEnd,
1155
+ progressLoop
1156
+ } = swiper;
1157
+ const wasBeginning = isBeginning;
1158
+ const wasEnd = isEnd;
1159
+ if (translatesDiff === 0) {
1160
+ progress = 0;
1161
+ isBeginning = true;
1162
+ isEnd = true;
1163
+ } else {
1164
+ progress = (translate2 - swiper.minTranslate()) / translatesDiff;
1165
+ const isBeginningRounded = Math.abs(translate2 - swiper.minTranslate()) < 1;
1166
+ const isEndRounded = Math.abs(translate2 - swiper.maxTranslate()) < 1;
1167
+ isBeginning = isBeginningRounded || progress <= 0;
1168
+ isEnd = isEndRounded || progress >= 1;
1169
+ if (isBeginningRounded) progress = 0;
1170
+ if (isEndRounded) progress = 1;
1171
+ }
1172
+ if (params.loop) {
1173
+ const firstSlideIndex = swiper.getSlideIndexByData(0);
1174
+ const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);
1175
+ const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];
1176
+ const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];
1177
+ const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];
1178
+ const translateAbs = Math.abs(translate2);
1179
+ if (translateAbs >= firstSlideTranslate) {
1180
+ progressLoop = (translateAbs - firstSlideTranslate) / translateMax;
1181
+ } else {
1182
+ progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;
1183
+ }
1184
+ if (progressLoop > 1) progressLoop -= 1;
1185
+ }
1186
+ Object.assign(swiper, {
1187
+ progress,
1188
+ progressLoop,
1189
+ isBeginning,
1190
+ isEnd
1191
+ });
1192
+ if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate2);
1193
+ if (isBeginning && !wasBeginning) {
1194
+ swiper.emit("reachBeginning toEdge");
1195
+ }
1196
+ if (isEnd && !wasEnd) {
1197
+ swiper.emit("reachEnd toEdge");
1198
+ }
1199
+ if (wasBeginning && !isBeginning || wasEnd && !isEnd) {
1200
+ swiper.emit("fromEdge");
1201
+ }
1202
+ swiper.emit("progress", progress);
1203
+ }
1204
+ function updateSlidesClasses() {
1205
+ const swiper = this;
1206
+ const {
1207
+ slides,
1208
+ params,
1209
+ slidesEl,
1210
+ activeIndex
1211
+ } = swiper;
1212
+ const isVirtual = swiper.virtual && params.virtual.enabled;
1213
+ const getFilteredSlide = (selector) => {
1214
+ return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
1215
+ };
1216
+ slides.forEach((slideEl) => {
1217
+ slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
1218
+ });
1219
+ let activeSlide;
1220
+ if (isVirtual) {
1221
+ if (params.loop) {
1222
+ let slideIndex = activeIndex - swiper.virtual.slidesBefore;
1223
+ if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;
1224
+ if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;
1225
+ activeSlide = getFilteredSlide(`[data-swiper-slide-index="${slideIndex}"]`);
1226
+ } else {
1227
+ activeSlide = getFilteredSlide(`[data-swiper-slide-index="${activeIndex}"]`);
1228
+ }
1229
+ } else {
1230
+ activeSlide = slides[activeIndex];
1231
+ }
1232
+ if (activeSlide) {
1233
+ activeSlide.classList.add(params.slideActiveClass);
1234
+ let nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
1235
+ if (params.loop && !nextSlide) {
1236
+ nextSlide = slides[0];
1237
+ }
1238
+ if (nextSlide) {
1239
+ nextSlide.classList.add(params.slideNextClass);
1240
+ }
1241
+ let prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
1242
+ if (params.loop && !prevSlide === 0) {
1243
+ prevSlide = slides[slides.length - 1];
1244
+ }
1245
+ if (prevSlide) {
1246
+ prevSlide.classList.add(params.slidePrevClass);
1247
+ }
1248
+ }
1249
+ swiper.emitSlidesClasses();
1250
+ }
1251
+ var processLazyPreloader = (swiper, imageEl) => {
1252
+ if (!swiper || swiper.destroyed || !swiper.params) return;
1253
+ const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;
1254
+ const slideEl = imageEl.closest(slideSelector());
1255
+ if (slideEl) {
1256
+ let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);
1257
+ if (!lazyEl && swiper.isElement) {
1258
+ if (slideEl.shadowRoot) {
1259
+ lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);
1260
+ } else {
1261
+ requestAnimationFrame(() => {
1262
+ if (slideEl.shadowRoot) {
1263
+ lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);
1264
+ if (lazyEl) lazyEl.remove();
1265
+ }
1266
+ });
1267
+ }
1268
+ }
1269
+ if (lazyEl) lazyEl.remove();
1270
+ }
1271
+ };
1272
+ var unlazy = (swiper, index) => {
1273
+ if (!swiper.slides[index]) return;
1274
+ const imageEl = swiper.slides[index].querySelector('[loading="lazy"]');
1275
+ if (imageEl) imageEl.removeAttribute("loading");
1276
+ };
1277
+ var preload = (swiper) => {
1278
+ if (!swiper || swiper.destroyed || !swiper.params) return;
1279
+ let amount = swiper.params.lazyPreloadPrevNext;
1280
+ const len = swiper.slides.length;
1281
+ if (!len || !amount || amount < 0) return;
1282
+ amount = Math.min(amount, len);
1283
+ const slidesPerView = swiper.params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);
1284
+ const activeIndex = swiper.activeIndex;
1285
+ if (swiper.params.grid && swiper.params.grid.rows > 1) {
1286
+ const activeColumn = activeIndex;
1287
+ const preloadColumns = [activeColumn - amount];
1288
+ preloadColumns.push(...Array.from({
1289
+ length: amount
1290
+ }).map((_, i) => {
1291
+ return activeColumn + slidesPerView + i;
1292
+ }));
1293
+ swiper.slides.forEach((slideEl, i) => {
1294
+ if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);
1295
+ });
1296
+ return;
1297
+ }
1298
+ const slideIndexLastInView = activeIndex + slidesPerView - 1;
1299
+ if (swiper.params.rewind || swiper.params.loop) {
1300
+ for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {
1301
+ const realIndex = (i % len + len) % len;
1302
+ if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);
1303
+ }
1304
+ } else {
1305
+ for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {
1306
+ if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {
1307
+ unlazy(swiper, i);
1308
+ }
1309
+ }
1310
+ }
1311
+ };
1312
+ function getActiveIndexByTranslate(swiper) {
1313
+ const {
1314
+ slidesGrid,
1315
+ params
1316
+ } = swiper;
1317
+ const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1318
+ let activeIndex;
1319
+ for (let i = 0; i < slidesGrid.length; i += 1) {
1320
+ if (typeof slidesGrid[i + 1] !== "undefined") {
1321
+ if (translate2 >= slidesGrid[i] && translate2 < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {
1322
+ activeIndex = i;
1323
+ } else if (translate2 >= slidesGrid[i] && translate2 < slidesGrid[i + 1]) {
1324
+ activeIndex = i + 1;
1325
+ }
1326
+ } else if (translate2 >= slidesGrid[i]) {
1327
+ activeIndex = i;
1328
+ }
1329
+ }
1330
+ if (params.normalizeSlideIndex) {
1331
+ if (activeIndex < 0 || typeof activeIndex === "undefined") activeIndex = 0;
1332
+ }
1333
+ return activeIndex;
1334
+ }
1335
+ function updateActiveIndex(newActiveIndex) {
1336
+ const swiper = this;
1337
+ const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1338
+ const {
1339
+ snapGrid,
1340
+ params,
1341
+ activeIndex: previousIndex,
1342
+ realIndex: previousRealIndex,
1343
+ snapIndex: previousSnapIndex
1344
+ } = swiper;
1345
+ let activeIndex = newActiveIndex;
1346
+ let snapIndex;
1347
+ const getVirtualRealIndex = (aIndex) => {
1348
+ let realIndex2 = aIndex - swiper.virtual.slidesBefore;
1349
+ if (realIndex2 < 0) {
1350
+ realIndex2 = swiper.virtual.slides.length + realIndex2;
1351
+ }
1352
+ if (realIndex2 >= swiper.virtual.slides.length) {
1353
+ realIndex2 -= swiper.virtual.slides.length;
1354
+ }
1355
+ return realIndex2;
1356
+ };
1357
+ if (typeof activeIndex === "undefined") {
1358
+ activeIndex = getActiveIndexByTranslate(swiper);
1359
+ }
1360
+ if (snapGrid.indexOf(translate2) >= 0) {
1361
+ snapIndex = snapGrid.indexOf(translate2);
1362
+ } else {
1363
+ const skip = Math.min(params.slidesPerGroupSkip, activeIndex);
1364
+ snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);
1365
+ }
1366
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1367
+ if (activeIndex === previousIndex) {
1368
+ if (snapIndex !== previousSnapIndex) {
1369
+ swiper.snapIndex = snapIndex;
1370
+ swiper.emit("snapIndexChange");
1371
+ }
1372
+ if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
1373
+ swiper.realIndex = getVirtualRealIndex(activeIndex);
1374
+ }
1375
+ return;
1376
+ }
1377
+ let realIndex;
1378
+ if (swiper.virtual && params.virtual.enabled && params.loop) {
1379
+ realIndex = getVirtualRealIndex(activeIndex);
1380
+ } else if (swiper.slides[activeIndex]) {
1381
+ realIndex = parseInt(swiper.slides[activeIndex].getAttribute("data-swiper-slide-index") || activeIndex, 10);
1382
+ } else {
1383
+ realIndex = activeIndex;
1384
+ }
1385
+ Object.assign(swiper, {
1386
+ previousSnapIndex,
1387
+ snapIndex,
1388
+ previousRealIndex,
1389
+ realIndex,
1390
+ previousIndex,
1391
+ activeIndex
1392
+ });
1393
+ if (swiper.initialized) {
1394
+ preload(swiper);
1395
+ }
1396
+ swiper.emit("activeIndexChange");
1397
+ swiper.emit("snapIndexChange");
1398
+ if (swiper.initialized || swiper.params.runCallbacksOnInit) {
1399
+ if (previousRealIndex !== realIndex) {
1400
+ swiper.emit("realIndexChange");
1401
+ }
1402
+ swiper.emit("slideChange");
1403
+ }
1404
+ }
1405
+ function updateClickedSlide(el, path) {
1406
+ const swiper = this;
1407
+ const params = swiper.params;
1408
+ let slide2 = el.closest(`.${params.slideClass}, swiper-slide`);
1409
+ if (!slide2 && swiper.isElement && path && path.length > 1 && path.includes(el)) {
1410
+ [...path.slice(path.indexOf(el) + 1, path.length)].forEach((pathEl) => {
1411
+ if (!slide2 && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {
1412
+ slide2 = pathEl;
1413
+ }
1414
+ });
1415
+ }
1416
+ let slideFound = false;
1417
+ let slideIndex;
1418
+ if (slide2) {
1419
+ for (let i = 0; i < swiper.slides.length; i += 1) {
1420
+ if (swiper.slides[i] === slide2) {
1421
+ slideFound = true;
1422
+ slideIndex = i;
1423
+ break;
1424
+ }
1425
+ }
1426
+ }
1427
+ if (slide2 && slideFound) {
1428
+ swiper.clickedSlide = slide2;
1429
+ if (swiper.virtual && swiper.params.virtual.enabled) {
1430
+ swiper.clickedIndex = parseInt(slide2.getAttribute("data-swiper-slide-index"), 10);
1431
+ } else {
1432
+ swiper.clickedIndex = slideIndex;
1433
+ }
1434
+ } else {
1435
+ swiper.clickedSlide = void 0;
1436
+ swiper.clickedIndex = void 0;
1437
+ return;
1438
+ }
1439
+ if (params.slideToClickedSlide && swiper.clickedIndex !== void 0 && swiper.clickedIndex !== swiper.activeIndex) {
1440
+ swiper.slideToClickedSlide();
1441
+ }
1442
+ }
1443
+ var update = {
1444
+ updateSize,
1445
+ updateSlides,
1446
+ updateAutoHeight,
1447
+ updateSlidesOffset,
1448
+ updateSlidesProgress,
1449
+ updateProgress,
1450
+ updateSlidesClasses,
1451
+ updateActiveIndex,
1452
+ updateClickedSlide
1453
+ };
1454
+ function getSwiperTranslate(axis) {
1455
+ if (axis === void 0) {
1456
+ axis = this.isHorizontal() ? "x" : "y";
1457
+ }
1458
+ const swiper = this;
1459
+ const {
1460
+ params,
1461
+ rtlTranslate: rtl,
1462
+ translate: translate2,
1463
+ wrapperEl
1464
+ } = swiper;
1465
+ if (params.virtualTranslate) {
1466
+ return rtl ? -translate2 : translate2;
1467
+ }
1468
+ if (params.cssMode) {
1469
+ return translate2;
1470
+ }
1471
+ let currentTranslate = getTranslate(wrapperEl, axis);
1472
+ currentTranslate += swiper.cssOverflowAdjustment();
1473
+ if (rtl) currentTranslate = -currentTranslate;
1474
+ return currentTranslate || 0;
1475
+ }
1476
+ function setTranslate(translate2, byController) {
1477
+ const swiper = this;
1478
+ const {
1479
+ rtlTranslate: rtl,
1480
+ params,
1481
+ wrapperEl,
1482
+ progress
1483
+ } = swiper;
1484
+ let x = 0;
1485
+ let y = 0;
1486
+ const z = 0;
1487
+ if (swiper.isHorizontal()) {
1488
+ x = rtl ? -translate2 : translate2;
1489
+ } else {
1490
+ y = translate2;
1491
+ }
1492
+ if (params.roundLengths) {
1493
+ x = Math.floor(x);
1494
+ y = Math.floor(y);
1495
+ }
1496
+ swiper.previousTranslate = swiper.translate;
1497
+ swiper.translate = swiper.isHorizontal() ? x : y;
1498
+ if (params.cssMode) {
1499
+ wrapperEl[swiper.isHorizontal() ? "scrollLeft" : "scrollTop"] = swiper.isHorizontal() ? -x : -y;
1500
+ } else if (!params.virtualTranslate) {
1501
+ if (swiper.isHorizontal()) {
1502
+ x -= swiper.cssOverflowAdjustment();
1503
+ } else {
1504
+ y -= swiper.cssOverflowAdjustment();
1505
+ }
1506
+ wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;
1507
+ }
1508
+ let newProgress;
1509
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1510
+ if (translatesDiff === 0) {
1511
+ newProgress = 0;
1512
+ } else {
1513
+ newProgress = (translate2 - swiper.minTranslate()) / translatesDiff;
1514
+ }
1515
+ if (newProgress !== progress) {
1516
+ swiper.updateProgress(translate2);
1517
+ }
1518
+ swiper.emit("setTranslate", swiper.translate, byController);
1519
+ }
1520
+ function minTranslate() {
1521
+ return -this.snapGrid[0];
1522
+ }
1523
+ function maxTranslate() {
1524
+ return -this.snapGrid[this.snapGrid.length - 1];
1525
+ }
1526
+ function translateTo(translate2, speed, runCallbacks, translateBounds, internal) {
1527
+ if (translate2 === void 0) {
1528
+ translate2 = 0;
1529
+ }
1530
+ if (speed === void 0) {
1531
+ speed = this.params.speed;
1532
+ }
1533
+ if (runCallbacks === void 0) {
1534
+ runCallbacks = true;
1535
+ }
1536
+ if (translateBounds === void 0) {
1537
+ translateBounds = true;
1538
+ }
1539
+ const swiper = this;
1540
+ const {
1541
+ params,
1542
+ wrapperEl
1543
+ } = swiper;
1544
+ if (swiper.animating && params.preventInteractionOnTransition) {
1545
+ return false;
1546
+ }
1547
+ const minTranslate2 = swiper.minTranslate();
1548
+ const maxTranslate2 = swiper.maxTranslate();
1549
+ let newTranslate;
1550
+ if (translateBounds && translate2 > minTranslate2) newTranslate = minTranslate2;
1551
+ else if (translateBounds && translate2 < maxTranslate2) newTranslate = maxTranslate2;
1552
+ else newTranslate = translate2;
1553
+ swiper.updateProgress(newTranslate);
1554
+ if (params.cssMode) {
1555
+ const isH = swiper.isHorizontal();
1556
+ if (speed === 0) {
1557
+ wrapperEl[isH ? "scrollLeft" : "scrollTop"] = -newTranslate;
1558
+ } else {
1559
+ if (!swiper.support.smoothScroll) {
1560
+ animateCSSModeScroll({
1561
+ swiper,
1562
+ targetPosition: -newTranslate,
1563
+ side: isH ? "left" : "top"
1564
+ });
1565
+ return true;
1566
+ }
1567
+ wrapperEl.scrollTo({
1568
+ [isH ? "left" : "top"]: -newTranslate,
1569
+ behavior: "smooth"
1570
+ });
1571
+ }
1572
+ return true;
1573
+ }
1574
+ if (speed === 0) {
1575
+ swiper.setTransition(0);
1576
+ swiper.setTranslate(newTranslate);
1577
+ if (runCallbacks) {
1578
+ swiper.emit("beforeTransitionStart", speed, internal);
1579
+ swiper.emit("transitionEnd");
1580
+ }
1581
+ } else {
1582
+ swiper.setTransition(speed);
1583
+ swiper.setTranslate(newTranslate);
1584
+ if (runCallbacks) {
1585
+ swiper.emit("beforeTransitionStart", speed, internal);
1586
+ swiper.emit("transitionStart");
1587
+ }
1588
+ if (!swiper.animating) {
1589
+ swiper.animating = true;
1590
+ if (!swiper.onTranslateToWrapperTransitionEnd) {
1591
+ swiper.onTranslateToWrapperTransitionEnd = function transitionEnd2(e) {
1592
+ if (!swiper || swiper.destroyed) return;
1593
+ if (e.target !== this) return;
1594
+ swiper.wrapperEl.removeEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd);
1595
+ swiper.onTranslateToWrapperTransitionEnd = null;
1596
+ delete swiper.onTranslateToWrapperTransitionEnd;
1597
+ if (runCallbacks) {
1598
+ swiper.emit("transitionEnd");
1599
+ }
1600
+ };
1601
+ }
1602
+ swiper.wrapperEl.addEventListener("transitionend", swiper.onTranslateToWrapperTransitionEnd);
1603
+ }
1604
+ }
1605
+ return true;
1606
+ }
1607
+ var translate = {
1608
+ getTranslate: getSwiperTranslate,
1609
+ setTranslate,
1610
+ minTranslate,
1611
+ maxTranslate,
1612
+ translateTo
1613
+ };
1614
+ function setTransition(duration, byController) {
1615
+ const swiper = this;
1616
+ if (!swiper.params.cssMode) {
1617
+ swiper.wrapperEl.style.transitionDuration = `${duration}ms`;
1618
+ swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : "";
1619
+ }
1620
+ swiper.emit("setTransition", duration, byController);
1621
+ }
1622
+ function transitionEmit(_ref) {
1623
+ let {
1624
+ swiper,
1625
+ runCallbacks,
1626
+ direction,
1627
+ step
1628
+ } = _ref;
1629
+ const {
1630
+ activeIndex,
1631
+ previousIndex
1632
+ } = swiper;
1633
+ let dir = direction;
1634
+ if (!dir) {
1635
+ if (activeIndex > previousIndex) dir = "next";
1636
+ else if (activeIndex < previousIndex) dir = "prev";
1637
+ else dir = "reset";
1638
+ }
1639
+ swiper.emit(`transition${step}`);
1640
+ if (runCallbacks && activeIndex !== previousIndex) {
1641
+ if (dir === "reset") {
1642
+ swiper.emit(`slideResetTransition${step}`);
1643
+ return;
1644
+ }
1645
+ swiper.emit(`slideChangeTransition${step}`);
1646
+ if (dir === "next") {
1647
+ swiper.emit(`slideNextTransition${step}`);
1648
+ } else {
1649
+ swiper.emit(`slidePrevTransition${step}`);
1650
+ }
1651
+ }
1652
+ }
1653
+ function transitionStart(runCallbacks, direction) {
1654
+ if (runCallbacks === void 0) {
1655
+ runCallbacks = true;
1656
+ }
1657
+ const swiper = this;
1658
+ const {
1659
+ params
1660
+ } = swiper;
1661
+ if (params.cssMode) return;
1662
+ if (params.autoHeight) {
1663
+ swiper.updateAutoHeight();
1664
+ }
1665
+ transitionEmit({
1666
+ swiper,
1667
+ runCallbacks,
1668
+ direction,
1669
+ step: "Start"
1670
+ });
1671
+ }
1672
+ function transitionEnd(runCallbacks, direction) {
1673
+ if (runCallbacks === void 0) {
1674
+ runCallbacks = true;
1675
+ }
1676
+ const swiper = this;
1677
+ const {
1678
+ params
1679
+ } = swiper;
1680
+ swiper.animating = false;
1681
+ if (params.cssMode) return;
1682
+ swiper.setTransition(0);
1683
+ transitionEmit({
1684
+ swiper,
1685
+ runCallbacks,
1686
+ direction,
1687
+ step: "End"
1688
+ });
1689
+ }
1690
+ var transition = {
1691
+ setTransition,
1692
+ transitionStart,
1693
+ transitionEnd
1694
+ };
1695
+ function slideTo(index, speed, runCallbacks, internal, initial) {
1696
+ if (index === void 0) {
1697
+ index = 0;
1698
+ }
1699
+ if (speed === void 0) {
1700
+ speed = this.params.speed;
1701
+ }
1702
+ if (runCallbacks === void 0) {
1703
+ runCallbacks = true;
1704
+ }
1705
+ if (typeof index === "string") {
1706
+ index = parseInt(index, 10);
1707
+ }
1708
+ const swiper = this;
1709
+ let slideIndex = index;
1710
+ if (slideIndex < 0) slideIndex = 0;
1711
+ const {
1712
+ params,
1713
+ snapGrid,
1714
+ slidesGrid,
1715
+ previousIndex,
1716
+ activeIndex,
1717
+ rtlTranslate: rtl,
1718
+ wrapperEl,
1719
+ enabled
1720
+ } = swiper;
1721
+ if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {
1722
+ return false;
1723
+ }
1724
+ const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
1725
+ let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
1726
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1727
+ const translate2 = -snapGrid[snapIndex];
1728
+ if (params.normalizeSlideIndex) {
1729
+ for (let i = 0; i < slidesGrid.length; i += 1) {
1730
+ const normalizedTranslate = -Math.floor(translate2 * 100);
1731
+ const normalizedGrid = Math.floor(slidesGrid[i] * 100);
1732
+ const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);
1733
+ if (typeof slidesGrid[i + 1] !== "undefined") {
1734
+ if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {
1735
+ slideIndex = i;
1736
+ } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {
1737
+ slideIndex = i + 1;
1738
+ }
1739
+ } else if (normalizedTranslate >= normalizedGrid) {
1740
+ slideIndex = i;
1741
+ }
1742
+ }
1743
+ }
1744
+ if (swiper.initialized && slideIndex !== activeIndex) {
1745
+ if (!swiper.allowSlideNext && (rtl ? translate2 > swiper.translate && translate2 > swiper.minTranslate() : translate2 < swiper.translate && translate2 < swiper.minTranslate())) {
1746
+ return false;
1747
+ }
1748
+ if (!swiper.allowSlidePrev && translate2 > swiper.translate && translate2 > swiper.maxTranslate()) {
1749
+ if ((activeIndex || 0) !== slideIndex) {
1750
+ return false;
1751
+ }
1752
+ }
1753
+ }
1754
+ if (slideIndex !== (previousIndex || 0) && runCallbacks) {
1755
+ swiper.emit("beforeSlideChangeStart");
1756
+ }
1757
+ swiper.updateProgress(translate2);
1758
+ let direction;
1759
+ if (slideIndex > activeIndex) direction = "next";
1760
+ else if (slideIndex < activeIndex) direction = "prev";
1761
+ else direction = "reset";
1762
+ if (rtl && -translate2 === swiper.translate || !rtl && translate2 === swiper.translate) {
1763
+ swiper.updateActiveIndex(slideIndex);
1764
+ if (params.autoHeight) {
1765
+ swiper.updateAutoHeight();
1766
+ }
1767
+ swiper.updateSlidesClasses();
1768
+ if (params.effect !== "slide") {
1769
+ swiper.setTranslate(translate2);
1770
+ }
1771
+ if (direction !== "reset") {
1772
+ swiper.transitionStart(runCallbacks, direction);
1773
+ swiper.transitionEnd(runCallbacks, direction);
1774
+ }
1775
+ return false;
1776
+ }
1777
+ if (params.cssMode) {
1778
+ const isH = swiper.isHorizontal();
1779
+ const t = rtl ? translate2 : -translate2;
1780
+ if (speed === 0) {
1781
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
1782
+ if (isVirtual) {
1783
+ swiper.wrapperEl.style.scrollSnapType = "none";
1784
+ swiper._immediateVirtual = true;
1785
+ }
1786
+ if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {
1787
+ swiper._cssModeVirtualInitialSet = true;
1788
+ requestAnimationFrame(() => {
1789
+ wrapperEl[isH ? "scrollLeft" : "scrollTop"] = t;
1790
+ });
1791
+ } else {
1792
+ wrapperEl[isH ? "scrollLeft" : "scrollTop"] = t;
1793
+ }
1794
+ if (isVirtual) {
1795
+ requestAnimationFrame(() => {
1796
+ swiper.wrapperEl.style.scrollSnapType = "";
1797
+ swiper._immediateVirtual = false;
1798
+ });
1799
+ }
1800
+ } else {
1801
+ if (!swiper.support.smoothScroll) {
1802
+ animateCSSModeScroll({
1803
+ swiper,
1804
+ targetPosition: t,
1805
+ side: isH ? "left" : "top"
1806
+ });
1807
+ return true;
1808
+ }
1809
+ wrapperEl.scrollTo({
1810
+ [isH ? "left" : "top"]: t,
1811
+ behavior: "smooth"
1812
+ });
1813
+ }
1814
+ return true;
1815
+ }
1816
+ swiper.setTransition(speed);
1817
+ swiper.setTranslate(translate2);
1818
+ swiper.updateActiveIndex(slideIndex);
1819
+ swiper.updateSlidesClasses();
1820
+ swiper.emit("beforeTransitionStart", speed, internal);
1821
+ swiper.transitionStart(runCallbacks, direction);
1822
+ if (speed === 0) {
1823
+ swiper.transitionEnd(runCallbacks, direction);
1824
+ } else if (!swiper.animating) {
1825
+ swiper.animating = true;
1826
+ if (!swiper.onSlideToWrapperTransitionEnd) {
1827
+ swiper.onSlideToWrapperTransitionEnd = function transitionEnd2(e) {
1828
+ if (!swiper || swiper.destroyed) return;
1829
+ if (e.target !== this) return;
1830
+ swiper.wrapperEl.removeEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd);
1831
+ swiper.onSlideToWrapperTransitionEnd = null;
1832
+ delete swiper.onSlideToWrapperTransitionEnd;
1833
+ swiper.transitionEnd(runCallbacks, direction);
1834
+ };
1835
+ }
1836
+ swiper.wrapperEl.addEventListener("transitionend", swiper.onSlideToWrapperTransitionEnd);
1837
+ }
1838
+ return true;
1839
+ }
1840
+ function slideToLoop(index, speed, runCallbacks, internal) {
1841
+ if (index === void 0) {
1842
+ index = 0;
1843
+ }
1844
+ if (speed === void 0) {
1845
+ speed = this.params.speed;
1846
+ }
1847
+ if (runCallbacks === void 0) {
1848
+ runCallbacks = true;
1849
+ }
1850
+ if (typeof index === "string") {
1851
+ const indexAsNumber = parseInt(index, 10);
1852
+ index = indexAsNumber;
1853
+ }
1854
+ const swiper = this;
1855
+ let newIndex = index;
1856
+ if (swiper.params.loop) {
1857
+ if (swiper.virtual && swiper.params.virtual.enabled) {
1858
+ newIndex = newIndex + swiper.virtual.slidesBefore;
1859
+ } else {
1860
+ newIndex = swiper.getSlideIndexByData(newIndex);
1861
+ }
1862
+ }
1863
+ return swiper.slideTo(newIndex, speed, runCallbacks, internal);
1864
+ }
1865
+ function slideNext(speed, runCallbacks, internal) {
1866
+ if (speed === void 0) {
1867
+ speed = this.params.speed;
1868
+ }
1869
+ if (runCallbacks === void 0) {
1870
+ runCallbacks = true;
1871
+ }
1872
+ const swiper = this;
1873
+ const {
1874
+ enabled,
1875
+ params,
1876
+ animating
1877
+ } = swiper;
1878
+ if (!enabled) return swiper;
1879
+ let perGroup = params.slidesPerGroup;
1880
+ if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
1881
+ perGroup = Math.max(swiper.slidesPerViewDynamic("current", true), 1);
1882
+ }
1883
+ const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;
1884
+ const isVirtual = swiper.virtual && params.virtual.enabled;
1885
+ if (params.loop) {
1886
+ if (animating && !isVirtual && params.loopPreventsSliding) return false;
1887
+ swiper.loopFix({
1888
+ direction: "next"
1889
+ });
1890
+ swiper._clientLeft = swiper.wrapperEl.clientLeft;
1891
+ if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {
1892
+ requestAnimationFrame(() => {
1893
+ swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
1894
+ });
1895
+ return true;
1896
+ }
1897
+ }
1898
+ if (params.rewind && swiper.isEnd) {
1899
+ return swiper.slideTo(0, speed, runCallbacks, internal);
1900
+ }
1901
+ return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
1902
+ }
1903
+ function slidePrev(speed, runCallbacks, internal) {
1904
+ if (speed === void 0) {
1905
+ speed = this.params.speed;
1906
+ }
1907
+ if (runCallbacks === void 0) {
1908
+ runCallbacks = true;
1909
+ }
1910
+ const swiper = this;
1911
+ const {
1912
+ params,
1913
+ snapGrid,
1914
+ slidesGrid,
1915
+ rtlTranslate,
1916
+ enabled,
1917
+ animating
1918
+ } = swiper;
1919
+ if (!enabled) return swiper;
1920
+ const isVirtual = swiper.virtual && params.virtual.enabled;
1921
+ if (params.loop) {
1922
+ if (animating && !isVirtual && params.loopPreventsSliding) return false;
1923
+ swiper.loopFix({
1924
+ direction: "prev"
1925
+ });
1926
+ swiper._clientLeft = swiper.wrapperEl.clientLeft;
1927
+ }
1928
+ const translate2 = rtlTranslate ? swiper.translate : -swiper.translate;
1929
+ function normalize(val) {
1930
+ if (val < 0) return -Math.floor(Math.abs(val));
1931
+ return Math.floor(val);
1932
+ }
1933
+ const normalizedTranslate = normalize(translate2);
1934
+ const normalizedSnapGrid = snapGrid.map((val) => normalize(val));
1935
+ let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
1936
+ if (typeof prevSnap === "undefined" && params.cssMode) {
1937
+ let prevSnapIndex;
1938
+ snapGrid.forEach((snap, snapIndex) => {
1939
+ if (normalizedTranslate >= snap) {
1940
+ prevSnapIndex = snapIndex;
1941
+ }
1942
+ });
1943
+ if (typeof prevSnapIndex !== "undefined") {
1944
+ prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];
1945
+ }
1946
+ }
1947
+ let prevIndex = 0;
1948
+ if (typeof prevSnap !== "undefined") {
1949
+ prevIndex = slidesGrid.indexOf(prevSnap);
1950
+ if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
1951
+ if (params.slidesPerView === "auto" && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
1952
+ prevIndex = prevIndex - swiper.slidesPerViewDynamic("previous", true) + 1;
1953
+ prevIndex = Math.max(prevIndex, 0);
1954
+ }
1955
+ }
1956
+ if (params.rewind && swiper.isBeginning) {
1957
+ const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
1958
+ return swiper.slideTo(lastIndex, speed, runCallbacks, internal);
1959
+ } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {
1960
+ requestAnimationFrame(() => {
1961
+ swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1962
+ });
1963
+ return true;
1964
+ }
1965
+ return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1966
+ }
1967
+ function slideReset(speed, runCallbacks, internal) {
1968
+ if (speed === void 0) {
1969
+ speed = this.params.speed;
1970
+ }
1971
+ if (runCallbacks === void 0) {
1972
+ runCallbacks = true;
1973
+ }
1974
+ const swiper = this;
1975
+ return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
1976
+ }
1977
+ function slideToClosest(speed, runCallbacks, internal, threshold) {
1978
+ if (speed === void 0) {
1979
+ speed = this.params.speed;
1980
+ }
1981
+ if (runCallbacks === void 0) {
1982
+ runCallbacks = true;
1983
+ }
1984
+ if (threshold === void 0) {
1985
+ threshold = 0.5;
1986
+ }
1987
+ const swiper = this;
1988
+ let index = swiper.activeIndex;
1989
+ const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
1990
+ const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
1991
+ const translate2 = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1992
+ if (translate2 >= swiper.snapGrid[snapIndex]) {
1993
+ const currentSnap = swiper.snapGrid[snapIndex];
1994
+ const nextSnap = swiper.snapGrid[snapIndex + 1];
1995
+ if (translate2 - currentSnap > (nextSnap - currentSnap) * threshold) {
1996
+ index += swiper.params.slidesPerGroup;
1997
+ }
1998
+ } else {
1999
+ const prevSnap = swiper.snapGrid[snapIndex - 1];
2000
+ const currentSnap = swiper.snapGrid[snapIndex];
2001
+ if (translate2 - prevSnap <= (currentSnap - prevSnap) * threshold) {
2002
+ index -= swiper.params.slidesPerGroup;
2003
+ }
2004
+ }
2005
+ index = Math.max(index, 0);
2006
+ index = Math.min(index, swiper.slidesGrid.length - 1);
2007
+ return swiper.slideTo(index, speed, runCallbacks, internal);
2008
+ }
2009
+ function slideToClickedSlide() {
2010
+ const swiper = this;
2011
+ const {
2012
+ params,
2013
+ slidesEl
2014
+ } = swiper;
2015
+ const slidesPerView = params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : params.slidesPerView;
2016
+ let slideToIndex = swiper.clickedIndex;
2017
+ let realIndex;
2018
+ const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;
2019
+ if (params.loop) {
2020
+ if (swiper.animating) return;
2021
+ realIndex = parseInt(swiper.clickedSlide.getAttribute("data-swiper-slide-index"), 10);
2022
+ if (params.centeredSlides) {
2023
+ if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {
2024
+ swiper.loopFix();
2025
+ slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]);
2026
+ nextTick(() => {
2027
+ swiper.slideTo(slideToIndex);
2028
+ });
2029
+ } else {
2030
+ swiper.slideTo(slideToIndex);
2031
+ }
2032
+ } else if (slideToIndex > swiper.slides.length - slidesPerView) {
2033
+ swiper.loopFix();
2034
+ slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]);
2035
+ nextTick(() => {
2036
+ swiper.slideTo(slideToIndex);
2037
+ });
2038
+ } else {
2039
+ swiper.slideTo(slideToIndex);
2040
+ }
2041
+ } else {
2042
+ swiper.slideTo(slideToIndex);
2043
+ }
2044
+ }
2045
+ var slide = {
2046
+ slideTo,
2047
+ slideToLoop,
2048
+ slideNext,
2049
+ slidePrev,
2050
+ slideReset,
2051
+ slideToClosest,
2052
+ slideToClickedSlide
2053
+ };
2054
+ function loopCreate(slideRealIndex) {
2055
+ const swiper = this;
2056
+ const {
2057
+ params,
2058
+ slidesEl
2059
+ } = swiper;
2060
+ if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;
2061
+ const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
2062
+ slides.forEach((el, index) => {
2063
+ el.setAttribute("data-swiper-slide-index", index);
2064
+ });
2065
+ swiper.loopFix({
2066
+ slideRealIndex,
2067
+ direction: params.centeredSlides ? void 0 : "next"
2068
+ });
2069
+ }
2070
+ function loopFix(_temp) {
2071
+ let {
2072
+ slideRealIndex,
2073
+ slideTo: slideTo2 = true,
2074
+ direction,
2075
+ setTranslate: setTranslate2,
2076
+ activeSlideIndex,
2077
+ byController,
2078
+ byMousewheel
2079
+ } = _temp === void 0 ? {} : _temp;
2080
+ const swiper = this;
2081
+ if (!swiper.params.loop) return;
2082
+ swiper.emit("beforeLoopFix");
2083
+ const {
2084
+ slides,
2085
+ allowSlidePrev,
2086
+ allowSlideNext,
2087
+ slidesEl,
2088
+ params
2089
+ } = swiper;
2090
+ swiper.allowSlidePrev = true;
2091
+ swiper.allowSlideNext = true;
2092
+ if (swiper.virtual && params.virtual.enabled) {
2093
+ if (slideTo2) {
2094
+ if (!params.centeredSlides && swiper.snapIndex === 0) {
2095
+ swiper.slideTo(swiper.virtual.slides.length, 0, false, true);
2096
+ } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {
2097
+ swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);
2098
+ } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {
2099
+ swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);
2100
+ }
2101
+ }
2102
+ swiper.allowSlidePrev = allowSlidePrev;
2103
+ swiper.allowSlideNext = allowSlideNext;
2104
+ swiper.emit("loopFix");
2105
+ return;
2106
+ }
2107
+ const slidesPerView = params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10));
2108
+ let loopedSlides = params.loopedSlides || slidesPerView;
2109
+ if (loopedSlides % params.slidesPerGroup !== 0) {
2110
+ loopedSlides += params.slidesPerGroup - loopedSlides % params.slidesPerGroup;
2111
+ }
2112
+ swiper.loopedSlides = loopedSlides;
2113
+ const prependSlidesIndexes = [];
2114
+ const appendSlidesIndexes = [];
2115
+ let activeIndex = swiper.activeIndex;
2116
+ if (typeof activeSlideIndex === "undefined") {
2117
+ activeSlideIndex = swiper.getSlideIndex(swiper.slides.filter((el) => el.classList.contains(params.slideActiveClass))[0]);
2118
+ } else {
2119
+ activeIndex = activeSlideIndex;
2120
+ }
2121
+ const isNext = direction === "next" || !direction;
2122
+ const isPrev = direction === "prev" || !direction;
2123
+ let slidesPrepended = 0;
2124
+ let slidesAppended = 0;
2125
+ if (activeSlideIndex < loopedSlides) {
2126
+ slidesPrepended = Math.max(loopedSlides - activeSlideIndex, params.slidesPerGroup);
2127
+ for (let i = 0; i < loopedSlides - activeSlideIndex; i += 1) {
2128
+ const index = i - Math.floor(i / slides.length) * slides.length;
2129
+ prependSlidesIndexes.push(slides.length - index - 1);
2130
+ }
2131
+ } else if (activeSlideIndex > swiper.slides.length - loopedSlides * 2) {
2132
+ slidesAppended = Math.max(activeSlideIndex - (swiper.slides.length - loopedSlides * 2), params.slidesPerGroup);
2133
+ for (let i = 0; i < slidesAppended; i += 1) {
2134
+ const index = i - Math.floor(i / slides.length) * slides.length;
2135
+ appendSlidesIndexes.push(index);
2136
+ }
2137
+ }
2138
+ if (isPrev) {
2139
+ prependSlidesIndexes.forEach((index) => {
2140
+ swiper.slides[index].swiperLoopMoveDOM = true;
2141
+ slidesEl.prepend(swiper.slides[index]);
2142
+ swiper.slides[index].swiperLoopMoveDOM = false;
2143
+ });
2144
+ }
2145
+ if (isNext) {
2146
+ appendSlidesIndexes.forEach((index) => {
2147
+ swiper.slides[index].swiperLoopMoveDOM = true;
2148
+ slidesEl.append(swiper.slides[index]);
2149
+ swiper.slides[index].swiperLoopMoveDOM = false;
2150
+ });
2151
+ }
2152
+ swiper.recalcSlides();
2153
+ if (params.slidesPerView === "auto") {
2154
+ swiper.updateSlides();
2155
+ }
2156
+ if (params.watchSlidesProgress) {
2157
+ swiper.updateSlidesOffset();
2158
+ }
2159
+ if (slideTo2) {
2160
+ if (prependSlidesIndexes.length > 0 && isPrev) {
2161
+ if (typeof slideRealIndex === "undefined") {
2162
+ const currentSlideTranslate = swiper.slidesGrid[activeIndex];
2163
+ const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];
2164
+ const diff = newSlideTranslate - currentSlideTranslate;
2165
+ if (byMousewheel) {
2166
+ swiper.setTranslate(swiper.translate - diff);
2167
+ } else {
2168
+ swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);
2169
+ if (setTranslate2) {
2170
+ swiper.touches[swiper.isHorizontal() ? "startX" : "startY"] += diff;
2171
+ swiper.touchEventsData.currentTranslate = swiper.translate;
2172
+ }
2173
+ }
2174
+ } else {
2175
+ if (setTranslate2) {
2176
+ swiper.slideToLoop(slideRealIndex, 0, false, true);
2177
+ swiper.touchEventsData.currentTranslate = swiper.translate;
2178
+ }
2179
+ }
2180
+ } else if (appendSlidesIndexes.length > 0 && isNext) {
2181
+ if (typeof slideRealIndex === "undefined") {
2182
+ const currentSlideTranslate = swiper.slidesGrid[activeIndex];
2183
+ const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];
2184
+ const diff = newSlideTranslate - currentSlideTranslate;
2185
+ if (byMousewheel) {
2186
+ swiper.setTranslate(swiper.translate - diff);
2187
+ } else {
2188
+ swiper.slideTo(activeIndex - slidesAppended, 0, false, true);
2189
+ if (setTranslate2) {
2190
+ swiper.touches[swiper.isHorizontal() ? "startX" : "startY"] += diff;
2191
+ swiper.touchEventsData.currentTranslate = swiper.translate;
2192
+ }
2193
+ }
2194
+ } else {
2195
+ swiper.slideToLoop(slideRealIndex, 0, false, true);
2196
+ }
2197
+ }
2198
+ }
2199
+ swiper.allowSlidePrev = allowSlidePrev;
2200
+ swiper.allowSlideNext = allowSlideNext;
2201
+ if (swiper.controller && swiper.controller.control && !byController) {
2202
+ const loopParams = {
2203
+ slideRealIndex,
2204
+ direction,
2205
+ setTranslate: setTranslate2,
2206
+ activeSlideIndex,
2207
+ byController: true
2208
+ };
2209
+ if (Array.isArray(swiper.controller.control)) {
2210
+ swiper.controller.control.forEach((c) => {
2211
+ if (!c.destroyed && c.params.loop) c.loopFix({
2212
+ ...loopParams,
2213
+ slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo2 : false
2214
+ });
2215
+ });
2216
+ } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {
2217
+ swiper.controller.control.loopFix({
2218
+ ...loopParams,
2219
+ slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo2 : false
2220
+ });
2221
+ }
2222
+ }
2223
+ swiper.emit("loopFix");
2224
+ }
2225
+ function loopDestroy() {
2226
+ const swiper = this;
2227
+ const {
2228
+ params,
2229
+ slidesEl
2230
+ } = swiper;
2231
+ if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;
2232
+ swiper.recalcSlides();
2233
+ const newSlidesOrder = [];
2234
+ swiper.slides.forEach((slideEl) => {
2235
+ const index = typeof slideEl.swiperSlideIndex === "undefined" ? slideEl.getAttribute("data-swiper-slide-index") * 1 : slideEl.swiperSlideIndex;
2236
+ newSlidesOrder[index] = slideEl;
2237
+ });
2238
+ swiper.slides.forEach((slideEl) => {
2239
+ slideEl.removeAttribute("data-swiper-slide-index");
2240
+ });
2241
+ newSlidesOrder.forEach((slideEl) => {
2242
+ slidesEl.append(slideEl);
2243
+ });
2244
+ swiper.recalcSlides();
2245
+ swiper.slideTo(swiper.realIndex, 0);
2246
+ }
2247
+ var loop = {
2248
+ loopCreate,
2249
+ loopFix,
2250
+ loopDestroy
2251
+ };
2252
+ function setGrabCursor(moving) {
2253
+ const swiper = this;
2254
+ if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;
2255
+ const el = swiper.params.touchEventsTarget === "container" ? swiper.el : swiper.wrapperEl;
2256
+ if (swiper.isElement) {
2257
+ swiper.__preventObserver__ = true;
2258
+ }
2259
+ el.style.cursor = "move";
2260
+ el.style.cursor = moving ? "grabbing" : "grab";
2261
+ if (swiper.isElement) {
2262
+ requestAnimationFrame(() => {
2263
+ swiper.__preventObserver__ = false;
2264
+ });
2265
+ }
2266
+ }
2267
+ function unsetGrabCursor() {
2268
+ const swiper = this;
2269
+ if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {
2270
+ return;
2271
+ }
2272
+ if (swiper.isElement) {
2273
+ swiper.__preventObserver__ = true;
2274
+ }
2275
+ swiper[swiper.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "";
2276
+ if (swiper.isElement) {
2277
+ requestAnimationFrame(() => {
2278
+ swiper.__preventObserver__ = false;
2279
+ });
2280
+ }
2281
+ }
2282
+ var grabCursor = {
2283
+ setGrabCursor,
2284
+ unsetGrabCursor
2285
+ };
2286
+ function closestElement(selector, base) {
2287
+ if (base === void 0) {
2288
+ base = this;
2289
+ }
2290
+ function __closestFrom(el) {
2291
+ if (!el || el === getDocument() || el === getWindow()) return null;
2292
+ if (el.assignedSlot) el = el.assignedSlot;
2293
+ const found = el.closest(selector);
2294
+ if (!found && !el.getRootNode) {
2295
+ return null;
2296
+ }
2297
+ return found || __closestFrom(el.getRootNode().host);
2298
+ }
2299
+ return __closestFrom(base);
2300
+ }
2301
+ function onTouchStart(event) {
2302
+ const swiper = this;
2303
+ const document2 = getDocument();
2304
+ const window2 = getWindow();
2305
+ const data = swiper.touchEventsData;
2306
+ data.evCache.push(event);
2307
+ const {
2308
+ params,
2309
+ touches,
2310
+ enabled
2311
+ } = swiper;
2312
+ if (!enabled) return;
2313
+ if (!params.simulateTouch && event.pointerType === "mouse") return;
2314
+ if (swiper.animating && params.preventInteractionOnTransition) {
2315
+ return;
2316
+ }
2317
+ if (!swiper.animating && params.cssMode && params.loop) {
2318
+ swiper.loopFix();
2319
+ }
2320
+ let e = event;
2321
+ if (e.originalEvent) e = e.originalEvent;
2322
+ let targetEl = e.target;
2323
+ if (params.touchEventsTarget === "wrapper") {
2324
+ if (!swiper.wrapperEl.contains(targetEl)) return;
2325
+ }
2326
+ if ("which" in e && e.which === 3) return;
2327
+ if ("button" in e && e.button > 0) return;
2328
+ if (data.isTouched && data.isMoved) return;
2329
+ const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== "";
2330
+ const eventPath = event.composedPath ? event.composedPath() : event.path;
2331
+ if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
2332
+ targetEl = eventPath[0];
2333
+ }
2334
+ const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;
2335
+ const isTargetShadow = !!(e.target && e.target.shadowRoot);
2336
+ if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {
2337
+ swiper.allowClick = true;
2338
+ return;
2339
+ }
2340
+ if (params.swipeHandler) {
2341
+ if (!targetEl.closest(params.swipeHandler)) return;
2342
+ }
2343
+ touches.currentX = e.pageX;
2344
+ touches.currentY = e.pageY;
2345
+ const startX = touches.currentX;
2346
+ const startY = touches.currentY;
2347
+ const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
2348
+ const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
2349
+ if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window2.innerWidth - edgeSwipeThreshold)) {
2350
+ if (edgeSwipeDetection === "prevent") {
2351
+ event.preventDefault();
2352
+ } else {
2353
+ return;
2354
+ }
2355
+ }
2356
+ Object.assign(data, {
2357
+ isTouched: true,
2358
+ isMoved: false,
2359
+ allowTouchCallbacks: true,
2360
+ isScrolling: void 0,
2361
+ startMoving: void 0
2362
+ });
2363
+ touches.startX = startX;
2364
+ touches.startY = startY;
2365
+ data.touchStartTime = now();
2366
+ swiper.allowClick = true;
2367
+ swiper.updateSize();
2368
+ swiper.swipeDirection = void 0;
2369
+ if (params.threshold > 0) data.allowThresholdMove = false;
2370
+ let preventDefault = true;
2371
+ if (targetEl.matches(data.focusableElements)) {
2372
+ preventDefault = false;
2373
+ if (targetEl.nodeName === "SELECT") {
2374
+ data.isTouched = false;
2375
+ }
2376
+ }
2377
+ if (document2.activeElement && document2.activeElement.matches(data.focusableElements) && document2.activeElement !== targetEl) {
2378
+ document2.activeElement.blur();
2379
+ }
2380
+ const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
2381
+ if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {
2382
+ e.preventDefault();
2383
+ }
2384
+ if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {
2385
+ swiper.freeMode.onTouchStart();
2386
+ }
2387
+ swiper.emit("touchStart", e);
2388
+ }
2389
+ function onTouchMove(event) {
2390
+ const document2 = getDocument();
2391
+ const swiper = this;
2392
+ const data = swiper.touchEventsData;
2393
+ const {
2394
+ params,
2395
+ touches,
2396
+ rtlTranslate: rtl,
2397
+ enabled
2398
+ } = swiper;
2399
+ if (!enabled) return;
2400
+ if (!params.simulateTouch && event.pointerType === "mouse") return;
2401
+ let e = event;
2402
+ if (e.originalEvent) e = e.originalEvent;
2403
+ if (!data.isTouched) {
2404
+ if (data.startMoving && data.isScrolling) {
2405
+ swiper.emit("touchMoveOpposite", e);
2406
+ }
2407
+ return;
2408
+ }
2409
+ const pointerIndex = data.evCache.findIndex((cachedEv) => cachedEv.pointerId === e.pointerId);
2410
+ if (pointerIndex >= 0) data.evCache[pointerIndex] = e;
2411
+ const targetTouch = data.evCache.length > 1 ? data.evCache[0] : e;
2412
+ const pageX = targetTouch.pageX;
2413
+ const pageY = targetTouch.pageY;
2414
+ if (e.preventedByNestedSwiper) {
2415
+ touches.startX = pageX;
2416
+ touches.startY = pageY;
2417
+ return;
2418
+ }
2419
+ if (!swiper.allowTouchMove) {
2420
+ if (!e.target.matches(data.focusableElements)) {
2421
+ swiper.allowClick = false;
2422
+ }
2423
+ if (data.isTouched) {
2424
+ Object.assign(touches, {
2425
+ startX: pageX,
2426
+ startY: pageY,
2427
+ prevX: swiper.touches.currentX,
2428
+ prevY: swiper.touches.currentY,
2429
+ currentX: pageX,
2430
+ currentY: pageY
2431
+ });
2432
+ data.touchStartTime = now();
2433
+ }
2434
+ return;
2435
+ }
2436
+ if (params.touchReleaseOnEdges && !params.loop) {
2437
+ if (swiper.isVertical()) {
2438
+ if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {
2439
+ data.isTouched = false;
2440
+ data.isMoved = false;
2441
+ return;
2442
+ }
2443
+ } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {
2444
+ return;
2445
+ }
2446
+ }
2447
+ if (document2.activeElement) {
2448
+ if (e.target === document2.activeElement && e.target.matches(data.focusableElements)) {
2449
+ data.isMoved = true;
2450
+ swiper.allowClick = false;
2451
+ return;
2452
+ }
2453
+ }
2454
+ if (data.allowTouchCallbacks) {
2455
+ swiper.emit("touchMove", e);
2456
+ }
2457
+ if (e.targetTouches && e.targetTouches.length > 1) return;
2458
+ touches.currentX = pageX;
2459
+ touches.currentY = pageY;
2460
+ const diffX = touches.currentX - touches.startX;
2461
+ const diffY = touches.currentY - touches.startY;
2462
+ if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;
2463
+ if (typeof data.isScrolling === "undefined") {
2464
+ let touchAngle;
2465
+ if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {
2466
+ data.isScrolling = false;
2467
+ } else {
2468
+ if (diffX * diffX + diffY * diffY >= 25) {
2469
+ touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;
2470
+ data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;
2471
+ }
2472
+ }
2473
+ }
2474
+ if (data.isScrolling) {
2475
+ swiper.emit("touchMoveOpposite", e);
2476
+ }
2477
+ if (typeof data.startMoving === "undefined") {
2478
+ if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
2479
+ data.startMoving = true;
2480
+ }
2481
+ }
2482
+ if (data.isScrolling || swiper.zoom && swiper.params.zoom && swiper.params.zoom.enabled && data.evCache.length > 1) {
2483
+ data.isTouched = false;
2484
+ return;
2485
+ }
2486
+ if (!data.startMoving) {
2487
+ return;
2488
+ }
2489
+ swiper.allowClick = false;
2490
+ if (!params.cssMode && e.cancelable) {
2491
+ e.preventDefault();
2492
+ }
2493
+ if (params.touchMoveStopPropagation && !params.nested) {
2494
+ e.stopPropagation();
2495
+ }
2496
+ let diff = swiper.isHorizontal() ? diffX : diffY;
2497
+ let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;
2498
+ if (params.oneWayMovement) {
2499
+ diff = Math.abs(diff) * (rtl ? 1 : -1);
2500
+ touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);
2501
+ }
2502
+ touches.diff = diff;
2503
+ diff *= params.touchRatio;
2504
+ if (rtl) {
2505
+ diff = -diff;
2506
+ touchesDiff = -touchesDiff;
2507
+ }
2508
+ const prevTouchesDirection = swiper.touchesDirection;
2509
+ swiper.swipeDirection = diff > 0 ? "prev" : "next";
2510
+ swiper.touchesDirection = touchesDiff > 0 ? "prev" : "next";
2511
+ const isLoop = swiper.params.loop && !params.cssMode;
2512
+ const allowLoopFix = swiper.swipeDirection === "next" && swiper.allowSlideNext || swiper.swipeDirection === "prev" && swiper.allowSlidePrev;
2513
+ if (!data.isMoved) {
2514
+ if (isLoop && allowLoopFix) {
2515
+ swiper.loopFix({
2516
+ direction: swiper.swipeDirection
2517
+ });
2518
+ }
2519
+ data.startTranslate = swiper.getTranslate();
2520
+ swiper.setTransition(0);
2521
+ if (swiper.animating) {
2522
+ const evt = new window.CustomEvent("transitionend", {
2523
+ bubbles: true,
2524
+ cancelable: true
2525
+ });
2526
+ swiper.wrapperEl.dispatchEvent(evt);
2527
+ }
2528
+ data.allowMomentumBounce = false;
2529
+ if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2530
+ swiper.setGrabCursor(true);
2531
+ }
2532
+ swiper.emit("sliderFirstMove", e);
2533
+ }
2534
+ let loopFixed;
2535
+ if (data.isMoved && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {
2536
+ swiper.loopFix({
2537
+ direction: swiper.swipeDirection,
2538
+ setTranslate: true
2539
+ });
2540
+ loopFixed = true;
2541
+ }
2542
+ swiper.emit("sliderMove", e);
2543
+ data.isMoved = true;
2544
+ data.currentTranslate = diff + data.startTranslate;
2545
+ let disableParentSwiper = true;
2546
+ let resistanceRatio = params.resistanceRatio;
2547
+ if (params.touchReleaseOnEdges) {
2548
+ resistanceRatio = 0;
2549
+ }
2550
+ if (diff > 0) {
2551
+ if (isLoop && allowLoopFix && !loopFixed && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.size / 2 : swiper.minTranslate())) {
2552
+ swiper.loopFix({
2553
+ direction: "prev",
2554
+ setTranslate: true,
2555
+ activeSlideIndex: 0
2556
+ });
2557
+ }
2558
+ if (data.currentTranslate > swiper.minTranslate()) {
2559
+ disableParentSwiper = false;
2560
+ if (params.resistance) {
2561
+ data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;
2562
+ }
2563
+ }
2564
+ } else if (diff < 0) {
2565
+ if (isLoop && allowLoopFix && !loopFixed && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.size / 2 : swiper.maxTranslate())) {
2566
+ swiper.loopFix({
2567
+ direction: "next",
2568
+ setTranslate: true,
2569
+ activeSlideIndex: swiper.slides.length - (params.slidesPerView === "auto" ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))
2570
+ });
2571
+ }
2572
+ if (data.currentTranslate < swiper.maxTranslate()) {
2573
+ disableParentSwiper = false;
2574
+ if (params.resistance) {
2575
+ data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;
2576
+ }
2577
+ }
2578
+ }
2579
+ if (disableParentSwiper) {
2580
+ e.preventedByNestedSwiper = true;
2581
+ }
2582
+ if (!swiper.allowSlideNext && swiper.swipeDirection === "next" && data.currentTranslate < data.startTranslate) {
2583
+ data.currentTranslate = data.startTranslate;
2584
+ }
2585
+ if (!swiper.allowSlidePrev && swiper.swipeDirection === "prev" && data.currentTranslate > data.startTranslate) {
2586
+ data.currentTranslate = data.startTranslate;
2587
+ }
2588
+ if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {
2589
+ data.currentTranslate = data.startTranslate;
2590
+ }
2591
+ if (params.threshold > 0) {
2592
+ if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
2593
+ if (!data.allowThresholdMove) {
2594
+ data.allowThresholdMove = true;
2595
+ touches.startX = touches.currentX;
2596
+ touches.startY = touches.currentY;
2597
+ data.currentTranslate = data.startTranslate;
2598
+ touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
2599
+ return;
2600
+ }
2601
+ } else {
2602
+ data.currentTranslate = data.startTranslate;
2603
+ return;
2604
+ }
2605
+ }
2606
+ if (!params.followFinger || params.cssMode) return;
2607
+ if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {
2608
+ swiper.updateActiveIndex();
2609
+ swiper.updateSlidesClasses();
2610
+ }
2611
+ if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {
2612
+ swiper.freeMode.onTouchMove();
2613
+ }
2614
+ swiper.updateProgress(data.currentTranslate);
2615
+ swiper.setTranslate(data.currentTranslate);
2616
+ }
2617
+ function onTouchEnd(event) {
2618
+ const swiper = this;
2619
+ const data = swiper.touchEventsData;
2620
+ const pointerIndex = data.evCache.findIndex((cachedEv) => cachedEv.pointerId === event.pointerId);
2621
+ if (pointerIndex >= 0) {
2622
+ data.evCache.splice(pointerIndex, 1);
2623
+ }
2624
+ if (["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes(event.type)) {
2625
+ const proceed = ["pointercancel", "contextmenu"].includes(event.type) && (swiper.browser.isSafari || swiper.browser.isWebView);
2626
+ if (!proceed) {
2627
+ return;
2628
+ }
2629
+ }
2630
+ const {
2631
+ params,
2632
+ touches,
2633
+ rtlTranslate: rtl,
2634
+ slidesGrid,
2635
+ enabled
2636
+ } = swiper;
2637
+ if (!enabled) return;
2638
+ if (!params.simulateTouch && event.pointerType === "mouse") return;
2639
+ let e = event;
2640
+ if (e.originalEvent) e = e.originalEvent;
2641
+ if (data.allowTouchCallbacks) {
2642
+ swiper.emit("touchEnd", e);
2643
+ }
2644
+ data.allowTouchCallbacks = false;
2645
+ if (!data.isTouched) {
2646
+ if (data.isMoved && params.grabCursor) {
2647
+ swiper.setGrabCursor(false);
2648
+ }
2649
+ data.isMoved = false;
2650
+ data.startMoving = false;
2651
+ return;
2652
+ }
2653
+ if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2654
+ swiper.setGrabCursor(false);
2655
+ }
2656
+ const touchEndTime = now();
2657
+ const timeDiff = touchEndTime - data.touchStartTime;
2658
+ if (swiper.allowClick) {
2659
+ const pathTree = e.path || e.composedPath && e.composedPath();
2660
+ swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);
2661
+ swiper.emit("tap click", e);
2662
+ if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {
2663
+ swiper.emit("doubleTap doubleClick", e);
2664
+ }
2665
+ }
2666
+ data.lastClickTime = now();
2667
+ nextTick(() => {
2668
+ if (!swiper.destroyed) swiper.allowClick = true;
2669
+ });
2670
+ if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {
2671
+ data.isTouched = false;
2672
+ data.isMoved = false;
2673
+ data.startMoving = false;
2674
+ return;
2675
+ }
2676
+ data.isTouched = false;
2677
+ data.isMoved = false;
2678
+ data.startMoving = false;
2679
+ let currentPos;
2680
+ if (params.followFinger) {
2681
+ currentPos = rtl ? swiper.translate : -swiper.translate;
2682
+ } else {
2683
+ currentPos = -data.currentTranslate;
2684
+ }
2685
+ if (params.cssMode) {
2686
+ return;
2687
+ }
2688
+ if (params.freeMode && params.freeMode.enabled) {
2689
+ swiper.freeMode.onTouchEnd({
2690
+ currentPos
2691
+ });
2692
+ return;
2693
+ }
2694
+ let stopIndex = 0;
2695
+ let groupSize = swiper.slidesSizesGrid[0];
2696
+ for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {
2697
+ const increment2 = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
2698
+ if (typeof slidesGrid[i + increment2] !== "undefined") {
2699
+ if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment2]) {
2700
+ stopIndex = i;
2701
+ groupSize = slidesGrid[i + increment2] - slidesGrid[i];
2702
+ }
2703
+ } else if (currentPos >= slidesGrid[i]) {
2704
+ stopIndex = i;
2705
+ groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
2706
+ }
2707
+ }
2708
+ let rewindFirstIndex = null;
2709
+ let rewindLastIndex = null;
2710
+ if (params.rewind) {
2711
+ if (swiper.isBeginning) {
2712
+ rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
2713
+ } else if (swiper.isEnd) {
2714
+ rewindFirstIndex = 0;
2715
+ }
2716
+ }
2717
+ const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
2718
+ const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
2719
+ if (timeDiff > params.longSwipesMs) {
2720
+ if (!params.longSwipes) {
2721
+ swiper.slideTo(swiper.activeIndex);
2722
+ return;
2723
+ }
2724
+ if (swiper.swipeDirection === "next") {
2725
+ if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);
2726
+ else swiper.slideTo(stopIndex);
2727
+ }
2728
+ if (swiper.swipeDirection === "prev") {
2729
+ if (ratio > 1 - params.longSwipesRatio) {
2730
+ swiper.slideTo(stopIndex + increment);
2731
+ } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {
2732
+ swiper.slideTo(rewindLastIndex);
2733
+ } else {
2734
+ swiper.slideTo(stopIndex);
2735
+ }
2736
+ }
2737
+ } else {
2738
+ if (!params.shortSwipes) {
2739
+ swiper.slideTo(swiper.activeIndex);
2740
+ return;
2741
+ }
2742
+ const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);
2743
+ if (!isNavButtonTarget) {
2744
+ if (swiper.swipeDirection === "next") {
2745
+ swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);
2746
+ }
2747
+ if (swiper.swipeDirection === "prev") {
2748
+ swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);
2749
+ }
2750
+ } else if (e.target === swiper.navigation.nextEl) {
2751
+ swiper.slideTo(stopIndex + increment);
2752
+ } else {
2753
+ swiper.slideTo(stopIndex);
2754
+ }
2755
+ }
2756
+ }
2757
+ function onResize() {
2758
+ const swiper = this;
2759
+ const {
2760
+ params,
2761
+ el
2762
+ } = swiper;
2763
+ if (el && el.offsetWidth === 0) return;
2764
+ if (params.breakpoints) {
2765
+ swiper.setBreakpoint();
2766
+ }
2767
+ const {
2768
+ allowSlideNext,
2769
+ allowSlidePrev,
2770
+ snapGrid
2771
+ } = swiper;
2772
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
2773
+ swiper.allowSlideNext = true;
2774
+ swiper.allowSlidePrev = true;
2775
+ swiper.updateSize();
2776
+ swiper.updateSlides();
2777
+ swiper.updateSlidesClasses();
2778
+ const isVirtualLoop = isVirtual && params.loop;
2779
+ if ((params.slidesPerView === "auto" || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {
2780
+ swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2781
+ } else {
2782
+ if (swiper.params.loop && !isVirtual) {
2783
+ swiper.slideToLoop(swiper.realIndex, 0, false, true);
2784
+ } else {
2785
+ swiper.slideTo(swiper.activeIndex, 0, false, true);
2786
+ }
2787
+ }
2788
+ if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
2789
+ clearTimeout(swiper.autoplay.resizeTimeout);
2790
+ swiper.autoplay.resizeTimeout = setTimeout(() => {
2791
+ if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
2792
+ swiper.autoplay.resume();
2793
+ }
2794
+ }, 500);
2795
+ }
2796
+ swiper.allowSlidePrev = allowSlidePrev;
2797
+ swiper.allowSlideNext = allowSlideNext;
2798
+ if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
2799
+ swiper.checkOverflow();
2800
+ }
2801
+ }
2802
+ function onClick(e) {
2803
+ const swiper = this;
2804
+ if (!swiper.enabled) return;
2805
+ if (!swiper.allowClick) {
2806
+ if (swiper.params.preventClicks) e.preventDefault();
2807
+ if (swiper.params.preventClicksPropagation && swiper.animating) {
2808
+ e.stopPropagation();
2809
+ e.stopImmediatePropagation();
2810
+ }
2811
+ }
2812
+ }
2813
+ function onScroll() {
2814
+ const swiper = this;
2815
+ const {
2816
+ wrapperEl,
2817
+ rtlTranslate,
2818
+ enabled
2819
+ } = swiper;
2820
+ if (!enabled) return;
2821
+ swiper.previousTranslate = swiper.translate;
2822
+ if (swiper.isHorizontal()) {
2823
+ swiper.translate = -wrapperEl.scrollLeft;
2824
+ } else {
2825
+ swiper.translate = -wrapperEl.scrollTop;
2826
+ }
2827
+ if (swiper.translate === 0) swiper.translate = 0;
2828
+ swiper.updateActiveIndex();
2829
+ swiper.updateSlidesClasses();
2830
+ let newProgress;
2831
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
2832
+ if (translatesDiff === 0) {
2833
+ newProgress = 0;
2834
+ } else {
2835
+ newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;
2836
+ }
2837
+ if (newProgress !== swiper.progress) {
2838
+ swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);
2839
+ }
2840
+ swiper.emit("setTranslate", swiper.translate, false);
2841
+ }
2842
+ function onLoad(e) {
2843
+ const swiper = this;
2844
+ processLazyPreloader(swiper, e.target);
2845
+ if (swiper.params.cssMode || swiper.params.slidesPerView !== "auto" && !swiper.params.autoHeight) {
2846
+ return;
2847
+ }
2848
+ swiper.update();
2849
+ }
2850
+ var dummyEventAttached = false;
2851
+ function dummyEventListener() {
2852
+ }
2853
+ var events = (swiper, method) => {
2854
+ const document2 = getDocument();
2855
+ const {
2856
+ params,
2857
+ el,
2858
+ wrapperEl,
2859
+ device
2860
+ } = swiper;
2861
+ const capture = !!params.nested;
2862
+ const domMethod = method === "on" ? "addEventListener" : "removeEventListener";
2863
+ const swiperMethod = method;
2864
+ el[domMethod]("pointerdown", swiper.onTouchStart, {
2865
+ passive: false
2866
+ });
2867
+ document2[domMethod]("pointermove", swiper.onTouchMove, {
2868
+ passive: false,
2869
+ capture
2870
+ });
2871
+ document2[domMethod]("pointerup", swiper.onTouchEnd, {
2872
+ passive: true
2873
+ });
2874
+ document2[domMethod]("pointercancel", swiper.onTouchEnd, {
2875
+ passive: true
2876
+ });
2877
+ document2[domMethod]("pointerout", swiper.onTouchEnd, {
2878
+ passive: true
2879
+ });
2880
+ document2[domMethod]("pointerleave", swiper.onTouchEnd, {
2881
+ passive: true
2882
+ });
2883
+ document2[domMethod]("contextmenu", swiper.onTouchEnd, {
2884
+ passive: true
2885
+ });
2886
+ if (params.preventClicks || params.preventClicksPropagation) {
2887
+ el[domMethod]("click", swiper.onClick, true);
2888
+ }
2889
+ if (params.cssMode) {
2890
+ wrapperEl[domMethod]("scroll", swiper.onScroll);
2891
+ }
2892
+ if (params.updateOnWindowResize) {
2893
+ swiper[swiperMethod](device.ios || device.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", onResize, true);
2894
+ } else {
2895
+ swiper[swiperMethod]("observerUpdate", onResize, true);
2896
+ }
2897
+ el[domMethod]("load", swiper.onLoad, {
2898
+ capture: true
2899
+ });
2900
+ };
2901
+ function attachEvents() {
2902
+ const swiper = this;
2903
+ const document2 = getDocument();
2904
+ const {
2905
+ params
2906
+ } = swiper;
2907
+ swiper.onTouchStart = onTouchStart.bind(swiper);
2908
+ swiper.onTouchMove = onTouchMove.bind(swiper);
2909
+ swiper.onTouchEnd = onTouchEnd.bind(swiper);
2910
+ if (params.cssMode) {
2911
+ swiper.onScroll = onScroll.bind(swiper);
2912
+ }
2913
+ swiper.onClick = onClick.bind(swiper);
2914
+ swiper.onLoad = onLoad.bind(swiper);
2915
+ if (!dummyEventAttached) {
2916
+ document2.addEventListener("touchstart", dummyEventListener);
2917
+ dummyEventAttached = true;
2918
+ }
2919
+ events(swiper, "on");
2920
+ }
2921
+ function detachEvents() {
2922
+ const swiper = this;
2923
+ events(swiper, "off");
2924
+ }
2925
+ var events$1 = {
2926
+ attachEvents,
2927
+ detachEvents
2928
+ };
2929
+ var isGridEnabled = (swiper, params) => {
2930
+ return swiper.grid && params.grid && params.grid.rows > 1;
2931
+ };
2932
+ function setBreakpoint() {
2933
+ const swiper = this;
2934
+ const {
2935
+ realIndex,
2936
+ initialized,
2937
+ params,
2938
+ el
2939
+ } = swiper;
2940
+ const breakpoints2 = params.breakpoints;
2941
+ if (!breakpoints2 || breakpoints2 && Object.keys(breakpoints2).length === 0) return;
2942
+ const breakpoint = swiper.getBreakpoint(breakpoints2, swiper.params.breakpointsBase, swiper.el);
2943
+ if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;
2944
+ const breakpointOnlyParams = breakpoint in breakpoints2 ? breakpoints2[breakpoint] : void 0;
2945
+ const breakpointParams = breakpointOnlyParams || swiper.originalParams;
2946
+ const wasMultiRow = isGridEnabled(swiper, params);
2947
+ const isMultiRow = isGridEnabled(swiper, breakpointParams);
2948
+ const wasEnabled = params.enabled;
2949
+ if (wasMultiRow && !isMultiRow) {
2950
+ el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
2951
+ swiper.emitContainerClasses();
2952
+ } else if (!wasMultiRow && isMultiRow) {
2953
+ el.classList.add(`${params.containerModifierClass}grid`);
2954
+ if (breakpointParams.grid.fill && breakpointParams.grid.fill === "column" || !breakpointParams.grid.fill && params.grid.fill === "column") {
2955
+ el.classList.add(`${params.containerModifierClass}grid-column`);
2956
+ }
2957
+ swiper.emitContainerClasses();
2958
+ }
2959
+ ["navigation", "pagination", "scrollbar"].forEach((prop) => {
2960
+ if (typeof breakpointParams[prop] === "undefined") return;
2961
+ const wasModuleEnabled = params[prop] && params[prop].enabled;
2962
+ const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;
2963
+ if (wasModuleEnabled && !isModuleEnabled) {
2964
+ swiper[prop].disable();
2965
+ }
2966
+ if (!wasModuleEnabled && isModuleEnabled) {
2967
+ swiper[prop].enable();
2968
+ }
2969
+ });
2970
+ const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;
2971
+ const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);
2972
+ const wasLoop = params.loop;
2973
+ if (directionChanged && initialized) {
2974
+ swiper.changeDirection();
2975
+ }
2976
+ extend2(swiper.params, breakpointParams);
2977
+ const isEnabled = swiper.params.enabled;
2978
+ const hasLoop = swiper.params.loop;
2979
+ Object.assign(swiper, {
2980
+ allowTouchMove: swiper.params.allowTouchMove,
2981
+ allowSlideNext: swiper.params.allowSlideNext,
2982
+ allowSlidePrev: swiper.params.allowSlidePrev
2983
+ });
2984
+ if (wasEnabled && !isEnabled) {
2985
+ swiper.disable();
2986
+ } else if (!wasEnabled && isEnabled) {
2987
+ swiper.enable();
2988
+ }
2989
+ swiper.currentBreakpoint = breakpoint;
2990
+ swiper.emit("_beforeBreakpoint", breakpointParams);
2991
+ if (initialized) {
2992
+ if (needsReLoop) {
2993
+ swiper.loopDestroy();
2994
+ swiper.loopCreate(realIndex);
2995
+ swiper.updateSlides();
2996
+ } else if (!wasLoop && hasLoop) {
2997
+ swiper.loopCreate(realIndex);
2998
+ swiper.updateSlides();
2999
+ } else if (wasLoop && !hasLoop) {
3000
+ swiper.loopDestroy();
3001
+ }
3002
+ }
3003
+ swiper.emit("breakpoint", breakpointParams);
3004
+ }
3005
+ function getBreakpoint(breakpoints2, base, containerEl) {
3006
+ if (base === void 0) {
3007
+ base = "window";
3008
+ }
3009
+ if (!breakpoints2 || base === "container" && !containerEl) return void 0;
3010
+ let breakpoint = false;
3011
+ const window2 = getWindow();
3012
+ const currentHeight = base === "window" ? window2.innerHeight : containerEl.clientHeight;
3013
+ const points = Object.keys(breakpoints2).map((point) => {
3014
+ if (typeof point === "string" && point.indexOf("@") === 0) {
3015
+ const minRatio = parseFloat(point.substr(1));
3016
+ const value = currentHeight * minRatio;
3017
+ return {
3018
+ value,
3019
+ point
3020
+ };
3021
+ }
3022
+ return {
3023
+ value: point,
3024
+ point
3025
+ };
3026
+ });
3027
+ points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));
3028
+ for (let i = 0; i < points.length; i += 1) {
3029
+ const {
3030
+ point,
3031
+ value
3032
+ } = points[i];
3033
+ if (base === "window") {
3034
+ if (window2.matchMedia(`(min-width: ${value}px)`).matches) {
3035
+ breakpoint = point;
3036
+ }
3037
+ } else if (value <= containerEl.clientWidth) {
3038
+ breakpoint = point;
3039
+ }
3040
+ }
3041
+ return breakpoint || "max";
3042
+ }
3043
+ var breakpoints = {
3044
+ setBreakpoint,
3045
+ getBreakpoint
3046
+ };
3047
+ function prepareClasses(entries, prefix) {
3048
+ const resultClasses = [];
3049
+ entries.forEach((item) => {
3050
+ if (typeof item === "object") {
3051
+ Object.keys(item).forEach((classNames) => {
3052
+ if (item[classNames]) {
3053
+ resultClasses.push(prefix + classNames);
3054
+ }
3055
+ });
3056
+ } else if (typeof item === "string") {
3057
+ resultClasses.push(prefix + item);
3058
+ }
3059
+ });
3060
+ return resultClasses;
3061
+ }
3062
+ function addClasses() {
3063
+ const swiper = this;
3064
+ const {
3065
+ classNames,
3066
+ params,
3067
+ rtl,
3068
+ el,
3069
+ device
3070
+ } = swiper;
3071
+ const suffixes = prepareClasses(["initialized", params.direction, {
3072
+ "free-mode": swiper.params.freeMode && params.freeMode.enabled
3073
+ }, {
3074
+ "autoheight": params.autoHeight
3075
+ }, {
3076
+ "rtl": rtl
3077
+ }, {
3078
+ "grid": params.grid && params.grid.rows > 1
3079
+ }, {
3080
+ "grid-column": params.grid && params.grid.rows > 1 && params.grid.fill === "column"
3081
+ }, {
3082
+ "android": device.android
3083
+ }, {
3084
+ "ios": device.ios
3085
+ }, {
3086
+ "css-mode": params.cssMode
3087
+ }, {
3088
+ "centered": params.cssMode && params.centeredSlides
3089
+ }, {
3090
+ "watch-progress": params.watchSlidesProgress
3091
+ }], params.containerModifierClass);
3092
+ classNames.push(...suffixes);
3093
+ el.classList.add(...classNames);
3094
+ swiper.emitContainerClasses();
3095
+ }
3096
+ function removeClasses() {
3097
+ const swiper = this;
3098
+ const {
3099
+ el,
3100
+ classNames
3101
+ } = swiper;
3102
+ el.classList.remove(...classNames);
3103
+ swiper.emitContainerClasses();
3104
+ }
3105
+ var classes = {
3106
+ addClasses,
3107
+ removeClasses
3108
+ };
3109
+ function checkOverflow() {
3110
+ const swiper = this;
3111
+ const {
3112
+ isLocked: wasLocked,
3113
+ params
3114
+ } = swiper;
3115
+ const {
3116
+ slidesOffsetBefore
3117
+ } = params;
3118
+ if (slidesOffsetBefore) {
3119
+ const lastSlideIndex = swiper.slides.length - 1;
3120
+ const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;
3121
+ swiper.isLocked = swiper.size > lastSlideRightEdge;
3122
+ } else {
3123
+ swiper.isLocked = swiper.snapGrid.length === 1;
3124
+ }
3125
+ if (params.allowSlideNext === true) {
3126
+ swiper.allowSlideNext = !swiper.isLocked;
3127
+ }
3128
+ if (params.allowSlidePrev === true) {
3129
+ swiper.allowSlidePrev = !swiper.isLocked;
3130
+ }
3131
+ if (wasLocked && wasLocked !== swiper.isLocked) {
3132
+ swiper.isEnd = false;
3133
+ }
3134
+ if (wasLocked !== swiper.isLocked) {
3135
+ swiper.emit(swiper.isLocked ? "lock" : "unlock");
3136
+ }
3137
+ }
3138
+ var checkOverflow$1 = {
3139
+ checkOverflow
3140
+ };
3141
+ var defaults = {
3142
+ init: true,
3143
+ direction: "horizontal",
3144
+ oneWayMovement: false,
3145
+ touchEventsTarget: "wrapper",
3146
+ initialSlide: 0,
3147
+ speed: 300,
3148
+ cssMode: false,
3149
+ updateOnWindowResize: true,
3150
+ resizeObserver: true,
3151
+ nested: false,
3152
+ createElements: false,
3153
+ enabled: true,
3154
+ focusableElements: "input, select, option, textarea, button, video, label",
3155
+ // Overrides
3156
+ width: null,
3157
+ height: null,
3158
+ //
3159
+ preventInteractionOnTransition: false,
3160
+ // ssr
3161
+ userAgent: null,
3162
+ url: null,
3163
+ // To support iOS's swipe-to-go-back gesture (when being used in-app).
3164
+ edgeSwipeDetection: false,
3165
+ edgeSwipeThreshold: 20,
3166
+ // Autoheight
3167
+ autoHeight: false,
3168
+ // Set wrapper width
3169
+ setWrapperSize: false,
3170
+ // Virtual Translate
3171
+ virtualTranslate: false,
3172
+ // Effects
3173
+ effect: "slide",
3174
+ // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
3175
+ // Breakpoints
3176
+ breakpoints: void 0,
3177
+ breakpointsBase: "window",
3178
+ // Slides grid
3179
+ spaceBetween: 0,
3180
+ slidesPerView: 1,
3181
+ slidesPerGroup: 1,
3182
+ slidesPerGroupSkip: 0,
3183
+ slidesPerGroupAuto: false,
3184
+ centeredSlides: false,
3185
+ centeredSlidesBounds: false,
3186
+ slidesOffsetBefore: 0,
3187
+ // in px
3188
+ slidesOffsetAfter: 0,
3189
+ // in px
3190
+ normalizeSlideIndex: true,
3191
+ centerInsufficientSlides: false,
3192
+ // Disable swiper and hide navigation when container not overflow
3193
+ watchOverflow: true,
3194
+ // Round length
3195
+ roundLengths: false,
3196
+ // Touches
3197
+ touchRatio: 1,
3198
+ touchAngle: 45,
3199
+ simulateTouch: true,
3200
+ shortSwipes: true,
3201
+ longSwipes: true,
3202
+ longSwipesRatio: 0.5,
3203
+ longSwipesMs: 300,
3204
+ followFinger: true,
3205
+ allowTouchMove: true,
3206
+ threshold: 5,
3207
+ touchMoveStopPropagation: false,
3208
+ touchStartPreventDefault: true,
3209
+ touchStartForcePreventDefault: false,
3210
+ touchReleaseOnEdges: false,
3211
+ // Unique Navigation Elements
3212
+ uniqueNavElements: true,
3213
+ // Resistance
3214
+ resistance: true,
3215
+ resistanceRatio: 0.85,
3216
+ // Progress
3217
+ watchSlidesProgress: false,
3218
+ // Cursor
3219
+ grabCursor: false,
3220
+ // Clicks
3221
+ preventClicks: true,
3222
+ preventClicksPropagation: true,
3223
+ slideToClickedSlide: false,
3224
+ // loop
3225
+ loop: false,
3226
+ loopedSlides: null,
3227
+ loopPreventsSliding: true,
3228
+ // rewind
3229
+ rewind: false,
3230
+ // Swiping/no swiping
3231
+ allowSlidePrev: true,
3232
+ allowSlideNext: true,
3233
+ swipeHandler: null,
3234
+ // '.swipe-handler',
3235
+ noSwiping: true,
3236
+ noSwipingClass: "swiper-no-swiping",
3237
+ noSwipingSelector: null,
3238
+ // Passive Listeners
3239
+ passiveListeners: true,
3240
+ maxBackfaceHiddenSlides: 10,
3241
+ // NS
3242
+ containerModifierClass: "swiper-",
3243
+ // NEW
3244
+ slideClass: "swiper-slide",
3245
+ slideActiveClass: "swiper-slide-active",
3246
+ slideVisibleClass: "swiper-slide-visible",
3247
+ slideNextClass: "swiper-slide-next",
3248
+ slidePrevClass: "swiper-slide-prev",
3249
+ wrapperClass: "swiper-wrapper",
3250
+ lazyPreloaderClass: "swiper-lazy-preloader",
3251
+ lazyPreloadPrevNext: 0,
3252
+ // Callbacks
3253
+ runCallbacksOnInit: true,
3254
+ // Internals
3255
+ _emitClasses: false
3256
+ };
3257
+ function moduleExtendParams(params, allModulesParams) {
3258
+ return function extendParams(obj) {
3259
+ if (obj === void 0) {
3260
+ obj = {};
3261
+ }
3262
+ const moduleParamName = Object.keys(obj)[0];
3263
+ const moduleParams = obj[moduleParamName];
3264
+ if (typeof moduleParams !== "object" || moduleParams === null) {
3265
+ extend2(allModulesParams, obj);
3266
+ return;
3267
+ }
3268
+ if (params[moduleParamName] === true) {
3269
+ params[moduleParamName] = {
3270
+ enabled: true
3271
+ };
3272
+ }
3273
+ if (moduleParamName === "navigation" && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {
3274
+ params[moduleParamName].auto = true;
3275
+ }
3276
+ if (["pagination", "scrollbar"].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {
3277
+ params[moduleParamName].auto = true;
3278
+ }
3279
+ if (!(moduleParamName in params && "enabled" in moduleParams)) {
3280
+ extend2(allModulesParams, obj);
3281
+ return;
3282
+ }
3283
+ if (typeof params[moduleParamName] === "object" && !("enabled" in params[moduleParamName])) {
3284
+ params[moduleParamName].enabled = true;
3285
+ }
3286
+ if (!params[moduleParamName]) params[moduleParamName] = {
3287
+ enabled: false
3288
+ };
3289
+ extend2(allModulesParams, obj);
3290
+ };
3291
+ }
3292
+ var prototypes = {
3293
+ eventsEmitter,
3294
+ update,
3295
+ translate,
3296
+ transition,
3297
+ slide,
3298
+ loop,
3299
+ grabCursor,
3300
+ events: events$1,
3301
+ breakpoints,
3302
+ checkOverflow: checkOverflow$1,
3303
+ classes
3304
+ };
3305
+ var extendedDefaults = {};
3306
+ var Swiper = class _Swiper {
3307
+ constructor() {
3308
+ let el;
3309
+ let params;
3310
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3311
+ args[_key] = arguments[_key];
3312
+ }
3313
+ if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === "Object") {
3314
+ params = args[0];
3315
+ } else {
3316
+ [el, params] = args;
3317
+ }
3318
+ if (!params) params = {};
3319
+ params = extend2({}, params);
3320
+ if (el && !params.el) params.el = el;
3321
+ const document2 = getDocument();
3322
+ if (params.el && typeof params.el === "string" && document2.querySelectorAll(params.el).length > 1) {
3323
+ const swipers = [];
3324
+ document2.querySelectorAll(params.el).forEach((containerEl) => {
3325
+ const newParams = extend2({}, params, {
3326
+ el: containerEl
3327
+ });
3328
+ swipers.push(new _Swiper(newParams));
3329
+ });
3330
+ return swipers;
3331
+ }
3332
+ const swiper = this;
3333
+ swiper.__swiper__ = true;
3334
+ swiper.support = getSupport();
3335
+ swiper.device = getDevice({
3336
+ userAgent: params.userAgent
3337
+ });
3338
+ swiper.browser = getBrowser();
3339
+ swiper.eventsListeners = {};
3340
+ swiper.eventsAnyListeners = [];
3341
+ swiper.modules = [...swiper.__modules__];
3342
+ if (params.modules && Array.isArray(params.modules)) {
3343
+ swiper.modules.push(...params.modules);
3344
+ }
3345
+ const allModulesParams = {};
3346
+ swiper.modules.forEach((mod) => {
3347
+ mod({
3348
+ params,
3349
+ swiper,
3350
+ extendParams: moduleExtendParams(params, allModulesParams),
3351
+ on: swiper.on.bind(swiper),
3352
+ once: swiper.once.bind(swiper),
3353
+ off: swiper.off.bind(swiper),
3354
+ emit: swiper.emit.bind(swiper)
3355
+ });
3356
+ });
3357
+ const swiperParams = extend2({}, defaults, allModulesParams);
3358
+ swiper.params = extend2({}, swiperParams, extendedDefaults, params);
3359
+ swiper.originalParams = extend2({}, swiper.params);
3360
+ swiper.passedParams = extend2({}, params);
3361
+ if (swiper.params && swiper.params.on) {
3362
+ Object.keys(swiper.params.on).forEach((eventName) => {
3363
+ swiper.on(eventName, swiper.params.on[eventName]);
3364
+ });
3365
+ }
3366
+ if (swiper.params && swiper.params.onAny) {
3367
+ swiper.onAny(swiper.params.onAny);
3368
+ }
3369
+ Object.assign(swiper, {
3370
+ enabled: swiper.params.enabled,
3371
+ el,
3372
+ // Classes
3373
+ classNames: [],
3374
+ // Slides
3375
+ slides: [],
3376
+ slidesGrid: [],
3377
+ snapGrid: [],
3378
+ slidesSizesGrid: [],
3379
+ // isDirection
3380
+ isHorizontal() {
3381
+ return swiper.params.direction === "horizontal";
3382
+ },
3383
+ isVertical() {
3384
+ return swiper.params.direction === "vertical";
3385
+ },
3386
+ // Indexes
3387
+ activeIndex: 0,
3388
+ realIndex: 0,
3389
+ //
3390
+ isBeginning: true,
3391
+ isEnd: false,
3392
+ // Props
3393
+ translate: 0,
3394
+ previousTranslate: 0,
3395
+ progress: 0,
3396
+ velocity: 0,
3397
+ animating: false,
3398
+ cssOverflowAdjustment() {
3399
+ return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
3400
+ },
3401
+ // Locks
3402
+ allowSlideNext: swiper.params.allowSlideNext,
3403
+ allowSlidePrev: swiper.params.allowSlidePrev,
3404
+ // Touch Events
3405
+ touchEventsData: {
3406
+ isTouched: void 0,
3407
+ isMoved: void 0,
3408
+ allowTouchCallbacks: void 0,
3409
+ touchStartTime: void 0,
3410
+ isScrolling: void 0,
3411
+ currentTranslate: void 0,
3412
+ startTranslate: void 0,
3413
+ allowThresholdMove: void 0,
3414
+ // Form elements to match
3415
+ focusableElements: swiper.params.focusableElements,
3416
+ // Last click time
3417
+ lastClickTime: 0,
3418
+ clickTimeout: void 0,
3419
+ // Velocities
3420
+ velocities: [],
3421
+ allowMomentumBounce: void 0,
3422
+ startMoving: void 0,
3423
+ evCache: []
3424
+ },
3425
+ // Clicks
3426
+ allowClick: true,
3427
+ // Touches
3428
+ allowTouchMove: swiper.params.allowTouchMove,
3429
+ touches: {
3430
+ startX: 0,
3431
+ startY: 0,
3432
+ currentX: 0,
3433
+ currentY: 0,
3434
+ diff: 0
3435
+ },
3436
+ // Images
3437
+ imagesToLoad: [],
3438
+ imagesLoaded: 0
3439
+ });
3440
+ swiper.emit("_swiper");
3441
+ if (swiper.params.init) {
3442
+ swiper.init();
3443
+ }
3444
+ return swiper;
3445
+ }
3446
+ getSlideIndex(slideEl) {
3447
+ const {
3448
+ slidesEl,
3449
+ params
3450
+ } = this;
3451
+ const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
3452
+ const firstSlideIndex = elementIndex(slides[0]);
3453
+ return elementIndex(slideEl) - firstSlideIndex;
3454
+ }
3455
+ getSlideIndexByData(index) {
3456
+ return this.getSlideIndex(this.slides.filter((slideEl) => slideEl.getAttribute("data-swiper-slide-index") * 1 === index)[0]);
3457
+ }
3458
+ recalcSlides() {
3459
+ const swiper = this;
3460
+ const {
3461
+ slidesEl,
3462
+ params
3463
+ } = swiper;
3464
+ swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
3465
+ }
3466
+ enable() {
3467
+ const swiper = this;
3468
+ if (swiper.enabled) return;
3469
+ swiper.enabled = true;
3470
+ if (swiper.params.grabCursor) {
3471
+ swiper.setGrabCursor();
3472
+ }
3473
+ swiper.emit("enable");
3474
+ }
3475
+ disable() {
3476
+ const swiper = this;
3477
+ if (!swiper.enabled) return;
3478
+ swiper.enabled = false;
3479
+ if (swiper.params.grabCursor) {
3480
+ swiper.unsetGrabCursor();
3481
+ }
3482
+ swiper.emit("disable");
3483
+ }
3484
+ setProgress(progress, speed) {
3485
+ const swiper = this;
3486
+ progress = Math.min(Math.max(progress, 0), 1);
3487
+ const min = swiper.minTranslate();
3488
+ const max = swiper.maxTranslate();
3489
+ const current = (max - min) * progress + min;
3490
+ swiper.translateTo(current, typeof speed === "undefined" ? 0 : speed);
3491
+ swiper.updateActiveIndex();
3492
+ swiper.updateSlidesClasses();
3493
+ }
3494
+ emitContainerClasses() {
3495
+ const swiper = this;
3496
+ if (!swiper.params._emitClasses || !swiper.el) return;
3497
+ const cls = swiper.el.className.split(" ").filter((className) => {
3498
+ return className.indexOf("swiper") === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;
3499
+ });
3500
+ swiper.emit("_containerClasses", cls.join(" "));
3501
+ }
3502
+ getSlideClasses(slideEl) {
3503
+ const swiper = this;
3504
+ if (swiper.destroyed) return "";
3505
+ return slideEl.className.split(" ").filter((className) => {
3506
+ return className.indexOf("swiper-slide") === 0 || className.indexOf(swiper.params.slideClass) === 0;
3507
+ }).join(" ");
3508
+ }
3509
+ emitSlidesClasses() {
3510
+ const swiper = this;
3511
+ if (!swiper.params._emitClasses || !swiper.el) return;
3512
+ const updates = [];
3513
+ swiper.slides.forEach((slideEl) => {
3514
+ const classNames = swiper.getSlideClasses(slideEl);
3515
+ updates.push({
3516
+ slideEl,
3517
+ classNames
3518
+ });
3519
+ swiper.emit("_slideClass", slideEl, classNames);
3520
+ });
3521
+ swiper.emit("_slideClasses", updates);
3522
+ }
3523
+ slidesPerViewDynamic(view, exact) {
3524
+ if (view === void 0) {
3525
+ view = "current";
3526
+ }
3527
+ if (exact === void 0) {
3528
+ exact = false;
3529
+ }
3530
+ const swiper = this;
3531
+ const {
3532
+ params,
3533
+ slides,
3534
+ slidesGrid,
3535
+ slidesSizesGrid,
3536
+ size: swiperSize,
3537
+ activeIndex
3538
+ } = swiper;
3539
+ let spv = 1;
3540
+ if (typeof params.slidesPerView === "number") return params.slidesPerView;
3541
+ if (params.centeredSlides) {
3542
+ let slideSize = slides[activeIndex] ? slides[activeIndex].swiperSlideSize : 0;
3543
+ let breakLoop;
3544
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
3545
+ if (slides[i] && !breakLoop) {
3546
+ slideSize += slides[i].swiperSlideSize;
3547
+ spv += 1;
3548
+ if (slideSize > swiperSize) breakLoop = true;
3549
+ }
3550
+ }
3551
+ for (let i = activeIndex - 1; i >= 0; i -= 1) {
3552
+ if (slides[i] && !breakLoop) {
3553
+ slideSize += slides[i].swiperSlideSize;
3554
+ spv += 1;
3555
+ if (slideSize > swiperSize) breakLoop = true;
3556
+ }
3557
+ }
3558
+ } else {
3559
+ if (view === "current") {
3560
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
3561
+ const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;
3562
+ if (slideInView) {
3563
+ spv += 1;
3564
+ }
3565
+ }
3566
+ } else {
3567
+ for (let i = activeIndex - 1; i >= 0; i -= 1) {
3568
+ const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;
3569
+ if (slideInView) {
3570
+ spv += 1;
3571
+ }
3572
+ }
3573
+ }
3574
+ }
3575
+ return spv;
3576
+ }
3577
+ update() {
3578
+ const swiper = this;
3579
+ if (!swiper || swiper.destroyed) return;
3580
+ const {
3581
+ snapGrid,
3582
+ params
3583
+ } = swiper;
3584
+ if (params.breakpoints) {
3585
+ swiper.setBreakpoint();
3586
+ }
3587
+ [...swiper.el.querySelectorAll('[loading="lazy"]')].forEach((imageEl) => {
3588
+ if (imageEl.complete) {
3589
+ processLazyPreloader(swiper, imageEl);
3590
+ }
3591
+ });
3592
+ swiper.updateSize();
3593
+ swiper.updateSlides();
3594
+ swiper.updateProgress();
3595
+ swiper.updateSlidesClasses();
3596
+ function setTranslate2() {
3597
+ const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
3598
+ const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
3599
+ swiper.setTranslate(newTranslate);
3600
+ swiper.updateActiveIndex();
3601
+ swiper.updateSlidesClasses();
3602
+ }
3603
+ let translated;
3604
+ if (params.freeMode && params.freeMode.enabled && !params.cssMode) {
3605
+ setTranslate2();
3606
+ if (params.autoHeight) {
3607
+ swiper.updateAutoHeight();
3608
+ }
3609
+ } else {
3610
+ if ((params.slidesPerView === "auto" || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {
3611
+ const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;
3612
+ translated = swiper.slideTo(slides.length - 1, 0, false, true);
3613
+ } else {
3614
+ translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
3615
+ }
3616
+ if (!translated) {
3617
+ setTranslate2();
3618
+ }
3619
+ }
3620
+ if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
3621
+ swiper.checkOverflow();
3622
+ }
3623
+ swiper.emit("update");
3624
+ }
3625
+ changeDirection(newDirection, needUpdate) {
3626
+ if (needUpdate === void 0) {
3627
+ needUpdate = true;
3628
+ }
3629
+ const swiper = this;
3630
+ const currentDirection = swiper.params.direction;
3631
+ if (!newDirection) {
3632
+ newDirection = currentDirection === "horizontal" ? "vertical" : "horizontal";
3633
+ }
3634
+ if (newDirection === currentDirection || newDirection !== "horizontal" && newDirection !== "vertical") {
3635
+ return swiper;
3636
+ }
3637
+ swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);
3638
+ swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);
3639
+ swiper.emitContainerClasses();
3640
+ swiper.params.direction = newDirection;
3641
+ swiper.slides.forEach((slideEl) => {
3642
+ if (newDirection === "vertical") {
3643
+ slideEl.style.width = "";
3644
+ } else {
3645
+ slideEl.style.height = "";
3646
+ }
3647
+ });
3648
+ swiper.emit("changeDirection");
3649
+ if (needUpdate) swiper.update();
3650
+ return swiper;
3651
+ }
3652
+ changeLanguageDirection(direction) {
3653
+ const swiper = this;
3654
+ if (swiper.rtl && direction === "rtl" || !swiper.rtl && direction === "ltr") return;
3655
+ swiper.rtl = direction === "rtl";
3656
+ swiper.rtlTranslate = swiper.params.direction === "horizontal" && swiper.rtl;
3657
+ if (swiper.rtl) {
3658
+ swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);
3659
+ swiper.el.dir = "rtl";
3660
+ } else {
3661
+ swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);
3662
+ swiper.el.dir = "ltr";
3663
+ }
3664
+ swiper.update();
3665
+ }
3666
+ mount(element) {
3667
+ const swiper = this;
3668
+ if (swiper.mounted) return true;
3669
+ let el = element || swiper.params.el;
3670
+ if (typeof el === "string") {
3671
+ el = document.querySelector(el);
3672
+ }
3673
+ if (!el) {
3674
+ return false;
3675
+ }
3676
+ el.swiper = swiper;
3677
+ if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === "SWIPER-CONTAINER") {
3678
+ swiper.isElement = true;
3679
+ }
3680
+ const getWrapperSelector = () => {
3681
+ return `.${(swiper.params.wrapperClass || "").trim().split(" ").join(".")}`;
3682
+ };
3683
+ const getWrapper = () => {
3684
+ if (el && el.shadowRoot && el.shadowRoot.querySelector) {
3685
+ const res = el.shadowRoot.querySelector(getWrapperSelector());
3686
+ return res;
3687
+ }
3688
+ return elementChildren(el, getWrapperSelector())[0];
3689
+ };
3690
+ let wrapperEl = getWrapper();
3691
+ if (!wrapperEl && swiper.params.createElements) {
3692
+ wrapperEl = createElement("div", swiper.params.wrapperClass);
3693
+ el.append(wrapperEl);
3694
+ elementChildren(el, `.${swiper.params.slideClass}`).forEach((slideEl) => {
3695
+ wrapperEl.append(slideEl);
3696
+ });
3697
+ }
3698
+ Object.assign(swiper, {
3699
+ el,
3700
+ wrapperEl,
3701
+ slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,
3702
+ hostEl: swiper.isElement ? el.parentNode.host : el,
3703
+ mounted: true,
3704
+ // RTL
3705
+ rtl: el.dir.toLowerCase() === "rtl" || elementStyle(el, "direction") === "rtl",
3706
+ rtlTranslate: swiper.params.direction === "horizontal" && (el.dir.toLowerCase() === "rtl" || elementStyle(el, "direction") === "rtl"),
3707
+ wrongRTL: elementStyle(wrapperEl, "display") === "-webkit-box"
3708
+ });
3709
+ return true;
3710
+ }
3711
+ init(el) {
3712
+ const swiper = this;
3713
+ if (swiper.initialized) return swiper;
3714
+ const mounted = swiper.mount(el);
3715
+ if (mounted === false) return swiper;
3716
+ swiper.emit("beforeInit");
3717
+ if (swiper.params.breakpoints) {
3718
+ swiper.setBreakpoint();
3719
+ }
3720
+ swiper.addClasses();
3721
+ swiper.updateSize();
3722
+ swiper.updateSlides();
3723
+ if (swiper.params.watchOverflow) {
3724
+ swiper.checkOverflow();
3725
+ }
3726
+ if (swiper.params.grabCursor && swiper.enabled) {
3727
+ swiper.setGrabCursor();
3728
+ }
3729
+ if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
3730
+ swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);
3731
+ } else {
3732
+ swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);
3733
+ }
3734
+ if (swiper.params.loop) {
3735
+ swiper.loopCreate();
3736
+ }
3737
+ swiper.attachEvents();
3738
+ const lazyElements = [...swiper.el.querySelectorAll('[loading="lazy"]')];
3739
+ if (swiper.isElement) {
3740
+ lazyElements.push(...swiper.hostEl.querySelectorAll('[loading="lazy"]'));
3741
+ }
3742
+ lazyElements.forEach((imageEl) => {
3743
+ if (imageEl.complete) {
3744
+ processLazyPreloader(swiper, imageEl);
3745
+ } else {
3746
+ imageEl.addEventListener("load", (e) => {
3747
+ processLazyPreloader(swiper, e.target);
3748
+ });
3749
+ }
3750
+ });
3751
+ preload(swiper);
3752
+ swiper.initialized = true;
3753
+ preload(swiper);
3754
+ swiper.emit("init");
3755
+ swiper.emit("afterInit");
3756
+ return swiper;
3757
+ }
3758
+ destroy(deleteInstance, cleanStyles) {
3759
+ if (deleteInstance === void 0) {
3760
+ deleteInstance = true;
3761
+ }
3762
+ if (cleanStyles === void 0) {
3763
+ cleanStyles = true;
3764
+ }
3765
+ const swiper = this;
3766
+ const {
3767
+ params,
3768
+ el,
3769
+ wrapperEl,
3770
+ slides
3771
+ } = swiper;
3772
+ if (typeof swiper.params === "undefined" || swiper.destroyed) {
3773
+ return null;
3774
+ }
3775
+ swiper.emit("beforeDestroy");
3776
+ swiper.initialized = false;
3777
+ swiper.detachEvents();
3778
+ if (params.loop) {
3779
+ swiper.loopDestroy();
3780
+ }
3781
+ if (cleanStyles) {
3782
+ swiper.removeClasses();
3783
+ el.removeAttribute("style");
3784
+ wrapperEl.removeAttribute("style");
3785
+ if (slides && slides.length) {
3786
+ slides.forEach((slideEl) => {
3787
+ slideEl.classList.remove(params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
3788
+ slideEl.removeAttribute("style");
3789
+ slideEl.removeAttribute("data-swiper-slide-index");
3790
+ });
3791
+ }
3792
+ }
3793
+ swiper.emit("destroy");
3794
+ Object.keys(swiper.eventsListeners).forEach((eventName) => {
3795
+ swiper.off(eventName);
3796
+ });
3797
+ if (deleteInstance !== false) {
3798
+ swiper.el.swiper = null;
3799
+ deleteProps(swiper);
3800
+ }
3801
+ swiper.destroyed = true;
3802
+ return null;
3803
+ }
3804
+ static extendDefaults(newDefaults) {
3805
+ extend2(extendedDefaults, newDefaults);
3806
+ }
3807
+ static get extendedDefaults() {
3808
+ return extendedDefaults;
3809
+ }
3810
+ static get defaults() {
3811
+ return defaults;
3812
+ }
3813
+ static installModule(mod) {
3814
+ if (!_Swiper.prototype.__modules__) _Swiper.prototype.__modules__ = [];
3815
+ const modules = _Swiper.prototype.__modules__;
3816
+ if (typeof mod === "function" && modules.indexOf(mod) < 0) {
3817
+ modules.push(mod);
3818
+ }
3819
+ }
3820
+ static use(module2) {
3821
+ if (Array.isArray(module2)) {
3822
+ module2.forEach((m) => _Swiper.installModule(m));
3823
+ return _Swiper;
3824
+ }
3825
+ _Swiper.installModule(module2);
3826
+ return _Swiper;
3827
+ }
3828
+ };
3829
+ Object.keys(prototypes).forEach((prototypeGroup) => {
3830
+ Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
3831
+ Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
3832
+ });
3833
+ });
3834
+ Swiper.use([Resize, Observer]);
3835
+
3836
+ // node_modules/swiper/shared/update-swiper.mjs
3837
+ var paramsList = [
3838
+ "eventsPrefix",
3839
+ "injectStyles",
3840
+ "injectStylesUrls",
3841
+ "modules",
3842
+ "init",
3843
+ "_direction",
3844
+ "oneWayMovement",
3845
+ "touchEventsTarget",
3846
+ "initialSlide",
3847
+ "_speed",
3848
+ "cssMode",
3849
+ "updateOnWindowResize",
3850
+ "resizeObserver",
3851
+ "nested",
3852
+ "focusableElements",
3853
+ "_enabled",
3854
+ "_width",
3855
+ "_height",
3856
+ "preventInteractionOnTransition",
3857
+ "userAgent",
3858
+ "url",
3859
+ "_edgeSwipeDetection",
3860
+ "_edgeSwipeThreshold",
3861
+ "_freeMode",
3862
+ "_autoHeight",
3863
+ "setWrapperSize",
3864
+ "virtualTranslate",
3865
+ "_effect",
3866
+ "breakpoints",
3867
+ "breakpointsBase",
3868
+ "_spaceBetween",
3869
+ "_slidesPerView",
3870
+ "maxBackfaceHiddenSlides",
3871
+ "_grid",
3872
+ "_slidesPerGroup",
3873
+ "_slidesPerGroupSkip",
3874
+ "_slidesPerGroupAuto",
3875
+ "_centeredSlides",
3876
+ "_centeredSlidesBounds",
3877
+ "_slidesOffsetBefore",
3878
+ "_slidesOffsetAfter",
3879
+ "normalizeSlideIndex",
3880
+ "_centerInsufficientSlides",
3881
+ "_watchOverflow",
3882
+ "roundLengths",
3883
+ "touchRatio",
3884
+ "touchAngle",
3885
+ "simulateTouch",
3886
+ "_shortSwipes",
3887
+ "_longSwipes",
3888
+ "longSwipesRatio",
3889
+ "longSwipesMs",
3890
+ "_followFinger",
3891
+ "allowTouchMove",
3892
+ "_threshold",
3893
+ "touchMoveStopPropagation",
3894
+ "touchStartPreventDefault",
3895
+ "touchStartForcePreventDefault",
3896
+ "touchReleaseOnEdges",
3897
+ "uniqueNavElements",
3898
+ "_resistance",
3899
+ "_resistanceRatio",
3900
+ "_watchSlidesProgress",
3901
+ "_grabCursor",
3902
+ "preventClicks",
3903
+ "preventClicksPropagation",
3904
+ "_slideToClickedSlide",
3905
+ "_loop",
3906
+ "loopedSlides",
3907
+ "loopPreventsSliding",
3908
+ "_rewind",
3909
+ "_allowSlidePrev",
3910
+ "_allowSlideNext",
3911
+ "_swipeHandler",
3912
+ "_noSwiping",
3913
+ "noSwipingClass",
3914
+ "noSwipingSelector",
3915
+ "passiveListeners",
3916
+ "containerModifierClass",
3917
+ "slideClass",
3918
+ "slideActiveClass",
3919
+ "slideVisibleClass",
3920
+ "slideNextClass",
3921
+ "slidePrevClass",
3922
+ "wrapperClass",
3923
+ "lazyPreloaderClass",
3924
+ "lazyPreloadPrevNext",
3925
+ "runCallbacksOnInit",
3926
+ "observer",
3927
+ "observeParents",
3928
+ "observeSlideChildren",
3929
+ // modules
3930
+ "a11y",
3931
+ "_autoplay",
3932
+ "_controller",
3933
+ "coverflowEffect",
3934
+ "cubeEffect",
3935
+ "fadeEffect",
3936
+ "flipEffect",
3937
+ "creativeEffect",
3938
+ "cardsEffect",
3939
+ "hashNavigation",
3940
+ "history",
3941
+ "keyboard",
3942
+ "mousewheel",
3943
+ "_navigation",
3944
+ "_pagination",
3945
+ "parallax",
3946
+ "_scrollbar",
3947
+ "_thumbs",
3948
+ "virtual",
3949
+ "zoom",
3950
+ "control"
3951
+ ];
3952
+ function isObject3(o) {
3953
+ return typeof o === "object" && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === "Object" && !o.__swiper__;
3954
+ }
3955
+ function extend3(target, src) {
3956
+ const noExtend = ["__proto__", "constructor", "prototype"];
3957
+ Object.keys(src).filter((key) => noExtend.indexOf(key) < 0).forEach((key) => {
3958
+ if (typeof target[key] === "undefined") target[key] = src[key];
3959
+ else if (isObject3(src[key]) && isObject3(target[key]) && Object.keys(src[key]).length > 0) {
3960
+ if (src[key].__swiper__) target[key] = src[key];
3961
+ else extend3(target[key], src[key]);
3962
+ } else {
3963
+ target[key] = src[key];
3964
+ }
3965
+ });
3966
+ }
3967
+ function needsNavigation(params) {
3968
+ if (params === void 0) {
3969
+ params = {};
3970
+ }
3971
+ return params.navigation && typeof params.navigation.nextEl === "undefined" && typeof params.navigation.prevEl === "undefined";
3972
+ }
3973
+ function needsPagination(params) {
3974
+ if (params === void 0) {
3975
+ params = {};
3976
+ }
3977
+ return params.pagination && typeof params.pagination.el === "undefined";
3978
+ }
3979
+ function needsScrollbar(params) {
3980
+ if (params === void 0) {
3981
+ params = {};
3982
+ }
3983
+ return params.scrollbar && typeof params.scrollbar.el === "undefined";
3984
+ }
3985
+ function uniqueClasses(classNames) {
3986
+ if (classNames === void 0) {
3987
+ classNames = "";
3988
+ }
3989
+ const classes2 = classNames.split(" ").map((c) => c.trim()).filter((c) => !!c);
3990
+ const unique = [];
3991
+ classes2.forEach((c) => {
3992
+ if (unique.indexOf(c) < 0) unique.push(c);
3993
+ });
3994
+ return unique.join(" ");
3995
+ }
3996
+ function wrapperClass(className) {
3997
+ if (className === void 0) {
3998
+ className = "";
3999
+ }
4000
+ if (!className) return "swiper-wrapper";
4001
+ if (!className.includes("swiper-wrapper")) return `swiper-wrapper ${className}`;
4002
+ return className;
4003
+ }
4004
+ function updateSwiper(_ref) {
4005
+ let {
4006
+ swiper,
4007
+ slides,
4008
+ passedParams,
4009
+ changedParams,
4010
+ nextEl,
4011
+ prevEl,
4012
+ scrollbarEl,
4013
+ paginationEl
4014
+ } = _ref;
4015
+ const updateParams = changedParams.filter((key) => key !== "children" && key !== "direction" && key !== "wrapperClass");
4016
+ const {
4017
+ params: currentParams,
4018
+ pagination,
4019
+ navigation,
4020
+ scrollbar,
4021
+ virtual,
4022
+ thumbs
4023
+ } = swiper;
4024
+ let needThumbsInit;
4025
+ let needControllerInit;
4026
+ let needPaginationInit;
4027
+ let needScrollbarInit;
4028
+ let needNavigationInit;
4029
+ let loopNeedDestroy;
4030
+ let loopNeedEnable;
4031
+ let loopNeedReloop;
4032
+ if (changedParams.includes("thumbs") && passedParams.thumbs && passedParams.thumbs.swiper && currentParams.thumbs && !currentParams.thumbs.swiper) {
4033
+ needThumbsInit = true;
4034
+ }
4035
+ if (changedParams.includes("controller") && passedParams.controller && passedParams.controller.control && currentParams.controller && !currentParams.controller.control) {
4036
+ needControllerInit = true;
4037
+ }
4038
+ if (changedParams.includes("pagination") && passedParams.pagination && (passedParams.pagination.el || paginationEl) && (currentParams.pagination || currentParams.pagination === false) && pagination && !pagination.el) {
4039
+ needPaginationInit = true;
4040
+ }
4041
+ if (changedParams.includes("scrollbar") && passedParams.scrollbar && (passedParams.scrollbar.el || scrollbarEl) && (currentParams.scrollbar || currentParams.scrollbar === false) && scrollbar && !scrollbar.el) {
4042
+ needScrollbarInit = true;
4043
+ }
4044
+ if (changedParams.includes("navigation") && passedParams.navigation && (passedParams.navigation.prevEl || prevEl) && (passedParams.navigation.nextEl || nextEl) && (currentParams.navigation || currentParams.navigation === false) && navigation && !navigation.prevEl && !navigation.nextEl) {
4045
+ needNavigationInit = true;
4046
+ }
4047
+ const destroyModule = (mod) => {
4048
+ if (!swiper[mod]) return;
4049
+ swiper[mod].destroy();
4050
+ if (mod === "navigation") {
4051
+ if (swiper.isElement) {
4052
+ swiper[mod].prevEl.remove();
4053
+ swiper[mod].nextEl.remove();
4054
+ }
4055
+ currentParams[mod].prevEl = void 0;
4056
+ currentParams[mod].nextEl = void 0;
4057
+ swiper[mod].prevEl = void 0;
4058
+ swiper[mod].nextEl = void 0;
4059
+ } else {
4060
+ if (swiper.isElement) {
4061
+ swiper[mod].el.remove();
4062
+ }
4063
+ currentParams[mod].el = void 0;
4064
+ swiper[mod].el = void 0;
4065
+ }
4066
+ };
4067
+ if (changedParams.includes("loop") && swiper.isElement) {
4068
+ if (currentParams.loop && !passedParams.loop) {
4069
+ loopNeedDestroy = true;
4070
+ } else if (!currentParams.loop && passedParams.loop) {
4071
+ loopNeedEnable = true;
4072
+ } else {
4073
+ loopNeedReloop = true;
4074
+ }
4075
+ }
4076
+ updateParams.forEach((key) => {
4077
+ if (isObject3(currentParams[key]) && isObject3(passedParams[key])) {
4078
+ extend3(currentParams[key], passedParams[key]);
4079
+ if ((key === "navigation" || key === "pagination" || key === "scrollbar") && "enabled" in passedParams[key] && !passedParams[key].enabled) {
4080
+ destroyModule(key);
4081
+ }
4082
+ } else {
4083
+ const newValue = passedParams[key];
4084
+ if ((newValue === true || newValue === false) && (key === "navigation" || key === "pagination" || key === "scrollbar")) {
4085
+ if (newValue === false) {
4086
+ destroyModule(key);
4087
+ }
4088
+ } else {
4089
+ currentParams[key] = passedParams[key];
4090
+ }
4091
+ }
4092
+ });
4093
+ if (updateParams.includes("controller") && !needControllerInit && swiper.controller && swiper.controller.control && currentParams.controller && currentParams.controller.control) {
4094
+ swiper.controller.control = currentParams.controller.control;
4095
+ }
4096
+ if (changedParams.includes("children") && slides && virtual && currentParams.virtual.enabled) {
4097
+ virtual.slides = slides;
4098
+ virtual.update(true);
4099
+ }
4100
+ if (changedParams.includes("children") && slides && currentParams.loop) {
4101
+ loopNeedReloop = true;
4102
+ }
4103
+ if (needThumbsInit) {
4104
+ const initialized = thumbs.init();
4105
+ if (initialized) thumbs.update(true);
4106
+ }
4107
+ if (needControllerInit) {
4108
+ swiper.controller.control = currentParams.controller.control;
4109
+ }
4110
+ if (needPaginationInit) {
4111
+ if (swiper.isElement && (!paginationEl || typeof paginationEl === "string")) {
4112
+ paginationEl = document.createElement("div");
4113
+ paginationEl.classList.add("swiper-pagination");
4114
+ paginationEl.part.add("pagination");
4115
+ swiper.el.appendChild(paginationEl);
4116
+ }
4117
+ if (paginationEl) currentParams.pagination.el = paginationEl;
4118
+ pagination.init();
4119
+ pagination.render();
4120
+ pagination.update();
4121
+ }
4122
+ if (needScrollbarInit) {
4123
+ if (swiper.isElement && (!scrollbarEl || typeof scrollbarEl === "string")) {
4124
+ scrollbarEl = document.createElement("div");
4125
+ scrollbarEl.classList.add("swiper-scrollbar");
4126
+ scrollbarEl.part.add("scrollbar");
4127
+ swiper.el.appendChild(scrollbarEl);
4128
+ }
4129
+ if (scrollbarEl) currentParams.scrollbar.el = scrollbarEl;
4130
+ scrollbar.init();
4131
+ scrollbar.updateSize();
4132
+ scrollbar.setTranslate();
4133
+ }
4134
+ if (needNavigationInit) {
4135
+ if (swiper.isElement) {
4136
+ if (!nextEl || typeof nextEl === "string") {
4137
+ nextEl = document.createElement("div");
4138
+ nextEl.classList.add("swiper-button-next");
4139
+ nextEl.innerHTML = swiper.hostEl.constructor.nextButtonSvg;
4140
+ nextEl.part.add("button-next");
4141
+ swiper.el.appendChild(nextEl);
4142
+ }
4143
+ if (!prevEl || typeof prevEl === "string") {
4144
+ prevEl = document.createElement("div");
4145
+ prevEl.classList.add("swiper-button-prev");
4146
+ prevEl.innerHTML = swiper.hostEl.constructor.prevButtonSvg;
4147
+ prevEl.part.add("button-prev");
4148
+ swiper.el.appendChild(prevEl);
4149
+ }
4150
+ }
4151
+ if (nextEl) currentParams.navigation.nextEl = nextEl;
4152
+ if (prevEl) currentParams.navigation.prevEl = prevEl;
4153
+ navigation.init();
4154
+ navigation.update();
4155
+ }
4156
+ if (changedParams.includes("allowSlideNext")) {
4157
+ swiper.allowSlideNext = passedParams.allowSlideNext;
4158
+ }
4159
+ if (changedParams.includes("allowSlidePrev")) {
4160
+ swiper.allowSlidePrev = passedParams.allowSlidePrev;
4161
+ }
4162
+ if (changedParams.includes("direction")) {
4163
+ swiper.changeDirection(passedParams.direction, false);
4164
+ }
4165
+ if (loopNeedDestroy || loopNeedReloop) {
4166
+ swiper.loopDestroy();
4167
+ }
4168
+ if (loopNeedEnable || loopNeedReloop) {
4169
+ swiper.loopCreate();
4170
+ }
4171
+ swiper.update();
4172
+ }
4173
+
4174
+ // node_modules/swiper/shared/update-on-virtual-data.mjs
4175
+ function getParams(obj, splitEvents) {
4176
+ if (obj === void 0) {
4177
+ obj = {};
4178
+ }
4179
+ if (splitEvents === void 0) {
4180
+ splitEvents = true;
4181
+ }
4182
+ const params = {
4183
+ on: {}
4184
+ };
4185
+ const events2 = {};
4186
+ const passedParams = {};
4187
+ extend3(params, defaults);
4188
+ params._emitClasses = true;
4189
+ params.init = false;
4190
+ const rest = {};
4191
+ const allowedParams = paramsList.map((key) => key.replace(/_/, ""));
4192
+ const plainObj = Object.assign({}, obj);
4193
+ Object.keys(plainObj).forEach((key) => {
4194
+ if (typeof obj[key] === "undefined") return;
4195
+ if (allowedParams.indexOf(key) >= 0) {
4196
+ if (isObject3(obj[key])) {
4197
+ params[key] = {};
4198
+ passedParams[key] = {};
4199
+ extend3(params[key], obj[key]);
4200
+ extend3(passedParams[key], obj[key]);
4201
+ } else {
4202
+ params[key] = obj[key];
4203
+ passedParams[key] = obj[key];
4204
+ }
4205
+ } else if (key.search(/on[A-Z]/) === 0 && typeof obj[key] === "function") {
4206
+ if (splitEvents) {
4207
+ events2[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];
4208
+ } else {
4209
+ params.on[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];
4210
+ }
4211
+ } else {
4212
+ rest[key] = obj[key];
4213
+ }
4214
+ });
4215
+ ["navigation", "pagination", "scrollbar"].forEach((key) => {
4216
+ if (params[key] === true) params[key] = {};
4217
+ if (params[key] === false) delete params[key];
4218
+ });
4219
+ return {
4220
+ params,
4221
+ passedParams,
4222
+ rest,
4223
+ events: events2
4224
+ };
4225
+ }
4226
+ function mountSwiper(_ref, swiperParams) {
4227
+ let {
4228
+ el,
4229
+ nextEl,
4230
+ prevEl,
4231
+ paginationEl,
4232
+ scrollbarEl,
4233
+ swiper
4234
+ } = _ref;
4235
+ if (needsNavigation(swiperParams) && nextEl && prevEl) {
4236
+ swiper.params.navigation.nextEl = nextEl;
4237
+ swiper.originalParams.navigation.nextEl = nextEl;
4238
+ swiper.params.navigation.prevEl = prevEl;
4239
+ swiper.originalParams.navigation.prevEl = prevEl;
4240
+ }
4241
+ if (needsPagination(swiperParams) && paginationEl) {
4242
+ swiper.params.pagination.el = paginationEl;
4243
+ swiper.originalParams.pagination.el = paginationEl;
4244
+ }
4245
+ if (needsScrollbar(swiperParams) && scrollbarEl) {
4246
+ swiper.params.scrollbar.el = scrollbarEl;
4247
+ swiper.originalParams.scrollbar.el = scrollbarEl;
4248
+ }
4249
+ swiper.init(el);
4250
+ }
4251
+ function getChangedParams(swiperParams, oldParams, children, oldChildren, getKey) {
4252
+ const keys = [];
4253
+ if (!oldParams) return keys;
4254
+ const addKey = (key) => {
4255
+ if (keys.indexOf(key) < 0) keys.push(key);
4256
+ };
4257
+ if (children && oldChildren) {
4258
+ const oldChildrenKeys = oldChildren.map(getKey);
4259
+ const childrenKeys = children.map(getKey);
4260
+ if (oldChildrenKeys.join("") !== childrenKeys.join("")) addKey("children");
4261
+ if (oldChildren.length !== children.length) addKey("children");
4262
+ }
4263
+ const watchParams = paramsList.filter((key) => key[0] === "_").map((key) => key.replace(/_/, ""));
4264
+ watchParams.forEach((key) => {
4265
+ if (key in swiperParams && key in oldParams) {
4266
+ if (isObject3(swiperParams[key]) && isObject3(oldParams[key])) {
4267
+ const newKeys = Object.keys(swiperParams[key]);
4268
+ const oldKeys = Object.keys(oldParams[key]);
4269
+ if (newKeys.length !== oldKeys.length) {
4270
+ addKey(key);
4271
+ } else {
4272
+ newKeys.forEach((newKey) => {
4273
+ if (swiperParams[key][newKey] !== oldParams[key][newKey]) {
4274
+ addKey(key);
4275
+ }
4276
+ });
4277
+ oldKeys.forEach((oldKey) => {
4278
+ if (swiperParams[key][oldKey] !== oldParams[key][oldKey]) addKey(key);
4279
+ });
4280
+ }
4281
+ } else if (swiperParams[key] !== oldParams[key]) {
4282
+ addKey(key);
4283
+ }
4284
+ }
4285
+ });
4286
+ return keys;
4287
+ }
4288
+ var updateOnVirtualData = (swiper) => {
4289
+ if (!swiper || swiper.destroyed || !swiper.params.virtual || swiper.params.virtual && !swiper.params.virtual.enabled) return;
4290
+ swiper.updateSlides();
4291
+ swiper.updateProgress();
4292
+ swiper.updateSlidesClasses();
4293
+ if (swiper.parallax && swiper.params.parallax && swiper.params.parallax.enabled) {
4294
+ swiper.parallax.setTranslate();
4295
+ }
4296
+ };
4297
+
4298
+ // node_modules/swiper/swiper-react.mjs
4299
+ function _extends() {
4300
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
4301
+ for (var i = 1; i < arguments.length; i++) {
4302
+ var source = arguments[i];
4303
+ for (var key in source) {
4304
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
4305
+ target[key] = source[key];
4306
+ }
4307
+ }
4308
+ }
4309
+ return target;
4310
+ };
4311
+ return _extends.apply(this, arguments);
4312
+ }
4313
+ function isChildSwiperSlide(child) {
4314
+ return child.type && child.type.displayName && child.type.displayName.includes("SwiperSlide");
4315
+ }
4316
+ function processChildren(c) {
4317
+ const slides = [];
4318
+ import_react.default.Children.toArray(c).forEach((child) => {
4319
+ if (isChildSwiperSlide(child)) {
4320
+ slides.push(child);
4321
+ } else if (child.props && child.props.children) {
4322
+ processChildren(child.props.children).forEach((slide2) => slides.push(slide2));
4323
+ }
4324
+ });
4325
+ return slides;
4326
+ }
4327
+ function getChildren(c) {
4328
+ const slides = [];
4329
+ const slots = {
4330
+ "container-start": [],
4331
+ "container-end": [],
4332
+ "wrapper-start": [],
4333
+ "wrapper-end": []
4334
+ };
4335
+ import_react.default.Children.toArray(c).forEach((child) => {
4336
+ if (isChildSwiperSlide(child)) {
4337
+ slides.push(child);
4338
+ } else if (child.props && child.props.slot && slots[child.props.slot]) {
4339
+ slots[child.props.slot].push(child);
4340
+ } else if (child.props && child.props.children) {
4341
+ const foundSlides = processChildren(child.props.children);
4342
+ if (foundSlides.length > 0) {
4343
+ foundSlides.forEach((slide2) => slides.push(slide2));
4344
+ } else {
4345
+ slots["container-end"].push(child);
4346
+ }
4347
+ } else {
4348
+ slots["container-end"].push(child);
4349
+ }
4350
+ });
4351
+ return {
4352
+ slides,
4353
+ slots
4354
+ };
4355
+ }
4356
+ function renderVirtual(swiper, slides, virtualData) {
4357
+ if (!virtualData) return null;
4358
+ const getSlideIndex = (index) => {
4359
+ let slideIndex = index;
4360
+ if (index < 0) {
4361
+ slideIndex = slides.length + index;
4362
+ } else if (slideIndex >= slides.length) {
4363
+ slideIndex = slideIndex - slides.length;
4364
+ }
4365
+ return slideIndex;
4366
+ };
4367
+ const style = swiper.isHorizontal() ? {
4368
+ [swiper.rtlTranslate ? "right" : "left"]: `${virtualData.offset}px`
4369
+ } : {
4370
+ top: `${virtualData.offset}px`
4371
+ };
4372
+ const {
4373
+ from,
4374
+ to
4375
+ } = virtualData;
4376
+ const loopFrom = swiper.params.loop ? -slides.length : 0;
4377
+ const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;
4378
+ const slidesToRender = [];
4379
+ for (let i = loopFrom; i < loopTo; i += 1) {
4380
+ if (i >= from && i <= to) {
4381
+ slidesToRender.push(slides[getSlideIndex(i)]);
4382
+ }
4383
+ }
4384
+ return slidesToRender.map((child, index) => {
4385
+ return /* @__PURE__ */ import_react.default.cloneElement(child, {
4386
+ swiper,
4387
+ style,
4388
+ key: `slide-${index}`
4389
+ });
4390
+ });
4391
+ }
4392
+ function useIsomorphicLayoutEffect(callback, deps) {
4393
+ if (typeof window === "undefined") return (0, import_react.useEffect)(callback, deps);
4394
+ return (0, import_react.useLayoutEffect)(callback, deps);
4395
+ }
4396
+ var SwiperSlideContext = /* @__PURE__ */ (0, import_react.createContext)(null);
4397
+ var useSwiperSlide = () => {
4398
+ return (0, import_react.useContext)(SwiperSlideContext);
4399
+ };
4400
+ var SwiperContext = /* @__PURE__ */ (0, import_react.createContext)(null);
4401
+ var useSwiper = () => {
4402
+ return (0, import_react.useContext)(SwiperContext);
4403
+ };
4404
+ var Swiper2 = /* @__PURE__ */ (0, import_react.forwardRef)(function(_temp, externalElRef) {
4405
+ let {
4406
+ className,
4407
+ tag: Tag = "div",
4408
+ wrapperTag: WrapperTag = "div",
4409
+ children,
4410
+ onSwiper,
4411
+ ...rest
4412
+ } = _temp === void 0 ? {} : _temp;
4413
+ let eventsAssigned = false;
4414
+ const [containerClasses, setContainerClasses] = (0, import_react.useState)("swiper");
4415
+ const [virtualData, setVirtualData] = (0, import_react.useState)(null);
4416
+ const [breakpointChanged, setBreakpointChanged] = (0, import_react.useState)(false);
4417
+ const initializedRef = (0, import_react.useRef)(false);
4418
+ const swiperElRef = (0, import_react.useRef)(null);
4419
+ const swiperRef = (0, import_react.useRef)(null);
4420
+ const oldPassedParamsRef = (0, import_react.useRef)(null);
4421
+ const oldSlides = (0, import_react.useRef)(null);
4422
+ const nextElRef = (0, import_react.useRef)(null);
4423
+ const prevElRef = (0, import_react.useRef)(null);
4424
+ const paginationElRef = (0, import_react.useRef)(null);
4425
+ const scrollbarElRef = (0, import_react.useRef)(null);
4426
+ const {
4427
+ params: swiperParams,
4428
+ passedParams,
4429
+ rest: restProps,
4430
+ events: events2
4431
+ } = getParams(rest);
4432
+ const {
4433
+ slides,
4434
+ slots
4435
+ } = getChildren(children);
4436
+ const onBeforeBreakpoint = () => {
4437
+ setBreakpointChanged(!breakpointChanged);
4438
+ };
4439
+ Object.assign(swiperParams.on, {
4440
+ _containerClasses(swiper, classes2) {
4441
+ setContainerClasses(classes2);
4442
+ }
4443
+ });
4444
+ const initSwiper = () => {
4445
+ Object.assign(swiperParams.on, events2);
4446
+ eventsAssigned = true;
4447
+ const passParams = {
4448
+ ...swiperParams
4449
+ };
4450
+ delete passParams.wrapperClass;
4451
+ swiperRef.current = new Swiper(passParams);
4452
+ if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {
4453
+ swiperRef.current.virtual.slides = slides;
4454
+ const extendWith = {
4455
+ cache: false,
4456
+ slides,
4457
+ renderExternal: setVirtualData,
4458
+ renderExternalUpdate: false
4459
+ };
4460
+ extend3(swiperRef.current.params.virtual, extendWith);
4461
+ extend3(swiperRef.current.originalParams.virtual, extendWith);
4462
+ }
4463
+ };
4464
+ if (!swiperElRef.current) {
4465
+ initSwiper();
4466
+ }
4467
+ if (swiperRef.current) {
4468
+ swiperRef.current.on("_beforeBreakpoint", onBeforeBreakpoint);
4469
+ }
4470
+ const attachEvents2 = () => {
4471
+ if (eventsAssigned || !events2 || !swiperRef.current) return;
4472
+ Object.keys(events2).forEach((eventName) => {
4473
+ swiperRef.current.on(eventName, events2[eventName]);
4474
+ });
4475
+ };
4476
+ const detachEvents2 = () => {
4477
+ if (!events2 || !swiperRef.current) return;
4478
+ Object.keys(events2).forEach((eventName) => {
4479
+ swiperRef.current.off(eventName, events2[eventName]);
4480
+ });
4481
+ };
4482
+ (0, import_react.useEffect)(() => {
4483
+ return () => {
4484
+ if (swiperRef.current) swiperRef.current.off("_beforeBreakpoint", onBeforeBreakpoint);
4485
+ };
4486
+ });
4487
+ (0, import_react.useEffect)(() => {
4488
+ if (!initializedRef.current && swiperRef.current) {
4489
+ swiperRef.current.emitSlidesClasses();
4490
+ initializedRef.current = true;
4491
+ }
4492
+ });
4493
+ useIsomorphicLayoutEffect(() => {
4494
+ if (externalElRef) {
4495
+ externalElRef.current = swiperElRef.current;
4496
+ }
4497
+ if (!swiperElRef.current) return;
4498
+ if (swiperRef.current.destroyed) {
4499
+ initSwiper();
4500
+ }
4501
+ mountSwiper({
4502
+ el: swiperElRef.current,
4503
+ nextEl: nextElRef.current,
4504
+ prevEl: prevElRef.current,
4505
+ paginationEl: paginationElRef.current,
4506
+ scrollbarEl: scrollbarElRef.current,
4507
+ swiper: swiperRef.current
4508
+ }, swiperParams);
4509
+ if (onSwiper) onSwiper(swiperRef.current);
4510
+ return () => {
4511
+ if (swiperRef.current && !swiperRef.current.destroyed) {
4512
+ swiperRef.current.destroy(true, false);
4513
+ }
4514
+ };
4515
+ }, []);
4516
+ useIsomorphicLayoutEffect(() => {
4517
+ attachEvents2();
4518
+ const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, (c) => c.key);
4519
+ oldPassedParamsRef.current = passedParams;
4520
+ oldSlides.current = slides;
4521
+ if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {
4522
+ updateSwiper({
4523
+ swiper: swiperRef.current,
4524
+ slides,
4525
+ passedParams,
4526
+ changedParams,
4527
+ nextEl: nextElRef.current,
4528
+ prevEl: prevElRef.current,
4529
+ scrollbarEl: scrollbarElRef.current,
4530
+ paginationEl: paginationElRef.current
4531
+ });
4532
+ }
4533
+ return () => {
4534
+ detachEvents2();
4535
+ };
4536
+ });
4537
+ useIsomorphicLayoutEffect(() => {
4538
+ updateOnVirtualData(swiperRef.current);
4539
+ }, [virtualData]);
4540
+ function renderSlides() {
4541
+ if (swiperParams.virtual) {
4542
+ return renderVirtual(swiperRef.current, slides, virtualData);
4543
+ }
4544
+ return slides.map((child, index) => {
4545
+ return /* @__PURE__ */ import_react.default.cloneElement(child, {
4546
+ swiper: swiperRef.current,
4547
+ swiperSlideIndex: index
4548
+ });
4549
+ });
4550
+ }
4551
+ return /* @__PURE__ */ import_react.default.createElement(Tag, _extends({
4552
+ ref: swiperElRef,
4553
+ className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ""}`)
4554
+ }, restProps), /* @__PURE__ */ import_react.default.createElement(SwiperContext.Provider, {
4555
+ value: swiperRef.current
4556
+ }, slots["container-start"], /* @__PURE__ */ import_react.default.createElement(WrapperTag, {
4557
+ className: wrapperClass(swiperParams.wrapperClass)
4558
+ }, slots["wrapper-start"], renderSlides(), slots["wrapper-end"]), needsNavigation(swiperParams) && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", {
4559
+ ref: prevElRef,
4560
+ className: "swiper-button-prev"
4561
+ }), /* @__PURE__ */ import_react.default.createElement("div", {
4562
+ ref: nextElRef,
4563
+ className: "swiper-button-next"
4564
+ })), needsScrollbar(swiperParams) && /* @__PURE__ */ import_react.default.createElement("div", {
4565
+ ref: scrollbarElRef,
4566
+ className: "swiper-scrollbar"
4567
+ }), needsPagination(swiperParams) && /* @__PURE__ */ import_react.default.createElement("div", {
4568
+ ref: paginationElRef,
4569
+ className: "swiper-pagination"
4570
+ }), slots["container-end"]));
4571
+ });
4572
+ Swiper2.displayName = "Swiper";
4573
+ var SwiperSlide = /* @__PURE__ */ (0, import_react.forwardRef)(function(_temp, externalRef) {
4574
+ let {
4575
+ tag: Tag = "div",
4576
+ children,
4577
+ className = "",
4578
+ swiper,
4579
+ zoom,
4580
+ lazy,
4581
+ virtualIndex,
4582
+ swiperSlideIndex,
4583
+ ...rest
4584
+ } = _temp === void 0 ? {} : _temp;
4585
+ const slideElRef = (0, import_react.useRef)(null);
4586
+ const [slideClasses, setSlideClasses] = (0, import_react.useState)("swiper-slide");
4587
+ const [lazyLoaded, setLazyLoaded] = (0, import_react.useState)(false);
4588
+ function updateClasses(_s, el, classNames) {
4589
+ if (el === slideElRef.current) {
4590
+ setSlideClasses(classNames);
4591
+ }
4592
+ }
4593
+ useIsomorphicLayoutEffect(() => {
4594
+ if (typeof swiperSlideIndex !== "undefined") {
4595
+ slideElRef.current.swiperSlideIndex = swiperSlideIndex;
4596
+ }
4597
+ if (externalRef) {
4598
+ externalRef.current = slideElRef.current;
4599
+ }
4600
+ if (!slideElRef.current || !swiper) {
4601
+ return;
4602
+ }
4603
+ if (swiper.destroyed) {
4604
+ if (slideClasses !== "swiper-slide") {
4605
+ setSlideClasses("swiper-slide");
4606
+ }
4607
+ return;
4608
+ }
4609
+ swiper.on("_slideClass", updateClasses);
4610
+ return () => {
4611
+ if (!swiper) return;
4612
+ swiper.off("_slideClass", updateClasses);
4613
+ };
4614
+ });
4615
+ useIsomorphicLayoutEffect(() => {
4616
+ if (swiper && slideElRef.current && !swiper.destroyed) {
4617
+ setSlideClasses(swiper.getSlideClasses(slideElRef.current));
4618
+ }
4619
+ }, [swiper]);
4620
+ const slideData = {
4621
+ isActive: slideClasses.indexOf("swiper-slide-active") >= 0,
4622
+ isVisible: slideClasses.indexOf("swiper-slide-visible") >= 0,
4623
+ isPrev: slideClasses.indexOf("swiper-slide-prev") >= 0,
4624
+ isNext: slideClasses.indexOf("swiper-slide-next") >= 0
4625
+ };
4626
+ const renderChildren = () => {
4627
+ return typeof children === "function" ? children(slideData) : children;
4628
+ };
4629
+ const onLoad2 = () => {
4630
+ setLazyLoaded(true);
4631
+ };
4632
+ return /* @__PURE__ */ import_react.default.createElement(Tag, _extends({
4633
+ ref: slideElRef,
4634
+ className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ""}`),
4635
+ "data-swiper-slide-index": virtualIndex,
4636
+ onLoad: onLoad2
4637
+ }, rest), zoom && /* @__PURE__ */ import_react.default.createElement(SwiperSlideContext.Provider, {
4638
+ value: slideData
4639
+ }, /* @__PURE__ */ import_react.default.createElement("div", {
4640
+ className: "swiper-zoom-container",
4641
+ "data-swiper-zoom": typeof zoom === "number" ? zoom : void 0
4642
+ }, renderChildren(), lazy && !lazyLoaded && /* @__PURE__ */ import_react.default.createElement("div", {
4643
+ className: "swiper-lazy-preloader"
4644
+ }))), !zoom && /* @__PURE__ */ import_react.default.createElement(SwiperSlideContext.Provider, {
4645
+ value: slideData
4646
+ }, renderChildren(), lazy && !lazyLoaded && /* @__PURE__ */ import_react.default.createElement("div", {
4647
+ className: "swiper-lazy-preloader"
4648
+ })));
4649
+ });
4650
+ SwiperSlide.displayName = "SwiperSlide";
4651
+ //# sourceMappingURL=swiper-react.js.map