j1-template 2022.5.0 → 2022.5.1.rc0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (386) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/modules/attics/generator.html +5 -13
  3. data/assets/data/banner.html +2 -2
  4. data/assets/themes/j1/adapter/js/attic.js +106 -62
  5. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +26 -1
  6. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  7. data/assets/themes/j1/modules/backstretch/js/backstretch.js +1 -1
  8. data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.js +1696 -0
  9. data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.min.js +20 -0
  10. data/assets/themes/j1/modules/backstretch/js/v2.1.18/backstretch.js +1627 -0
  11. data/assets/themes/j1/modules/backstretch/js/v2.1.18/backstretch.min.js +20 -0
  12. data/lib/j1/version.rb +1 -1
  13. data/lib/starter_web/Gemfile +1 -1
  14. data/lib/starter_web/README.md +440 -175
  15. data/lib/starter_web/_config.yml +1 -1
  16. data/lib/starter_web/_data/blocks/banner.yml +1 -1
  17. data/lib/starter_web/_data/modules/attics.yml +12 -0
  18. data/lib/starter_web/_data/modules/defaults/attics.yml +16 -1
  19. data/lib/starter_web/_data/modules/navigator_menu.yml +28 -25
  20. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  21. data/lib/starter_web/assets/images/modules/attics/1920x1280/ben-kolde.jpg +0 -0
  22. data/lib/starter_web/assets/images/modules/attics/1920x1280/braden-collum.jpg +0 -0
  23. data/lib/starter_web/assets/images/modules/attics/1920x1280/ev.jpg +0 -0
  24. data/lib/starter_web/assets/images/modules/attics/1920x1280/firmbee-com.jpg +0 -0
  25. data/lib/starter_web/assets/images/modules/attics/1920x1280/max-harlynking.jpg +0 -0
  26. data/lib/starter_web/assets/images/modules/attics/guillaume-bolduc-1920x1280.jpg +0 -0
  27. data/lib/starter_web/assets/images/modules/attics/spacex-1920x1280.jpg +0 -0
  28. data/lib/starter_web/assets/videos/headers/{still → present_videos/still}/underground-broadway.jpg +0 -0
  29. data/lib/starter_web/assets/videos/headers/present_videos/underground-broadway.mp4 +0 -0
  30. data/lib/starter_web/collections/asciidoc_skeletons/simple-post/_posts/yyyy-mm-dd-your-post-name.asciidoc +3 -1
  31. data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.adoc +3 -0
  32. data/lib/starter_web/collections/posts/public/featured/_posts/2021-02-01-site-generators.adoc +2 -3
  33. data/lib/starter_web/collections/posts/public/featured/_posts/2022-02-01-about-j1.adoc +3 -0
  34. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-wiki-series.adoc +3 -0
  35. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-wiki-series.adoc +3 -0
  36. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-wiki-series.adoc +3 -0
  37. data/lib/starter_web/index.html +41 -7
  38. data/lib/starter_web/package.json +1 -1
  39. data/lib/starter_web/pages/public/about/features.adoc +119 -0
  40. data/lib/starter_web/pages/public/about/reporting_issues.adoc +5 -1
  41. data/lib/starter_web/pages/public/about/{about_site.adoc → site.adoc} +20 -15
  42. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +3 -0
  43. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +3 -0
  44. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +3 -0
  45. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +3 -0
  46. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +4 -1
  47. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +4 -1
  48. data/lib/starter_web/pages/public/blog/navigator/archive.html +4 -1
  49. data/lib/starter_web/pages/public/blog/navigator/index.html +4 -1
  50. data/lib/starter_web/pages/public/features/general.adoc +5 -1
  51. data/lib/starter_web/pages/public/features/template.adoc +4 -0
  52. data/lib/starter_web/pages/public/jupyter/examples/distributed/j1-circular-times-table.adoc +3 -0
  53. data/lib/starter_web/pages/public/jupyter/examples/distributed/j1-common-used-widgets.adoc +3 -0
  54. data/lib/starter_web/pages/public/jupyter/examples/distributed/j1-odes-in-python.adoc +3 -0
  55. data/lib/starter_web/pages/public/jupyter/examples/localized/j1_climate-change-forecast.adoc +3 -0
  56. data/lib/starter_web/pages/public/learn/quickstart.adoc +4 -1
  57. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +4 -1
  58. data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +16 -5
  59. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +3 -0
  60. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +3 -0
  61. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +3 -0
  62. data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +3 -0
  63. data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +3 -0
  64. data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +3 -0
  65. data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +6 -2
  66. data/lib/starter_web/pages/public/learn/where_to_go.adoc +3 -0
  67. data/lib/starter_web/pages/public/legal/de/100_copyright.adoc +3 -0
  68. data/lib/starter_web/pages/public/legal/de/100_impress.adoc +3 -0
  69. data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +3 -0
  70. data/lib/starter_web/pages/public/legal/de/400_comment_policy.adoc +3 -0
  71. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +9 -1
  72. data/lib/starter_web/pages/public/legal/en/200_impress.adoc +10 -2
  73. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +3 -0
  74. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +3 -0
  75. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +3 -0
  76. data/lib/starter_web/pages/public/plans/plans.adoc +3 -0
  77. data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +4 -0
  78. data/lib/starter_web/pages/public/se/se-fake.adoc +4 -0
  79. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  80. data/lib/starter_web/utilsrv/package.json +1 -1
  81. metadata +19 -367
  82. data/lib/starter_web/assets/videos/headers/still/victoria-oskolovich-on-vimeo.jpg +0 -0
  83. data/lib/starter_web/pages/public/_jupyter/docs/_includes/attributes.asciidoc +0 -67
  84. data/lib/starter_web/pages/public/_jupyter/docs/_includes/documents/j1_docs_example_static.asciidoc +0 -232
  85. data/lib/starter_web/pages/public/_jupyter/docs/binderhub.adoc +0 -631
  86. data/lib/starter_web/pages/public/_jupyter/docs/j1-nbinteract.adoc +0 -638
  87. data/lib/starter_web/pages/public/_jupyter/docs/jupyterhub.adoc +0 -248
  88. data/lib/starter_web/pages/public/_jupyter/docs/nbinteract-widget-manual.adoc +0 -928
  89. data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-circular-times-table.adoc +0 -139
  90. data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-common-used-widgets.adoc +0 -229
  91. data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-odes-in-python.adoc +0 -112
  92. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-altair/j1-altair-visualisations.adoc +0 -142
  93. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-bokeh/j1-bokeh-visualisations.adoc +0 -171
  94. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-bokeh/j1-bqplot-eamples.adoc +0 -111
  95. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-plotly/j1-plotly-visualisations.adoc +0 -94
  96. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1_climate-change-forecast.adoc +0 -106
  97. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +0 -16260
  98. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_bgplot_line_plot-checkpoint.ipynb +0 -247
  99. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-Copy1-checkpoint.ipynb +0 -12382
  100. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-checkpoint.ipynb +0 -12387
  101. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-short-checkpoint.ipynb +0 -12170
  102. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast-checkpoint.ipynb +0 -1058
  103. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_docs_example_dynamic-checkpoint.ipynb +0 -14478
  104. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-Copy1-checkpoint.ipynb +0 -379
  105. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-checkpoint.ipynb +0 -442
  106. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets-checkpoint.ipynb +0 -523
  107. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets.line_charts-checkpoint.ipynb +0 -84
  108. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets.questions-checkpoint.ipynb +0 -194
  109. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_chart-checkpoint.ipynb +0 -89
  110. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts-Copy1-checkpoint.ipynb +0 -164
  111. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts-checkpoint.ipynb +0 -173
  112. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts.1-checkpoint.ipynb +0 -256
  113. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_barcharts-checkpoint.ipynb +0 -126
  114. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_hist_chart-checkpoint.ipynb +0 -87
  115. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_line_chart-checkpoint.ipynb +0 -90
  116. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_line_charts-checkpoint.ipynb +0 -87
  117. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_question_multiple_choice-checkpoint.ipynb +0 -64
  118. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_question_short_answer-checkpoint.ipynb +0 -122
  119. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_questions-checkpoint.ipynb +0 -181
  120. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_chart-checkpoint.ipynb +0 -89
  121. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_charts-checkpoint.ipynb +0 -175
  122. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_drag_chart-checkpoint.ipynb +0 -87
  123. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_ode_selected-checkpoint.ipynb +0 -14478
  124. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_odes_in_python-checkpoint.ipynb +0 -15227
  125. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/factor_by_factor.mp4 +0 -0
  126. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_circular_times_table.ipynb +0 -12382
  127. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_climate_change_forecast.ipynb +0 -1058
  128. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_docs_example_dynamic.ipynb +0 -14478
  129. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_interactive_widgets.ipynb +0 -442
  130. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets.ipynb +0 -523
  131. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_bar_chart.ipynb +0 -89
  132. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_hist_chart.ipynb +0 -87
  133. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_line_chart.ipynb +0 -90
  134. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_question_multiple_choice.ipynb +0 -64
  135. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_question_short_answer.ipynb +0 -122
  136. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_scatter_chart.ipynb +0 -89
  137. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_scatter_drag_chart.ipynb +0 -87
  138. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_odes_in_python.ipynb +0 -15227
  139. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/line_by_line.mp4 +0 -0
  140. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/point_by_point.mp4 +0 -0
  141. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +0 -16296
  142. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/.ipynb_checkpoints/j1_altair_non_interactive-checkpoint.ipynb +0 -15385
  143. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/j1_altair_interactive.ipynb +0 -16296
  144. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/j1_altair_non_interactive.ipynb +0 -15385
  145. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/00 - Introduction and Setup-checkpoint.ipynb +0 -717
  146. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/01 - Basic Plotting-checkpoint.ipynb +0 -1381
  147. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/02 - Styling and Theming-checkpoint.ipynb +0 -1440
  148. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/03 - Data Sources and Transformations-checkpoint.ipynb +0 -927
  149. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/04 - Adding Annotations-checkpoint.ipynb +0 -1105
  150. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/05 - Presentation Layouts-checkpoint.ipynb +0 -578
  151. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/06 - Linking and Interactions-checkpoint.ipynb +0 -1196
  152. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/07 - Bar and Categorical Data Plots-checkpoint.ipynb +0 -1681
  153. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/08 - Graph and Network Plots-checkpoint.ipynb +0 -680
  154. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/09 - Geographic Plots-checkpoint.ipynb +0 -693
  155. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/10 - Exporting and Embedding-checkpoint.ipynb +0 -751
  156. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/11 - Running Bokeh Applications-checkpoint.ipynb +0 -770
  157. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/bokeh_tut_00_introduction_and_setup-checkpoint.ipynb +0 -666
  158. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_01_basic_plotting-checkpoint.ipynb +0 -1365
  159. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_02_styling_and_theming-checkpoint.ipynb +0 -1405
  160. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_03_data_sources_and_transformations-checkpoint.ipynb +0 -856
  161. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_04_adding_annotations-checkpoint.ipynb +0 -1167
  162. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_05_presentation_layouts-checkpoint.ipynb +0 -601
  163. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_06_linking_and_interactions-checkpoint.ipynb +0 -1356
  164. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_07_bar_and_categorical_data_plots-checkpoint.ipynb +0 -1742
  165. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_08_graph_and_network_plots-checkpoint.ipynb +0 -625
  166. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_09_geographic_plots-checkpoint.ipynb +0 -685
  167. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding-checkpoint.ipynb +0 -726
  168. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding-checkpoint.org +0 -726
  169. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding.new-checkpoint.ipynb +0 -560
  170. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_11_running_bokeh_applications-checkpoint.ipynb +0 -716
  171. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_01_basic_plotting.ipynb +0 -1365
  172. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_02_styling_and_theming.ipynb +0 -1405
  173. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_03_data_sources_and_transformations.ipynb +0 -856
  174. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_04_adding_annotations.ipynb +0 -1167
  175. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_05_presentation_layouts.ipynb +0 -601
  176. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_06_linking_and_interactions.ipynb +0 -1356
  177. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_07_bar_and_categorical_data_plots.ipynb +0 -1742
  178. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_08_graph_and_network_plots.ipynb +0 -625
  179. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_09_geographic_plots.ipynb +0 -685
  180. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/.ipynb_checkpoints/j1_mathplot_vs_bqplot-checkpoint.ipynb +0 -336
  181. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/advanced/Feature_Vector_Distribution-Iris-Digits.ipynb +0 -433
  182. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_bgplot_line_plot.ipynb +0 -244
  183. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_circular_times_table-short.ipynb +0 -12170
  184. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_mathplot_vs_bqplot.ipynb +0 -336
  185. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/.ipynb_checkpoints/Index-checkpoint.ipynb +0 -163
  186. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/.ipynb_checkpoints/Tutorials-checkpoint.ipynb +0 -51
  187. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Advanced Plotting.ipynb +0 -289
  188. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Animations.ipynb +0 -266
  189. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Axis Properties.ipynb +0 -396
  190. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Plotting Dates.ipynb +0 -318
  191. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Equity Index Performance/Time Series.ipynb +0 -158
  192. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Equity Index Performance/spx_prices.csv +0 -6799
  193. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Feature_Vector_Distribution-Iris-Digits.ipynb +0 -470
  194. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Index.ipynb +0 -49
  195. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Logs Analytics/Logs Dashboard.ipynb +0 -378
  196. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Mobile Patent Suits.ipynb +0 -123
  197. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Neural Network.ipynb +0 -177
  198. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Outlier Detection.ipynb +0 -311
  199. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/Bubble Chart.ipynb +0 -255
  200. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/Choropleth.ipynb +0 -275
  201. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/nations.json +0 -1
  202. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/world_map_codes.csv +0 -234
  203. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Basic Plotting-checkpoint.ipynb +0 -186
  204. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Pyplot-checkpoint.ipynb +0 -794
  205. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -323
  206. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/Basic Plotting.ipynb +0 -261
  207. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/Pyplot.ipynb +0 -1489
  208. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Index.ipynb +0 -163
  209. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Interaction Layer.ipynb +0 -966
  210. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Mark Interactions.ipynb +0 -476
  211. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Selectors.ipynb +0 -427
  212. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Introduction.ipynb +0 -528
  213. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Bars.ipynb +0 -480
  214. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Bins.ipynb +0 -217
  215. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Boxplot.ipynb +0 -253
  216. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Candles.ipynb +0 -225
  217. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/FlexLine.ipynb +0 -123
  218. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Graph.ipynb +0 -357
  219. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/GridHeatMap.ipynb +0 -422
  220. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/HeatMap.ipynb +0 -157
  221. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Hist.ipynb +0 -176
  222. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Image.ipynb +0 -195
  223. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Label.ipynb +0 -189
  224. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Lines.ipynb +0 -565
  225. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Map.ipynb +0 -182
  226. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Market Map.ipynb +0 -315
  227. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Pie.ipynb +0 -465
  228. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Scatter.ipynb +0 -835
  229. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Bars.ipynb +0 -362
  230. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Bins.ipynb +0 -252
  231. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Boxplot.ipynb +0 -273
  232. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Candles.ipynb +0 -242
  233. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/GridHeatMap.ipynb +0 -417
  234. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/HeatMap.ipynb +0 -155
  235. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Hist.ipynb +0 -238
  236. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Image.ipynb +0 -152
  237. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Label.ipynb +0 -206
  238. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Lines.ipynb +0 -474
  239. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Map.ipynb +0 -181
  240. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Pie.ipynb +0 -310
  241. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Scatter.ipynb +0 -702
  242. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Scales/Color Scales.ipynb +0 -495
  243. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Feature_Vector_Distribution-Iris-Digits-checkpoint.ipynb +0 -433
  244. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Linking Plots With Widgets-checkpoint.ipynb +0 -326
  245. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Updating Plots-Copy1-checkpoint.ipynb +0 -177
  246. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Updating Plots-checkpoint.ipynb +0 -177
  247. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Brush Interval Selector.ipynb +0 -154
  248. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Fast Interval Selector.ipynb +0 -152
  249. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Gaussian Density Widget.ipynb +0 -128
  250. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Gaussian Density.ipynb +0 -113
  251. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Linking Plots With Widgets.ipynb +0 -326
  252. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Object Model.ipynb +0 -179
  253. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Pyplot.ipynb +0 -174
  254. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Updating Plots.ipynb +0 -177
  255. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials.ipynb +0 -51
  256. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/country_codes.csv +0 -213
  257. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/gdp_per_capita.csv +0 -56
  258. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/state_codes.csv +0 -52
  259. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/trees.jpg +0 -0
  260. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_central_limit_theorem-checkpoint.ipynb +0 -247
  261. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_variability_of_the_sample_mean-checkpoint.ipynb +0 -323
  262. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +0 -387
  263. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_interactive_questions-checkpoint.ipynb +0 -185
  264. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_layout-checkpoint.ipynb +0 -384
  265. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_interact-checkpoint.ipynb +0 -254
  266. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_monty_hall-checkpoint.ipynb +0 -732
  267. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_central_limit_theorem.ipynb +0 -247
  268. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_correlation.ipynb +0 -651
  269. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_empirical_distributions.ipynb +0 -773
  270. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_linear_regression.ipynb +0 -111
  271. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_probability_distribution_plots.ipynb +0 -199
  272. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_sampling_from_a_population.ipynb +0 -421
  273. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_variability_of_the_sample_mean.ipynb +0 -323
  274. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_graphing.ipynb +0 -387
  275. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_interactive_questions.ipynb +0 -185
  276. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_layout.ipynb +0 -384
  277. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_tutorial_interact.ipynb +0 -254
  278. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_tutorial_monty_hall.ipynb +0 -732
  279. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Advanced Plotting.html +0 -373
  280. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Animations.html +0 -361
  281. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Axis Properties.html +0 -569
  282. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bars.html +0 -487
  283. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Basic Plotting.html +0 -341
  284. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bins.html +0 -259
  285. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Boxplot.html +0 -277
  286. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Brush Interval Selector.html +0 -182
  287. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bubble Chart.html +0 -299
  288. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Candles.html +0 -252
  289. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Choropleth.html +0 -318
  290. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Color Scales.html +0 -514
  291. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Fast Interval Selector.html +0 -182
  292. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Feature_Vector_Distribution-Iris-Digits.html +0 -479
  293. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/FlexLine.html +0 -128
  294. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Gaussian Density Widget.html +0 -152
  295. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Gaussian Density.html +0 -137
  296. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Graph.html +0 -484
  297. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/GridHeatMap.html +0 -483
  298. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/HeatMap.html +0 -170
  299. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Hist.html +0 -349
  300. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Image.html +0 -177
  301. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Index.html +0 -29
  302. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Interaction Layer.html +0 -1372
  303. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Introduction.html +0 -749
  304. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Label.html +0 -268
  305. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Lines.html +0 -704
  306. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Linking Plots With Widgets.html +0 -389
  307. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Logs Dashboard.html +0 -455
  308. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Map.html +0 -229
  309. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Mark Interactions.html +0 -613
  310. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Market Map.html +0 -413
  311. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Mobile Patent Suits.html +0 -131
  312. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Neural Network.html +0 -190
  313. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Object Model.html +0 -193
  314. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Outlier Detection.html +0 -363
  315. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Pie.html +0 -367
  316. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Plotting Dates.html +0 -337
  317. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Pyplot.html +0 -196
  318. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Scatter.html +0 -948
  319. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Selectors.html +0 -489
  320. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Time Series.html +0 -173
  321. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Tutorials.html +0 -40
  322. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Updating Plots.html +0 -228
  323. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_altair_interactive.html +0 -2216
  324. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_altair_non_interactive.html +0 -1170
  325. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bgplot_line_plot.html +0 -318
  326. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_01_basic_plotting.html +0 -1479
  327. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_02_styling_and_theming.html +0 -1524
  328. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_03_data_sources_and_transformations.html +0 -983
  329. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_04_adding_annotations.html +0 -1280
  330. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_05_presentation_layouts.html +0 -660
  331. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_06_linking_and_interactions.html +0 -1563
  332. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_07_bar_and_categorical_data_plots.html +0 -1888
  333. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_08_graph_and_network_plots.html +0 -689
  334. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_09_geographic_plots.html +0 -767
  335. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_circular_times_table-short.html +0 -475
  336. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_circular_times_table.html +0 -747
  337. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_climate_change_forecast.html +0 -1250
  338. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_docs_example_dynamic.html +0 -186
  339. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_interactive_widgets.html +0 -512
  340. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_mathplot_vs_bqplot.html +0 -407
  341. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets.html +0 -629
  342. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_bar_chart.html +0 -95
  343. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_hist_chart.html +0 -93
  344. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_line_chart.html +0 -96
  345. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_question_multiple_choice.html +0 -70
  346. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_question_short_answer.html +0 -156
  347. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_chart.html +0 -95
  348. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_drag_chart.html +0 -93
  349. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_odes_in_python.html +0 -955
  350. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_central_limit_theorem.html +0 -290
  351. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_correlation.html +0 -818
  352. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_empirical_distributions.html +0 -351
  353. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_linear_regression.html +0 -106
  354. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_probability_distribution_plots.html +0 -228
  355. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_sampling_from_a_population.html +0 -518
  356. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_variability_of_the_sample_mean.html +0 -372
  357. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_graphing.html +0 -473
  358. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_interactive_questions.html +0 -242
  359. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_layout.html +0 -496
  360. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_tutorial_interact.html +0 -329
  361. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_tutorial_monty_hall.html +0 -866
  362. data/lib/starter_web/pages/public/_jupyter/where_to_go.adoc +0 -270
  363. data/lib/starter_web/pages/public/learn/_roundtrip/100_present_images.adoc +0 -313
  364. data/lib/starter_web/pages/public/learn/_roundtrip/100_present_videos.adoc +0 -281
  365. data/lib/starter_web/pages/public/learn/_roundtrip/200_typography.adoc +0 -253
  366. data/lib/starter_web/pages/public/learn/_roundtrip/300_icon_fonts.adoc +0 -579
  367. data/lib/starter_web/pages/public/learn/_roundtrip/400_asciidoc_extensions.adoc +0 -718
  368. data/lib/starter_web/pages/public/learn/_roundtrip/410_bs_modals_extentions.adoc +0 -91
  369. data/lib/starter_web/pages/public/learn/_roundtrip/420_responsive_tables_extensions.adoc +0 -420
  370. data/lib/starter_web/pages/public/learn/_roundtrip/500_themes.adoc +0 -250
  371. data/lib/starter_web/pages/public/learn/_roundtrip/600_quicksearch.adoc +0 -425
  372. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/attributes.asciidoc +0 -118
  373. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/100_gistblock.asciidoc +0 -28
  374. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_info.asciidoc +0 -14
  375. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_left_warning.asciidoc +0 -11
  376. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_right_danger.asciidoc +0 -11
  377. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_central_success.asciidoc +0 -11
  378. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_full_height_left_info.asciidoc +0 -11
  379. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_full_height_right_success.asciidoc +0 -11
  380. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_table_bs_modal_examples.asciidoc +0 -47
  381. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_info.asciidoc +0 -11
  382. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_left_info.asciidoc +0 -11
  383. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_right_success.asciidoc +0 -11
  384. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/419_advanced_modals_demo.asciidoc +0 -337
  385. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/tables/bs_modal_examples.asciidoc +0 -47
  386. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/google-ad.js +0 -130
@@ -0,0 +1,1696 @@
1
+ /*
2
+ # -----------------------------------------------------------------------------
3
+ # ~/assets/themes/j1/modules/backstretch/js/backstretch.js
4
+ # Backstretch v.2.1.16 implementation for J1 Template.
5
+ #
6
+ # Product/Info:
7
+ # https://jekyll.one
8
+ # http://srobbin.com/jquery-plugins/backstretch/
9
+ #
10
+ # Copyright (C) 2022 Juergen Adams
11
+ # Copyright (C) 2017 Daniel Cohen Gindi
12
+ # Copyright (C) 2012 Scott Robbin
13
+ #
14
+ # J1 Template is licensed under the MIT License.
15
+ # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
16
+ # Backstretch is licensed under the MIT License.
17
+ # See: https://github.com/danielgindi/jquery-backstretch
18
+ # -----------------------------------------------------------------------------
19
+ */
20
+
21
+ // -----------------------------------------------------------------------------
22
+ // ESLint shimming
23
+ // -----------------------------------------------------------------------------
24
+ /* eslint indent: "off" */
25
+ /* eslint no-unused-vars: "off" */
26
+ /* eslint no-undef: "off" */
27
+ /* eslint no-useless-escape: "off" */
28
+ /* eslint no-prototype-builtins: "off" */
29
+ /* eslint no-shadow-restricted-names: "off" */
30
+ // -----------------------------------------------------------------------------
31
+ // Version 2.1.16
32
+
33
+ 'use strict';
34
+ (function ($, window, undefined) {
35
+
36
+ /** @const */
37
+ var YOUTUBE_REGEXP = /^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;
38
+ var logText;
39
+
40
+ /* PLUGIN DEFINITION
41
+ * ========================= */
42
+
43
+ $.fn.backstretch = function (images, options) {
44
+ var args = arguments;
45
+ // var debug = false;
46
+
47
+ /*
48
+ * Scroll the page one pixel to get the right window height on iOS
49
+ * Pretty harmless for everyone else
50
+ */
51
+ if ($(window).scrollTop() === 0) {
52
+ window.scrollTo(0, 0);
53
+ }
54
+
55
+ var returnValues;
56
+
57
+ this.each(function (eachIndex) {
58
+ var $this = $(this),
59
+ obj = $this.data('backstretch');
60
+
61
+ // Do we already have an instance attached to this element?
62
+ if (obj) {
63
+
64
+ // Is this a method they're trying to execute?
65
+ if (typeof args[0] === 'string' &&
66
+ typeof obj[args[0]] === 'function') {
67
+
68
+ // Call the method
69
+ var returnValue = obj[args[0]].apply(obj, Array.prototype.slice.call(args, 1));
70
+ if (returnValue === obj) { // If a method is chaining
71
+ returnValue = undefined;
72
+ }
73
+ if (returnValue !== undefined) {
74
+ returnValues = returnValues || [];
75
+ returnValues[eachIndex] = returnValue;
76
+ }
77
+
78
+ return; // Nothing further to do
79
+ }
80
+
81
+ // Merge the old options with the new
82
+ options = $.extend(obj.options, options);
83
+
84
+ // Remove the old instance
85
+ if (obj.hasOwnProperty('destroy')) {
86
+ obj.destroy(true);
87
+ }
88
+ }
89
+
90
+ // We need at least one image
91
+ if (!images || (images && images.length === 0)) {
92
+ var cssBackgroundImage = $this.css('background-image');
93
+ if (cssBackgroundImage && cssBackgroundImage !== 'none') {
94
+ images = [{
95
+ url: $this.css('backgroundImage').replace(/url\(|\)|"|'/g, '')
96
+ }];
97
+ } else {
98
+ $.error('No images were supplied for Backstretch, or element must have a CSS-defined background image.');
99
+ }
100
+ }
101
+
102
+ obj = new Backstretch(this, images, options || {});
103
+ $this.data('backstretch', obj);
104
+ });
105
+
106
+ return returnValues ? returnValues.length === 1 ? returnValues[0] : returnValues : this;
107
+ };
108
+
109
+ // If no element is supplied, we'll attach to body
110
+ $.backstretch = function (images, options) {
111
+ // Return the instance
112
+ return $('body')
113
+ .backstretch(images, options)
114
+ .data('backstretch');
115
+ };
116
+
117
+ // Custom selector
118
+ $.expr[':'].backstretch = function (elem) {
119
+ return $(elem).data('backstretch') !== undefined;
120
+ };
121
+
122
+ /* DEFAULTS
123
+ * ========================= */
124
+
125
+ $.fn.backstretch.defaults = {
126
+ debug: false
127
+ ,
128
+ duration: 5000 // Amount of time in between slides (if slideshow)
129
+ ,
130
+ transition: 'fade' // Type of transition between slides
131
+ ,
132
+ transitionDuration: 0 // Duration of transition between slides
133
+ ,
134
+ animateFirst: true // Animate the transition of first image of slideshow in?
135
+ ,
136
+ alignX: 0.5 // The x-alignment for the image, can be 'left'|'center'|'right' or any number between 0.0 and 1.0
137
+ ,
138
+ alignY: 0.5 // The y-alignment for the image, can be 'top'|'center'|'bottom' or any number between 0.0 and 1.0
139
+ ,
140
+ paused: false // Whether the images should slide after given duration
141
+ ,
142
+ start: 0 // Index of the first image to show
143
+ ,
144
+ preload: 2 // How many images preload at a time?
145
+ ,
146
+ preloadSize: 1 // How many images can we preload in parallel?
147
+ ,
148
+ resolutionRefreshRate: 2500 // How long to wait before switching resolution?
149
+ ,
150
+ resolutionChangeRatioThreshold: 0.1 // How much a change should it be before switching resolution?
151
+ };
152
+
153
+ /* STYLES
154
+ *
155
+ * Baked-in styles that we'll apply to our elements.
156
+ * In an effort to keep the plugin simple, these are not exposed as options.
157
+ * That said, anyone can override these in their own stylesheet.
158
+ * ========================= */
159
+ var styles = {
160
+ wrap: {
161
+ left: 0,
162
+ top: 0,
163
+ overflow: 'hidden',
164
+ margin: 0,
165
+ padding: 0,
166
+ height: '100%',
167
+ width: '100%',
168
+ zIndex: -999999
169
+ },
170
+ itemWrapper: {
171
+ position: 'absolute',
172
+ display: 'none',
173
+ margin: 0,
174
+ padding: 0,
175
+ border: 'none',
176
+ width: '100%',
177
+ height: '100%',
178
+ zIndex: -999999
179
+ },
180
+ item: {
181
+ position: 'absolute',
182
+ margin: 0,
183
+ padding: 0,
184
+ border: 'none',
185
+ width: '100%',
186
+ height: '100%',
187
+ maxWidth: 'none'
188
+ }
189
+ };
190
+
191
+ /* Given an array of different options for an image,
192
+ * choose the optimal image for the container size.
193
+ *
194
+ * Given an image template (a string with {{ width }} and/or
195
+ * {{height}} inside) and a container object, returns the
196
+ * image url with the exact values for the size of that
197
+ * container.
198
+ *
199
+ * Returns an array of urls optimized for the specified resolution.
200
+ *
201
+ */
202
+ var optimalSizeImages = (function () {
203
+
204
+ /* Sorts the array of image sizes based on width */
205
+ var widthInsertSort = function (arr) {
206
+ for (var i = 1; i < arr.length; i++) {
207
+ var tmp = arr[i],
208
+ j = i;
209
+ while (arr[j - 1] && parseInt(arr[j - 1].width, 10) > parseInt(tmp.width, 10)) {
210
+ arr[j] = arr[j - 1];
211
+ --j;
212
+ }
213
+ arr[j] = tmp;
214
+ }
215
+
216
+ return arr;
217
+ };
218
+
219
+ /* Given an array of various sizes of the same image and a container width,
220
+ * return the best image.
221
+ */
222
+ var selectBest = function (containerWidth, containerHeight, imageSizes) {
223
+
224
+ var devicePixelRatio = window.devicePixelRatio || 1;
225
+ var deviceOrientation = getDeviceOrientation();
226
+ var windowOrientation = getWindowOrientation();
227
+ var wrapperOrientation = (containerHeight > containerWidth) ?
228
+ 'portrait' :
229
+ (containerWidth > containerHeight ? 'landscape' : 'square');
230
+
231
+ var lastAllowedImage = 0;
232
+ var testWidth;
233
+
234
+ for (var j = 0, image; j < imageSizes.length; j++) {
235
+
236
+ image = imageSizes[j];
237
+
238
+ // In case a new image was pushed in, process it:
239
+ if (typeof image === 'string') {
240
+ image = imageSizes[j] = {
241
+ url: image
242
+ };
243
+ }
244
+
245
+ if (image.pixelRatio && image.pixelRatio !== 'auto' && parseFloat(image.pixelRatio) !== devicePixelRatio) {
246
+ // We disallowed choosing this image for current device pixel ratio,
247
+ // So skip this one.
248
+ continue;
249
+ }
250
+
251
+ if (image.deviceOrientation && image.deviceOrientation !== deviceOrientation) {
252
+ // We disallowed choosing this image for current device orientation,
253
+ // So skip this one.
254
+ continue;
255
+ }
256
+
257
+ if (image.windowOrientation && image.windowOrientation !== deviceOrientation) {
258
+ // We disallowed choosing this image for current window orientation,
259
+ // So skip this one.
260
+ continue;
261
+ }
262
+
263
+ if (image.orientation && image.orientation !== wrapperOrientation) {
264
+ // We disallowed choosing this image for current element's orientation,
265
+ // So skip this one.
266
+ continue;
267
+ }
268
+
269
+ // Mark this one as the last one we investigated
270
+ // which does not violate device pixel ratio rules.
271
+ // We may choose this one later if there's no match.
272
+ lastAllowedImage = j;
273
+
274
+ // For most images, we match the specified width against element width,
275
+ // And enforcing a limit depending on the "pixelRatio" property if specified.
276
+ // But if a pixelRatio="auto", then we consider the width as the physical width of the image,
277
+ // And match it while considering the device's pixel ratio.
278
+ testWidth = containerWidth;
279
+ if (image.pixelRatio === 'auto') {
280
+ containerWidth *= devicePixelRatio;
281
+ }
282
+
283
+ // Stop when the width of the image is larger or equal to the container width
284
+ if (image.width >= testWidth) {
285
+ break;
286
+ }
287
+ }
288
+
289
+ // Use the image located at where we stopped
290
+ return imageSizes[Math.min(j, lastAllowedImage)];
291
+ };
292
+
293
+ var replaceTagsInUrl = function (url, templateReplacer) {
294
+
295
+ if (typeof url === 'string') {
296
+ url = url.replace(/{{(width|height)}}/g, templateReplacer);
297
+ } else if (url instanceof Array) {
298
+ for (var i = 0; i < url.length; i++) {
299
+ if (url[i].src) {
300
+ url[i].src = replaceTagsInUrl(url[i].src, templateReplacer);
301
+ } else {
302
+ url[i] = replaceTagsInUrl(url[i], templateReplacer);
303
+ }
304
+ }
305
+ }
306
+
307
+ return url;
308
+ };
309
+
310
+ return function ($container, images) {
311
+ var containerWidth = $container.width(),
312
+ containerHeight = $container.height();
313
+
314
+ var chosenImages = [];
315
+
316
+ var templateReplacer = function (match, key) {
317
+ if (key === 'width') {
318
+ return containerWidth;
319
+ }
320
+ if (key === 'height') {
321
+ return containerHeight;
322
+ }
323
+ return match;
324
+ };
325
+
326
+ for (var i = 0; i < images.length; i++) {
327
+ if ($.isArray(images[i])) {
328
+ images[i] = widthInsertSort(images[i]);
329
+ var chosen = selectBest(containerWidth, containerHeight, images[i]);
330
+ chosenImages.push(chosen);
331
+ } else {
332
+ // In case a new image was pushed in, process it:
333
+ if (typeof images[i] === 'string') {
334
+ images[i] = {
335
+ url: images[i]
336
+ };
337
+ }
338
+
339
+ var item = $.extend({}, images[i]);
340
+ item.url = replaceTagsInUrl(item.url, templateReplacer);
341
+ chosenImages.push(item);
342
+ }
343
+ }
344
+ return chosenImages;
345
+ };
346
+
347
+ })();
348
+
349
+ var isVideoSource = function (source) {
350
+ return YOUTUBE_REGEXP.test(source.url) || source.isVideo;
351
+ };
352
+
353
+ /* Preload images */
354
+ var preload = (function (sources, startAt, count, batchSize, callback) {
355
+ // Plugin cache
356
+ var cache = [];
357
+
358
+ // Wrapper for cache
359
+ var caching = function (image) {
360
+ for (var i = 0; i < cache.length; i++) {
361
+ if (cache[i].src === image.src) {
362
+ return cache[i];
363
+ }
364
+ }
365
+ cache.push(image);
366
+ return image;
367
+ };
368
+
369
+ // Execute callback
370
+ var exec = function (sources, callback, last) {
371
+ if (typeof callback === 'function') {
372
+ callback.call(sources, last);
373
+ }
374
+ };
375
+
376
+ // Closure to hide cache
377
+ return function preload(sources, startAt, count, batchSize, callback) {
378
+ // Check input data
379
+ if (typeof sources === 'undefined') {
380
+ return;
381
+ }
382
+ if (!$.isArray(sources)) {
383
+ sources = [sources];
384
+ }
385
+
386
+ if (arguments.length < 5 && typeof arguments[arguments.length - 1] === 'function') {
387
+ callback = arguments[arguments.length - 1];
388
+ }
389
+
390
+ startAt = (typeof startAt === 'function' || !startAt) ? 0 : startAt;
391
+ count = (typeof count === 'function' || !count || count < 0) ? sources.length : Math.min(count, sources.length);
392
+ batchSize = (typeof batchSize === 'function' || !batchSize) ? 1 : batchSize;
393
+
394
+ if (startAt >= sources.length) {
395
+ startAt = 0;
396
+ count = 0;
397
+ }
398
+ if (batchSize < 0) {
399
+ batchSize = count;
400
+ }
401
+ batchSize = Math.min(batchSize, count);
402
+
403
+ var next = sources.slice(startAt + batchSize, count - batchSize);
404
+ sources = sources.slice(startAt, batchSize);
405
+ count = sources.length;
406
+
407
+ // If sources array is empty
408
+ if (!count) {
409
+ exec(sources, callback, true);
410
+ return;
411
+ }
412
+
413
+ // Image loading callback
414
+ var countLoaded = 0;
415
+
416
+ var loaded = function () {
417
+ countLoaded++;
418
+ if (countLoaded !== count) {
419
+ return;
420
+ }
421
+
422
+ exec(sources, callback, !next);
423
+ preload(next, 0, 0, batchSize, callback);
424
+ };
425
+
426
+ // Loop sources to preload
427
+ var image;
428
+
429
+ for (var i = 0; i < sources.length; i++) {
430
+
431
+ if (isVideoSource(sources[i])) {
432
+
433
+ // Do not preload videos. There are issues with that.
434
+ // First - we need to keep an instance of the preloaded and use that exactly, not a copy.
435
+ // Second - there are memory issues.
436
+ // If there will be a requirement from users - I'll try to implement this.
437
+
438
+ continue;
439
+
440
+ } else {
441
+
442
+ image = new Image();
443
+ image.src = sources[i].url;
444
+
445
+ image = caching(image);
446
+
447
+ if (image.complete) {
448
+ loaded();
449
+ } else {
450
+ $(image).on('load error', loaded);
451
+ }
452
+
453
+ }
454
+
455
+ }
456
+ };
457
+ })();
458
+
459
+ /* Process images array */
460
+ var processImagesArray = function (images) {
461
+ var processed = [];
462
+ for (var i = 0; i < images.length; i++) {
463
+ if (typeof images[i] === 'string') {
464
+ processed.push({
465
+ url: images[i]
466
+ });
467
+ } else if ($.isArray(images[i])) {
468
+ processed.push(processImagesArray(images[i]));
469
+ } else {
470
+ processed.push(processOptions(images[i]));
471
+ }
472
+ }
473
+ return processed;
474
+ };
475
+
476
+ /* Process options */
477
+ var processOptions = function (options, required) {
478
+
479
+ // Convert old options
480
+
481
+ // centeredX/centeredY are deprecated
482
+ if (options.centeredX || options.centeredY) {
483
+ if (window.console && window.console.log) {
484
+ window.console.log('jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`');
485
+ }
486
+ if (options.centeredX) {
487
+ options.alignX = 0.5;
488
+ }
489
+ if (options.centeredY) {
490
+ options.alignY = 0.5;
491
+ }
492
+ }
493
+
494
+ // Deprecated spec
495
+ if (options.speed !== undefined) {
496
+
497
+ if (window.console && window.console.log) {
498
+ window.console.log('jquery.backstretch: `speed` is deprecated, please use `transitionDuration`');
499
+ }
500
+
501
+ options.transitionDuration = options.speed;
502
+ options.transition = 'fade';
503
+ }
504
+
505
+ // Typo
506
+ if (options.resolutionChangeRatioTreshold !== undefined) {
507
+ window.console.log('jquery.backstretch: `treshold` is a typo!');
508
+ options.resolutionChangeRatioThreshold = options.resolutionChangeRatioTreshold;
509
+ }
510
+
511
+ // Current spec that needs processing
512
+
513
+ if (options.fadeFirst !== undefined) {
514
+ options.animateFirst = options.fadeFirst;
515
+ }
516
+
517
+ if (options.fade !== undefined) {
518
+ options.transitionDuration = options.fade;
519
+ options.transition = 'fade';
520
+ }
521
+
522
+ if (options.scale) {
523
+ options.scale = validScale(options.scale);
524
+ }
525
+
526
+ return processAlignOptions(options);
527
+ };
528
+
529
+ /* Process align options */
530
+ var processAlignOptions = function (options, required) {
531
+ if (options.alignX === 'left') {
532
+ options.alignX = 0.0;
533
+ } else if (options.alignX === 'center') {
534
+ options.alignX = 0.5;
535
+ } else if (options.alignX === 'right') {
536
+ options.alignX = 1.0;
537
+ } else {
538
+ if (options.alignX !== undefined || required) {
539
+ options.alignX = parseFloat(options.alignX);
540
+ if (isNaN(options.alignX)) {
541
+ options.alignX = 0.5;
542
+ }
543
+ }
544
+ }
545
+
546
+ if (options.alignY === 'top') {
547
+ options.alignY = 0.0;
548
+ } else if (options.alignY === 'center') {
549
+ options.alignY = 0.5;
550
+ } else if (options.alignY === 'bottom') {
551
+ options.alignY = 1.0;
552
+ } else {
553
+ if (options.alignX !== undefined || required) {
554
+ options.alignY = parseFloat(options.alignY);
555
+ if (isNaN(options.alignY)) {
556
+ options.alignY = 0.5;
557
+ }
558
+ }
559
+ }
560
+
561
+ return options;
562
+ };
563
+
564
+ var SUPPORTED_SCALE_OPTIONS = {
565
+ 'cover': 'cover',
566
+ 'fit': 'fit',
567
+ 'fit-smaller': 'fit-smaller',
568
+ 'fill': 'fill'
569
+ };
570
+
571
+ function validScale(scale) {
572
+ if (!SUPPORTED_SCALE_OPTIONS.hasOwnProperty(scale)) {
573
+ return 'cover';
574
+ }
575
+ return scale;
576
+ }
577
+
578
+ /* CLASS DEFINITION
579
+ * ========================= */
580
+ var Backstretch = function (container, images, options) {
581
+ this.options = $.extend({}, $.fn.backstretch.defaults, options || {});
582
+
583
+ this.firstShow = true;
584
+
585
+ // Process options
586
+ processOptions(this.options, true);
587
+
588
+ /* In its simplest form, we allow Backstretch to be called on an image path.
589
+ * e.g. $.backstretch('/path/to/image.jpg')
590
+ * So, we need to turn this back into an array.
591
+ */
592
+ this.images = processImagesArray($.isArray(images) ? images : [images]);
593
+
594
+ /**
595
+ * Paused-Option
596
+ */
597
+ if (this.options.paused) {
598
+ this.paused = true;
599
+ }
600
+
601
+ /**
602
+ * Start-Option (Index)
603
+ */
604
+ if (this.options.start >= this.images.length) {
605
+ this.options.start = this.images.length - 1;
606
+ }
607
+ if (this.options.start < 0) {
608
+ this.options.start = 0;
609
+ }
610
+
611
+ // Convenience reference to know if the container is body.
612
+ this.isBody = container === document.body;
613
+
614
+ /* We're keeping track of a few different elements
615
+ *
616
+ * Container: the element that Backstretch was called on.
617
+ * Wrap: a DIV that we place the image into, so we can hide the overflow.
618
+ * Root: Convenience reference to help calculate the correct height.
619
+ */
620
+ var $window = $(window);
621
+ this.$container = $(container);
622
+ this.$root = this.isBody ? supportsFixedPosition ? $window : $(document) : this.$container;
623
+
624
+ this.originalImages = this.images;
625
+ this.images = optimalSizeImages(
626
+ this.options.alwaysTestWindowResolution ? $window : this.$root,
627
+ this.originalImages);
628
+
629
+ /**
630
+ * Pre-Loading.
631
+ * This is the first image, so we will preload a minimum of 1 images.
632
+ */
633
+ preload(this.images, this.options.start || 0, this.options.preload || 1);
634
+
635
+ // Don't create a new wrap if one already exists (from a previous instance of Backstretch)
636
+ var $existing = this.$container.children('.backstretch').first();
637
+ this.$wrap = $existing.length ? $existing :
638
+ $('<div class="backstretch"></div>')
639
+ .css(this.options.bypassCss ? {} : styles.wrap)
640
+ .appendTo(this.$container);
641
+
642
+ if (!this.options.bypassCss) {
643
+
644
+ // Non-body elements need some style adjustments
645
+ if (!this.isBody) {
646
+ // If the container is statically positioned, we need to make it relative,
647
+ // and if no zIndex is defined, we should set it to zero.
648
+ var position = this.$container.css('position'),
649
+ zIndex = this.$container.css('zIndex');
650
+
651
+ this.$container.css({
652
+ position: position === 'static' ? 'relative' : position,
653
+ zIndex: zIndex === 'auto' ? 0 : zIndex
654
+ });
655
+
656
+ // Needs a higher z-index
657
+ this.$wrap.css({
658
+ zIndex: -999998
659
+ });
660
+ }
661
+
662
+ // Fixed or absolute positioning?
663
+ this.$wrap.css({
664
+ position: this.isBody && supportsFixedPosition ? 'fixed' : 'absolute'
665
+ });
666
+
667
+ }
668
+
669
+ // Set the first image
670
+ this.index = this.options.start;
671
+ this.show(this.index);
672
+
673
+ // Listen for resize
674
+ $window.on('resize.backstretch', $.proxy(this.resize, this))
675
+ .on('orientationchange.backstretch', $.proxy(function () {
676
+ // Need to do this in order to get the right window height
677
+ if (this.isBody && window.pageYOffset === 0) {
678
+ window.scrollTo(0, 1);
679
+ this.resize();
680
+ }
681
+ }, this));
682
+ };
683
+
684
+ var performTransition = function (options) {
685
+
686
+ var transition = options.transition || 'fade';
687
+
688
+ // Look for multiple options
689
+ if (typeof transition === 'string' && transition.indexOf('|') > -1) {
690
+ transition = transition.split('|');
691
+ }
692
+
693
+ if (transition instanceof Array) {
694
+ transition = transition[Math.round(Math.random() * (transition.length - 1))];
695
+ }
696
+
697
+ var $new = options['new'];
698
+ var $old = options['old'] ? options['old'] : $([]);
699
+
700
+ switch (transition.toString().toLowerCase()) {
701
+
702
+ default:
703
+ case 'fade':
704
+ $new.fadeIn({
705
+ duration: options.duration,
706
+ complete: options.complete,
707
+ easing: options.easing || undefined
708
+ });
709
+ break;
710
+
711
+ case 'fadeinout':
712
+ case 'fade_in_out':
713
+
714
+ var fadeInNew = function () {
715
+ $new.fadeIn({
716
+ duration: options.duration / 2,
717
+ complete: options.complete,
718
+ easing: options.easing || undefined
719
+ });
720
+ };
721
+
722
+ if ($old.length) {
723
+ $old.fadeOut({
724
+ duration: options.duration / 2,
725
+ complete: fadeInNew,
726
+ easing: options.easing || undefined
727
+ });
728
+ } else {
729
+ fadeInNew();
730
+ }
731
+
732
+ break;
733
+
734
+ case 'pushleft':
735
+ case 'push_left':
736
+ case 'pushright':
737
+ case 'push_right':
738
+ case 'pushup':
739
+ case 'push_up':
740
+ case 'pushdown':
741
+ case 'push_down':
742
+ case 'coverleft':
743
+ case 'cover_left':
744
+ case 'coverright':
745
+ case 'cover_right':
746
+ case 'coverup':
747
+ case 'cover_up':
748
+ case 'coverdown':
749
+ case 'cover_down':
750
+
751
+ var transitionParts = transition.match(/^(cover|push)_?(.*)$/);
752
+
753
+ var animProp = transitionParts[2] === 'left' ? 'right' : transitionParts[2] === 'right' ? 'left' : transitionParts[2] === 'down' ? 'top' : transitionParts[2] === 'up' ? 'bottom' : 'right';
754
+
755
+ var newCssStart = {
756
+ 'display': ''
757
+ },
758
+ newCssAnim = {};
759
+ newCssStart[animProp] = '-100%';
760
+ newCssAnim[animProp] = 0;
761
+
762
+ $new
763
+ .css(newCssStart)
764
+ .animate(newCssAnim, {
765
+ duration: options.duration,
766
+ complete: function () {
767
+ $new.css(animProp, '');
768
+ options.complete.apply(this, arguments);
769
+ },
770
+ easing: options.easing || undefined
771
+ });
772
+
773
+ if (transitionParts[1] === 'push' && $old.length) {
774
+ var oldCssAnim = {};
775
+ oldCssAnim[animProp] = '100%';
776
+
777
+ $old
778
+ .animate(oldCssAnim, {
779
+ duration: options.duration,
780
+ complete: function () {
781
+ $old.css('display', 'none');
782
+ },
783
+ easing: options.easing || undefined
784
+ });
785
+ }
786
+
787
+ break;
788
+ }
789
+
790
+ };
791
+
792
+ /* PUBLIC METHODS
793
+ * ========================= */
794
+ Backstretch.prototype = {
795
+
796
+ resize: function () {
797
+ try {
798
+ // var debug = false;
799
+ var logger = log4javascript.getLogger('j1.core.attic');
800
+
801
+ // Check for a better suited image after the resize
802
+ var $resTest = this.options.alwaysTestWindowResolution ? $(window) : this.$root;
803
+ var newContainerWidth = $resTest.width();
804
+ var newContainerHeight = $resTest.height();
805
+ var changeRatioW = newContainerWidth / (this._lastResizeContainerWidth || 0);
806
+ var changeRatioH = newContainerHeight / (this._lastResizeContainerHeight || 0);
807
+ var resolutionChangeRatioThreshold = this.options.resolutionChangeRatioThreshold || 0.0;
808
+
809
+ // check for big changes in container size
810
+ if ((newContainerWidth !== this._lastResizeContainerWidth ||
811
+ newContainerHeight !== this._lastResizeContainerHeight) &&
812
+ ((Math.abs(changeRatioW - 1) >= resolutionChangeRatioThreshold || isNaN(changeRatioW)) ||
813
+ (Math.abs(changeRatioH - 1) >= resolutionChangeRatioThreshold || isNaN(changeRatioH)))) {
814
+
815
+ this._lastResizeContainerWidth = newContainerWidth;
816
+ this._lastResizeContainerHeight = newContainerHeight;
817
+
818
+ // Big change: rebuild the entire images array
819
+ this.images = optimalSizeImages($resTest, this.originalImages);
820
+
821
+ // Preload them (they will be automatically inserted on the next cycle)
822
+ if (this.options.preload) {
823
+ preload(this.images, (this.index + 1) % this.images.length, this.options.preload);
824
+ }
825
+
826
+ // In case there is no cycle and the new source is different than the current
827
+ if (this.images.length === 1 &&
828
+ this._currentImage.url !== this.images[0].url) {
829
+
830
+ // Wait a little an update the image being showed
831
+ var that = this;
832
+ clearTimeout(that._selectAnotherResolutionTimeout);
833
+ that._selectAnotherResolutionTimeout = setTimeout(function () {
834
+ that.show(0);
835
+ }, this.options.resolutionRefreshRate);
836
+ }
837
+ }
838
+
839
+ var bgCSS = {
840
+ left: 0,
841
+ top: 0,
842
+ right: 'auto',
843
+ bottom: 'auto'
844
+ }
845
+
846
+ ,
847
+ boxWidth = this.isBody ? this.$root.width() : this.$root.innerWidth(),
848
+ boxHeight = this.isBody ? (window.innerHeight ? window.innerHeight : this.$root.height()) : this.$root.innerHeight()
849
+
850
+ ,
851
+ naturalWidth = this.$itemWrapper.data('width'),
852
+ naturalHeight = this.$itemWrapper.data('height')
853
+
854
+ ,
855
+ ratio = (naturalWidth / naturalHeight) || 1
856
+
857
+ ,
858
+ alignX = this._currentImage.alignX === undefined ? this.options.alignX : this._currentImage.alignX,
859
+ alignY = this._currentImage.alignY === undefined ? this.options.alignY : this._currentImage.alignY,
860
+ scale = validScale(this._currentImage.scale || this.options.scale);
861
+
862
+ // jadams, 2017-12-07: Added log for testing
863
+ if(this.options.debug) {
864
+ logText = '\n' + 'resize: boxHeight x boxWidth: ' + boxHeight + ' x ' + boxWidth;
865
+ logger.debug(logText);
866
+ }
867
+
868
+ if ( boxHeight == 0 || boxWidth == 0 ) {
869
+ logText = '\n' + 'Kacke am Schuh';
870
+ logger.warn(logText);
871
+ }
872
+
873
+ var width, height;
874
+ if (scale === 'fit' || scale === 'fit-smaller') {
875
+ width = naturalWidth;
876
+ height = naturalHeight;
877
+
878
+ if (width > boxWidth ||
879
+ height > boxHeight ||
880
+ scale === 'fit-smaller') {
881
+ var boxRatio = boxWidth / boxHeight;
882
+ if (boxRatio > ratio) {
883
+ width = Math.floor(boxHeight * ratio);
884
+ height = boxHeight;
885
+ } else if (boxRatio < ratio) {
886
+ width = boxWidth;
887
+ height = Math.floor(boxWidth / ratio);
888
+ } else {
889
+ width = boxWidth;
890
+ height = boxHeight;
891
+ }
892
+ }
893
+ } else if (scale === 'fill') {
894
+ width = boxWidth;
895
+ height = boxHeight;
896
+ } else { // 'cover'
897
+ width = Math.max(boxHeight * ratio, boxWidth);
898
+ height = Math.max(width / ratio, boxHeight);
899
+ }
900
+
901
+ // Make adjustments based on image ratio
902
+ bgCSS.top = -(height - boxHeight) * alignY;
903
+ bgCSS.left = -(width - boxWidth) * alignX;
904
+ bgCSS.width = width;
905
+ bgCSS.height = height;
906
+
907
+ if (!this.options.bypassCss) {
908
+
909
+ this.$wrap
910
+ .css({
911
+ width: boxWidth,
912
+ height: boxHeight
913
+ })
914
+ .find('>.backstretch-item').not('.deleteable')
915
+ .each(function () {
916
+ var $wrapper = $(this);
917
+ $wrapper.find('img,video,iframe')
918
+ .css(bgCSS);
919
+ });
920
+ }
921
+
922
+ var evt = $.Event('backstretch.resize', {
923
+ relatedTarget: this.$container[0]
924
+ });
925
+ this.$container.trigger(evt, this);
926
+
927
+ } catch (err) {
928
+ // IE7 seems to trigger resize before the image is loaded.
929
+ // This try/catch block is a hack to let it fail gracefully.
930
+ logText = 'resize: jadams, IE7 hack to let it fail gracefully: ' + err;
931
+ logger.warn(logText);
932
+ }
933
+
934
+ return this;
935
+ }
936
+
937
+ // Show the slide at a certain position
938
+ ,
939
+ show: function (newIndex, overrideOptions) {
940
+
941
+ var logger = log4javascript.getLogger('j1.core.attic');
942
+
943
+ // Validate index
944
+ if (Math.abs(newIndex) > this.images.length - 1) {
945
+ return;
946
+ }
947
+
948
+ // Vars
949
+ var that = this,
950
+ $oldItemWrapper = that.$wrap.find('>.backstretch-item').addClass('deleteable'),
951
+ oldVideoWrapper = that.videoWrapper,
952
+ evtOptions = {
953
+ relatedTarget: that.$container[0]
954
+ };
955
+
956
+ // Trigger the "before" event
957
+ that.$container.trigger($.Event('backstretch.before', evtOptions), [that, newIndex]);
958
+
959
+ // Set the new frame index
960
+ this.index = newIndex;
961
+ var selectedImage = that.images[newIndex];
962
+
963
+ // Pause the slideshow
964
+ clearTimeout(that._cycleTimeout);
965
+
966
+ // New image
967
+
968
+ delete that.videoWrapper; // Current item may not be a video
969
+
970
+ var isVideo = isVideoSource(selectedImage);
971
+ if (isVideo) {
972
+ that.videoWrapper = new VideoWrapper(selectedImage);
973
+ that.$item = that.videoWrapper.$video.css('pointer-events', 'none');
974
+ } else {
975
+ that.$item = $('<img />');
976
+ }
977
+
978
+ that.$itemWrapper = $('<div class="backstretch-item">')
979
+ .append(that.$item);
980
+
981
+ if (this.options.bypassCss) {
982
+ that.$itemWrapper.css({
983
+ 'display': 'none'
984
+ });
985
+ } else {
986
+ that.$itemWrapper.css(styles.itemWrapper);
987
+ that.$item.css(styles.item);
988
+ }
989
+
990
+ that.$item.bind(isVideo ? 'canplay' : 'load', function (e) {
991
+ var $this = $(this),
992
+ $wrapper = $this.parent(),
993
+ options = $wrapper.data('options');
994
+
995
+ if (overrideOptions) {
996
+ options = $.extend({}, options, overrideOptions);
997
+ }
998
+
999
+ var imgWidth = this.naturalWidth || this.videoWidth || this.width,
1000
+ imgHeight = this.naturalHeight || this.videoHeight || this.height;
1001
+
1002
+ // Save the natural dimensions
1003
+ $wrapper
1004
+ .data('width', imgWidth)
1005
+ .data('height', imgHeight);
1006
+
1007
+ var getOption = function (opt) {
1008
+ return options[opt] !== undefined ?
1009
+ options[opt] :
1010
+ that.options[opt];
1011
+ };
1012
+
1013
+ var transition = getOption('transition');
1014
+ var transitionEasing = getOption('transitionEasing');
1015
+ var transitionDuration = getOption('transitionDuration');
1016
+
1017
+ // Show the image, then delete the old one
1018
+ var bringInNextImage = function () {
1019
+
1020
+ if (oldVideoWrapper) {
1021
+ oldVideoWrapper.stop();
1022
+ oldVideoWrapper.destroy();
1023
+ }
1024
+
1025
+ $oldItemWrapper.remove();
1026
+
1027
+ // Resume the slideshow
1028
+ if (!that.paused && that.images.length > 1) {
1029
+ that.cycle();
1030
+ }
1031
+
1032
+ // Now we can clear the background on the element, to spare memory
1033
+ if (!that.options.bypassCss && !that.isBody) {
1034
+ // jadams, 2017-09-30: leave background unchanged
1035
+ //that.$container.css('background-image', 'none');
1036
+ }
1037
+
1038
+ // Trigger the "after" and "show" events
1039
+ // jadams 2022-07-23: added missing 'before' event
1040
+ // "show" (as an event) is being deprecated (used only internallly)
1041
+ // $(['after', 'show']).each(function () {
1042
+ $(['before', 'after', 'show']).each(function () {
1043
+ that.$container.trigger($.Event('backstretch.' + this, evtOptions), [that, newIndex]);
1044
+ });
1045
+
1046
+ if (isVideo) {
1047
+ that.videoWrapper.play();
1048
+ }
1049
+ };
1050
+
1051
+ if ((that.firstShow && !that.options.animateFirst) || !transitionDuration || !transition) {
1052
+ // Avoid transition on first show or if there's no transitionDuration value
1053
+ $wrapper.show();
1054
+ bringInNextImage();
1055
+ } else {
1056
+
1057
+ performTransition({
1058
+ 'new': $wrapper,
1059
+ old: $oldItemWrapper,
1060
+ transition: transition,
1061
+ duration: transitionDuration,
1062
+ easing: transitionEasing,
1063
+ complete: bringInNextImage
1064
+ });
1065
+
1066
+ }
1067
+
1068
+ that.firstShow = false;
1069
+
1070
+ // jadams, 2017-12-07: Added log for debug mode
1071
+ var imageWidth = this.naturalWidth || this.videoWidth || this.width;
1072
+ var imageHeight = this.naturalHeight || this.videoHeight || this.height;
1073
+ var logText = 'show: imageHeight x imageWidth: ' + imageHeight + ' x ' + imageWidth;
1074
+
1075
+ if(that.options.debug) {
1076
+ logger.debug(logText);
1077
+ }
1078
+
1079
+ // jadams, 2019-08-06: a resize requires a VISIBLE element otherwise
1080
+ // the calculatiin of the images dimensions will fail.
1081
+ // As a workaround, wait until the element is visible
1082
+ // Run resize on the image loaded for re-scaling
1083
+ var myID = '#' + that.$container['0']['id'];
1084
+ var isVisible = setInterval(function() {
1085
+ if ($(myID).is(':visible')) {
1086
+ // clear interval checking
1087
+ clearInterval(isVisible);
1088
+ logger.info('\n' + 'container visible on id: ' + myID);
1089
+ that.resize();
1090
+ }
1091
+ }, 50); // END 'isVisible'
1092
+
1093
+ });
1094
+
1095
+ that.$itemWrapper.appendTo(that.$wrap);
1096
+
1097
+ that.$item.attr('alt', selectedImage.alt || '');
1098
+ that.$itemWrapper.data('options', selectedImage);
1099
+
1100
+ if (!isVideo) {
1101
+ that.$item.attr('src', selectedImage.url);
1102
+ }
1103
+
1104
+ that._currentImage = selectedImage;
1105
+
1106
+ return that;
1107
+ }
1108
+
1109
+ ,
1110
+ current: function () {
1111
+ return this.index;
1112
+ }
1113
+
1114
+ ,
1115
+ next: function () {
1116
+ var args = Array.prototype.slice.call(arguments, 0);
1117
+ args.unshift(this.index < this.images.length - 1 ? this.index + 1 : 0);
1118
+ return this.show.apply(this, args);
1119
+ }
1120
+
1121
+ ,
1122
+ prev: function () {
1123
+ var args = Array.prototype.slice.call(arguments, 0);
1124
+ args.unshift(this.index === 0 ? this.images.length - 1 : this.index - 1);
1125
+ return this.show.apply(this, args);
1126
+ }
1127
+
1128
+ ,
1129
+ pause: function () {
1130
+ // Pause the slideshow
1131
+ this.paused = true;
1132
+
1133
+ if (this.videoWrapper) {
1134
+ this.videoWrapper.pause();
1135
+ }
1136
+
1137
+ return this;
1138
+ }
1139
+
1140
+ ,
1141
+ resume: function () {
1142
+ // Resume the slideshow
1143
+ this.paused = false;
1144
+
1145
+ if (this.videoWrapper) {
1146
+ this.videoWrapper.play();
1147
+ }
1148
+
1149
+ this.cycle();
1150
+ return this;
1151
+ }
1152
+
1153
+ ,
1154
+ cycle: function () {
1155
+ // Start/resume the slideshow
1156
+ if (this.images.length > 1) {
1157
+ // Clear the timeout, just in case
1158
+ clearTimeout(this._cycleTimeout);
1159
+
1160
+ var duration = (this._currentImage && this._currentImage.duration) || this.options.duration;
1161
+ var isVideo = isVideoSource(this._currentImage);
1162
+
1163
+ var callNext = function () {
1164
+ this.$item.off('.cycle');
1165
+
1166
+ // Check for paused slideshow
1167
+ if (!this.paused) {
1168
+ this.next();
1169
+ }
1170
+ };
1171
+
1172
+ // Special video handling
1173
+ if (isVideo) {
1174
+
1175
+ // Leave video at last frame
1176
+ if (!this._currentImage.loop) {
1177
+ var lastFrameTimeout = 0;
1178
+
1179
+ this.$item
1180
+ .on('playing.cycle', function () {
1181
+ var player = $(this).data('player');
1182
+
1183
+ // jadams, 2017-10-10: Workaround the wrong handling of the
1184
+ // HTML5 Audio/Video property .data
1185
+ // See https://www.w3schools.com/tags/ref_av_dom.asp for more
1186
+ // details for HTML Audio and Video DOM Reference
1187
+
1188
+ // ToDo: In general it should work. To be fixed.
1189
+
1190
+ clearTimeout(lastFrameTimeout);
1191
+ if (typeof player != 'undefined') {
1192
+ lastFrameTimeout = setTimeout(function () {
1193
+ player.pause();
1194
+ player.$video.trigger('ended');
1195
+ }, (player.getDuration() - player.getCurrentTime()) * 1000);
1196
+ }
1197
+ })
1198
+ .on('ended.cycle', function () {
1199
+ clearTimeout(lastFrameTimeout);
1200
+ });
1201
+ }
1202
+
1203
+ // On error go to next
1204
+ this.$item.on('error.cycle initerror.cycle', $.proxy(callNext, this));
1205
+ }
1206
+
1207
+ if (isVideo && !this._currentImage.duration) {
1208
+ // It's a video - playing until end
1209
+ this.$item.on('ended.cycle', $.proxy(callNext, this));
1210
+
1211
+ } else {
1212
+ // Cycling according to specified duration
1213
+ this._cycleTimeout = setTimeout($.proxy(callNext, this), duration);
1214
+ }
1215
+
1216
+ }
1217
+ return this;
1218
+ }
1219
+
1220
+ ,
1221
+ destroy: function (preserveBackground) {
1222
+ // Stop the resize events
1223
+ $(window).off('resize.backstretch orientationchange.backstretch');
1224
+
1225
+ // Stop any videos
1226
+ if (this.videoWrapper) {
1227
+ this.videoWrapper.destroy();
1228
+ }
1229
+
1230
+ // Clear the timeout
1231
+ clearTimeout(this._cycleTimeout);
1232
+
1233
+ // Remove Backstretch
1234
+ if (!preserveBackground) {
1235
+ this.$wrap.remove();
1236
+ }
1237
+ this.$container.removeData('backstretch');
1238
+ }
1239
+ };
1240
+
1241
+ /**
1242
+ * Video Abstraction Layer
1243
+ *
1244
+ * Static methods:
1245
+ * > VideoWrapper.loadYoutubeAPI() -> Call in order to load the Youtube API.
1246
+ * An 'youtube_api_load' event will be triggered on $(window) when the API is loaded.
1247
+ *
1248
+ * Generic:
1249
+ * > player.type -> type of the video
1250
+ * > player.video / player.$video -> contains the element holding the video
1251
+ * > player.play() -> plays the video
1252
+ * > player.pause() -> pauses the video
1253
+ * > player.setCurrentTime(position) -> seeks to a position by seconds
1254
+ *
1255
+ * Youtube:
1256
+ * > player.ytId will contain the youtube ID if the source is a youtube url
1257
+ * > player.ytReady is a flag telling whether the youtube source is ready for playback
1258
+ * */
1259
+
1260
+ var VideoWrapper = function () {
1261
+ this.init.apply(this, arguments);
1262
+ };
1263
+
1264
+ /**
1265
+ * @param {Object} options
1266
+ * @param {String|Array<String>|Array<{{src: String, type: String?}}>} options.url
1267
+ * @param {Boolean} options.loop=false
1268
+ * @param {Boolean?} options.mute=true
1269
+ * @param {String?} options.poster
1270
+ * loop, mute, poster
1271
+ */
1272
+ VideoWrapper.prototype.init = function (options) {
1273
+
1274
+ var that = this;
1275
+
1276
+ var $video;
1277
+
1278
+ var setVideoElement = function () {
1279
+ that.$video = $video;
1280
+ that.video = $video[0];
1281
+ };
1282
+
1283
+ // Determine video type
1284
+
1285
+ var videoType = 'video';
1286
+
1287
+ if (!(options.url instanceof Array) &&
1288
+ YOUTUBE_REGEXP.test(options.url)) {
1289
+ videoType = 'youtube';
1290
+ }
1291
+
1292
+ that.type = videoType;
1293
+
1294
+ if (videoType === 'youtube') {
1295
+
1296
+ // Try to load the API in the meantime
1297
+ VideoWrapper.loadYoutubeAPI();
1298
+
1299
+ that.ytId = options.url.match(YOUTUBE_REGEXP)[2];
1300
+ var src = 'https://www.youtube.com/embed/' + that.ytId +
1301
+ '?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1' +
1302
+ '&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0' +
1303
+ '&enablejsapi=1&origin=' + encodeURIComponent(window.location.origin);
1304
+
1305
+ that.__ytStartMuted = !!options.mute || options.mute === undefined;
1306
+
1307
+ $video = $('<iframe />')
1308
+ .attr({
1309
+ 'src_to_load': src
1310
+ })
1311
+ .css({
1312
+ 'border': 0,
1313
+ 'margin': 0,
1314
+ 'padding': 0
1315
+ })
1316
+ .data('player', that);
1317
+
1318
+ if (options.loop) {
1319
+ $video.on('ended.loop', function () {
1320
+ if (!that.__manuallyStopped) {
1321
+ that.play();
1322
+ }
1323
+ });
1324
+ }
1325
+
1326
+ that.ytReady = false;
1327
+
1328
+ setVideoElement();
1329
+
1330
+ if (window['YT']) {
1331
+ that._initYoutube();
1332
+ $video.trigger('initsuccess');
1333
+ } else {
1334
+ $(window).one('youtube_api_load', function () {
1335
+ that._initYoutube();
1336
+ $video.trigger('initsuccess');
1337
+ });
1338
+ }
1339
+
1340
+ } else {
1341
+ // Traditional <video> tag with multiple sources
1342
+
1343
+ $video = $('<video>')
1344
+ .prop('autoplay', false)
1345
+ .prop('controls', false)
1346
+ .prop('loop', !!options.loop)
1347
+ .prop('muted', !!options.mute || options.mute === undefined)
1348
+
1349
+ // Let the first frames be available before playback, as we do transitions
1350
+ .prop('preload', 'auto')
1351
+ .prop('poster', options.poster || '');
1352
+
1353
+ var sources = (options.url instanceof Array) ? options.url : [options.url];
1354
+
1355
+ for (var i = 0; i < sources.length; i++) {
1356
+ var sourceItem = sources[i];
1357
+ if (typeof (sourceItem) === 'string') {
1358
+ sourceItem = {
1359
+ src: sourceItem
1360
+ };
1361
+ }
1362
+ $('<source>')
1363
+ .attr('src', sourceItem.src)
1364
+ // Make sure to not specify type if unknown -
1365
+ // so the browser will try to autodetect.
1366
+ .attr('type', sourceItem.type || null)
1367
+ .appendTo($video);
1368
+ }
1369
+
1370
+ if (!$video[0].canPlayType || !sources.length) {
1371
+ $video.trigger('initerror');
1372
+ } else {
1373
+ $video.trigger('initsuccess');
1374
+ }
1375
+
1376
+ setVideoElement();
1377
+ }
1378
+
1379
+ };
1380
+
1381
+ VideoWrapper.prototype._initYoutube = function () {
1382
+ var that = this;
1383
+
1384
+ var YT = window['YT'];
1385
+
1386
+ that.$video
1387
+ .attr('src', that.$video.attr('src_to_load'))
1388
+ .removeAttr('src_to_load');
1389
+
1390
+ // It won't init if it's not in the DOM, so we emulate that
1391
+ var hasParent = !!that.$video[0].parentNode;
1392
+ if (!hasParent) {
1393
+ var $tmpParent = $('<div>').css('display', 'none !important').appendTo(document.body);
1394
+ that.$video.appendTo($tmpParent);
1395
+ }
1396
+
1397
+ var player = new YT.Player(that.video, {
1398
+ events: {
1399
+ 'onReady': function () {
1400
+
1401
+ if (that.__ytStartMuted) {
1402
+ player.mute();
1403
+ }
1404
+
1405
+ if (!hasParent) {
1406
+ // Restore parent to old state - without interrupting any changes
1407
+ if (that.$video[0].parentNode === $tmpParent[0]) {
1408
+ that.$video.detach();
1409
+ }
1410
+ $tmpParent.remove();
1411
+ }
1412
+
1413
+ that.ytReady = true;
1414
+ that._updateYoutubeSize();
1415
+ that.$video.trigger('canplay');
1416
+ },
1417
+ 'onStateChange': function (event) {
1418
+ switch (event.data) {
1419
+ case YT.PlayerState.PLAYING:
1420
+ that.$video.trigger('playing');
1421
+ break;
1422
+ case YT.PlayerState.ENDED:
1423
+ that.$video.trigger('ended');
1424
+ break;
1425
+ case YT.PlayerState.PAUSED:
1426
+ that.$video.trigger('pause');
1427
+ break;
1428
+ case YT.PlayerState.BUFFERING:
1429
+ that.$video.trigger('waiting');
1430
+ break;
1431
+ case YT.PlayerState.CUED:
1432
+ that.$video.trigger('canplay');
1433
+ break;
1434
+ }
1435
+ },
1436
+ 'onPlaybackQualityChange': function () {
1437
+ that._updateYoutubeSize();
1438
+ that.$video.trigger('resize');
1439
+ },
1440
+ 'onError': function (err) {
1441
+ that.hasError = true;
1442
+ that.$video.trigger({
1443
+ 'type': 'error',
1444
+ 'error': err
1445
+ });
1446
+ }
1447
+ }
1448
+ });
1449
+
1450
+ that.ytPlayer = player;
1451
+
1452
+ return that;
1453
+ };
1454
+
1455
+ VideoWrapper.prototype._updateYoutubeSize = function () {
1456
+ var that = this;
1457
+
1458
+ switch (that.ytPlayer.getPlaybackQuality() || 'medium') {
1459
+ case 'small':
1460
+ that.video.videoWidth = 426;
1461
+ that.video.videoHeight = 240;
1462
+ break;
1463
+ case 'medium':
1464
+ that.video.videoWidth = 640;
1465
+ that.video.videoHeight = 360;
1466
+ break;
1467
+ default:
1468
+ case 'large':
1469
+ that.video.videoWidth = 854;
1470
+ that.video.videoHeight = 480;
1471
+ break;
1472
+ case 'hd720':
1473
+ that.video.videoWidth = 1280;
1474
+ that.video.videoHeight = 720;
1475
+ break;
1476
+ case 'hd1080':
1477
+ that.video.videoWidth = 1920;
1478
+ that.video.videoHeight = 1080;
1479
+ break;
1480
+ case 'highres':
1481
+ that.video.videoWidth = 2560;
1482
+ that.video.videoHeight = 1440;
1483
+ break;
1484
+ }
1485
+
1486
+ return that;
1487
+ };
1488
+
1489
+ VideoWrapper.prototype.play = function () {
1490
+ var that = this;
1491
+
1492
+ that.__manuallyStopped = false;
1493
+
1494
+ if (that.type === 'youtube') {
1495
+ if (that.ytReady) {
1496
+ that.$video.trigger('play');
1497
+ that.ytPlayer.playVideo();
1498
+ }
1499
+ } else {
1500
+ that.video.play();
1501
+ }
1502
+
1503
+ return that;
1504
+ };
1505
+
1506
+ VideoWrapper.prototype.pause = function () {
1507
+ var that = this;
1508
+
1509
+ that.__manuallyStopped = false;
1510
+
1511
+ if (that.type === 'youtube') {
1512
+ if (that.ytReady) {
1513
+ that.ytPlayer.pauseVideo();
1514
+ }
1515
+ } else {
1516
+ that.video.pause();
1517
+ }
1518
+
1519
+ return that;
1520
+ };
1521
+
1522
+ VideoWrapper.prototype.stop = function () {
1523
+ var that = this;
1524
+
1525
+ that.__manuallyStopped = true;
1526
+
1527
+ if (that.type === 'youtube') {
1528
+ if (that.ytReady) {
1529
+ that.ytPlayer.pauseVideo();
1530
+ that.ytPlayer.seekTo(0);
1531
+ }
1532
+ } else {
1533
+ that.video.pause();
1534
+ that.video.currentTime = 0;
1535
+ }
1536
+
1537
+ return that;
1538
+ };
1539
+
1540
+ VideoWrapper.prototype.destroy = function () {
1541
+ var that = this;
1542
+
1543
+ if (that.ytPlayer) {
1544
+ that.ytPlayer.destroy();
1545
+ }
1546
+
1547
+ that.$video.remove();
1548
+
1549
+ return that;
1550
+ };
1551
+
1552
+ VideoWrapper.prototype.getCurrentTime = function (seconds) {
1553
+ var that = this;
1554
+
1555
+ if (that.type === 'youtube') {
1556
+ if (that.ytReady) {
1557
+ return that.ytPlayer.getCurrentTime();
1558
+ }
1559
+ } else {
1560
+ return that.video.currentTime;
1561
+ }
1562
+
1563
+ return 0;
1564
+ };
1565
+
1566
+ VideoWrapper.prototype.setCurrentTime = function (seconds) {
1567
+ var that = this;
1568
+
1569
+ if (that.type === 'youtube') {
1570
+ if (that.ytReady) {
1571
+ that.ytPlayer.seekTo(seconds, true);
1572
+ }
1573
+ } else {
1574
+ that.video.currentTime = seconds;
1575
+ }
1576
+
1577
+ return that;
1578
+ };
1579
+
1580
+ VideoWrapper.prototype.getDuration = function () {
1581
+ var that = this;
1582
+
1583
+ if (that.type === 'youtube') {
1584
+ if (that.ytReady) {
1585
+ return that.ytPlayer.getDuration();
1586
+ }
1587
+ } else {
1588
+ return that.video.duration;
1589
+ }
1590
+
1591
+ return 0;
1592
+ };
1593
+
1594
+ /**
1595
+ * This will load the youtube API (if not loaded yet)
1596
+ * Use $(window).one('youtube_api_load', ...) to listen for API loaded event
1597
+ */
1598
+ VideoWrapper.loadYoutubeAPI = function () {
1599
+ if (window['YT']) {
1600
+ return;
1601
+ }
1602
+ if (!$('script[src*=www\\.youtube\\.com\\/iframe_api]').length) {
1603
+ $('<script type="text/javascript" src="https://www.youtube.com/iframe_api">').appendTo('body');
1604
+ }
1605
+ var ytAPILoadInt = setInterval(function () {
1606
+ if (window['YT'] && window['YT'].loaded) {
1607
+ $(window).trigger('youtube_api_load');
1608
+ clearTimeout(ytAPILoadInt);
1609
+ }
1610
+ }, 50);
1611
+ };
1612
+
1613
+ var getDeviceOrientation = function () {
1614
+
1615
+ if ('matchMedia' in window) {
1616
+ if (window.matchMedia('(orientation: portrait)').matches) {
1617
+ return 'portrait';
1618
+ } else if (window.matchMedia('(orientation: landscape)').matches) {
1619
+ return 'landscape';
1620
+ }
1621
+ }
1622
+
1623
+ if (screen.height > screen.width) {
1624
+ return 'portrait';
1625
+ }
1626
+
1627
+ // Even square devices have orientation,
1628
+ // but a desktop browser may be too old for `matchMedia`.
1629
+ // Defaulting to `landscape` for the VERY rare case of a square desktop screen is good enough.
1630
+ return 'landscape';
1631
+ };
1632
+
1633
+ var getWindowOrientation = function () {
1634
+ if (window.innerHeight > window.innerWidth) {
1635
+ return 'portrait';
1636
+ }
1637
+ if (window.innerWidth > window.innerHeight) {
1638
+ return 'landscape';
1639
+ }
1640
+
1641
+ return 'square';
1642
+ };
1643
+
1644
+ /* SUPPORTS FIXED POSITION?
1645
+ *
1646
+ * Based on code from jQuery Mobile 1.1.0
1647
+ * http://jquerymobile.com/
1648
+ *
1649
+ * In a nutshell, we need to figure out if fixed positioning is supported.
1650
+ * Unfortunately, this is very difficult to do on iOS, and usually involves
1651
+ * injecting content, scrolling the page, etc.. It's ugly.
1652
+ * jQuery Mobile uses this workaround. It's not ideal, but works.
1653
+ *
1654
+ * Modified to detect IE6
1655
+ * ========================= */
1656
+
1657
+ var supportsFixedPosition = (function () {
1658
+ var ua = navigator.userAgent,
1659
+ platform = navigator.platform
1660
+ // Rendering engine is Webkit, and capture major version
1661
+ ,
1662
+ wkmatch = ua.match(/AppleWebKit\/([0-9]+)/),
1663
+ wkversion = !!wkmatch && wkmatch[1],
1664
+ ffmatch = ua.match(/Fennec\/([0-9]+)/),
1665
+ ffversion = !!ffmatch && ffmatch[1],
1666
+ operammobilematch = ua.match(/Opera Mobi\/([0-9]+)/),
1667
+ omversion = !!operammobilematch && operammobilematch[1],
1668
+ iematch = ua.match(/MSIE ([0-9]+)/),
1669
+ ieversion = !!iematch && iematch[1];
1670
+
1671
+ return !(
1672
+ // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
1673
+ ((platform.indexOf('iPhone') > -1 || platform.indexOf('iPad') > -1 || platform.indexOf('iPod') > -1) && wkversion && wkversion < 534) ||
1674
+
1675
+ // Opera Mini
1676
+ (window.operamini && ({}).toString.call(window.operamini) === '[object OperaMini]') ||
1677
+ (operammobilematch && omversion < 7458) ||
1678
+
1679
+ //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
1680
+ (ua.indexOf('Android') > -1 && wkversion && wkversion < 533) ||
1681
+
1682
+ // Firefox Mobile before 6.0 -
1683
+ (ffversion && ffversion < 6) ||
1684
+
1685
+ // WebOS less than 3
1686
+ ('palmGetResource' in window && wkversion && wkversion < 534) ||
1687
+
1688
+ // MeeGo
1689
+ (ua.indexOf('MeeGo') > -1 && ua.indexOf('NokiaBrowser/8.5.0') > -1) ||
1690
+
1691
+ // IE6
1692
+ (ieversion && ieversion <= 6)
1693
+ );
1694
+ }());
1695
+
1696
+ }(jQuery, window));