j1-template 2024.3.15 → 2024.3.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/amplitude.html +139 -68
  3. data/assets/data/banner.html +1 -1
  4. data/assets/data/cookieconsent.html +1 -1
  5. data/assets/data/docsearch.html +1 -1
  6. data/assets/data/fab.html +1 -1
  7. data/assets/data/footer.html +1 -1
  8. data/assets/data/galeries.html +1 -1
  9. data/assets/data/gallery_customizer.html +1 -1
  10. data/assets/data/gemini-ui.html +1 -1
  11. data/assets/data/iframes.html +1 -1
  12. data/assets/data/masonry.html +1 -1
  13. data/assets/data/masterslider.html +1 -1
  14. data/assets/data/menu.html +1 -1
  15. data/assets/data/mmenu.html +1 -1
  16. data/assets/data/mmenu_sidebar.html +1 -1
  17. data/assets/data/mmenu_toc.html +1 -1
  18. data/assets/data/panel.html +5 -4
  19. data/assets/data/quicklinks.html +1 -1
  20. data/assets/data/rtext_resizer.html +1 -1
  21. data/assets/data/slick.html +1 -1
  22. data/assets/data/speak2me.html +1 -1
  23. data/assets/data/swiper.html +313 -0
  24. data/assets/theme/j1/adapter/js/amplitude.30.js +1177 -0
  25. data/assets/theme/j1/adapter/js/amplitude.js +241 -191
  26. data/assets/theme/j1/adapter/js/j1.js +3 -3
  27. data/assets/theme/j1/adapter/js/masonry.js +2 -2
  28. data/assets/theme/j1/adapter/js/masterslider.js +2 -1
  29. data/assets/theme/j1/adapter/js/swiper.js +231 -0
  30. data/assets/theme/j1/adapter/js/videojs.js +212 -0
  31. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +7 -4
  32. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css.map +1 -1
  33. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  34. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css.map +1 -1
  35. data/assets/theme/j1/core/js/template.js +4 -0
  36. data/assets/theme/j1/core/js/template.min.js +2 -2
  37. data/assets/theme/j1/core/js/template.min.js.map +1 -1
  38. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +94 -4
  39. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
  40. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +3 -2
  41. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +1 -1
  42. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +72 -10
  43. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +2 -1
  44. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/artist.svg +78 -0
  45. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/mute.svg +52 -20
  46. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/next.svg +20 -39
  47. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/now-playing.svg +24 -38
  48. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-hide.svg +85 -0
  49. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-music.svg +85 -0
  50. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-show.svg +85 -0
  51. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist.svg +85 -0
  52. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/previous.svg +18 -37
  53. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-backward.svg +33 -30
  54. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-forward.svg +33 -29
  55. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/next.svg +55 -14
  56. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/previous.svg +56 -14
  57. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/volume.svg +38 -21
  58. data/assets/theme/j1/modules/amplitudejs/js/amplitude.map +20 -20
  59. data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.15.js +1594 -0
  60. data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +1617 -89
  61. data/assets/theme/j1/modules/amplitudejs/js/visualizations/bar.js +1 -1
  62. data/assets/theme/j1/modules/amplitudejs/js/visualizations/circular-equalizer.js +31 -1
  63. data/assets/theme/j1/modules/amplitudejs/js/visualizations/frequency-analyzer.js +1 -1
  64. data/assets/theme/j1/modules/amplitudejs/js/visualizations/michael-bromley.js +1 -1
  65. data/assets/theme/j1/modules/amplitudejs/js/visualizations/template.js +1 -1
  66. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +206 -122
  67. data/assets/theme/j1/modules/photoswipe/.version_5.4.4 +6 -0
  68. data/assets/theme/j1/modules/photoswipe/LICENSE +21 -0
  69. data/assets/theme/j1/modules/photoswipe/README.md +32 -0
  70. data/assets/theme/j1/modules/photoswipe/css/org/photoswipe-dynamic-caption-plugin.umd.min.js +5 -0
  71. data/assets/theme/j1/modules/photoswipe/css/org/photoswipe.css +420 -0
  72. data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.css +67 -0
  73. data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.min.css +16 -0
  74. data/assets/theme/j1/modules/photoswipe/css/photoswipe.css +376 -0
  75. data/assets/theme/j1/modules/photoswipe/css/photoswipe.min.css +17 -0
  76. data/assets/theme/j1/modules/photoswipe/css/scss/photoswipe.scss +427 -0
  77. data/assets/theme/j1/modules/photoswipe/example/photoswipe-caption-plugin.html +237 -0
  78. data/assets/theme/j1/modules/photoswipe/example/test-gallery.html +36 -0
  79. data/assets/theme/j1/modules/photoswipe/js/README.md +43 -0
  80. data/assets/theme/j1/modules/photoswipe/js/photoswipe-caption-plugin.min.js +5 -0
  81. data/assets/theme/j1/modules/photoswipe/js/photoswipe-core.min.js +18 -0
  82. data/assets/theme/j1/modules/photoswipe/js/photoswipe-lightbox.min.js +18 -0
  83. data/assets/theme/j1/modules/swiper/.version_1.2.0 +15 -0
  84. data/assets/theme/j1/modules/swiper/LICENSE +20 -0
  85. data/assets/theme/j1/modules/swiper/README.md +95 -0
  86. data/assets/theme/j1/modules/swiper/css/swiper-bundle.css +740 -0
  87. data/assets/theme/j1/modules/swiper/css/swiper-bundle.min..css +17 -0
  88. data/assets/theme/j1/modules/swiper/css/theme/uno.css +249 -0
  89. data/assets/theme/j1/modules/swiper/css/theme/uno.min.css +154 -0
  90. data/assets/theme/j1/modules/swiper/js/swiper-bundle.js +9785 -0
  91. data/assets/theme/j1/modules/swiper/js/swiper-bundle.min.js +17 -0
  92. data/assets/theme/j1/modules/swiper/swiperjs.com-demos.url +2 -0
  93. data/assets/theme/j1/modules/videojs/assets/icons/custom-icons/next.svg +82 -0
  94. data/assets/theme/j1/modules/videojs/css/font/README.md +151 -0
  95. data/assets/theme/j1/modules/videojs/css/font/VideoJS.svg +150 -0
  96. data/assets/theme/j1/modules/videojs/css/font/video-js-cdn.css +2012 -0
  97. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +32 -0
  98. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +31 -0
  99. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.css +31 -0
  100. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.min.css +21 -0
  101. data/assets/theme/j1/modules/videojs/css/themes/uno.css +14 -3
  102. data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
  103. data/assets/theme/j1/modules/videojs/css/videojs.css +1 -0
  104. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/LICENSE +13 -0
  105. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/README.md +75 -0
  106. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.js +149 -0
  107. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.min.js +21 -0
  108. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/README.md +76 -30
  109. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.js +64 -53
  110. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.min.js +1 -1
  111. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/README.md +133 -0
  112. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.js +137 -0
  113. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.min.js +21 -0
  114. data/assets/theme/j1/modules/videojs/js/plugins/controls/zoom/zoom.js +15 -12
  115. data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.js +43 -16
  116. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/fastfilereaderext.so +0 -0
  117. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/rubyeventmachine.so +0 -0
  118. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/fastfilereaderext.so +0 -0
  119. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/rubyeventmachine.so +0 -0
  120. data/lib/j1/version.rb +1 -1
  121. data/lib/j1_app/j1_auth_manager/config.rb +0 -4
  122. data/lib/starter_web/Gemfile +45 -22
  123. data/lib/starter_web/README.md +5 -5
  124. data/lib/starter_web/_config.yml +4 -6
  125. data/lib/starter_web/_data/modules/amplitude.yml +308 -363
  126. data/lib/starter_web/_data/modules/defaults/amplitude.yml +60 -35
  127. data/lib/starter_web/_data/modules/defaults/gallery.yml +42 -0
  128. data/lib/starter_web/_data/modules/defaults/slick.yml +1 -1
  129. data/lib/starter_web/_data/modules/defaults/swiper.yml +515 -0
  130. data/lib/starter_web/_data/modules/defaults/videojs.yml +107 -0
  131. data/lib/starter_web/_data/modules/gallery.yml +30 -14
  132. data/lib/starter_web/_data/modules/masonry.yml +15 -0
  133. data/lib/starter_web/_data/modules/swiper.yml +227 -0
  134. data/lib/starter_web/_data/modules/videojs.yml +57 -0
  135. data/lib/starter_web/_data/resources.yml +50 -16
  136. data/lib/starter_web/_data/templates/feed.xml +1 -1
  137. data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +1 -0
  138. data/lib/starter_web/_plugins/asciidoctor/amplitude-block.rb +1 -0
  139. data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +4 -1
  140. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +141 -24
  141. data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +4 -1
  142. data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +313 -0
  143. data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +192 -17
  144. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  145. data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/der_unverzichtbare_feind.jpg +0 -0
  146. data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/ein_diener_vieler_herren.jpg +0 -0
  147. data/lib/starter_web/assets/video/poster/youtube/the_piano/the-piano.jpg +0 -0
  148. data/lib/starter_web/package.json +1 -1
  149. data/lib/starter_web/pages/public/_includes/attributes.asciidoc +45 -0
  150. data/lib/starter_web/pages/public/_includes/documents/photoswipe/200_photoswipe_parameters.asciidoc +510 -0
  151. data/lib/starter_web/pages/public/_includes/documents/photoswipe/210_photoswipe_lightbox_parameters.asciidoc +98 -0
  152. data/lib/starter_web/pages/public/_includes/documents/photoswipe/300_caption_plugin_for_photoSwipe.asciidoc +327 -0
  153. data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_features.asciidoc +50 -0
  154. data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_html_layout.asciidoc +122 -0
  155. data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_initialization.asciidoc +53 -0
  156. data/lib/starter_web/pages/public/_includes/documents/swiper/110_swiper_common_options.asciidoc +43 -0
  157. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_a_k.asciidoc +994 -0
  158. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_l_o.asciidoc +473 -0
  159. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_p_s.asciidoc +700 -0
  160. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_t_z.asciidoc +413 -0
  161. data/lib/starter_web/pages/public/_includes/documents/swiper/300_swiper_instance_properties.asciidoc +873 -0
  162. data/lib/starter_web/pages/public/_includes/documents/swiper/400_swiper_modules.asciidoc +2514 -0
  163. data/lib/starter_web/pages/public/_includes/documents/swiper/500_swiper_methods.asciidoc +989 -0
  164. data/lib/starter_web/pages/public/_includes/documents/swiper/600_swiper_events.asciidoc +1534 -0
  165. data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +89 -62
  166. data/lib/starter_web/pages/public/manuals/integrations/amplitudejs/amplitudejs-api.adoc +1 -1
  167. data/lib/starter_web/pages/public/manuals/integrations/videojs/youtube-api.adoc +1638 -0
  168. data/lib/starter_web/pages/public/photoswipe_api.adoc +150 -0
  169. data/lib/starter_web/pages/public/swiper_api.adoc +128 -0
  170. data/lib/starter_web/pages/public/swiper_tester.adoc +973 -0
  171. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -6
  172. data/lib/starter_web/pages/public/tools/previewer/preview_videojs.adoc +203 -0
  173. data/lib/starter_web/pages/{tour → public/tour}/modal_extentions.adoc +12 -5
  174. data/lib/starter_web/pages/{tour → public/tour}/play_audio.adoc +63 -15
  175. data/lib/starter_web/pages/{tour → public/tour}/play_video.adoc +79 -40
  176. data/lib/starter_web/pages/{tour → public/tour}/present_images.adoc +5 -5
  177. metadata +114 -41
  178. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_pause.svg +0 -19
  179. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_play.svg +0 -18
  180. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/show-playlist.svg +0 -15
  181. data/assets/theme/j1/modules/jqueryScrollbar/LICENSE +0 -20
  182. data/assets/theme/j1/modules/jqueryScrollbar/README.md +0 -28
  183. data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.css +0 -939
  184. data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.min.css +0 -20
  185. data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.js +0 -851
  186. data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.min.js +0 -36
  187. data/assets/theme/j1/modules/jqueryScrollbar/sass/scrollbar.scss +0 -806
  188. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.0.js +0 -794
  189. /data/lib/starter_web/pages/{tour → public/tour}/_includes/attributes.asciidoc +0 -0
  190. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/100_gistblock.asciidoc +0 -0
  191. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_info.asciidoc +0 -0
  192. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_left_warning.asciidoc +0 -0
  193. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_right_danger.asciidoc +0 -0
  194. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_central_success.asciidoc +0 -0
  195. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_full_height_left_info.asciidoc +0 -0
  196. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_full_height_right_success.asciidoc +0 -0
  197. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_table_bs_modal_examples.asciidoc +0 -0
  198. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_info.asciidoc +0 -0
  199. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_left_info.asciidoc +0 -0
  200. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_right_success.asciidoc +0 -0
  201. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/419_advanced_modals_demo.asciidoc +0 -0
  202. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/tables/bs_modal_examples.asciidoc +0 -0
  203. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/themes_bootstrap.asciidoc +0 -0
  204. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/themes_rouge.asciidoc +0 -0
  205. /data/lib/starter_web/pages/{tour → public/tour}/asciidoc_extensions.adoc +0 -0
  206. /data/lib/starter_web/pages/{tour → public/tour}/bootstrap_themes.adoc +0 -0
  207. /data/lib/starter_web/pages/{tour → public/tour}/highlghter_rouge.adoc +0 -0
  208. /data/lib/starter_web/pages/{tour → public/tour}/icon_fonts.adoc +0 -0
  209. /data/lib/starter_web/pages/{tour → public/tour}/quicksearch.adoc +0 -0
  210. /data/lib/starter_web/pages/{tour → public/tour}/responsive_tables.adoc +0 -0
  211. /data/lib/starter_web/pages/{tour → public/tour}/typography.adoc +0 -0
@@ -21,7 +21,7 @@
21
21
  * Simple visualization that shows the waveforms as a bar graph
22
22
  */
23
23
 
24
- function BarVisualization(){
24
+ function BarVisualization() {
25
25
  /*
26
26
  Define the ID, name, and initialize the container. These are a part
27
27
  of the visualization template and are necessary.
@@ -17,4 +17,34 @@
17
17
  # -----------------------------------------------------------------------------
18
18
  */
19
19
 
20
- function CircularEqualizer(){this.id="circular_equalizer",this.name="Circular Equalizer",this.container="",this.preferences={barWidth:2,barHeight:2,barSpacing:5,barColor:"#ffffff",shadowColor:"#ffffff",shadowBlur:10},this.analyser="",this.frequencyData=[],this.canvas=null,this.canvasCtx=null,this.gradient=null,this.getID=function(){return this.id},this.getName=function(){return this.name},this.setPreferences=function(t){for(var e in this.preferences)null!=t[e]&&(this.preferences[e]=t[e])},this.startVisualization=function(t){this.analyser=Amplitude.getAnalyser(),this.container=t,window.cont=this.container,this.canvas=document.createElement("canvas"),this.canvas.width=this.container.offsetWidth,this.canvas.height=this.container.offsetHeight,this.container.appendChild(this.canvas),this.canvasCtx=this.canvas.getContext("2d"),this.frequencyData=new Uint8Array(this.analyser.frequencyBinCount),this.gradient=this.canvasCtx.createLinearGradient(0,0,0,400),this.gradient.addColorStop(0,this.preferences.barColor),this.gradient.addColorStop(1,"orange"),this.canvasCtx.fillStyle=this.gradient,this.canvasCtx.shadowBlur=this.preferences.shadowBlur,this.canvasCtx.shadowColor=this.preferences.shadowColor,requestAnimationFrame(this.renderFrame.bind(this))},this.stopVisualization=function(){this.container.innerHTML="",window.cancelAnimationFrame(this.renderFrame.bind(this))},this.renderFrame=function(){requestAnimationFrame(this.renderFrame.bind(this)),this.analyser.getByteFrequencyData(this.frequencyData),this.canvasCtx.clearRect(0,0,this.canvas.width,this.canvas.height);for(var t=this.canvas.width/2,e=this.canvas.height/2,a=t-27,i=Math.floor(2*a*Math.PI/(this.preferences.barWidth+this.preferences.barSpacing)),s=i-Math.floor(25*i/100),n=Math.floor(this.frequencyData.length/i),r=0;r<s;r++){var h=this.frequencyData[r*n],c=2*r*Math.PI/i+Math.PI,o=(135-this.preferences.barWidth)*Math.PI/180,f=a-(h/12-this.preferences.barHeight),l=this.preferences.barWidth,d=h/6+this.preferences.barHeight;this.canvasCtx.save(),this.canvasCtx.translate(t,e),this.canvasCtx.rotate(c-o),this.canvasCtx.fillRect(0,f,l,d),this.canvasCtx.restore()}}}
20
+ function CircularEqualizer() {
21
+ this.id = "circular_equalizer", this.name = "Circular Equalizer", this.container = "", this.preferences = {
22
+ barWidth: 2,
23
+ barHeight: 2,
24
+ barSpacing: 5,
25
+ barColor: "#ffffff",
26
+ shadowColor: "#ffffff",
27
+ shadowBlur: 10
28
+ }, this.analyser = "", this.frequencyData = [], this.canvas = null, this.canvasCtx = null, this.gradient = null, this.getID = function () {
29
+ return this.id
30
+ }, this.getName = function () {
31
+ return this.name
32
+ }, this.setPreferences = function (t) {
33
+ for (var e in this.preferences) null != t[e] && (this.preferences[e] = t[e])
34
+ }, this.startVisualization = function (t) {
35
+ this.analyser = Amplitude.getAnalyser(), this.container = t, window.cont = this.container, this.canvas = document.createElement("canvas"), this.canvas.width = this.container.offsetWidth, this.canvas.height = this.container.offsetHeight, this.container.appendChild(this.canvas), this.canvasCtx = this.canvas.getContext("2d"), this.frequencyData = new Uint8Array(this.analyser.frequencyBinCount), this.gradient = this.canvasCtx.createLinearGradient(0, 0, 0, 400), this.gradient.addColorStop(0, this.preferences.barColor), this.gradient.addColorStop(1, "orange"), this.canvasCtx.fillStyle = this.gradient, this.canvasCtx.shadowBlur = this.preferences.shadowBlur, this.canvasCtx.shadowColor = this.preferences.shadowColor, requestAnimationFrame(this.renderFrame.bind(this))
36
+ }, this.stopVisualization = function () {
37
+ this.container.innerHTML = "", window.cancelAnimationFrame(this.renderFrame.bind(this))
38
+ }, this.renderFrame = function () {
39
+ requestAnimationFrame(this.renderFrame.bind(this)), this.analyser.getByteFrequencyData(this.frequencyData), this.canvasCtx.clearRect(0, 0, this.canvas.width, this.canvas.height);
40
+ for (var t = this.canvas.width / 2, e = this.canvas.height / 2, a = t - 27, i = Math.floor(2 * a * Math.PI / (this.preferences.barWidth + this.preferences.barSpacing)), s = i - Math.floor(25 * i / 100), n = Math.floor(this.frequencyData.length / i), r = 0; r < s; r++) {
41
+ var h = this.frequencyData[r * n],
42
+ c = 2 * r * Math.PI / i + Math.PI,
43
+ o = (135 - this.preferences.barWidth) * Math.PI / 180,
44
+ f = a - (h / 12 - this.preferences.barHeight),
45
+ l = this.preferences.barWidth,
46
+ d = h / 6 + this.preferences.barHeight;
47
+ this.canvasCtx.save(), this.canvasCtx.translate(t, e), this.canvasCtx.rotate(c - o), this.canvasCtx.fillRect(0, f, l, d), this.canvasCtx.restore()
48
+ }
49
+ }
50
+ }
@@ -17,7 +17,7 @@
17
17
  # -----------------------------------------------------------------------------
18
18
  */
19
19
 
20
- function FrequencyAnalyzerVisualization(){
20
+ function FrequencyAnalyzerVisualization() {
21
21
  /*
22
22
  Define the ID of your visualization. This is used to apply
23
23
  visualizations to songs, playlists, and default. It is a JSON
@@ -22,7 +22,7 @@
22
22
  https://github.com/michaelbromley/soundcloud-visualizer
23
23
  */
24
24
 
25
- function MichaelBromleyVisualization(){
25
+ function MichaelBromleyVisualization() {
26
26
  /*
27
27
  Sets the ID and Name of the visualization.
28
28
  */
@@ -29,7 +29,7 @@
29
29
  name for your visualization.
30
30
  */
31
31
 
32
- function VisualizationObjectName(){
32
+ function VisualizationObjectName() {
33
33
  /*
34
34
  Define the ID of your visualization. This is used to apply
35
35
  visualizations to songs, playlists, and default. It is a JSON
@@ -613,34 +613,43 @@
613
613
  };
614
614
 
615
615
  Video.prototype.controlVideo = function (index, action) {
616
+ const vjsOptions = j1.modules.videojs.options;
616
617
  var trackSrc,
617
618
  $videoElement, videoInfo, videoStart, videoData, videoId,
618
- videojsPlayer, zoomPlugin;
619
-
620
- var playbackRatesDefaults = '[0.25, 0.5, 1, 1.5, 2]';
621
- var chapterTracksEnabled = false;
622
-
623
- var hotkeysPluginDefaults = {
624
- volumeStep: 0.1,
625
- seekStep: 5,
626
- enableMute: true,
627
- enableVolumeScroll: true,
628
- enableHoverScroll: false,
629
- enableFullscreen: true,
630
- enableNumbers: true,
631
- enableJogStyle: false,
632
- alwaysCaptureHotkeys: false,
633
- captureDocumentHotkeys: false,
634
- enableModifiersForNumbers: false,
635
- enableInactiveFocus: true,
636
- skipInitialFocus: false
619
+ videojsPlayer, playbackRates,
620
+ hotKeysPlugin, skipButtonsPlugin, zoomPlugin;
621
+
622
+ var playbackRatesDefaults = vjsOptions.playbackRates.values;
623
+ var chapterTracksEnabled = false;
624
+
625
+ var hotKeysPluginDefaults = {
626
+ volumeStep: vjsOptions.plugins.hotKeys.volumeStep,
627
+ seekStep: vjsOptions.plugins.hotKeys.seekStep,
628
+ enableMute: vjsOptions.plugins.hotKeys.enableMute,
629
+ enableVolumeScroll: vjsOptions.plugins.hotKeys.enableVolumeScroll,
630
+ enableHoverScroll: vjsOptions.plugins.hotKeys.enableHoverScroll,
631
+ enableFullscreen: vjsOptions.plugins.hotKeys.enableFullscreen,
632
+ enableNumbers: vjsOptions.plugins.hotKeys.enableNumbers,
633
+ enableJogStyle: vjsOptions.plugins.hotKeys.enableJogStyle,
634
+ alwaysCaptureHotkeys: vjsOptions.plugins.hotKeys.alwaysCaptureHotkeys,
635
+ captureDocumentHotkeys: vjsOptions.plugins.hotKeys.captureDocumentHotkeys,
636
+ enableModifiersForNumbers: vjsOptions.plugins.hotKeys.enableModifiersForNumbers,
637
+ enableInactiveFocus: vjsOptions.plugins.hotKeys.enableInactiveFocus,
638
+ skipInitialFocus: vjsOptions.plugins.hotKeys.skipInitialFocus
637
639
  };
638
640
 
639
- var zoomPluginDefaults = {
640
- moveX: 0,
641
- moveY: 0,
642
- rotate: 0,
643
- zoom: 1
641
+ var skipButtonsPluginDefaults = {
642
+ backward: vjsOptions.plugins.skipButtons.backward,
643
+ forward: vjsOptions.plugins.skipButtons.forward,
644
+ backwardIndex: 0,
645
+ forwardIndex: 1
646
+ };
647
+
648
+ var zoomPluginDefaults = {
649
+ moveX: vjsOptions.plugins.zoomButtons.moveX,
650
+ moveY: vjsOptions.plugins.zoomButtons.moveY,
651
+ rotate: vjsOptions.plugins.zoomButtons.rotate,
652
+ zoom: vjsOptions.plugins.zoomButtons.zoom
644
653
  };
645
654
 
646
655
  videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
@@ -652,116 +661,190 @@
652
661
  // chapter tracks only available for VJS
653
662
  //
654
663
  if (this.core.galleryItems[this.core.index].video !== undefined && videoInfo.html5) {
655
- videoData = JSON.parse(this.core.galleryItems[this.core.index].video);
656
- if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
657
- for (var i=0; i<videoData.tracks.length; i++) {
658
- if (videoData.tracks[i].kind == 'chapters') {
659
- trackSrc = videoData.tracks[i].src;
660
- chapterTracksEnabled = true;
661
- }
662
- }
663
- } // END if videoData.tracks
664
+ videoData = JSON.parse(this.core.galleryItems[this.core.index].video);
664
665
 
665
- if ($videoElement.selector !== undefined) {
666
- videoId = $videoElement.selector.id;
667
- videojsPlayer = videojs(videoId);
668
- } else {
669
- videojsPlayer = 'unknown';
670
- }
666
+ if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
667
+ for (var i=0; i<videoData.tracks.length; i++) {
668
+ if (videoData.tracks[i].kind == 'chapters') {
669
+ trackSrc = videoData.tracks[i].src;
670
+ chapterTracksEnabled = true;
671
+ }
672
+ }
673
+ } // END if videoData.tracks
671
674
 
672
- if (videojsPlayer !== 'unknown') {
673
-
674
- // jadams, 2024-06-16: added VJS Plugins hotkeys|zoom, playbackRates
675
- // ---------------------------------------------------------------
676
- var hotkeysPlugin = this.settings.videojsOptions.controlBar.hotkeysPlugin;
677
- var zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
678
- var playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
679
-
680
- // jadams, 2024-01-22: added video start position
681
- // ---------------------------------------------------------------
682
- if (this.settings.videojsOptions.videoStart !== undefined) {
683
- videoStart = this.settings.videojsOptions.videoStart[index];
684
- videojsPlayer.on("play", function() {
685
- var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
686
- videojsPlayer.currentTime(startFromSecond);
687
-
688
- }); // END on "play"
689
- } // END if videoStart
690
-
691
- // add playbackRates (only available for VJS)
692
- videojsPlayer.playbackRates(playbackRates);
693
-
694
- // add hotkeysPlugin (only available for VJS)
695
- if (hotkeysPlugin !== undefined && hotkeysPlugin.enabled) {
696
- hotkeysPlugin.options = __assign(__assign({}, hotkeysPluginDefaults), hotkeysPlugin.options);
697
- videojsPlayer.hotkeys({
698
- enableModifiersForNumbers: hotkeysPlugin.options.enableModifiersForNumbers
699
- });
700
- } // END if hotkeysPlugin enabled
701
-
702
- // add zoomPlugin (only available for VJS)
703
- if (zoomPlugin !== undefined && zoomPlugin.enabled) {
704
- zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
705
- videojsPlayer.zoomPlugin({
706
- moveX: zoomPlugin.options.moveX,
707
- moveY: zoomPlugin.options.moveY,
708
- rotate: zoomPlugin.options.rotate,
709
- zoom: zoomPlugin.options.zoom
710
- });
711
- } // END if zoomPlugin enabled
712
-
713
- // jadams, 2023-12-11: added chapter track processing (only available for VJS)
714
- // -----------------------------------------------------------------
715
- if (chapterTracksEnabled) {
716
- var parser = new WebVTTParser();
717
- var markers = [];
718
-
719
- function cb_load (data /* ,textStatus, jqXHR */ ) {
720
- var tree = parser.parse(data, 'metadata');
721
- var marker;
722
-
723
- // add chapter tracks to markers array
724
- for (var i=0; i<tree.cues.length; i++) {
725
- marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
726
- markers.push(marker);
675
+ if ($videoElement.selector !== undefined) {
676
+ videoId = $videoElement.selector.id;
677
+ videojsPlayer = videojs(videoId);
678
+ } else {
679
+ videojsPlayer = 'unknown';
680
+ }
681
+
682
+ if (videojsPlayer !== 'unknown') {
683
+
684
+ // added VJS Plugins hotKeys|skipButtons|zoom, playbackRates
685
+ // -------------------------------------------------------------
686
+ hotKeysPlugin = this.settings.videojsOptions.controlBar.hotKeysPlugin;
687
+ skipButtonsPlugin = this.settings.videojsOptions.controlBar.skipButtonsPlugin;
688
+ zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
689
+ playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
690
+
691
+ // jadams, 2024-01-22: added video start position
692
+ // -------------------------------------------------------------
693
+ if (this.settings.videojsOptions.videoStart !== undefined) {
694
+ videoStart = this.settings.videojsOptions.videoStart[index];
695
+ videojsPlayer.on("play", function() {
696
+ var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
697
+ videojsPlayer.currentTime(startFromSecond);
698
+ }); // END on event play
699
+ } // END if videoStart
700
+
701
+ // add playbackRates (only available for VJS)
702
+ if (videojsPlayer.playbackRates !== undefined) {
703
+ videojsPlayer.playbackRates(playbackRates);
727
704
  }
728
- }; // END callback
729
705
 
730
- // load chapter tracks
731
- loadVtt(trackSrc, cb_load);
706
+ // add hotkeys Plugin (only available for VJS)
707
+ if (hotKeysPlugin !== undefined && hotKeysPlugin.enabled && videojsPlayer.hotKeys !== undefined) {
708
+
709
+ // merge objects
710
+ hotKeysPlugin.options = __assign(__assign({}, hotKeysPluginDefaults), hotKeysPlugin.options);
711
+
712
+ // prevent multiple plugin instances
713
+ var hotKeysActive = false;
714
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.hotKeys !== undefined) {
715
+ hotKeysActive = videojsPlayer.activePlugins_.hotKeys;
716
+ }
717
+
718
+ if (!hotKeysActive) {
719
+ videojsPlayer.hotKeys({
720
+ volumeStep: hotKeysPlugin.options.volumeStep,
721
+ seekStep: hotKeysPlugin.options.seekStep,
722
+ enableMute: hotKeysPlugin.options.enableMute,
723
+ enableFullscreen: hotKeysPlugin.options.enableFullscreen,
724
+ enableNumbers: hotKeysPlugin.options.enableNumbers,
725
+ enableVolumeScroll: hotKeysPlugin.options.enableVolumeScroll,
726
+ enableHoverScroll: hotKeysPlugin.options.enableHoverScroll,
727
+ alwaysCaptureHotkeys: hotKeysPlugin.options.alwaysCaptureHotkeys,
728
+ captureDocumentHotkeys: hotKeysPlugin.options.captureDocumentHotkeys,
729
+ documentHotkeysFocusElementFilter: hotKeysPlugin.options.documentHotkeysFocusElementFilter,
730
+
731
+ // Mimic VLC seek behavior (default to: 15)
732
+ seekStep: function(e) {
733
+ if (e.ctrlKey && e.altKey) {
734
+ return 5*60;
735
+ } else if (e.ctrlKey) {
736
+ return 60;
737
+ } else if (e.altKey) {
738
+ return 10;
739
+ } else {
740
+ return 15;
741
+ }
742
+ }
743
+
744
+ });
745
+ } // END if hotKeysActive
732
746
 
733
- // add chapter tracks on play
734
- videojsPlayer.on("play", function() {
735
- videojsPlayer.currentTime(videoStart);
747
+ } // END if hotKeysPlugin enabled
736
748
 
737
- var total = videojsPlayer.duration();
738
- var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
749
+ // add skipButtons Plugin (only available for VJS)
750
+ // -------------------------------------------------------------
751
+ if (skipButtonsPlugin !== undefined && skipButtonsPlugin.enabled && videojsPlayer.skipButtons !== undefined) {
752
+ // merge objects
753
+ skipButtonsPlugin.options = __assign(__assign({}, skipButtonsPluginDefaults), skipButtonsPlugin.options);
739
754
 
740
- // add chapter tracks on timeline (delayed)
741
- setTimeout (function() {
742
- var markers_loaded = setInterval (function () {
743
- if (markers.length) {
744
- for (var i=0; i<markers.length; i++) {
745
- var left = (markers[i].time / total * 100) + '%';
746
- var time = markers[i].time;
747
- var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
755
+ // prevent multiple plugin instances
756
+ var skipButtonsActive = false;
757
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.skipButtons !== undefined) {
758
+ skipButtonsActive = videojsPlayer.activePlugins_.skipButtons;
759
+ }
748
760
 
749
- el.click(function() {
750
- videojsPlayer.currentTime($(this).data('time'));
761
+ if (!skipButtonsActive) {
762
+ videojsPlayer.skipButtons({
763
+ backward: skipButtonsPlugin.options.backward,
764
+ forward: skipButtonsPlugin.options.forward,
765
+ backwardIndex: skipButtonsPlugin.options.backwardIndex,
766
+ forwardIndex: skipButtonsPlugin.options.forwardIndex
751
767
  });
768
+ }
769
+
770
+ } // END if skipButtons Plugin enabled
771
+
772
+ // add zoom Plugin (only available for VJS)
773
+ // -----------------------------------------------------------------
774
+ if (zoomPlugin !== undefined && zoomPlugin.enabled && videojsPlayer.zoomButtons !== undefined) {
775
+ // merge objects
776
+ zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
752
777
 
753
- timeline.append(el);
754
- }
755
- clearInterval(markers_loaded);
778
+ // prevent multiple plugin instances
779
+ var zoomButtonsActive = false;
780
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.zoomButtons !== undefined) {
781
+ zoomButtonsActive = videojsPlayer.activePlugins_.zoomButtons;
782
+ }
783
+
784
+ if (!zoomButtonsActive) {
785
+ videojsPlayer.zoomButtons({
786
+ moveX: zoomPlugin.options.moveX,
787
+ moveY: zoomPlugin.options.moveY,
788
+ rotate: zoomPlugin.options.rotate,
789
+ zoom: zoomPlugin.options.zoom
790
+ });
756
791
  }
757
- }, 10);
758
- }, 1000 );
759
792
 
760
- }); // END on "play"
793
+ } // END if zoom Plugin enabled
794
+
795
+ // chapter track processing (only available for VJS)
796
+ // -----------------------------------------------------------------
797
+ if (chapterTracksEnabled) {
798
+ var parser = new WebVTTParser();
799
+ var markers = [];
800
+
801
+ function cb_load (data /* ,textStatus, jqXHR */ ) {
802
+ var tree = parser.parse(data, 'metadata');
803
+ var marker;
804
+
805
+ // add chapter tracks to markers array
806
+ for (var i=0; i<tree.cues.length; i++) {
807
+ marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
808
+ markers.push(marker);
809
+ }
810
+ }; // END function cb_load
811
+
812
+ // load chapter tracks
813
+ // -------------------------------------------------------------
814
+ loadVtt(trackSrc, cb_load);
761
815
 
762
- } // END if chapterTracksEnabled
816
+ // add chapter tracks on play
817
+ videojsPlayer.on("play", function() {
818
+ videojsPlayer.currentTime(videoStart);
763
819
 
764
- } // END if videojsPlayer is defined
820
+ var total = videojsPlayer.duration();
821
+ var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
822
+
823
+ // add chapter tracks on timeline (delayed)
824
+ setTimeout (function() {
825
+ var markers_loaded = setInterval (function () {
826
+ if (markers.length) {
827
+ for (var i=0; i<markers.length; i++) {
828
+ var left = (markers[i].time / total * 100) + '%';
829
+ var time = markers[i].time;
830
+ var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
831
+
832
+ el.click(function() {
833
+ videojsPlayer.currentTime($(this).data('time'));
834
+ });
835
+
836
+ timeline.append(el);
837
+ }
838
+ clearInterval(markers_loaded);
839
+ }
840
+ }, 10); // END markers_loaded
841
+ }, 1000 ); // END setTimeout
842
+
843
+ }); // END on "play"
844
+
845
+ } // END if chapterTracksEnabled
846
+
847
+ } // END if videojsPlayer is defined
765
848
 
766
849
  } // END if videoInfo.html5
767
850
 
@@ -811,7 +894,8 @@
811
894
  console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
812
895
  }
813
896
  }
814
- };
897
+
898
+ }; // END controlVideo
815
899
 
816
900
  Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
817
901
  var _this = this;
@@ -875,4 +959,4 @@
875
959
 
876
960
  return Video;
877
961
 
878
- })));
962
+ })));
@@ -0,0 +1,6 @@
1
+ /*
2
+ * PhotoSwipe 5.4.4 - https://photoswipe.com
3
+ * (c) 2024 Dmytro Semenov
4
+ */
5
+
6
+ PhotoSwipe v5 — JavaScript image gallery and lightbox
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014-2022 Dmitry Semenov, https://dimsemenov.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,32 @@
1
+ [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://savelife.in.ua/en/)
2
+
3
+
4
+ PhotoSwipe v5 — JavaScript image gallery and lightbox
5
+
6
+ **[Demo](https://photoswipe.com)** | **[Documentation](https://photoswipe.com/getting-started/)**
7
+
8
+ [![Sponsor via OpenCollective](https://img.shields.io/opencollective/all/photoswipe?label=Sponsor%20via%20OpenCollective)](https://opencollective.com/photoswipe)
9
+ [![Follow on Twitter](https://img.shields.io/twitter/follow/photoswipe?style=social)](https://twitter.com/intent/user?screen_name=photoswipe)
10
+
11
+
12
+ ### Repo structure
13
+
14
+ - `dist/` - main JS and CSS
15
+ - `src/` - source JS and CSS.
16
+ - `src/js/photoswipe.js` - entry for PhotoSwipe Core.
17
+ - `src/js/lightbox/lightbox.js` - entry for PhotoSwipe Lightbox.
18
+ - `docs/` - documentation markdown files.
19
+ - `demo-docs-website/` - website with documentation, demos and manual tests.
20
+ - `build/` - rollup build config.
21
+
22
+ To build JS and CSS in `dist/` directory, run `npm run build`.
23
+
24
+ To run the demo website and automatically rebuild files during development, run `npm install` in `demo-docs-website/` and `npm run watch` in the root directory.
25
+
26
+ ### Older versions
27
+
28
+ Documentation for the old version (v4) can be found [here](https://photoswipe.com/v4-docs/getting-started.html) and [the code for 4.1.3 is here](https://github.com/dimsemenov/PhotoSwipe/tree/v4.1.3).
29
+
30
+ ---
31
+
32
+ This project is tested with [BrowserStack](https://www.browserstack.com/).
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * PhotoSwipe Dynamic Caption plugin 1.2.7 - https://photoswipe.com
3
+ * (c) 2022 Dmytro Semenov
4
+ */
5
+ !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).PhotoSwipeDynamicCaption=i()}(this,(function(){"use strict";const t={captionContent:".pswp-caption-content",type:"auto",horizontalEdgeThreshold:20,mobileCaptionOverlapRatio:.3,mobileLayoutBreakpoint:600,verticallyCenterImage:!1};return class{constructor(i,e){this.options={...t,...e},this.lightbox=i,this.lightbox.on("init",(()=>{this.pswp=this.lightbox.pswp,this.initCaption()}))}initCaption(){const{pswp:t}=this;t.on("change",(()=>{this.showCaption(this.pswp.currSlide)})),t.on("calcSlideSize",(t=>this.onCalcSlideSize(t))),t.on("slideDestroy",(t=>{t.slide.dynamicCaption&&(t.slide.dynamicCaption.element&&t.slide.dynamicCaption.element.remove(),delete t.slide.dynamicCaption)})),t.on("zoomPanUpdate",(({slide:i})=>{if(t.opener.isOpen&&i.dynamicCaption){if(i.currZoomLevel>i.zoomLevels.initial?this.hideCaption(i):this.showCaption(i),i.dynamicCaption.element){let t=0;if(i.currZoomLevel<=i.zoomLevels.initial){const e=i.pan.y-i.bounds.center.y;Math.abs(e)>1&&(t=e)}this.setCaptionYOffset(i.dynamicCaption.element,t)}this.adjustPanArea(i,i.currZoomLevel)}})),t.on("beforeZoomTo",(i=>{this.adjustPanArea(t.currSlide,i.destZoomLevel)})),t.on("tapAction",(t=>{t.originalEvent.target.closest(".pswp__dynamic-caption")&&t.preventDefault()}))}adjustPanArea(t,i){t.dynamicCaption&&t.dynamicCaption.adjustedPanAreaSize&&(i>t.zoomLevels.initial?(t.panAreaSize.x=t.dynamicCaption.originalPanAreaSize.x,t.panAreaSize.y=t.dynamicCaption.originalPanAreaSize.y):(t.panAreaSize.x=t.dynamicCaption.adjustedPanAreaSize.x,t.panAreaSize.y=t.dynamicCaption.adjustedPanAreaSize.y))}useMobileLayout(){const{mobileLayoutBreakpoint:t}=this.options;return"function"==typeof t?t.call(this):"number"==typeof t&&window.innerWidth<t}hideCaption(t){if(t.dynamicCaption&&!t.dynamicCaption.hidden){const i=t.dynamicCaption.element;if(!i)return;t.dynamicCaption.hidden=!0,i.classList.add("pswp__dynamic-caption--faded"),t.captionFadeTimeout&&clearTimeout(t.captionFadeTimeout),t.captionFadeTimeout=setTimeout((()=>{i.style.visibility="hidden",delete t.captionFadeTimeout}),400)}}setCaptionYOffset(t,i){t.style.transform=`translateY(${i}px)`}showCaption(t){if(t.dynamicCaption&&t.dynamicCaption.hidden){const i=t.dynamicCaption.element;if(!i)return;t.dynamicCaption.hidden=!1,i.style.visibility="visible",clearTimeout(t.captionFadeTimeout),t.captionFadeTimeout=setTimeout((()=>{i.classList.remove("pswp__dynamic-caption--faded"),delete t.captionFadeTimeout}),50)}}setCaptionPosition(t,i,e){const s=i<=this.options.horizontalEdgeThreshold;t.classList[s?"add":"remove"]("pswp__dynamic-caption--on-hor-edge"),t.style.left=i+"px",t.style.top=e+"px"}setCaptionWidth(t,i){i?t.style.width=i+"px":t.style.removeProperty("width")}setCaptionType(t,i){const e=t.dataset.pswpCaptionType;i!==e&&(t.classList.add("pswp__dynamic-caption--"+i),t.classList.remove("pswp__dynamic-caption--"+e),t.dataset.pswpCaptionType=i)}updateCaptionPosition(t){if(!t.dynamicCaption||!t.dynamicCaption.type||!t.dynamicCaption.element)return;if("mobile"===t.dynamicCaption.type)return this.setCaptionType(t.dynamicCaption.element,t.dynamicCaption.type),t.dynamicCaption.element.style.removeProperty("left"),t.dynamicCaption.element.style.removeProperty("top"),void this.setCaptionWidth(t.dynamicCaption.element,!1);const i=t.zoomLevels.initial,e=Math.ceil(t.width*i),s=Math.ceil(t.height*i);this.setCaptionType(t.dynamicCaption.element,t.dynamicCaption.type),"aside"===t.dynamicCaption.type?(this.setCaptionPosition(t.dynamicCaption.element,t.bounds.center.x+e,t.bounds.center.y),this.setCaptionWidth(t.dynamicCaption.element,!1)):"below"===t.dynamicCaption.type&&(this.setCaptionPosition(t.dynamicCaption.element,t.bounds.center.x,t.bounds.center.y+s),this.setCaptionWidth(t.dynamicCaption.element,e))}onCalcSlideSize(t){const{slide:i}=t;let e,s;if(!i.dynamicCaption){i.dynamicCaption={element:void 0,type:!1,hidden:!1};const t=this.getCaptionHTML(i);if(!t)return;i.dynamicCaption.element=document.createElement("div"),i.dynamicCaption.element.className="pswp__dynamic-caption pswp__hide-on-close",i.dynamicCaption.element.innerHTML=t,this.pswp.dispatch("dynamicCaptionUpdateHTML",{captionElement:i.dynamicCaption.element,slide:i}),i.holderElement.appendChild(i.dynamicCaption.element)}if(!i.dynamicCaption.element)return;this.storeOriginalPanAreaSize(i),i.bounds.update(i.zoomLevels.initial),this.useMobileLayout()?(i.dynamicCaption.type="mobile",s=!0):"auto"===this.options.type?i.bounds.center.x>i.bounds.center.y?i.dynamicCaption.type="aside":i.dynamicCaption.type="below":i.dynamicCaption.type=this.options.type;const o=Math.ceil(i.width*i.zoomLevels.initial),n=Math.ceil(i.height*i.zoomLevels.initial);if(this.setCaptionType(i.dynamicCaption.element,i.dynamicCaption.type),"aside"===i.dynamicCaption.type){this.setCaptionWidth(i.dynamicCaption.element,!1),e=this.measureCaptionSize(i.dynamicCaption.element,t.slide);const s=e.x,n=o+i.bounds.center.x;i.panAreaSize.x-n<=s&&(i.panAreaSize.x-=s,this.recalculateZoomLevelAndBounds(i))}else if("below"===i.dynamicCaption.type||s){this.setCaptionWidth(i.dynamicCaption.element,s?this.pswp.viewportSize.x:o),e=this.measureCaptionSize(i.dynamicCaption.element,t.slide);const a=e.y;if(this.options.verticallyCenterImage)i.panAreaSize.y-=a,this.recalculateZoomLevelAndBounds(i);else{const t=n+i.bounds.center.y,e=i.panAreaSize.y-t,o=i.panAreaSize.y;if(e<=a){i.panAreaSize.y-=Math.min(2*(a-e),a),this.recalculateZoomLevelAndBounds(i);const t=i.panAreaSize.x*this.options.mobileCaptionOverlapRatio/2;s&&i.bounds.center.x>t&&(i.panAreaSize.y=o,this.recalculateZoomLevelAndBounds(i))}}}this.storeAdjustedPanAreaSize(i),this.updateCaptionPosition(i)}measureCaptionSize(t,i){const e=t.getBoundingClientRect();return this.pswp.dispatch("dynamicCaptionMeasureSize",{captionEl:t,slide:i,captionSize:{x:e.width,y:e.height}}).captionSize}recalculateZoomLevelAndBounds(t){t.zoomLevels.update(t.width,t.height,t.panAreaSize),t.bounds.update(t.zoomLevels.initial)}storeAdjustedPanAreaSize(t){t.dynamicCaption&&(t.dynamicCaption.adjustedPanAreaSize||(t.dynamicCaption.adjustedPanAreaSize={}),t.dynamicCaption.adjustedPanAreaSize.x=t.panAreaSize.x,t.dynamicCaption.adjustedPanAreaSize.y=t.panAreaSize.y)}storeOriginalPanAreaSize(t){t.dynamicCaption&&(t.dynamicCaption.originalPanAreaSize||(t.dynamicCaption.originalPanAreaSize={}),t.dynamicCaption.originalPanAreaSize.x=t.panAreaSize.x,t.dynamicCaption.originalPanAreaSize.y=t.panAreaSize.y)}getCaptionHTML(t){if("function"==typeof this.options.captionContent)return this.options.captionContent.call(this,t);const i=t.data.element;let e="";if(i){const t=i.querySelector(this.options.captionContent);if(t)e=t.innerHTML;else{const t=i.querySelector("img");t&&(e=t.getAttribute("alt"))}}return e}}}));