j1-template 2024.3.21 → 2024.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/amplitude_app.html +60 -51
  3. data/assets/theme/j1/adapter/js/advertising.js +40 -38
  4. data/assets/theme/j1/adapter/js/algolia.js +13 -11
  5. data/assets/theme/j1/adapter/js/amplitude.js +504 -348
  6. data/assets/theme/j1/adapter/js/analytics.js +19 -17
  7. data/assets/theme/j1/adapter/js/asciidoctor.js +10 -8
  8. data/assets/theme/j1/adapter/js/attic.js +24 -22
  9. data/assets/theme/j1/adapter/js/bmd.js +10 -8
  10. data/assets/theme/j1/adapter/js/carousel.js +12 -9
  11. data/assets/theme/j1/adapter/js/chatbot.js +106 -104
  12. data/assets/theme/j1/adapter/js/clipboard.js +16 -14
  13. data/assets/theme/j1/adapter/js/comments.js +24 -22
  14. data/assets/theme/j1/adapter/js/cookieConsent.js +5 -1
  15. data/assets/theme/j1/adapter/js/customFunctions.js +12 -10
  16. data/assets/theme/j1/adapter/js/customModule.js +10 -8
  17. data/assets/theme/j1/adapter/js/docsearch.js +33 -31
  18. data/assets/theme/j1/adapter/js/dropdowns.js +16 -14
  19. data/assets/theme/j1/adapter/js/fab.js +34 -32
  20. data/assets/theme/j1/adapter/js/gallery.js +21 -19
  21. data/assets/theme/j1/adapter/js/gemini.js +66 -64
  22. data/assets/theme/j1/adapter/js/iconPicker.js +31 -29
  23. data/assets/theme/j1/adapter/js/iconPickerPage.js +11 -9
  24. data/assets/theme/j1/adapter/js/iframer.js +17 -15
  25. data/assets/theme/j1/adapter/js/j1.js +146 -143
  26. data/assets/theme/j1/adapter/js/lazyLoader.js +33 -31
  27. data/assets/theme/j1/adapter/js/lightbox.js +9 -7
  28. data/assets/theme/j1/adapter/js/logger.js +11 -9
  29. data/assets/theme/j1/adapter/js/lunr.js +37 -35
  30. data/assets/theme/j1/adapter/js/masonry.js +23 -21
  31. data/assets/theme/j1/adapter/js/masterslider.js +31 -29
  32. data/assets/theme/j1/adapter/js/mmenu.js +25 -23
  33. data/assets/theme/j1/adapter/js/navigator.js +43 -41
  34. data/assets/theme/j1/adapter/js/particles.js +12 -10
  35. data/assets/theme/j1/adapter/js/rangeSlider.js +21 -19
  36. data/assets/theme/j1/adapter/js/rouge.js +10 -8
  37. data/assets/theme/j1/adapter/js/rtable.js +14 -12
  38. data/assets/theme/j1/adapter/js/rtextResizer.js +10 -8
  39. data/assets/theme/j1/adapter/js/scroller.js +15 -13
  40. data/assets/theme/j1/adapter/js/slick.js +18 -16
  41. data/assets/theme/j1/adapter/js/slimSelect.js +30 -28
  42. data/assets/theme/j1/adapter/js/speak2me.js +25 -23
  43. data/assets/theme/j1/adapter/js/swiper.js +13 -11
  44. data/assets/theme/j1/adapter/js/themeToggler.js +11 -9
  45. data/assets/theme/j1/adapter/js/themes.js +25 -23
  46. data/assets/theme/j1/adapter/js/toccer.js +13 -11
  47. data/assets/theme/j1/adapter/js/translator.js +19 -16
  48. data/assets/theme/j1/adapter/js/videojs.js +9 -7
  49. data/assets/theme/j1/adapter/js/waves.js +18 -16
  50. data/assets/theme/j1/core/js/template.js +11180 -10968
  51. data/assets/theme/j1/core/js/template.min.js +13 -18
  52. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +10 -4
  53. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
  54. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +15 -8
  55. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +2 -1
  56. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +35 -14
  57. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +1 -1
  58. data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +475 -423
  59. data/assets/theme/j1/modules/backstretch/js/backstretch.js +2 -2
  60. data/assets/theme/j1/modules/backstretch/js/backstretch.min.js +1 -1
  61. data/assets/theme/j1/modules/cookieConsent/js/cookieConsent.js +11 -11
  62. data/assets/theme/j1/modules/cookieConsent/js/cookieConsent.min.js +2 -1
  63. data/assets/theme/j1/modules/dropdowns/js/dropdowns.js +2 -2
  64. data/assets/theme/j1/modules/dropdowns/js/dropdowns.min.js +1 -1
  65. data/assets/theme/j1/modules/fab/js/fab.js +2 -2
  66. data/assets/theme/j1/modules/fab/js/fab.min.js +1 -1
  67. data/assets/theme/j1/modules/lunr/js/j1.js +1 -1
  68. data/assets/theme/j1/modules/lunr/js/j1.min.js +2 -1
  69. data/assets/theme/j1/modules/rtable/js/rtable.js +2 -2
  70. data/assets/theme/j1/modules/rtable/js/rtable.min.js +2 -1
  71. data/assets/theme/j1/modules/scroller/js/scroller.js +31 -29
  72. data/assets/theme/j1/modules/scroller/js/scroller.min.js +2 -1
  73. data/assets/theme/j1/modules/themeSwitcher/js/switcher.js +26 -26
  74. data/assets/theme/j1/modules/themeSwitcher/js/switcher.min.js +2 -1
  75. data/assets/theme/j1/modules/translator/js/translator.js +17 -17
  76. data/assets/theme/j1/modules/translator/js/translator.min.js +1 -1
  77. data/assets/theme/j1/modules/videojs/js/plugins/players/dm/dailymotion.js +10 -8
  78. data/assets/theme/j1/modules/videojs/js/plugins/players/dm/dailymotion.min.js +1 -1
  79. data/assets/theme/j1/modules/videojs/js/plugins/players/vm/vimeo.js +9 -7
  80. data/assets/theme/j1/modules/videojs/js/plugins/players/vm/vimeo.min.js +1 -1
  81. data/assets/theme/j1/modules/videojs/js/plugins/players/wt/wistia.js +13 -11
  82. data/assets/theme/j1/modules/videojs/js/plugins/players/wt/wistia.min.js +1 -1
  83. data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.js +10 -8
  84. data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.min.js +1 -1
  85. data/lib/j1/version.rb +1 -1
  86. data/lib/starter_web/README.md +5 -5
  87. data/lib/starter_web/_config.yml +1 -1
  88. data/lib/starter_web/_data/modules/amplitude_playlists.yml +124 -79
  89. data/lib/starter_web/_data/modules/defaults/amplitude.yml +5 -3
  90. data/lib/starter_web/_data/templates/feed.xml +1 -1
  91. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +8 -0
  92. data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +7 -0
  93. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  94. data/lib/starter_web/assets/audio/album/emancipator/Alligator.mp3 +0 -0
  95. data/lib/starter_web/assets/audio/album/emancipator/DabCity.mp3 +0 -0
  96. data/lib/starter_web/assets/audio/album/emancipator/SeaToSky.mp3 +0 -0
  97. data/lib/starter_web/assets/audio/album/emancipator/TimeForSpace.mp3 +0 -0
  98. data/lib/starter_web/assets/audio/cover/emancipator/alligator.jpg +0 -0
  99. data/lib/starter_web/assets/audio/cover/emancipator/anthem.jpg +0 -0
  100. data/lib/starter_web/assets/audio/cover/emancipator/dab-city.jpg +0 -0
  101. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn.jpg +0 -0
  102. data/lib/starter_web/assets/audio/cover/emancipator/safe-in-the-steep-cliffs.jpg +0 -0
  103. data/lib/starter_web/assets/audio/cover/emancipator/sea-to-sky.jpg +0 -0
  104. data/lib/starter_web/assets/audio/cover/emancipator/soon-it-will-be-cold-enough.jpg +0 -0
  105. data/lib/starter_web/assets/audio/cover/emancipator/tine-for-space.jpg +0 -0
  106. data/lib/starter_web/package.json +1 -1
  107. data/lib/starter_web/pages/public/tour/audio_data.adoc +11 -6
  108. metadata +19 -11
  109. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/anthem.jpg +0 -0
  110. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/from-dusk-to-dawn.jpg +0 -0
  111. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/safe-in-the-steep-cliffs.jpg +0 -0
  112. data/lib/starter_web/assets/audio/cover/emancipator/from-dusk-to-dawn/soon-it-will-be-cold-enough.jpg +0 -0
  113. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn → !info}/!sound.links.txt +0 -0
  114. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/Anthem.mp3 → Anthem.mp3} +0 -0
  115. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/DuskToDawn.mp3 → DuskToDawn.mp3} +0 -0
  116. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/FirstSnow.mp3 → FirstSnow.mp3} +0 -0
  117. /data/lib/starter_web/assets/audio/album/emancipator/{from-dusk-to-dawn/SafeInTheSteepCliffs.mp3 → SafeInTheSteepCliffs.mp3} +0 -0
@@ -796,7 +796,7 @@
796
796
  resize: function () {
797
797
  try {
798
798
  // var debug = false;
799
- var logger = log4javascript.getLogger('j1.core.attic');
799
+ var logger = log4javascript.getLogger('j1.api.attic');
800
800
 
801
801
  // Check for a better suited image after the resize
802
802
  var $resTest = this.options.alwaysTestWindowResolution ? $(window) : this.$root;
@@ -938,7 +938,7 @@
938
938
  ,
939
939
  show: function (newIndex, overrideOptions) {
940
940
 
941
- var logger = log4javascript.getLogger('j1.core.attic');
941
+ var logger = log4javascript.getLogger('j1.api.attic');
942
942
 
943
943
  // Validate index
944
944
  if (Math.abs(newIndex) > this.images.length - 1) {
@@ -18,4 +18,4 @@
18
18
  # -----------------------------------------------------------------------------
19
19
  */
20
20
 
21
- "use strict";!function(t,e,i){var r,a=/^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;t.fn.backstretch=function(r,a){var o,n=arguments;return 0===t(e).scrollTop()&&e.scrollTo(0,0),this.each((function(e){var s=t(this),h=s.data("backstretch");if(h){if("string"==typeof n[0]&&"function"==typeof h[n[0]]){var c=h[n[0]].apply(h,Array.prototype.slice.call(n,1));return c===h&&(c=i),void(c!==i&&((o=o||[])[e]=c))}a=t.extend(h.options,a),h.hasOwnProperty("destroy")&&h.destroy(!0)}if(!r||r&&0===r.length){var d=s.css("background-image");d&&"none"!==d?r=[{url:s.css("backgroundImage").replace(/url\(|\)|"|'/g,"")}]:t.error("No images were supplied for Backstretch, or element must have a CSS-defined background image.")}h=new w(this,r,a||{}),s.data("backstretch",h)})),o?1===o.length?o[0]:o:this},t.backstretch=function(e,i){return t("body").backstretch(e,i).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==i},t.fn.backstretch.defaults={debug:!1,duration:5e3,transition:"fade",transitionDuration:0,animateFirst:!0,alignX:.5,alignY:.5,paused:!1,start:0,preload:2,preloadSize:1,resolutionRefreshRate:2500,resolutionChangeRatioThreshold:.1};var o,n,s,h,c,d,l={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},itemWrapper:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"100%",height:"100%",zIndex:-999999},item:{position:"absolute",margin:0,padding:0,border:"none",width:"100%",height:"100%",maxWidth:"none"}},u=(o=function(t){for(var e=1;e<t.length;e++){for(var i=t[e],r=e;t[r-1]&&parseInt(t[r-1].width,10)>parseInt(i.width,10);)t[r]=t[r-1],--r;t[r]=i}return t},n=function(t,i,r){for(var a,o,n=e.devicePixelRatio||1,s=z(),h=(S(),i>t?"portrait":t>i?"landscape":"square"),c=0,d=0;d<r.length&&("string"==typeof(o=r[d])&&(o=r[d]={url:o}),o.pixelRatio&&"auto"!==o.pixelRatio&&parseFloat(o.pixelRatio)!==n||o.deviceOrientation&&o.deviceOrientation!==s||o.windowOrientation&&o.windowOrientation!==s||o.orientation&&o.orientation!==h||(c=d,a=t,"auto"===o.pixelRatio&&(t*=n),!(o.width>=a)));d++);return r[Math.min(d,c)]},s=function(t,e){if("string"==typeof t)t=t.replace(/{{(width|height)}}/g,e);else if(t instanceof Array)for(var i=0;i<t.length;i++)t[i].src?t[i].src=s(t[i].src,e):t[i]=s(t[i],e);return t},function(e,i){for(var r=e.width(),a=e.height(),h=[],c=function(t,e){return"width"===e?r:"height"===e?a:t},d=0;d<i.length;d++)if(t.isArray(i[d])){i[d]=o(i[d]);var l=n(r,a,i[d]);h.push(l)}else{"string"==typeof i[d]&&(i[d]={url:i[d]});var u=t.extend({},i[d]);u.url=s(u.url,c),h.push(u)}return h}),p=function(t){return a.test(t.url)||t.isVideo},g=(h=[],c=function(t){for(var e=0;e<h.length;e++)if(h[e].src===t.src)return h[e];return h.push(t),t},d=function(t,e,i){"function"==typeof e&&e.call(t,i)},function e(i,r,a,o,n){if(void 0!==i){t.isArray(i)||(i=[i]),arguments.length<5&&"function"==typeof arguments[arguments.length-1]&&(n=arguments[arguments.length-1]),r="function"!=typeof r&&r?r:0,a="function"==typeof a||!a||a<0?i.length:Math.min(a,i.length),o="function"!=typeof o&&o?o:1,r>=i.length&&(r=0,a=0),o<0&&(o=a),o=Math.min(o,a);var s=i.slice(r+o,a-o);if(i=i.slice(r,o),a=i.length)for(var h,l=0,u=function(){++l===a&&(d(i,n,!s),e(s,0,0,o,n))},g=0;g<i.length;g++)p(i[g])||((h=new Image).src=i[g].url,(h=c(h)).complete?u():t(h).on("load error",u));else d(i,n,!0)}}),f=function(e){for(var i=[],r=0;r<e.length;r++)"string"==typeof e[r]?i.push({url:e[r]}):t.isArray(e[r])?i.push(f(e[r])):i.push(y(e[r]));return i},y=function(t,r){return(t.centeredX||t.centeredY)&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`"),t.centeredX&&(t.alignX=.5),t.centeredY&&(t.alignY=.5)),t.speed!==i&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `speed` is deprecated, please use `transitionDuration`"),t.transitionDuration=t.speed,t.transition="fade"),t.resolutionChangeRatioTreshold!==i&&(e.console.log("jquery.backstretch: `treshold` is a typo!"),t.resolutionChangeRatioThreshold=t.resolutionChangeRatioTreshold),t.fadeFirst!==i&&(t.animateFirst=t.fadeFirst),t.fade!==i&&(t.transitionDuration=t.fade,t.transition="fade"),t.scale&&(t.scale=b(t.scale)),v(t)},v=function(t,e){return"left"===t.alignX?t.alignX=0:"center"===t.alignX?t.alignX=.5:"right"===t.alignX?t.alignX=1:(t.alignX!==i||e)&&(t.alignX=parseFloat(t.alignX),isNaN(t.alignX)&&(t.alignX=.5)),"top"===t.alignY?t.alignY=0:"center"===t.alignY?t.alignY=.5:"bottom"===t.alignY?t.alignY=1:(t.alignX!==i||e)&&(t.alignY=parseFloat(t.alignY),isNaN(t.alignY)&&(t.alignY=.5)),t},m={cover:"cover",fit:"fit","fit-smaller":"fit-smaller",fill:"fill"};function b(t){return m.hasOwnProperty(t)?t:"cover"}var w=function(i,r,a){this.options=t.extend({},t.fn.backstretch.defaults,a||{}),this.firstShow=!0,y(this.options,!0),this.images=f(t.isArray(r)?r:[r]),this.options.paused&&(this.paused=!0),this.options.start>=this.images.length&&(this.options.start=this.images.length-1),this.options.start<0&&(this.options.start=0),this.isBody=i===document.body;var o=t(e);this.$container=t(i),this.$root=this.isBody?A?o:t(document):this.$container,this.originalImages=this.images,this.images=u(this.options.alwaysTestWindowResolution?o:this.$root,this.originalImages),g(this.images,this.options.start||0,this.options.preload||1);var n=this.$container.children(".backstretch").first();if(this.$wrap=n.length?n:t('<div class="backstretch"></div>').css(this.options.bypassCss?{}:l.wrap).appendTo(this.$container),!this.options.bypassCss){if(!this.isBody){var s=this.$container.css("position"),h=this.$container.css("zIndex");this.$container.css({position:"static"===s?"relative":s,zIndex:"auto"===h?0:h}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&A?"fixed":"absolute"})}this.index=this.options.start,this.show(this.index),o.on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy((function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())}),this))};w.prototype={resize:function(){try{var a=log4javascript.getLogger("j1.core.attic"),o=this.options.alwaysTestWindowResolution?t(e):this.$root,n=o.width(),s=o.height(),h=n/(this._lastResizeContainerWidth||0),c=s/(this._lastResizeContainerHeight||0),d=this.options.resolutionChangeRatioThreshold||0;if((n!==this._lastResizeContainerWidth||s!==this._lastResizeContainerHeight)&&(Math.abs(h-1)>=d||isNaN(h)||Math.abs(c-1)>=d||isNaN(c))&&(this._lastResizeContainerWidth=n,this._lastResizeContainerHeight=s,this.images=u(o,this.originalImages),this.options.preload&&g(this.images,(this.index+1)%this.images.length,this.options.preload),1===this.images.length&&this._currentImage.url!==this.images[0].url)){var l=this;clearTimeout(l._selectAnotherResolutionTimeout),l._selectAnotherResolutionTimeout=setTimeout((function(){l.show(0)}),this.options.resolutionRefreshRate)}var p,f,y={left:0,top:0,right:"auto",bottom:"auto"},v=this.isBody?this.$root.width():this.$root.innerWidth(),m=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),w=this.$itemWrapper.data("width"),_=this.$itemWrapper.data("height"),$=w/_||1,T=this._currentImage.alignX===i?this.options.alignX:this._currentImage.alignX,k=this._currentImage.alignY===i?this.options.alignY:this._currentImage.alignY,x=b(this._currentImage.scale||this.options.scale);if(this.options.debug&&(r="\nresize: boxHeight x boxWidth: "+m+" x "+v,a.debug(r)),"fit"===x||"fit-smaller"===x){if(f=_,(p=w)>v||f>m||"fit-smaller"===x){var W=v/m;W>$?(p=Math.floor(m*$),f=m):W<$?(p=v,f=Math.floor(v/$)):(p=v,f=m)}}else"fill"===x?(p=v,f=m):(p=Math.max(m*$,v),f=Math.max(p/$,m));y.top=-(f-m)*k,y.left=-(p-v)*T,y.width=p,y.height=f,this.options.bypassCss||this.$wrap.css({width:v,height:m}).find(">.backstretch-item").not(".deleteable").each((function(){t(this).find("img,video,iframe").css(y)}));var I=t.Event("backstretch.resize",{relatedTarget:this.$container[0]});this.$container.trigger(I,this)}catch(t){r="resize: jadams, IE7 hack to let it fail gracefully: "+t,a.warn(r)}return this},show:function(e,r){var a=log4javascript.getLogger("j1.core.attic");if(!(Math.abs(e)>this.images.length-1)){var o=this,n=o.$wrap.find(">.backstretch-item").addClass("deleteable"),s=o.videoWrapper,h={relatedTarget:o.$container[0]};o.$container.trigger(t.Event("backstretch.before",h),[o,e]),this.index=e;var c=o.images[e];clearTimeout(o._cycleTimeout),delete o.videoWrapper;var d=p(c);return d?(o.videoWrapper=new _(c),o.$item=o.videoWrapper.$video.css("pointer-events","none")):o.$item=t("<img />"),o.$itemWrapper=t('<div class="backstretch-item">').append(o.$item),this.options.bypassCss?o.$itemWrapper.css({display:"none"}):(o.$itemWrapper.css(l.itemWrapper),o.$item.css(l.item)),o.$item.bind(d?"canplay":"load",(function(c){var l=t(this).parent(),u=l.data("options");r&&(u=t.extend({},u,r));var p=this.naturalWidth||this.videoWidth||this.width,g=this.naturalHeight||this.videoHeight||this.height;l.data("width",p).data("height",g);var f=function(t){return u[t]!==i?u[t]:o.options[t]},y=f("transition"),v=f("transitionEasing"),m=f("transitionDuration"),b=function(){s&&(s.stop(),s.destroy()),n.remove(),!o.paused&&o.images.length>1&&o.cycle(),!o.options.bypassCss&&o.isBody,t(["before","after","show"]).each((function(){o.$container.trigger(t.Event("backstretch."+this,h),[o,e])})),d&&o.videoWrapper.play()};o.firstShow&&!o.options.animateFirst||!m||!y?(l.show(),b()):function(e){var r=e.transition||"fade";"string"==typeof r&&r.indexOf("|")>-1&&(r=r.split("|")),r instanceof Array&&(r=r[Math.round(Math.random()*(r.length-1))]);var a=e.new,o=e.old?e.old:t([]);switch(r.toString().toLowerCase()){default:case"fade":a.fadeIn({duration:e.duration,complete:e.complete,easing:e.easing||i});break;case"fadeinout":case"fade_in_out":var n=function(){a.fadeIn({duration:e.duration/2,complete:e.complete,easing:e.easing||i})};o.length?o.fadeOut({duration:e.duration/2,complete:n,easing:e.easing||i}):n();break;case"pushleft":case"push_left":case"pushright":case"push_right":case"pushup":case"push_up":case"pushdown":case"push_down":case"coverleft":case"cover_left":case"coverright":case"cover_right":case"coverup":case"cover_up":case"coverdown":case"cover_down":var s=r.match(/^(cover|push)_?(.*)$/),h="left"===s[2]?"right":"right"===s[2]?"left":"down"===s[2]?"top":"up"===s[2]?"bottom":"right",c={display:""},d={};if(c[h]="-100%",d[h]=0,a.css(c).animate(d,{duration:e.duration,complete:function(){a.css(h,""),e.complete.apply(this,arguments)},easing:e.easing||i}),"push"===s[1]&&o.length){var l={};l[h]="100%",o.animate(l,{duration:e.duration,complete:function(){o.css("display","none")},easing:e.easing||i})}}}({new:l,old:n,transition:y,duration:m,easing:v,complete:b}),o.firstShow=!1;var w=this.naturalWidth||this.videoWidth||this.width,_="show: imageHeight x imageWidth: "+(this.naturalHeight||this.videoHeight||this.height)+" x "+w;o.options.debug&&a.debug(_);var $="#"+o.$container[0].id,T=setInterval((function(){t($).is(":visible")&&(a.debug("\ncontainer visible on id: "+$),o.resize(),clearInterval(T))}),10)})),o.$itemWrapper.appendTo(o.$wrap),o.$item.attr("alt",c.alt||""),o.$itemWrapper.data("options",c),d||o.$item.attr("src",c.url),o._currentImage=c,o}},current:function(){return this.index},next:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this.index<this.images.length-1?this.index+1:0),this.show.apply(this,t)},prev:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(0===this.index?this.images.length-1:this.index-1),this.show.apply(this,t)},pause:function(){return this.paused=!0,this.videoWrapper&&this.videoWrapper.pause(),this},resume:function(){return this.paused=!1,this.videoWrapper&&this.videoWrapper.play(),this.cycle(),this},cycle:function(){if(this.images.length>1){clearTimeout(this._cycleTimeout);var e=this._currentImage&&this._currentImage.duration||this.options.duration,i=p(this._currentImage),r=function(){this.$item.off(".cycle"),this.paused||this.next()};if(i){if(!this._currentImage.loop){var a=0;this.$item.on("playing.cycle",(function(){var e=t(this).data("player");clearTimeout(a),void 0!==e&&(a=setTimeout((function(){e.pause(),e.$video.trigger("ended")}),1e3*(e.getDuration()-e.getCurrentTime())))})).on("ended.cycle",(function(){clearTimeout(a)}))}this.$item.on("error.cycle initerror.cycle",t.proxy(r,this))}i&&!this._currentImage.duration?this.$item.on("ended.cycle",t.proxy(r,this)):this._cycleTimeout=setTimeout(t.proxy(r,this),e)}return this},destroy:function(i){t(e).off("resize.backstretch orientationchange.backstretch"),this.videoWrapper&&this.videoWrapper.destroy(),clearTimeout(this._cycleTimeout),i||this.$wrap.remove(),this.$container.removeData("backstretch")}};var _=function(){this.init.apply(this,arguments)};_.prototype.init=function(r){var o,n=this,s=function(){n.$video=o,n.video=o[0]},h="video";if(r.url instanceof Array||!a.test(r.url)||(h="youtube"),n.type=h,"youtube"===h){_.loadYoutubeAPI(),n.ytId=r.url.match(a)[2];var c="https://www.youtube.com/embed/"+n.ytId+"?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0&enablejsapi=1&origin="+encodeURIComponent(e.location.origin);n.__ytStartMuted=!!r.mute||r.mute===i,o=t("<iframe />").attr({src_to_load:c}).css({border:0,margin:0,padding:0}).data("player",n),r.loop&&o.on("ended.loop",(function(){n.__manuallyStopped||n.play()})),n.ytReady=!1,s(),e.YT?(n._initYoutube(),o.trigger("initsuccess")):t(e).one("youtube_api_load",(function(){n._initYoutube(),o.trigger("initsuccess")}))}else{o=t("<video>").prop("autoplay",!1).prop("controls",!1).prop("loop",!!r.loop).prop("muted",!!r.mute||r.mute===i).prop("preload","auto").prop("poster",r.poster||"");for(var d=r.url instanceof Array?r.url:[r.url],l=0;l<d.length;l++){var u=d[l];"string"==typeof u&&(u={src:u}),t("<source>").attr("src",u.src).attr("type",u.type||null).appendTo(o)}o[0].canPlayType&&d.length?o.trigger("initsuccess"):o.trigger("initerror"),s()}},_.prototype._initYoutube=function(){var i=this,r=e.YT;i.$video.attr("src",i.$video.attr("src_to_load")).removeAttr("src_to_load");var a=!!i.$video[0].parentNode;if(!a){var o=t("<div>").css("display","none !important").appendTo(document.body);i.$video.appendTo(o)}var n=new r.Player(i.video,{events:{onReady:function(){i.__ytStartMuted&&n.mute(),a||(i.$video[0].parentNode===o[0]&&i.$video.detach(),o.remove()),i.ytReady=!0,i._updateYoutubeSize(),i.$video.trigger("canplay")},onStateChange:function(t){switch(t.data){case r.PlayerState.PLAYING:i.$video.trigger("playing");break;case r.PlayerState.ENDED:i.$video.trigger("ended");break;case r.PlayerState.PAUSED:i.$video.trigger("pause");break;case r.PlayerState.BUFFERING:i.$video.trigger("waiting");break;case r.PlayerState.CUED:i.$video.trigger("canplay")}},onPlaybackQualityChange:function(){i._updateYoutubeSize(),i.$video.trigger("resize")},onError:function(t){i.hasError=!0,i.$video.trigger({type:"error",error:t})}}});return i.ytPlayer=n,i},_.prototype._updateYoutubeSize=function(){var t=this;switch(t.ytPlayer.getPlaybackQuality()||"medium"){case"small":t.video.videoWidth=426,t.video.videoHeight=240;break;case"medium":t.video.videoWidth=640,t.video.videoHeight=360;break;default:case"large":t.video.videoWidth=854,t.video.videoHeight=480;break;case"hd720":t.video.videoWidth=1280,t.video.videoHeight=720;break;case"hd1080":t.video.videoWidth=1920,t.video.videoHeight=1080;break;case"highres":t.video.videoWidth=2560,t.video.videoHeight=1440}return t},_.prototype.play=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&(t.$video.trigger("play"),t.ytPlayer.playVideo()):t.video.play(),t},_.prototype.pause=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&t.ytPlayer.pauseVideo():t.video.pause(),t},_.prototype.stop=function(){var t=this;return t.__manuallyStopped=!0,"youtube"===t.type?t.ytReady&&(t.ytPlayer.pauseVideo(),t.ytPlayer.seekTo(0)):(t.video.pause(),t.video.currentTime=0),t},_.prototype.destroy=function(){var t=this;return t.ytPlayer&&t.ytPlayer.destroy(),t.$video.remove(),t},_.prototype.getCurrentTime=function(t){var e=this;return"youtube"!==e.type?e.video.currentTime:e.ytReady?e.ytPlayer.getCurrentTime():0},_.prototype.setCurrentTime=function(t){var e=this;return"youtube"===e.type?e.ytReady&&e.ytPlayer.seekTo(t,!0):e.video.currentTime=t,e},_.prototype.getDuration=function(){var t=this;return"youtube"!==t.type?t.video.duration:t.ytReady?t.ytPlayer.getDuration():0},_.loadYoutubeAPI=function(){if(!e.YT){t("script[src*=www\\.youtube\\.com\\/iframe_api]").length||t('<script src="https://www.youtube.com/iframe_api">').appendTo("body");var i=setInterval((function(){e.YT&&e.YT.loaded&&(t(e).trigger("youtube_api_load"),clearTimeout(i))}),10)}};var $,T,k,x,W,I,R,Y,P,C,z=function(){if("matchMedia"in e){if(e.matchMedia("(orientation: portrait)").matches)return"portrait";if(e.matchMedia("(orientation: landscape)").matches)return"landscape"}return screen.height>screen.width?"portrait":"landscape"},S=function(){return e.innerHeight>e.innerWidth?"portrait":e.innerWidth>e.innerHeight?"landscape":"square"},A=($=navigator.userAgent,T=navigator.platform,k=$.match(/AppleWebKit\/([0-9]+)/),x=!!k&&k[1],W=$.match(/Fennec\/([0-9]+)/),I=!!W&&W[1],R=$.match(/Opera Mobi\/([0-9]+)/),Y=!!R&&R[1],P=$.match(/MSIE ([0-9]+)/),C=!!P&&P[1],!((T.indexOf("iPhone")>-1||T.indexOf("iPad")>-1||T.indexOf("iPod")>-1)&&x&&x<534||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||R&&Y<7458||$.indexOf("Android")>-1&&x&&x<533||I&&I<6||"palmGetResource"in e&&x&&x<534||$.indexOf("MeeGo")>-1&&$.indexOf("NokiaBrowser/8.5.0")>-1||C&&C<=6))}(jQuery,window);
21
+ "use strict";!function(t,e,i){var r,a=/^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;t.fn.backstretch=function(r,a){var o,n=arguments;return 0===t(e).scrollTop()&&e.scrollTo(0,0),this.each((function(e){var s=t(this),h=s.data("backstretch");if(h){if("string"==typeof n[0]&&"function"==typeof h[n[0]]){var c=h[n[0]].apply(h,Array.prototype.slice.call(n,1));return c===h&&(c=i),void(c!==i&&((o=o||[])[e]=c))}a=t.extend(h.options,a),h.hasOwnProperty("destroy")&&h.destroy(!0)}if(!r||r&&0===r.length){var d=s.css("background-image");d&&"none"!==d?r=[{url:s.css("backgroundImage").replace(/url\(|\)|"|'/g,"")}]:t.error("No images were supplied for Backstretch, or element must have a CSS-defined background image.")}h=new w(this,r,a||{}),s.data("backstretch",h)})),o?1===o.length?o[0]:o:this},t.backstretch=function(e,i){return t("body").backstretch(e,i).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==i},t.fn.backstretch.defaults={debug:!1,duration:5e3,transition:"fade",transitionDuration:0,animateFirst:!0,alignX:.5,alignY:.5,paused:!1,start:0,preload:2,preloadSize:1,resolutionRefreshRate:2500,resolutionChangeRatioThreshold:.1};var o,n,s,h,c,d,l={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},itemWrapper:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"100%",height:"100%",zIndex:-999999},item:{position:"absolute",margin:0,padding:0,border:"none",width:"100%",height:"100%",maxWidth:"none"}},u=(o=function(t){for(var e=1;e<t.length;e++){for(var i=t[e],r=e;t[r-1]&&parseInt(t[r-1].width,10)>parseInt(i.width,10);)t[r]=t[r-1],--r;t[r]=i}return t},n=function(t,i,r){for(var a,o,n=e.devicePixelRatio||1,s=z(),h=(S(),i>t?"portrait":t>i?"landscape":"square"),c=0,d=0;d<r.length&&("string"==typeof(o=r[d])&&(o=r[d]={url:o}),o.pixelRatio&&"auto"!==o.pixelRatio&&parseFloat(o.pixelRatio)!==n||o.deviceOrientation&&o.deviceOrientation!==s||o.windowOrientation&&o.windowOrientation!==s||o.orientation&&o.orientation!==h||(c=d,a=t,"auto"===o.pixelRatio&&(t*=n),!(o.width>=a)));d++);return r[Math.min(d,c)]},s=function(t,e){if("string"==typeof t)t=t.replace(/{{(width|height)}}/g,e);else if(t instanceof Array)for(var i=0;i<t.length;i++)t[i].src?t[i].src=s(t[i].src,e):t[i]=s(t[i],e);return t},function(e,i){for(var r=e.width(),a=e.height(),h=[],c=function(t,e){return"width"===e?r:"height"===e?a:t},d=0;d<i.length;d++)if(t.isArray(i[d])){i[d]=o(i[d]);var l=n(r,a,i[d]);h.push(l)}else{"string"==typeof i[d]&&(i[d]={url:i[d]});var u=t.extend({},i[d]);u.url=s(u.url,c),h.push(u)}return h}),p=function(t){return a.test(t.url)||t.isVideo},g=(h=[],c=function(t){for(var e=0;e<h.length;e++)if(h[e].src===t.src)return h[e];return h.push(t),t},d=function(t,e,i){"function"==typeof e&&e.call(t,i)},function e(i,r,a,o,n){if(void 0!==i){t.isArray(i)||(i=[i]),arguments.length<5&&"function"==typeof arguments[arguments.length-1]&&(n=arguments[arguments.length-1]),r="function"!=typeof r&&r?r:0,a="function"==typeof a||!a||a<0?i.length:Math.min(a,i.length),o="function"!=typeof o&&o?o:1,r>=i.length&&(r=0,a=0),o<0&&(o=a),o=Math.min(o,a);var s=i.slice(r+o,a-o);if(i=i.slice(r,o),a=i.length)for(var h,l=0,u=function(){++l===a&&(d(i,n,!s),e(s,0,0,o,n))},g=0;g<i.length;g++)p(i[g])||((h=new Image).src=i[g].url,(h=c(h)).complete?u():t(h).on("load error",u));else d(i,n,!0)}}),f=function(e){for(var i=[],r=0;r<e.length;r++)"string"==typeof e[r]?i.push({url:e[r]}):t.isArray(e[r])?i.push(f(e[r])):i.push(y(e[r]));return i},y=function(t,r){return(t.centeredX||t.centeredY)&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`"),t.centeredX&&(t.alignX=.5),t.centeredY&&(t.alignY=.5)),t.speed!==i&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `speed` is deprecated, please use `transitionDuration`"),t.transitionDuration=t.speed,t.transition="fade"),t.resolutionChangeRatioTreshold!==i&&(e.console.log("jquery.backstretch: `treshold` is a typo!"),t.resolutionChangeRatioThreshold=t.resolutionChangeRatioTreshold),t.fadeFirst!==i&&(t.animateFirst=t.fadeFirst),t.fade!==i&&(t.transitionDuration=t.fade,t.transition="fade"),t.scale&&(t.scale=b(t.scale)),v(t)},v=function(t,e){return"left"===t.alignX?t.alignX=0:"center"===t.alignX?t.alignX=.5:"right"===t.alignX?t.alignX=1:(t.alignX!==i||e)&&(t.alignX=parseFloat(t.alignX),isNaN(t.alignX)&&(t.alignX=.5)),"top"===t.alignY?t.alignY=0:"center"===t.alignY?t.alignY=.5:"bottom"===t.alignY?t.alignY=1:(t.alignX!==i||e)&&(t.alignY=parseFloat(t.alignY),isNaN(t.alignY)&&(t.alignY=.5)),t},m={cover:"cover",fit:"fit","fit-smaller":"fit-smaller",fill:"fill"};function b(t){return m.hasOwnProperty(t)?t:"cover"}var w=function(i,r,a){this.options=t.extend({},t.fn.backstretch.defaults,a||{}),this.firstShow=!0,y(this.options,!0),this.images=f(t.isArray(r)?r:[r]),this.options.paused&&(this.paused=!0),this.options.start>=this.images.length&&(this.options.start=this.images.length-1),this.options.start<0&&(this.options.start=0),this.isBody=i===document.body;var o=t(e);this.$container=t(i),this.$root=this.isBody?A?o:t(document):this.$container,this.originalImages=this.images,this.images=u(this.options.alwaysTestWindowResolution?o:this.$root,this.originalImages),g(this.images,this.options.start||0,this.options.preload||1);var n=this.$container.children(".backstretch").first();if(this.$wrap=n.length?n:t('<div class="backstretch"></div>').css(this.options.bypassCss?{}:l.wrap).appendTo(this.$container),!this.options.bypassCss){if(!this.isBody){var s=this.$container.css("position"),h=this.$container.css("zIndex");this.$container.css({position:"static"===s?"relative":s,zIndex:"auto"===h?0:h}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&A?"fixed":"absolute"})}this.index=this.options.start,this.show(this.index),o.on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy((function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())}),this))};w.prototype={resize:function(){try{var a=log4javascript.getLogger("j1.api.attic"),o=this.options.alwaysTestWindowResolution?t(e):this.$root,n=o.width(),s=o.height(),h=n/(this._lastResizeContainerWidth||0),c=s/(this._lastResizeContainerHeight||0),d=this.options.resolutionChangeRatioThreshold||0;if((n!==this._lastResizeContainerWidth||s!==this._lastResizeContainerHeight)&&(Math.abs(h-1)>=d||isNaN(h)||Math.abs(c-1)>=d||isNaN(c))&&(this._lastResizeContainerWidth=n,this._lastResizeContainerHeight=s,this.images=u(o,this.originalImages),this.options.preload&&g(this.images,(this.index+1)%this.images.length,this.options.preload),1===this.images.length&&this._currentImage.url!==this.images[0].url)){var l=this;clearTimeout(l._selectAnotherResolutionTimeout),l._selectAnotherResolutionTimeout=setTimeout((function(){l.show(0)}),this.options.resolutionRefreshRate)}var p,f,y={left:0,top:0,right:"auto",bottom:"auto"},v=this.isBody?this.$root.width():this.$root.innerWidth(),m=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),w=this.$itemWrapper.data("width"),_=this.$itemWrapper.data("height"),$=w/_||1,T=this._currentImage.alignX===i?this.options.alignX:this._currentImage.alignX,k=this._currentImage.alignY===i?this.options.alignY:this._currentImage.alignY,x=b(this._currentImage.scale||this.options.scale);if(this.options.debug&&(r="\nresize: boxHeight x boxWidth: "+m+" x "+v,a.debug(r)),"fit"===x||"fit-smaller"===x){if(f=_,(p=w)>v||f>m||"fit-smaller"===x){var W=v/m;W>$?(p=Math.floor(m*$),f=m):W<$?(p=v,f=Math.floor(v/$)):(p=v,f=m)}}else"fill"===x?(p=v,f=m):(p=Math.max(m*$,v),f=Math.max(p/$,m));y.top=-(f-m)*k,y.left=-(p-v)*T,y.width=p,y.height=f,this.options.bypassCss||this.$wrap.css({width:v,height:m}).find(">.backstretch-item").not(".deleteable").each((function(){t(this).find("img,video,iframe").css(y)}));var I=t.Event("backstretch.resize",{relatedTarget:this.$container[0]});this.$container.trigger(I,this)}catch(t){r="resize: jadams, IE7 hack to let it fail gracefully: "+t,a.warn(r)}return this},show:function(e,r){var a=log4javascript.getLogger("j1.api.attic");if(!(Math.abs(e)>this.images.length-1)){var o=this,n=o.$wrap.find(">.backstretch-item").addClass("deleteable"),s=o.videoWrapper,h={relatedTarget:o.$container[0]};o.$container.trigger(t.Event("backstretch.before",h),[o,e]),this.index=e;var c=o.images[e];clearTimeout(o._cycleTimeout),delete o.videoWrapper;var d=p(c);return d?(o.videoWrapper=new _(c),o.$item=o.videoWrapper.$video.css("pointer-events","none")):o.$item=t("<img />"),o.$itemWrapper=t('<div class="backstretch-item">').append(o.$item),this.options.bypassCss?o.$itemWrapper.css({display:"none"}):(o.$itemWrapper.css(l.itemWrapper),o.$item.css(l.item)),o.$item.bind(d?"canplay":"load",(function(c){var l=t(this).parent(),u=l.data("options");r&&(u=t.extend({},u,r));var p=this.naturalWidth||this.videoWidth||this.width,g=this.naturalHeight||this.videoHeight||this.height;l.data("width",p).data("height",g);var f=function(t){return u[t]!==i?u[t]:o.options[t]},y=f("transition"),v=f("transitionEasing"),m=f("transitionDuration"),b=function(){s&&(s.stop(),s.destroy()),n.remove(),!o.paused&&o.images.length>1&&o.cycle(),!o.options.bypassCss&&o.isBody,t(["before","after","show"]).each((function(){o.$container.trigger(t.Event("backstretch."+this,h),[o,e])})),d&&o.videoWrapper.play()};o.firstShow&&!o.options.animateFirst||!m||!y?(l.show(),b()):function(e){var r=e.transition||"fade";"string"==typeof r&&r.indexOf("|")>-1&&(r=r.split("|")),r instanceof Array&&(r=r[Math.round(Math.random()*(r.length-1))]);var a=e.new,o=e.old?e.old:t([]);switch(r.toString().toLowerCase()){default:case"fade":a.fadeIn({duration:e.duration,complete:e.complete,easing:e.easing||i});break;case"fadeinout":case"fade_in_out":var n=function(){a.fadeIn({duration:e.duration/2,complete:e.complete,easing:e.easing||i})};o.length?o.fadeOut({duration:e.duration/2,complete:n,easing:e.easing||i}):n();break;case"pushleft":case"push_left":case"pushright":case"push_right":case"pushup":case"push_up":case"pushdown":case"push_down":case"coverleft":case"cover_left":case"coverright":case"cover_right":case"coverup":case"cover_up":case"coverdown":case"cover_down":var s=r.match(/^(cover|push)_?(.*)$/),h="left"===s[2]?"right":"right"===s[2]?"left":"down"===s[2]?"top":"up"===s[2]?"bottom":"right",c={display:""},d={};if(c[h]="-100%",d[h]=0,a.css(c).animate(d,{duration:e.duration,complete:function(){a.css(h,""),e.complete.apply(this,arguments)},easing:e.easing||i}),"push"===s[1]&&o.length){var l={};l[h]="100%",o.animate(l,{duration:e.duration,complete:function(){o.css("display","none")},easing:e.easing||i})}}}({new:l,old:n,transition:y,duration:m,easing:v,complete:b}),o.firstShow=!1;var w=this.naturalWidth||this.videoWidth||this.width,_="show: imageHeight x imageWidth: "+(this.naturalHeight||this.videoHeight||this.height)+" x "+w;o.options.debug&&a.debug(_);var $="#"+o.$container[0].id,T=setInterval((function(){t($).is(":visible")&&(a.debug("\ncontainer visible on id: "+$),o.resize(),clearInterval(T))}),10)})),o.$itemWrapper.appendTo(o.$wrap),o.$item.attr("alt",c.alt||""),o.$itemWrapper.data("options",c),d||o.$item.attr("src",c.url),o._currentImage=c,o}},current:function(){return this.index},next:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this.index<this.images.length-1?this.index+1:0),this.show.apply(this,t)},prev:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(0===this.index?this.images.length-1:this.index-1),this.show.apply(this,t)},pause:function(){return this.paused=!0,this.videoWrapper&&this.videoWrapper.pause(),this},resume:function(){return this.paused=!1,this.videoWrapper&&this.videoWrapper.play(),this.cycle(),this},cycle:function(){if(this.images.length>1){clearTimeout(this._cycleTimeout);var e=this._currentImage&&this._currentImage.duration||this.options.duration,i=p(this._currentImage),r=function(){this.$item.off(".cycle"),this.paused||this.next()};if(i){if(!this._currentImage.loop){var a=0;this.$item.on("playing.cycle",(function(){var e=t(this).data("player");clearTimeout(a),void 0!==e&&(a=setTimeout((function(){e.pause(),e.$video.trigger("ended")}),1e3*(e.getDuration()-e.getCurrentTime())))})).on("ended.cycle",(function(){clearTimeout(a)}))}this.$item.on("error.cycle initerror.cycle",t.proxy(r,this))}i&&!this._currentImage.duration?this.$item.on("ended.cycle",t.proxy(r,this)):this._cycleTimeout=setTimeout(t.proxy(r,this),e)}return this},destroy:function(i){t(e).off("resize.backstretch orientationchange.backstretch"),this.videoWrapper&&this.videoWrapper.destroy(),clearTimeout(this._cycleTimeout),i||this.$wrap.remove(),this.$container.removeData("backstretch")}};var _=function(){this.init.apply(this,arguments)};_.prototype.init=function(r){var o,n=this,s=function(){n.$video=o,n.video=o[0]},h="video";if(r.url instanceof Array||!a.test(r.url)||(h="youtube"),n.type=h,"youtube"===h){_.loadYoutubeAPI(),n.ytId=r.url.match(a)[2];var c="https://www.youtube.com/embed/"+n.ytId+"?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0&enablejsapi=1&origin="+encodeURIComponent(e.location.origin);n.__ytStartMuted=!!r.mute||r.mute===i,o=t("<iframe />").attr({src_to_load:c}).css({border:0,margin:0,padding:0}).data("player",n),r.loop&&o.on("ended.loop",(function(){n.__manuallyStopped||n.play()})),n.ytReady=!1,s(),e.YT?(n._initYoutube(),o.trigger("initsuccess")):t(e).one("youtube_api_load",(function(){n._initYoutube(),o.trigger("initsuccess")}))}else{o=t("<video>").prop("autoplay",!1).prop("controls",!1).prop("loop",!!r.loop).prop("muted",!!r.mute||r.mute===i).prop("preload","auto").prop("poster",r.poster||"");for(var d=r.url instanceof Array?r.url:[r.url],l=0;l<d.length;l++){var u=d[l];"string"==typeof u&&(u={src:u}),t("<source>").attr("src",u.src).attr("type",u.type||null).appendTo(o)}o[0].canPlayType&&d.length?o.trigger("initsuccess"):o.trigger("initerror"),s()}},_.prototype._initYoutube=function(){var i=this,r=e.YT;i.$video.attr("src",i.$video.attr("src_to_load")).removeAttr("src_to_load");var a=!!i.$video[0].parentNode;if(!a){var o=t("<div>").css("display","none !important").appendTo(document.body);i.$video.appendTo(o)}var n=new r.Player(i.video,{events:{onReady:function(){i.__ytStartMuted&&n.mute(),a||(i.$video[0].parentNode===o[0]&&i.$video.detach(),o.remove()),i.ytReady=!0,i._updateYoutubeSize(),i.$video.trigger("canplay")},onStateChange:function(t){switch(t.data){case r.PlayerState.PLAYING:i.$video.trigger("playing");break;case r.PlayerState.ENDED:i.$video.trigger("ended");break;case r.PlayerState.PAUSED:i.$video.trigger("pause");break;case r.PlayerState.BUFFERING:i.$video.trigger("waiting");break;case r.PlayerState.CUED:i.$video.trigger("canplay")}},onPlaybackQualityChange:function(){i._updateYoutubeSize(),i.$video.trigger("resize")},onError:function(t){i.hasError=!0,i.$video.trigger({type:"error",error:t})}}});return i.ytPlayer=n,i},_.prototype._updateYoutubeSize=function(){var t=this;switch(t.ytPlayer.getPlaybackQuality()||"medium"){case"small":t.video.videoWidth=426,t.video.videoHeight=240;break;case"medium":t.video.videoWidth=640,t.video.videoHeight=360;break;default:case"large":t.video.videoWidth=854,t.video.videoHeight=480;break;case"hd720":t.video.videoWidth=1280,t.video.videoHeight=720;break;case"hd1080":t.video.videoWidth=1920,t.video.videoHeight=1080;break;case"highres":t.video.videoWidth=2560,t.video.videoHeight=1440}return t},_.prototype.play=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&(t.$video.trigger("play"),t.ytPlayer.playVideo()):t.video.play(),t},_.prototype.pause=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&t.ytPlayer.pauseVideo():t.video.pause(),t},_.prototype.stop=function(){var t=this;return t.__manuallyStopped=!0,"youtube"===t.type?t.ytReady&&(t.ytPlayer.pauseVideo(),t.ytPlayer.seekTo(0)):(t.video.pause(),t.video.currentTime=0),t},_.prototype.destroy=function(){var t=this;return t.ytPlayer&&t.ytPlayer.destroy(),t.$video.remove(),t},_.prototype.getCurrentTime=function(t){var e=this;return"youtube"!==e.type?e.video.currentTime:e.ytReady?e.ytPlayer.getCurrentTime():0},_.prototype.setCurrentTime=function(t){var e=this;return"youtube"===e.type?e.ytReady&&e.ytPlayer.seekTo(t,!0):e.video.currentTime=t,e},_.prototype.getDuration=function(){var t=this;return"youtube"!==t.type?t.video.duration:t.ytReady?t.ytPlayer.getDuration():0},_.loadYoutubeAPI=function(){if(!e.YT){t("script[src*=www\\.youtube\\.com\\/iframe_api]").length||t('<script src="https://www.youtube.com/iframe_api">').appendTo("body");var i=setInterval((function(){e.YT&&e.YT.loaded&&(t(e).trigger("youtube_api_load"),clearTimeout(i))}),10)}};var $,T,k,x,W,I,R,Y,P,C,z=function(){if("matchMedia"in e){if(e.matchMedia("(orientation: portrait)").matches)return"portrait";if(e.matchMedia("(orientation: landscape)").matches)return"landscape"}return screen.height>screen.width?"portrait":"landscape"},S=function(){return e.innerHeight>e.innerWidth?"portrait":e.innerWidth>e.innerHeight?"landscape":"square"},A=($=navigator.userAgent,T=navigator.platform,k=$.match(/AppleWebKit\/([0-9]+)/),x=!!k&&k[1],W=$.match(/Fennec\/([0-9]+)/),I=!!W&&W[1],R=$.match(/Opera Mobi\/([0-9]+)/),Y=!!R&&R[1],P=$.match(/MSIE ([0-9]+)/),C=!!P&&P[1],!((T.indexOf("iPhone")>-1||T.indexOf("iPad")>-1||T.indexOf("iPod")>-1)&&x&&x<534||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||R&&Y<7458||$.indexOf("Android")>-1&&x&&x<533||I&&I<6||"palmGetResource"in e&&x&&x<534||$.indexOf("MeeGo")>-1&&$.indexOf("NokiaBrowser/8.5.0")>-1||C&&C<=6))}(jQuery,window);
@@ -38,7 +38,7 @@
38
38
 
39
39
  'use strict';
40
40
  function CookieConsent(props) {
41
- var logger = log4javascript.getLogger('j1.core.CookieConsent');
41
+ var logger = log4javascript.getLogger('j1.api.CookieConsent');
42
42
  var self = this;
43
43
  var detailedSettingsShown = false;
44
44
  var url = new liteURL(window.location.href);
@@ -49,8 +49,8 @@ function CookieConsent(props) {
49
49
  var current_page;
50
50
  var whitelisted;
51
51
 
52
- logger.debug('\n' + 'initializing core module: started');
53
- logger.debug('\n' + 'state: started');
52
+ logger.debug('initializing core module: started');
53
+ logger.debug('state: started');
54
54
 
55
55
  if (navigatorLanguage.indexOf("-") !== -1) {
56
56
  navigatorLanguage = navigatorLanguage.split("-")[0];
@@ -210,7 +210,7 @@ function CookieConsent(props) {
210
210
 
211
211
  self.modal = document.getElementById(self.props.dialogContainerID);
212
212
  if (!self.modal) {
213
- logger.info('\n' + 'load consent modal');
213
+ logger.info( 'load consent modal');
214
214
 
215
215
  self.modal = document.createElement("div");
216
216
  self.modal.id = self.props.dialogContainerID;
@@ -250,7 +250,7 @@ function CookieConsent(props) {
250
250
  var templateUrl = self.props.contentURL + '/' + 'index.html';
251
251
  $.get(templateUrl)
252
252
  .done(function (data) {
253
- logger.info('\n' + 'loading consent modal: successfully');
253
+ logger.info('loading consent modal: successfully');
254
254
  self.modal.innerHTML = data;
255
255
  self.modal.innerHTML = $('#' + self.props.xhrDataElement).eq(0).html();
256
256
  self.modal.style.display = 'block';
@@ -265,7 +265,7 @@ function CookieConsent(props) {
265
265
  self.$buttonSave = $("#bccs-buttonSave");
266
266
  self.$buttonAgreeAll = $("#bccs-buttonAgreeAll");
267
267
 
268
- logger.info('\n' + 'load/initialze options from cookie');
268
+ logger.info('load/initialze options from cookie');
269
269
 
270
270
  updateButtons();
271
271
  updateOptionsFromCookie();
@@ -278,7 +278,7 @@ function CookieConsent(props) {
278
278
  updateButtons();
279
279
  });
280
280
 
281
- logger.info('\n' + 'initialze event handler');
281
+ logger.info('initialze event handler');
282
282
 
283
283
  self.$buttonDoNotAgree.click(function () {
284
284
  doNotAgree();
@@ -300,8 +300,8 @@ function CookieConsent(props) {
300
300
  self.$modal.modal('show');
301
301
  })
302
302
  .fail(function () {
303
- logger.error('\n' + 'loading consent modal: failed');
304
- logger.warn('\n' + 'probably no `contentURL` set');
303
+ logger.error('loading consent modal: failed');
304
+ logger.warn('probably no `contentURL` set');
305
305
  });
306
306
  } else {
307
307
  self.$modal.modal('show');
@@ -401,8 +401,8 @@ function CookieConsent(props) {
401
401
 
402
402
  // API functions
403
403
  // ---------------------------------------------------------------------------
404
- logger.debug('\n' + 'initializing core module finished');
405
- logger.debug('\n' + 'state: finished');
404
+ logger.debug('initializing core module finished');
405
+ logger.debug('state: finished');
406
406
 
407
407
  // show the consent dialog (modal)
408
408
  // ---------------------------------------------------------------------------
@@ -25,4 +25,5 @@
25
25
  # -----------------------------------------------------------------------------
26
26
  */
27
27
 
28
- "use strict";function CookieConsent(o){var e,t=log4javascript.getLogger("j1.core.CookieConsent"),n=this,i=!1,a=!!new liteURL(window.location.href).protocol.includes("https"),s=navigator.language||navigator.userLanguage;for(var l in t.info("\ninitializing core module: started"),t.info("\nstate: started"),-1!==s.indexOf("-")&&(s=s.split("-")[0]),this.props={autoShowDialog:!0,dialogLanguage:s,dialogLanguages:["en","de"],contentURL:"/assets/data/cookieconsent",postSelectionCallback:"",whitelisted:[],xhrDataElement:"consent-data",dialogContainerID:"consent-modal"},o)this.props[l]=o[l];-1!==this.props.dialogLanguage.indexOf("-")&&(this.props.dialogLanguage=this.props.dialogLanguage.split("-")[0]),this.props.dialogLanguages.includes(this.props.dialogLanguage)||(this.props.dialogLanguage="en"),this.props.xhrDataElement=this.props.xhrDataElement+"-"+this.props.dialogLanguage,this.props.cookieSecure=a;var r={set:function(o,e,t,n,i,a){var s=window.btoa(e),l="; expires=Thu, 01 Jan 1970 00:00:00 UTC";if(t>0){var r=new Date;r.setTime(r.getTime()+24*t*60*60*1e3),l="; expires="+r.toUTCString()}document.cookie=a?i?o+"="+(s||"")+l+"; Path=/; SameSite="+n+"; Domain="+i+"; Secure="+a+";":o+"="+(s||"")+l+"; Path=/; SameSite="+n+"; Secure="+a+";":i?o+"="+(s||"")+l+"; Path=/; SameSite="+n+";Domain="+i+"; ":o+"="+(s||"")+l+"; Path=/; SameSite="+n+";"},get:function(o){for(var e=o+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var i=t[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e)){var a=i.substring(e.length,i.length);return window.atob(a)}}}},d={documentReady:function(o){"loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o)}};function c(o){d.documentReady(function(){if(n.modal=document.getElementById(n.props.dialogContainerID),n.modal)n.$modal.modal("show");else{t.info("\nload consent modal"),n.modal=document.createElement("div"),n.modal.id=n.props.dialogContainerID,n.modal.style.display="none",n.modal.setAttribute("class","modal fade"),n.modal.setAttribute("tabindex","-1"),n.modal.setAttribute("role","dialog"),n.modal.setAttribute("aria-labelledby",n.props.dialogContainerID),document.body.append(n.modal),n.$modal=$(n.modal),n.$modal.on("show.bs.modal",function(){}),n.$modal.on("hidden.bs.modal",function(){!function(o,e){for(var t=Array.prototype.slice.call(arguments,2),n=o.split("."),i=n.pop(),a=0;a<n.length;a++)e=e[n[a]];e[i].apply(e,t)}(n.props.postSelectionCallback,window)});var o=n.props.contentURL+"/index.html";$.get(o).done(function(o){t.info("\nloading consent modal: successfully"),n.modal.innerHTML=o,n.modal.innerHTML=$("#"+n.props.xhrDataElement).eq(0).html(),n.modal.style.display="block",$(n.modal).modal({backdrop:"static",keyboard:!1}),n.$buttonDoNotAgree=$("#bccs-buttonDoNotAgree"),n.$buttonAgree=$("#bccs-buttonAgree"),n.$buttonSave=$("#bccs-buttonSave"),n.$buttonAgreeAll=$("#bccs-buttonAgreeAll"),t.info("\nload/initialze options from cookie"),g(),p(),$("#bccs-options").on("hide.bs.collapse",function(){i=!1,g()}).on("show.bs.collapse",function(){i=!0,g()}),t.info("\ninitialze event handler"),n.$buttonDoNotAgree.click(function(){r.set(n.props.cookieName,JSON.stringify(u(!1)),0,n.props.cookieSameSite,n.props.cookieDomain,a),n.$modal.modal("hide"),window.location.href="/445.html"}),n.$buttonAgree.click(function(){m()}),n.$buttonSave.click(function(){$("#bccs-options").collapse("hide"),r.set(n.props.cookieName,JSON.stringify(u()),n.props.cookieStorageDays,n.props.cookieSameSite,n.props.cookieDomain,a),n.$modal.modal("hide"),p()}),n.$buttonAgreeAll.click(function(){$("#bccs-options").collapse("hide"),m(),p()}),n.$modal.modal("show")}).fail(function(){t.error("\nloading consent modal: failed"),t.warn("\nprobably no `contentURL` set")})}}.bind(this))}function p(){var o=n.getSettings();if(o)for(var e in o){n.$modal.find("#bccs-options .bccs-option[data-name='"+e+"'] input[type='checkbox']").prop("checked",o[e])}}function g(){i?(n.$buttonDoNotAgree.hide(),n.$buttonAgree.hide(),n.$buttonSave.show(),n.$buttonAgreeAll.show()):(n.$buttonDoNotAgree.show(),n.$buttonAgree.show(),n.$buttonSave.hide(),n.$buttonAgreeAll.hide())}function u(o){for(var e=n.$modal.find("#bccs-options .bccs-option"),t={},i=0;i<e.length;i++){var a=e[i],s=a.getAttribute("data-name");if("necessary"===s)t[s]=!0;else if(void 0===o){var l=$(a).find("input[type='checkbox']");t[s]=l.prop("checked")}else t[s]=!!o}return t}function m(){r.set(n.props.cookieName,JSON.stringify(u(!0)),n.props.cookieStorageDays,n.props.cookieSameSite,n.props.cookieDomain,a),n.$modal.modal("hide")}e=this.props.whitelisted.indexOf(window.location.pathname)>-1;var h=r.get(this.props.cookieName);void 0!==h&&"false"!==h||!this.props.autoShowDialog||e||c(),t.info("\ninitializing core module finished"),t.info("\nstate: finished"),this.showDialog=function(){(e=this.props.whitelisted.indexOf(window.location.pathname)>-1)||c()},this.getSettings=function(o){if(r.get(n.props.cookieName)){var e=JSON.parse(r.get(n.props.cookieName));return void 0===o?e:!!e&&e[o]}}}
28
+ "use strict";function CookieConsent(o){var e,t=log4javascript.getLogger("j1.api.CookieConsent"),i=this,n=!1,a=!!new liteURL(window.location.href).protocol.includes("https"),s=navigator.language||navigator.userLanguage;for(var l in t.debug("initializing core module: started"),t.debug("state: started"),-1!==s.indexOf("-")&&(s=s.split("-")[0]),this.props={autoShowDialog:!0,dialogLanguage:"en",dialogLanguages:["en","de"],contentURL:"/assets/data/cookieconsent",postSelectionCallback:"",whitelisted:[],xhrDataElement:"consent-data",dialogContainerID:"consent-modal"},o)this.props[l]=o[l];-1!==this.props.dialogLanguage.indexOf("-")&&(this.props.dialogLanguage=this.props.dialogLanguage.split("-")[0]),this.props.dialogLanguages.includes(this.props.dialogLanguage)||(this.props.dialogLanguage="en"),this.props.xhrDataElement=this.props.xhrDataElement+"-"+this.props.dialogLanguage,this.props.cookieSecure=a;var r={set:(o,e,t,i,n,a)=>{var s=window.btoa(e),l="; expires=Thu, 01 Jan 1970 00:00:00 UTC";if(t>0){var r=new Date;r.setTime(r.getTime()+24*t*60*60*1e3),l="; expires="+r.toUTCString()}document.cookie=a?n?o+"="+(s||"")+l+"; Path=/; SameSite="+i+"; Domain="+n+"; Secure="+a+";":o+"="+(s||"")+l+"; Path=/; SameSite="+i+"; Secure="+a+";":n?o+"="+(s||"")+l+"; Path=/; SameSite="+i+";Domain="+n+"; ":o+"="+(s||"")+l+"; Path=/; SameSite="+i+";"},get:o=>{for(var e=o+"=",t=document.cookie.split(";"),i=0;i<t.length;i++){for(var n=t[i];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e)){var a=n.substring(e.length,n.length);return window.atob(a)}}}},d=function(o){"loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o)};function c(o){d(function(){if(i.modal=document.getElementById(i.props.dialogContainerID),i.modal)i.$modal.modal("show");else{t.info("load consent modal"),i.modal=document.createElement("div"),i.modal.id=i.props.dialogContainerID,i.modal.style.display="none",i.modal.setAttribute("class","modal fade"),i.modal.setAttribute("tabindex","-1"),i.modal.setAttribute("role","dialog"),i.modal.setAttribute("aria-labelledby",i.props.dialogContainerID),document.body.append(i.modal),i.$modal=$(i.modal),i.$modal.on("show.bs.modal",(function(){})),i.$modal.on("hidden.bs.modal",(function(){!function(o,e){for(var t=Array.prototype.slice.call(arguments,2),i=o.split("."),n=i.pop(),a=0;a<i.length;a++)e=e[i[a]];e[n].apply(e,t)}(i.props.postSelectionCallback,window)}));var o=i.props.contentURL+"/index.html";$.get(o).done((function(o){t.info("loading consent modal: successfully"),i.modal.innerHTML=o,i.modal.innerHTML=$("#"+i.props.xhrDataElement).eq(0).html(),i.modal.style.display="block",$(i.modal).modal({backdrop:"static",keyboard:!1}),i.$buttonDoNotAgree=$("#bccs-buttonDoNotAgree"),i.$buttonAgree=$("#bccs-buttonAgree"),i.$buttonSave=$("#bccs-buttonSave"),i.$buttonAgreeAll=$("#bccs-buttonAgreeAll"),t.info("load/initialze options from cookie"),g(),p(),$("#bccs-options").on("hide.bs.collapse",(function(){n=!1,g()})).on("show.bs.collapse",(function(){n=!0,g()})),t.info("initialze event handler"),i.$buttonDoNotAgree.click((function(){r.set(i.props.cookieName,JSON.stringify(u(!1)),0,i.props.cookieSameSite,i.props.cookieDomain,a),i.$modal.modal("hide"),window.location.href="/445.html"})),i.$buttonAgree.click((function(){m()})),i.$buttonSave.click((function(){$("#bccs-options").collapse("hide"),r.set(i.props.cookieName,JSON.stringify(u()),i.props.cookieStorageDays,i.props.cookieSameSite,i.props.cookieDomain,a),i.$modal.modal("hide"),p()})),i.$buttonAgreeAll.click((function(){$("#bccs-options").collapse("hide"),m(),p()})),i.$modal.modal("show")})).fail((function(){t.error("loading consent modal: failed"),t.warn("probably no `contentURL` set")}))}}.bind(this))}function p(){var o=i.getSettings();if(o)for(var e in o){i.$modal.find("#bccs-options .bccs-option[data-name='"+e+"'] input[type='checkbox']").prop("checked",o[e])}}function g(){n?(i.$buttonDoNotAgree.hide(),i.$buttonAgree.hide(),i.$buttonSave.show(),i.$buttonAgreeAll.show()):(i.$buttonDoNotAgree.show(),i.$buttonAgree.show(),i.$buttonSave.hide(),i.$buttonAgreeAll.hide())}function u(o){for(var e=i.$modal.find("#bccs-options .bccs-option"),t={},n=0;n<e.length;n++){var a=e[n],s=a.getAttribute("data-name");if("necessary"===s)t[s]=!0;else if(void 0===o){var l=$(a).find("input[type='checkbox']");t[s]=l.prop("checked")}else t[s]=!!o}return t}function m(){r.set(i.props.cookieName,JSON.stringify(u(!0)),i.props.cookieStorageDays,i.props.cookieSameSite,i.props.cookieDomain,a),i.$modal.modal("hide")}e=this.props.whitelisted.indexOf(window.location.pathname)>-1;var h=r.get(this.props.cookieName);void 0!==h&&"false"!==h||!this.props.autoShowDialog||e||c(),t.debug("initializing core module finished"),t.debug("state: finished"),this.showDialog=function(){(e=this.props.whitelisted.indexOf(window.location.pathname)>-1)||c()},this.getSettings=function(o){if(r.get(i.props.cookieName)){var e=JSON.parse(r.get(i.props.cookieName));return void 0===o?e:!!e&&e[o]}}}
29
+
@@ -860,5 +860,5 @@
860
860
 
861
861
  // jadams, 2020-10-10: TODO: check if anime could be a replacement
862
862
  // for (huge) animate.css
863
- // })($, j1.anime);
864
- })(cash, j1.anime);
863
+ // })($, j1.api.anime);
864
+ })(cash, j1.api.anime);
@@ -17,4 +17,4 @@
17
17
  # jadams, 2020-10-11: module needs to be rewitten to PURE jQuery
18
18
  # -----------------------------------------------------------------------------
19
19
  */
20
- "use strict";!function(e,t){var i={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};e.fn.reverse=[].reverse;class o{constructor(e,t,i){t instanceof Element||console.error(Error(t+" is not an HTML Element"));var o=e.getInstance(t);o&&o.destroy(),this.el=t,this.$el=cash(t)}static init(e,t,i){var o=null;if(t instanceof Element)o=new e(t,i);else if(t&&(t.jquery||t.cash||t instanceof NodeList)){for(var n=[],s=0;s<t.length;s++)n.push(new e(t[s],i));o=n}return o}}j1.initializeJqueryWrapper=function(e,t,i){jQuery.fn[t]=function(o){if(e.prototype[o]){var n=Array.prototype.slice.call(arguments,1);if("get"===o.slice(0,3)){var s=this.first()[0][i];return s[o].apply(s,n)}return this.each(function(){var e=this[i];e[o].apply(e,n)})}if("object"==typeof o||!o)return e.init(this,arguments[0]),this;jQuery.error("Method "+o+" does not exist on jQuery."+t)}};class n extends o{constructor(t,i){super(n,t,i),this.el.M_Dropdown=this,n._dropdowns.push(this),this.id=this.getIdFromTrigger(t),this.dropdownEl=document.getElementById(this.id),this.$dropdownEl=e(this.dropdownEl),this.options=e.extend({},n.defaults,i),this.isOpen=!1,this.isScrollable=!1,this.isTouchMoving=!1,this.focusedIndex=-1,this.filterQuery=[],this.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},this.options.container?e(this.options.container).append(this.dropdownEl):this.$el.after(this.dropdownEl),this._makeDropdownFocusable(),this._resetFilterQueryBound=this._resetFilterQuery.bind(this),this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleDocumentTouchmoveBound=this._handleDocumentTouchmove.bind(this),this._handleDropdownClickBound=this._handleDropdownClick.bind(this),this._handleDropdownKeydownBound=this._handleDropdownKeydown.bind(this),this._handleTriggerKeydownBound=this._handleTriggerKeydown.bind(this),this._setupEventHandlers()}static get defaults(){return i}static init(e,t){return super.init(this,e,t)}static getInstance(e){return(e.jquery?e[0]:e).M_Dropdown}getIdFromTrigger(e){var t=e.getAttribute("data-target");return t||(t=(t=e.getAttribute("href"))?t.slice(1):""),t}executeFunctionByName(e,t){for(var i=Array.prototype.slice.call(arguments,2),o=e.split("."),n=o.pop(),s=0;s<o.length;s++)t=t[o[s]];return t[n].apply(t,i)}checkPossibleAlignments(e,t,i,o){var n={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},s="visible"===getComputedStyle(t).overflow,h=t.getBoundingClientRect(),d=Math.min(h.height,window.innerHeight),r=Math.min(h.width,window.innerWidth),l=e.getBoundingClientRect(),a=t.scrollLeft,c=t.scrollTop,p=i.left-a,u=i.top-c,w=i.top+l.height-c;return n.spaceOnRight=s?window.innerWidth-(l.left+i.width):r-(p+i.width),n.spaceOnRight<0&&(n.left=!1),n.spaceOnLeft=s?l.right-i.width:p-i.width+l.width,n.spaceOnLeft<0&&(n.right=!1),n.spaceOnBottom=s?window.innerHeight-(l.top+i.height+o):d-(u+i.height+o),n.spaceOnBottom<0&&(n.top=!1),n.spaceOnTop=s?l.bottom-(i.height+o):w-(i.height-o),n.spaceOnTop<0&&(n.bottom=!1),n}destroy(){this._resetDropdownStyles(),this._removeEventHandlers(),n._dropdowns.splice(n._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}_setupEventHandlers(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}_removeEventHandlers(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}_setupTemporaryEventHandlers(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}_removeTemporaryEventHandlers(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}_handleClick(e){e.preventDefault(),this.open()}_handleMouseEnter(){this.open()}_handleMouseLeave(t){let i=t.toElement||t.relatedTarget,o=!!e(i).closest(".dropdown-content").length,n=!1,s=e(i).closest(".dropdowns");s.length&&s[0].M_Dropdown&&s[0].M_Dropdown.isOpen&&(n=!0),n||o||this.close()}_handleDocumentClick(t){let i=e(t.target);this.options.closeOnClick&&i.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(()=>{this.close()},0):!i.closest(".dropdowns").length&&i.closest(".dropdown-content").length||setTimeout(()=>{this.close()},0),this.isTouchMoving=!1}_handleTriggerKeydown(e){e.which!==this.keys.ARROW_DOWN&&e.which!==this.keys.ENTER||this.isOpen||(e.preventDefault(),this.open())}_handleDocumentTouchmove(t){e(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}_handleDropdownClick(e){if("false"!==this.options.onItemClick){this.executeFunctionByName(this.options.onItemClick,window,this)}}_handleDropdownKeydown(t){if(t.which===this.keys.TAB)t.preventDefault(),this.close();else if(t.which!==this.keys.ARROW_DOWN&&t.which!==this.keys.ARROW_UP||!this.isOpen)if(t.which===this.keys.ENTER&&this.isOpen){let t=this.dropdownEl.children[this.focusedIndex],i=e(t).find("a, button").first();i.length?i[0].click():t&&t.click()}else t.which===this.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();let e=t.which===this.keys.ARROW_DOWN?1:-1,i=this.focusedIndex,o=!1;do{if(i+=e,this.dropdownEl.children[i]&&-1!==this.dropdownEl.children[i].tabIndex){o=!0;break}}while(i<this.dropdownEl.children.length&&i>=0);o&&(this.focusedIndex=i,this._focusFocusedItem())}let i=String.fromCharCode(t.which).toLowerCase();if(i&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(i);let t=this.filterQuery.join(""),o=e(this.dropdownEl).find("li").filter(i=>0===e(i).text().toLowerCase().indexOf(t))[0];o&&(this.focusedIndex=e(o).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}_resetFilterQuery(){this.filterQuery=[]}_resetDropdownStyles(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}_makeDropdownFocusable(){this.dropdownEl.tabIndex=0,e(this.dropdownEl).children().each(function(e){e.getAttribute("tabindex")||e.setAttribute("tabindex",0)})}_focusFocusedItem(){this.focusedIndex>=0&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}_getDropdownPosition(){this.el.offsetParent.getBoundingClientRect();let e=this.el.getBoundingClientRect(),t=this.dropdownEl.getBoundingClientRect(),i=t.height,o=t.width,n=e.left-t.left,s=e.top-t.top,h={left:n,top:s,height:i,width:o},d=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,r=this.checkPossibleAlignments(this.el,d,h,this.options.coverTrigger?0:e.height),l="top",a=this.options.alignment;if(s+=this.options.coverTrigger?0:e.height,this.isScrollable=!1,r.top||(r.bottom?l="bottom":(this.isScrollable=!0,r.spaceOnTop>r.spaceOnBottom?(l="bottom",i+=r.spaceOnTop,s-=r.spaceOnTop):i+=r.spaceOnBottom)),!r[a]){let e="left"===a?"right":"left";r[e]?a=e:r.spaceOnLeft>r.spaceOnRight?(a="right",o+=r.spaceOnLeft,n-=r.spaceOnLeft):(a="left",o+=r.spaceOnRight)}return"bottom"===l&&(s=s-t.height+(this.options.coverTrigger?e.height:0)),"right"===a&&(n=n-t.width+e.width),{x:n,y:s,verticalAlignment:l,horizontalAlignment:a,height:i,width:o}}_animateIn(){t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:e=>{this.options.autoFocus&&this.dropdownEl.focus(),"function"==typeof this.options.onOpenEnd&&this.options.onOpenEnd.call(this,this.el)}})}_animateOut(){t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:e=>{this._resetDropdownStyles(),"function"==typeof this.options.onCloseEnd&&this.options.onCloseEnd.call(this,this.el)}})}_placeDropdown(){let e=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=e+"px";let t=this._getDropdownPosition();this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=`${"left"===t.horizontalAlignment?"0":"100%"} ${"top"===t.verticalAlignment?"0":"100%"}`}open(){if(!this.isOpen){this.isOpen=!0;for(var e="#"+(o=this).id+" li",t=document.querySelectorAll(e),i=0;i<t.length;i++)t[i].addEventListener("click",function(e){e.preventDefault();for(var i=0;i<t.length;i++)t[i].classList.contains("active")&&t[i].classList.remove("active");this.classList.add("active")},!1);var o=this;this.options.onOpen&&this.executeFunctionByName(this.options.onOpen,window,o),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers()}}close(){if(this.isOpen){this.isOpen=!1,this.focusedIndex=-1;this.options.onClose&&this.executeFunctionByName(this.options.onClose,window,this),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus()}}recalculateDimensions(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}n._dropdowns=[],j1.dropdowns=n,j1.jQueryLoaded=!!window.jQuery,j1.jQueryLoaded&&j1.initializeJqueryWrapper(n,"dropdown","M_Dropdown")}(cash,j1.anime);
20
+ "use strict";!function(e,t){var i={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};e.fn.reverse=[].reverse;class o{constructor(e,t,i){t instanceof Element||console.error(Error(t+" is not an HTML Element"));var o=e.getInstance(t);o&&o.destroy(),this.el=t,this.$el=cash(t)}static init(e,t,i){var o=null;if(t instanceof Element)o=new e(t,i);else if(t&&(t.jquery||t.cash||t instanceof NodeList)){for(var n=[],s=0;s<t.length;s++)n.push(new e(t[s],i));o=n}return o}}j1.initializeJqueryWrapper=function(e,t,i){jQuery.fn[t]=function(o){if(e.prototype[o]){var n=Array.prototype.slice.call(arguments,1);if("get"===o.slice(0,3)){var s=this.first()[0][i];return s[o].apply(s,n)}return this.each(function(){var e=this[i];e[o].apply(e,n)})}if("object"==typeof o||!o)return e.init(this,arguments[0]),this;jQuery.error("Method "+o+" does not exist on jQuery."+t)}};class n extends o{constructor(t,i){super(n,t,i),this.el.M_Dropdown=this,n._dropdowns.push(this),this.id=this.getIdFromTrigger(t),this.dropdownEl=document.getElementById(this.id),this.$dropdownEl=e(this.dropdownEl),this.options=e.extend({},n.defaults,i),this.isOpen=!1,this.isScrollable=!1,this.isTouchMoving=!1,this.focusedIndex=-1,this.filterQuery=[],this.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},this.options.container?e(this.options.container).append(this.dropdownEl):this.$el.after(this.dropdownEl),this._makeDropdownFocusable(),this._resetFilterQueryBound=this._resetFilterQuery.bind(this),this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleDocumentTouchmoveBound=this._handleDocumentTouchmove.bind(this),this._handleDropdownClickBound=this._handleDropdownClick.bind(this),this._handleDropdownKeydownBound=this._handleDropdownKeydown.bind(this),this._handleTriggerKeydownBound=this._handleTriggerKeydown.bind(this),this._setupEventHandlers()}static get defaults(){return i}static init(e,t){return super.init(this,e,t)}static getInstance(e){return(e.jquery?e[0]:e).M_Dropdown}getIdFromTrigger(e){var t=e.getAttribute("data-target");return t||(t=(t=e.getAttribute("href"))?t.slice(1):""),t}executeFunctionByName(e,t){for(var i=Array.prototype.slice.call(arguments,2),o=e.split("."),n=o.pop(),s=0;s<o.length;s++)t=t[o[s]];return t[n].apply(t,i)}checkPossibleAlignments(e,t,i,o){var n={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},s="visible"===getComputedStyle(t).overflow,h=t.getBoundingClientRect(),d=Math.min(h.height,window.innerHeight),r=Math.min(h.width,window.innerWidth),l=e.getBoundingClientRect(),a=t.scrollLeft,c=t.scrollTop,p=i.left-a,u=i.top-c,w=i.top+l.height-c;return n.spaceOnRight=s?window.innerWidth-(l.left+i.width):r-(p+i.width),n.spaceOnRight<0&&(n.left=!1),n.spaceOnLeft=s?l.right-i.width:p-i.width+l.width,n.spaceOnLeft<0&&(n.right=!1),n.spaceOnBottom=s?window.innerHeight-(l.top+i.height+o):d-(u+i.height+o),n.spaceOnBottom<0&&(n.top=!1),n.spaceOnTop=s?l.bottom-(i.height+o):w-(i.height-o),n.spaceOnTop<0&&(n.bottom=!1),n}destroy(){this._resetDropdownStyles(),this._removeEventHandlers(),n._dropdowns.splice(n._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}_setupEventHandlers(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}_removeEventHandlers(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}_setupTemporaryEventHandlers(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}_removeTemporaryEventHandlers(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}_handleClick(e){e.preventDefault(),this.open()}_handleMouseEnter(){this.open()}_handleMouseLeave(t){let i=t.toElement||t.relatedTarget,o=!!e(i).closest(".dropdown-content").length,n=!1,s=e(i).closest(".dropdowns");s.length&&s[0].M_Dropdown&&s[0].M_Dropdown.isOpen&&(n=!0),n||o||this.close()}_handleDocumentClick(t){let i=e(t.target);this.options.closeOnClick&&i.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(()=>{this.close()},0):!i.closest(".dropdowns").length&&i.closest(".dropdown-content").length||setTimeout(()=>{this.close()},0),this.isTouchMoving=!1}_handleTriggerKeydown(e){e.which!==this.keys.ARROW_DOWN&&e.which!==this.keys.ENTER||this.isOpen||(e.preventDefault(),this.open())}_handleDocumentTouchmove(t){e(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}_handleDropdownClick(e){if("false"!==this.options.onItemClick){this.executeFunctionByName(this.options.onItemClick,window,this)}}_handleDropdownKeydown(t){if(t.which===this.keys.TAB)t.preventDefault(),this.close();else if(t.which!==this.keys.ARROW_DOWN&&t.which!==this.keys.ARROW_UP||!this.isOpen)if(t.which===this.keys.ENTER&&this.isOpen){let t=this.dropdownEl.children[this.focusedIndex],i=e(t).find("a, button").first();i.length?i[0].click():t&&t.click()}else t.which===this.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();let e=t.which===this.keys.ARROW_DOWN?1:-1,i=this.focusedIndex,o=!1;do{if(i+=e,this.dropdownEl.children[i]&&-1!==this.dropdownEl.children[i].tabIndex){o=!0;break}}while(i<this.dropdownEl.children.length&&i>=0);o&&(this.focusedIndex=i,this._focusFocusedItem())}let i=String.fromCharCode(t.which).toLowerCase();if(i&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(i);let t=this.filterQuery.join(""),o=e(this.dropdownEl).find("li").filter(i=>0===e(i).text().toLowerCase().indexOf(t))[0];o&&(this.focusedIndex=e(o).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}_resetFilterQuery(){this.filterQuery=[]}_resetDropdownStyles(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}_makeDropdownFocusable(){this.dropdownEl.tabIndex=0,e(this.dropdownEl).children().each(function(e){e.getAttribute("tabindex")||e.setAttribute("tabindex",0)})}_focusFocusedItem(){this.focusedIndex>=0&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}_getDropdownPosition(){this.el.offsetParent.getBoundingClientRect();let e=this.el.getBoundingClientRect(),t=this.dropdownEl.getBoundingClientRect(),i=t.height,o=t.width,n=e.left-t.left,s=e.top-t.top,h={left:n,top:s,height:i,width:o},d=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,r=this.checkPossibleAlignments(this.el,d,h,this.options.coverTrigger?0:e.height),l="top",a=this.options.alignment;if(s+=this.options.coverTrigger?0:e.height,this.isScrollable=!1,r.top||(r.bottom?l="bottom":(this.isScrollable=!0,r.spaceOnTop>r.spaceOnBottom?(l="bottom",i+=r.spaceOnTop,s-=r.spaceOnTop):i+=r.spaceOnBottom)),!r[a]){let e="left"===a?"right":"left";r[e]?a=e:r.spaceOnLeft>r.spaceOnRight?(a="right",o+=r.spaceOnLeft,n-=r.spaceOnLeft):(a="left",o+=r.spaceOnRight)}return"bottom"===l&&(s=s-t.height+(this.options.coverTrigger?e.height:0)),"right"===a&&(n=n-t.width+e.width),{x:n,y:s,verticalAlignment:l,horizontalAlignment:a,height:i,width:o}}_animateIn(){t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:e=>{this.options.autoFocus&&this.dropdownEl.focus(),"function"==typeof this.options.onOpenEnd&&this.options.onOpenEnd.call(this,this.el)}})}_animateOut(){t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:e=>{this._resetDropdownStyles(),"function"==typeof this.options.onCloseEnd&&this.options.onCloseEnd.call(this,this.el)}})}_placeDropdown(){let e=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=e+"px";let t=this._getDropdownPosition();this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=`${"left"===t.horizontalAlignment?"0":"100%"} ${"top"===t.verticalAlignment?"0":"100%"}`}open(){if(!this.isOpen){this.isOpen=!0;for(var e="#"+(o=this).id+" li",t=document.querySelectorAll(e),i=0;i<t.length;i++)t[i].addEventListener("click",function(e){e.preventDefault();for(var i=0;i<t.length;i++)t[i].classList.contains("active")&&t[i].classList.remove("active");this.classList.add("active")},!1);var o=this;this.options.onOpen&&this.executeFunctionByName(this.options.onOpen,window,o),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers()}}close(){if(this.isOpen){this.isOpen=!1,this.focusedIndex=-1;this.options.onClose&&this.executeFunctionByName(this.options.onClose,window,this),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus()}}recalculateDimensions(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}n._dropdowns=[],j1.dropdowns=n,j1.jQueryLoaded=!!window.jQuery,j1.jQueryLoaded&&j1.initializeJqueryWrapper(n,"dropdown","M_Dropdown")}(cash,j1.api.anime);
@@ -470,5 +470,5 @@
470
470
 
471
471
  // jadams, 2020-10-10: TODO: check if anime could be a replacement
472
472
  // for (huge) animate.css
473
- // })($, j1.anime);
474
- })(cash, j1.anime);
473
+ // })($, j1.api.anime);
474
+ })(cash, j1.api.anime);
@@ -17,4 +17,4 @@
17
17
  # jadams, 2020-10-11: module needs to be rewitten to PURE jQuery
18
18
  # -----------------------------------------------------------------------------
19
19
  */
20
- "use strict";!function(t,e){var s={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};t.fn.reverse=[].reverse;class i{constructor(t,e,s){e instanceof Element||console.error(Error(e+" is not an HTML Element"));var i=t.getInstance(e);i&&i.destroy(),this.el=e,this.$el=cash(e)}static init(t,e,s){var i=null;if(e instanceof Element)i=new t(e,s);else if(e&&(e.jquery||e.cash||e instanceof NodeList)){for(var n=[],o=0;o<e.length;o++)n.push(new t(e[o],s));i=n}return i}}j1.initializeJqueryWrapper=function(t,e,s){jQuery.fn[e]=function(i){if(t.prototype[i]){var n=Array.prototype.slice.call(arguments,1);if("get"===i.slice(0,3)){var o=this.first()[0][s];return o[i].apply(o,n)}return this.each(function(){var t=this[s];t[i].apply(t,n)})}if("object"==typeof i||!i)return t.init(this,arguments[0]),this;jQuery.error("Method "+i+" does not exist on jQuery."+e)}};class n extends i{constructor(e,s){super(n,e,s),this.el.M_FloatingActionButton=this,this.options=t.extend({},n.defaults,s),this.isOpen=!1,this.$anchor=this.$el.children("a").first(),this.$menu=this.$el.children("ul").first(),this.$floatingBtns=this.$el.find("ul .btn-fab-floating"),this.$floatingBtnsReverse=this.$el.find("ul .btn-fab-floating").reverse(),this.offsetY=0,this.offsetX=0,this.$el.addClass(`direction-${this.options.direction}`),"top"===this.options.direction?this.offsetY=40:"right"===this.options.direction?this.offsetX=-40:"bottom"===this.options.direction?this.offsetY=-40:this.offsetX=40,this._setupEventHandlers()}static get defaults(){return s}static init(t,e){return super.init(this,t,e)}static getInstance(t){return(t.jquery?t[0]:t).M_FloatingActionButton}destroy(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}_setupEventHandlers(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}_removeEventHandlers(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}_handleFABClick(){this.isOpen?this.close():this.open()}_handleDocumentClick(e){t(e.target).closest(this.$menu).length||this.close()}open(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}close(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}_animateInFAB(){this.$el.addClass("active");var t=0;this.$floatingBtnsReverse.each(s=>{e({targets:s,opacity:1,scale:[.4,1],translateY:[this.offsetY,0],translateX:[this.offsetX,0],duration:275,delay:t,easing:"easeInOutQuad"}),t+=40})}_animateOutFAB(){this.$floatingBtnsReverse.each(t=>{e.remove(t),e({targets:t,opacity:0,scale:.4,translateY:this.offsetY,translateX:this.offsetX,duration:175,easing:"easeOutQuad",complete:()=>{this.$el.removeClass("active")}})})}_animateInToolbar(){var e,s=window.innerWidth,i=window.innerHeight,n=this.el.getBoundingClientRect(),o=t('<div class="fam-btn-backdrop"></div>'),a=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=n.left-s/2+n.width/2,this.offsetY=i-n.bottom,e=s/o[0].clientWidth,this.btnBottom=n.bottom,this.btnLeft=n.left,this.btnWidth=n.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":a}),setTimeout(()=>{this.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),this.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(()=>{this.$el.css({overflow:"hidden","background-color":a}),o.css({transform:"scale("+e+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),this.$menu.children("li").children("a").css({opacity:1}),this._handleDocumentClickBound=this._handleDocumentClick.bind(this),window.addEventListener("scroll",this._handleCloseBound,!0),document.body.addEventListener("click",this._handleDocumentClickBound,!0)},100)},0)}_animateOutToolbar(){var t=window.innerWidth,e=window.innerHeight,s=this.$el.find(".fam-btn-backdrop"),i=this.$anchor.css("background-color");this.offsetX=this.btnLeft-t/2+this.btnWidth/2,this.offsetY=e-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),s.css({transform:"scale(0)","background-color":i}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(()=>{s.remove(),this.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-this.offsetX+"px,0,0)"}),this.$anchor.css({overflow:"",transform:"translate3d(0,"+this.offsetY+"px,0)"}),setTimeout(()=>{this.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),this.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}j1.fab=n,j1.jQueryLoaded=!!window.jQuery,j1.jQueryLoaded&&j1.initializeJqueryWrapper(n,"floatingActionButton","M_FloatingActionButton")}(cash,j1.anime);
20
+ "use strict";!function(t,e){var s={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};t.fn.reverse=[].reverse;class i{constructor(t,e,s){e instanceof Element||console.error(Error(e+" is not an HTML Element"));var i=t.getInstance(e);i&&i.destroy(),this.el=e,this.$el=cash(e)}static init(t,e,s){var i=null;if(e instanceof Element)i=new t(e,s);else if(e&&(e.jquery||e.cash||e instanceof NodeList)){for(var n=[],o=0;o<e.length;o++)n.push(new t(e[o],s));i=n}return i}}j1.initializeJqueryWrapper=function(t,e,s){jQuery.fn[e]=function(i){if(t.prototype[i]){var n=Array.prototype.slice.call(arguments,1);if("get"===i.slice(0,3)){var o=this.first()[0][s];return o[i].apply(o,n)}return this.each(function(){var t=this[s];t[i].apply(t,n)})}if("object"==typeof i||!i)return t.init(this,arguments[0]),this;jQuery.error("Method "+i+" does not exist on jQuery."+e)}};class n extends i{constructor(e,s){super(n,e,s),this.el.M_FloatingActionButton=this,this.options=t.extend({},n.defaults,s),this.isOpen=!1,this.$anchor=this.$el.children("a").first(),this.$menu=this.$el.children("ul").first(),this.$floatingBtns=this.$el.find("ul .btn-fab-floating"),this.$floatingBtnsReverse=this.$el.find("ul .btn-fab-floating").reverse(),this.offsetY=0,this.offsetX=0,this.$el.addClass(`direction-${this.options.direction}`),"top"===this.options.direction?this.offsetY=40:"right"===this.options.direction?this.offsetX=-40:"bottom"===this.options.direction?this.offsetY=-40:this.offsetX=40,this._setupEventHandlers()}static get defaults(){return s}static init(t,e){return super.init(this,t,e)}static getInstance(t){return(t.jquery?t[0]:t).M_FloatingActionButton}destroy(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}_setupEventHandlers(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}_removeEventHandlers(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}_handleFABClick(){this.isOpen?this.close():this.open()}_handleDocumentClick(e){t(e.target).closest(this.$menu).length||this.close()}open(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}close(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}_animateInFAB(){this.$el.addClass("active");var t=0;this.$floatingBtnsReverse.each(s=>{e({targets:s,opacity:1,scale:[.4,1],translateY:[this.offsetY,0],translateX:[this.offsetX,0],duration:275,delay:t,easing:"easeInOutQuad"}),t+=40})}_animateOutFAB(){this.$floatingBtnsReverse.each(t=>{e.remove(t),e({targets:t,opacity:0,scale:.4,translateY:this.offsetY,translateX:this.offsetX,duration:175,easing:"easeOutQuad",complete:()=>{this.$el.removeClass("active")}})})}_animateInToolbar(){var e,s=window.innerWidth,i=window.innerHeight,n=this.el.getBoundingClientRect(),o=t('<div class="fam-btn-backdrop"></div>'),a=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=n.left-s/2+n.width/2,this.offsetY=i-n.bottom,e=s/o[0].clientWidth,this.btnBottom=n.bottom,this.btnLeft=n.left,this.btnWidth=n.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":a}),setTimeout(()=>{this.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),this.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(()=>{this.$el.css({overflow:"hidden","background-color":a}),o.css({transform:"scale("+e+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),this.$menu.children("li").children("a").css({opacity:1}),this._handleDocumentClickBound=this._handleDocumentClick.bind(this),window.addEventListener("scroll",this._handleCloseBound,!0),document.body.addEventListener("click",this._handleDocumentClickBound,!0)},100)},0)}_animateOutToolbar(){var t=window.innerWidth,e=window.innerHeight,s=this.$el.find(".fam-btn-backdrop"),i=this.$anchor.css("background-color");this.offsetX=this.btnLeft-t/2+this.btnWidth/2,this.offsetY=e-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),s.css({transform:"scale(0)","background-color":i}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(()=>{s.remove(),this.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-this.offsetX+"px,0,0)"}),this.$anchor.css({overflow:"",transform:"translate3d(0,"+this.offsetY+"px,0)"}),setTimeout(()=>{this.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),this.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}j1.fab=n,j1.jQueryLoaded=!!window.jQuery,j1.jQueryLoaded&&j1.initializeJqueryWrapper(n,"floatingActionButton","M_FloatingActionButton")}(cash,j1.api.anime);
@@ -154,7 +154,7 @@
154
154
  // available), some cleanups are needed AFTER results generated.
155
155
  if (docs.length > 0) {
156
156
  var logger = log4javascript.getLogger('j1.lunr');
157
- var log_text = '\n' + 'post cleanup of tags and categories';
157
+ var log_text = 'post cleanup of tags and categories';
158
158
  var sr_categories;
159
159
  var sr_tags;
160
160
 
@@ -14,4 +14,5 @@
14
14
  # TODO:
15
15
  # -----------------------------------------------------------------------------
16
16
  */
17
- "use strict";!function(t){var e=function(t){var e=t.match(/(\d+)/g);return new Date(e[0],e[1]-1,e[2])},n=function(){function n(e,n){this.$elem=e,this.$results=t(n.results),this.indexData=n.index_file,this.template=this.compileTemplate(t(n.template)),this.titleMsg=n.titleMsg,this.emptyMsg=n.emptyMsg,this.onResultShown=n.onResultShown,this.initialize()}return n.prototype.initialize=function(){var e=this;this.loadIndexData(function(n){e.docs=t.map(n.docs,e.createEntry),e.index=lunr.Index.load(n.index),e.populateSearchFromQuery(),e.bindKeypress()})},n.prototype.compileTemplate=function(t){var e=t.text();return Mustache.parse(e),function(t,n){return Mustache.render(e,t,n)}},n.prototype.loadIndexData=function(e){t.getJSON(this.indexData,e)},n.prototype.createEntry=function(n,s){var i=t.extend({id:s+1},n);return n.date&&t.extend(i,{date:e(n.date),pubdate:function(){return dateFormat(e(n.date),"yyyy-mm-dd")},displaydate:function(){return dateFormat(e(n.date),"mmm dd, yyyy")}}),i},n.prototype.bindKeypress=function(){var t,e,n,s=this,i=this.$elem.val();this.$elem.bind("keyup",(t=function(){var t=s.$elem.val();t!==i&&s.search(t),i=t},n=Array.prototype.slice,function(){var s=n.call(arguments),i=this;clearTimeout(e),e=setTimeout(function(){t.apply(i,s)},100)}))},n.prototype.search=function(e){var n=this.docs;if(e.length<3)this.$results.hide().empty();else{var s=t.map(this.index.search(e),function(e){return t.grep(n,function(t){return t.id===parseInt(e.ref,10)})[0]});this.displayResults(s),this.onResultShown()}},n.prototype.displayResults=function(e){var n=this.$results;if(n.empty(),0===e.length?n.append(this.emptyMsg):(this.titleMsg&&0!==this.titleMsg.length&&n.append(this.titleMsg),n.append(this.template({docs:e}))),n.show(),e.length>0){var s,i;log4javascript.getLogger("j1.lunr").info("\npost cleanup of tags and categories"),t(".sr-tags").each(function(){i=t(this).html().replace(/^\s+(.*)(\s+·\s+$)/,"$1"),t(this).text(i)}),t(".sr-categories").each(function(){s=t(this).html().replace(/^(.*)(\s+·\s+$)/,"$1"),t(this).text(s)})}},n.prototype.populateSearchFromQuery=function(){var t=new URI(window.location.search.toString()).search(!0);t.hasOwnProperty("q")&&(this.$elem.val(t.q),this.search(t.q.toString()))},n}();t.fn.lunrSearch=function(e){return e=t.extend({},t.fn.lunrSearch.defaults,e),new n(this,e),this},t.fn.lunrSearch.defaults={index_file:"/assets/data/lunr-index.json",results:"#search-results",template:"#search-results-template",titleMsg:"<h1>Search results<h1>",emptyMsg:"<p>Nothing found.</p>",onResultShown:function(){}}}(jQuery);
17
+
18
+ "use strict";!function(t){var e=function(t){var e=t.match(/(\d+)/g);return new Date(e[0],e[1]-1,e[2])},n=function(){function n(e,n){this.$elem=e,this.$results=t(n.results),this.indexData=n.index_file,this.template=this.compileTemplate(t(n.template)),this.titleMsg=n.titleMsg,this.emptyMsg=n.emptyMsg,this.onResultShown=n.onResultShown,this.initialize()}return n.prototype.initialize=function(){var e=this;this.loadIndexData((function(n){e.docs=t.map(n.docs,e.createEntry),e.index=lunr.Index.load(n.index),e.populateSearchFromQuery(),e.bindKeypress()}))},n.prototype.compileTemplate=function(t){var e=t.text();return Mustache.parse(e),function(t,n){return Mustache.render(e,t,n)}},n.prototype.loadIndexData=function(e){t.getJSON(this.indexData,e)},n.prototype.createEntry=function(n,s){var i=t.extend({id:s+1},n);return n.date&&t.extend(i,{date:e(n.date),pubdate:function(){return dateFormat(e(n.date),"yyyy-mm-dd")},displaydate:function(){return dateFormat(e(n.date),"mmm dd, yyyy")}}),i},n.prototype.bindKeypress=function(){var t,e,n,s=this,i=this.$elem.val();this.$elem.bind("keyup",(t=function(){var t=s.$elem.val();t!==i&&s.search(t),i=t},n=Array.prototype.slice,function(){var s=n.call(arguments),i=this;clearTimeout(e),e=setTimeout((function(){t.apply(i,s)}),100)}))},n.prototype.search=function(e){var n=this.docs;if(e.length<3)this.$results.hide().empty();else{var s=t.map(this.index.search(e),(function(e){return t.grep(n,(function(t){return t.id===parseInt(e.ref,10)}))[0]}));this.displayResults(s),this.onResultShown()}},n.prototype.displayResults=function(e){var n=this.$results;if(n.empty(),0===e.length?n.append(this.emptyMsg):(this.titleMsg&&0!==this.titleMsg.length&&n.append(this.titleMsg),n.append(this.template({docs:e}))),n.show(),e.length>0){var s,i;log4javascript.getLogger("j1.lunr").info("post cleanup of tags and categories"),t(".sr-tags").each((function(){i=t(this).html().replace(/^\s+(.*)(\s+·\s+$)/,"$1"),t(this).text(i)})),t(".sr-categories").each((function(){s=t(this).html().replace(/^(.*)(\s+·\s+$)/,"$1"),t(this).text(s)}))}},n.prototype.populateSearchFromQuery=function(){var t=new URI(window.location.search.toString()).search(!0);t.hasOwnProperty("q")&&(this.$elem.val(t.q),this.search(t.q.toString()))},n}();t.fn.lunrSearch=function(e){return e=t.extend({},t.fn.lunrSearch.defaults,e),new n(this,e),this},t.fn.lunrSearch.defaults={index_file:"/assets/data/lunr-index.json",results:"#search-results",template:"#search-results-template",titleMsg:"<h1>Search results<h1>",emptyMsg:"<p>Nothing found.</p>",onResultShown:function(){}}}(jQuery);
@@ -572,12 +572,12 @@
572
572
  winWidth = $(window).width();
573
573
  // set show/hide all table/colgroup elements
574
574
  if ($(window).width() < Tablesaw.bsMediaBreakpoints[Tablesaw.options.breakpoint]) {
575
- log_text = '\n' + 'hide colgroups: ' + curTable.attr('id')
575
+ log_text = 'hide colgroups: ' + curTable.attr('id')
576
576
  // hide colgroups if table is collapsed
577
577
  curTable.find('colgroup').hide();
578
578
  logger.debug(log_text);
579
579
  } else {
580
- log_text = '\n' + 'show colgroup: ' + curTable.attr('id')
580
+ log_text = 'show colgroup: ' + curTable.attr('id')
581
581
  // show colgroups if table is expanded
582
582
  curTable.find('colgroup').show();
583
583
  logger.debug(log_text);
@@ -16,4 +16,5 @@
16
16
  # See: https://github.com/filamentgroup/tablesaw/blob/master/LICENSE
17
17
  # -----------------------------------------------------------------------------
18
18
  */
19
- !function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(a){return t.Tablesaw=e(a,t)}):"object"==typeof exports?module.exports=e("document"in t?require("jquery"):require("jquery")(t),t):t.Tablesaw=e(jQuery,t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";var a=e.document,i=/complete|loaded/.test(a.readyState);a.addEventListener("DOMContentLoaded",function(){i=!0});var n,r,s,o,l,d,h,c={i18n:{modeStack:"Stack",modeSwipe:"Swipe",modeToggle:"Toggle",modeSwitchColumnsAbbreviated:"Cols",modeSwitchColumns:"Columns",columnToggleButton:"Columns",columnToggleError:"No eligible columns.",sort:"Sort",swipePreviousColumn:"Previous column",swipeNextColumn:"Next column"},bsMediaBreakpoints:{xl:"1200",lg:"992",md:"768",sm:"576",xs:"575",default:"992"},mustard:"head"in a&&(!e.blackberry||e.WebKitPoint)&&!e.operamini,$:t,_init:function(t,e){c.$(t||a).trigger("enhance.tablesaw"),c.options=e},init:function(t,e){(i=i||/complete|loaded/.test(a.readyState))?c._init(t,e):"addEventListener"in a&&a.addEventListener("DOMContentLoaded",function(){c._init(t,e)})}};return t(a).on("enhance.tablesaw",function(){"undefined"!=typeof TablesawConfig&&TablesawConfig.i18n&&(c.i18n=t.extend(c.i18n,TablesawConfig.i18n||{})),c.i18n.modes=[c.i18n.modeStack,c.i18n.modeSwipe,c.i18n.modeToggle]}),c.mustard&&t(a.documentElement).addClass("tablesaw-enhanced"),function(){var i="tablesaw-bar",n={create:"tablesawcreate",destroy:"tablesawdestroy",refresh:"tablesawrefresh",resize:"tablesawresize"},r={},s=log4javascript.getLogger("j1.rtable");c.events=n;var o=function(e){if(!e)throw new Error("Tablesaw requires an element.");this.table=e,this.$table=t(e),this.$thead=this.$table.children().filter("thead").eq(0),this.$tbody=this.$table.children().filter("tbody"),this.mode=this.$table.attr("data-tablesaw-mode")||"stack",this.$toolbar=null,this.attributes={subrow:"data-tablesaw-subrow",ignorerow:"data-tablesaw-ignorerow"},this.init()};o.prototype.init=function(){if(!this.$thead.length)throw new Error("tablesaw: a <thead> is required, but none was found.");if(!this.$thead.find("th").length)throw new Error("tablesaw: no header cells found. Are you using <th> inside of <thead>?");this.$table.attr("id")||this.$table.attr("id","tablesaw-"+Math.round(1e4*Math.random())),this.createToolbar(),this._initCells(),this.$table.data("tablesaw",this),this.$table.trigger(n.create,[this])},o.prototype.getConfig=function(e){var a=t.extend(r,e||{});return t.extend(a,"undefined"!=typeof TablesawConfig?TablesawConfig:{})},o.prototype._getPrimaryHeaderRow=function(){return this._getHeaderRows().eq(0)},o.prototype._getHeaderRows=function(){return this.$thead.children().filter("tr").filter(function(){return!t(this).is("[data-tablesaw-ignorerow]")})},o.prototype._getRowIndex=function(t){return t.prevAll().length},o.prototype._getHeaderRowIndeces=function(){var e=this,a=[];return this._getHeaderRows().each(function(){a.push(e._getRowIndex(t(this)))}),a},o.prototype._getPrimaryHeaderCells=function(t){return(t||this._getPrimaryHeaderRow()).find("th")},o.prototype._$getCells=function(e){var a=this;return t(e).add(e.cells).filter(function(){var e=t(this),i=e.parent(),n=e.is("[colspan]");return!(i.is("["+a.attributes.subrow+"]")||i.is("["+a.attributes.ignorerow+"]")&&n)})},o.prototype._getVisibleColspan=function(){var e=0;return this._getPrimaryHeaderCells().each(function(){var a=t(this);"none"!==a.css("display")&&(e+=parseInt(a.attr("colspan"),10)||1)}),e},o.prototype.getColspanForCell=function(e){var a=this._getVisibleColspan(),i=0;return e.closest("tr").data("tablesaw-rowspanned")&&i++,e.siblings().each(function(){var e=t(this),a=parseInt(e.attr("colspan"),10)||1;"none"!==e.css("display")&&(i+=a)}),a-i},o.prototype.isCellInColumn=function(e,a){return t(e).add(e.cells).filter(function(){return this===a}).length},o.prototype.updateColspanCells=function(e,a,i){var n=this,r=n._getPrimaryHeaderRow();this.$table.find("[rowspan][data-tablesaw-priority]").each(function(){var e=t(this);if("persist"===e.attr("data-tablesaw-priority")){var a=e.closest("tr"),i=parseInt(e.attr("rowspan"),10);i>1&&((a=a.next()).data("tablesaw-rowspanned",!0),i--)}}),this.$table.find("[colspan],[data-tablesaw-maxcolspan]").filter(function(){return t(this).closest("tr")[0]!==r[0]}).each(function(){var r=t(this);if(void 0===i||n.isCellInColumn(a,this)){var s=n.getColspanForCell(r);e&&void 0!==i&&r[0===s?"addClass":"removeClass"](e);var o=parseInt(r.attr("data-tablesaw-maxcolspan"),10);o?s>o&&(s=o):r.attr("data-tablesaw-maxcolspan",r.attr("colspan")),r.attr("colspan",s)}})},o.prototype._findPrimaryHeadersForCell=function(t){for(var e=this._getPrimaryHeaderRow(),a=this._getRowIndex(e),i=[],n=0;n<this.headerMapping.length;n++)if(n!==a)for(var r=0;r<this.headerMapping[n].length;r++)this.headerMapping[n][r]===t&&i.push(this.headerMapping[a][r]);return i},o.prototype.getRows=function(){var e=this;return this.$table.find("tr").filter(function(){return t(this).closest("table").is(e.$table)})},o.prototype.getBodyRows=function(e){return(e?t(e):this.$tbody).children().filter("tr")},o.prototype.getHeaderCellIndex=function(t){for(var e=this.headerMapping[0],a=0;a<e.length;a++)if(e[a]===t)return a;return-1},o.prototype._initCells=function(){this.$table.find("[data-tablesaw-maxcolspan]").each(function(){var e=t(this);e.attr("colspan",e.attr("data-tablesaw-maxcolspan"))});var e=this.getRows(),a=[];e.each(function(t){a[t]=[]}),e.each(function(e){var i=0;t(this).children().each(function(){for(var t=parseInt(this.getAttribute("data-tablesaw-maxcolspan")||this.getAttribute("colspan"),10),n=parseInt(this.getAttribute("rowspan"),10);a[e][i];)i++;if(a[e][i]=this,t)for(var r=0;r<t-1;r++)i++,a[e][i]=this;if(n)for(var s=1;s<n;s++)a[e+s][i]=this;i++})});for(var i=this._getHeaderRowIndeces(),n=0;n<a[0].length;n++)for(var r=0,s=i.length;r<s;r++){var o,l=a[i[r]][n],d=i[r];for(l.cells||(l.cells=[]);d<a.length;)l!==(o=a[d][n])&&l.cells.push(o),d++}this.headerMapping=a},o.prototype.refresh=function(){this._initCells(),this.$table.trigger(n.refresh,[this])},o.prototype._getToolbarAnchor=function(){var t=this.$table.parent();return t.is(".tablesaw-overflow")?t:this.$table},o.prototype._getToolbar=function(t){return t||(t=this._getToolbarAnchor()),t.prev().filter("."+i)},o.prototype.createToolbar=function(){var e=this._getToolbarAnchor(),a=this._getToolbar(e);a.length||(a=t("<div>").addClass(i).insertBefore(e)),this.$toolbar=a,this.mode&&this.$toolbar.addClass("tablesaw-mode-"+this.mode)},o.prototype.destroy=function(){this._getToolbar().each(function(){this.className=this.className.replace(/\btablesaw-mode\-\w*\b/gi,"")});var i=this.$table.attr("id");t(a).off("."+i),t(e).off("."+i),this.$table.trigger(n.destroy,[this]),this.$table.removeData("tablesaw")},t.fn.tablesaw=function(){return this.each(function(){t(this).data("tablesaw")||new o(this)})};var l=t(a);l.on("enhance.tablesaw",function(e){if(c.mustard){var a=t(e.target);a.parent().length&&(a=a.parent()),a.find("table").filter("[data-tablesaw],[data-tablesaw-mode],[data-tablesaw-sortable]").tablesaw()}});var d,h,u=!1;l.on("scroll.tablesaw",function(){u=!0,e.clearTimeout(d),d=e.setTimeout(function(){u=!1},300)}),t(e).on("resize",function(){t("table").each(function(){var a,i=t(this);t(i).hasClass("rtable")&&(t(e).width(),t(e).width()<c.bsMediaBreakpoints[c.options.breakpoint]?(a="\nhide colgroups: "+i.attr("id"),i.find("colgroup").hide(),s.debug(a)):(a="\nshow colgroup: "+i.attr("id"),i.find("colgroup").show(),s.debug(a)))}),u||(e.clearTimeout(h),h=e.setTimeout(function(){l.trigger(n.resize)},150))}),c.Table=o}(),n="tablesaw-stack",r="tablesaw-cell-label",s="tablesaw-cell-content",o="tablesaw-stack",l="data-tablesaw-no-labels",d="data-tablesaw-hide-empty",(h=function(e,a){this.tablesaw=a,this.$table=t(e),this.labelless=this.$table.is("["+l+"]"),this.hideempty=this.$table.is("["+d+"]"),this.$table.data(o,this)}).prototype.init=function(){if(this.$table.addClass(n),!this.labelless){var e=this;this.$table.find("th, td").filter(function(){return!t(this).closest("thead").length}).filter(function(){return!(t(this).is("["+l+"]")||t(this).closest("tr").is("["+l+"]")||e.hideempty&&!t(this).html())}).each(function(){var i=t(a.createElement("b")).addClass(r),n=t(this);t(e.tablesaw._findPrimaryHeadersForCell(this)).each(function(e){var n=t(this.cloneNode(!0)),r=n.find(".tablesaw-sortable-btn");n.find(".tablesaw-sortable-arrow").remove();var s=n.find("[data-tablesaw-checkall]");if(s.closest("label").remove(),s.length)i=t([]);else{e>0&&i.append(a.createTextNode(", "));for(var o,l=r.length?r[0]:n[0];o=l.firstChild;)i[0].appendChild(o)}}),i.length&&!n.find("."+s).length&&n.wrapInner("<span class='"+s+"'></span>");var o=n.find("."+r);o.length?o.replaceWith(i):(n.prepend(a.createTextNode(" ")),n.prepend(i))})}},h.prototype.destroy=function(){this.$table.removeClass(n),this.$table.find("."+r).remove(),this.$table.find("."+s).each(function(){t(this).replaceWith(t(this.childNodes))})},t(a).on(c.events.create,function(t,e){"stack"===e.mode&&new h(e.table,e).init()}).on(c.events.refresh,function(e,a){"stack"===a.mode&&t(a.table).data(o).init()}).on(c.events.destroy,function(e,a){"stack"===a.mode&&t(a.table).data(o).destroy()}),c.Stack=h,c});
19
+
20
+ !function(t,e){"function"==typeof define&&define.amd?define(["jquery"],(function(a){return t.Tablesaw=e(a,t)})):"object"==typeof exports?module.exports=e("document"in t?require("jquery"):require("jquery")(t),t):t.Tablesaw=e(jQuery,t)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var a=e.document,i=/complete|loaded/.test(a.readyState);a.addEventListener("DOMContentLoaded",(function(){i=!0}));var n,r,s,o,l,d,h,c={i18n:{modeStack:"Stack",modeSwipe:"Swipe",modeToggle:"Toggle",modeSwitchColumnsAbbreviated:"Cols",modeSwitchColumns:"Columns",columnToggleButton:"Columns",columnToggleError:"No eligible columns.",sort:"Sort",swipePreviousColumn:"Previous column",swipeNextColumn:"Next column"},bsMediaBreakpoints:{xl:"1200",lg:"992",md:"768",sm:"576",xs:"575",default:"992"},mustard:"head"in a&&(!e.blackberry||e.WebKitPoint)&&!e.operamini,$:t,_init:function(t,e){c.$(t||a).trigger("enhance.tablesaw"),c.options=e},init:function(t,e){(i=i||/complete|loaded/.test(a.readyState))?c._init(t,e):"addEventListener"in a&&a.addEventListener("DOMContentLoaded",(function(){c._init(t,e)}))}};return t(a).on("enhance.tablesaw",(function(){"undefined"!=typeof TablesawConfig&&TablesawConfig.i18n&&(c.i18n=t.extend(c.i18n,TablesawConfig.i18n||{})),c.i18n.modes=[c.i18n.modeStack,c.i18n.modeSwipe,c.i18n.modeToggle]})),c.mustard&&t(a.documentElement).addClass("tablesaw-enhanced"),function(){var i="tablesaw",n="tablesaw-bar",r={create:"tablesawcreate",destroy:"tablesawdestroy",refresh:"tablesawrefresh",resize:"tablesawresize"},s={},o=log4javascript.getLogger("j1.rtable");c.events=r;var l=function(e){if(!e)throw new Error("Tablesaw requires an element.");this.table=e,this.$table=t(e),this.$thead=this.$table.children().filter("thead").eq(0),this.$tbody=this.$table.children().filter("tbody"),this.mode=this.$table.attr("data-tablesaw-mode")||"stack",this.$toolbar=null,this.attributes={subrow:"data-tablesaw-subrow",ignorerow:"data-tablesaw-ignorerow"},this.init()};l.prototype.init=function(){if(!this.$thead.length)throw new Error("tablesaw: a <thead> is required, but none was found.");if(!this.$thead.find("th").length)throw new Error("tablesaw: no header cells found. Are you using <th> inside of <thead>?");this.$table.attr("id")||this.$table.attr("id",i+"-"+Math.round(1e4*Math.random())),this.createToolbar(),this._initCells(),this.$table.data(i,this),this.$table.trigger(r.create,[this])},l.prototype.getConfig=function(e){var a=t.extend(s,e||{});return t.extend(a,"undefined"!=typeof TablesawConfig?TablesawConfig:{})},l.prototype._getPrimaryHeaderRow=function(){return this._getHeaderRows().eq(0)},l.prototype._getHeaderRows=function(){return this.$thead.children().filter("tr").filter((function(){return!t(this).is("[data-tablesaw-ignorerow]")}))},l.prototype._getRowIndex=function(t){return t.prevAll().length},l.prototype._getHeaderRowIndeces=function(){var e=this,a=[];return this._getHeaderRows().each((function(){a.push(e._getRowIndex(t(this)))})),a},l.prototype._getPrimaryHeaderCells=function(t){return(t||this._getPrimaryHeaderRow()).find("th")},l.prototype._$getCells=function(e){var a=this;return t(e).add(e.cells).filter((function(){var e=t(this),i=e.parent(),n=e.is("[colspan]");return!(i.is("["+a.attributes.subrow+"]")||i.is("["+a.attributes.ignorerow+"]")&&n)}))},l.prototype._getVisibleColspan=function(){var e=0;return this._getPrimaryHeaderCells().each((function(){var a=t(this);"none"!==a.css("display")&&(e+=parseInt(a.attr("colspan"),10)||1)})),e},l.prototype.getColspanForCell=function(e){var a=this._getVisibleColspan(),i=0;return e.closest("tr").data("tablesaw-rowspanned")&&i++,e.siblings().each((function(){var e=t(this),a=parseInt(e.attr("colspan"),10)||1;"none"!==e.css("display")&&(i+=a)})),a-i},l.prototype.isCellInColumn=function(e,a){return t(e).add(e.cells).filter((function(){return this===a})).length},l.prototype.updateColspanCells=function(e,a,i){var n=this,r=n._getPrimaryHeaderRow();this.$table.find("[rowspan][data-tablesaw-priority]").each((function(){var e=t(this);if("persist"===e.attr("data-tablesaw-priority")){var a=e.closest("tr"),i=parseInt(e.attr("rowspan"),10);i>1&&((a=a.next()).data("tablesaw-rowspanned",!0),i--)}})),this.$table.find("[colspan],[data-tablesaw-maxcolspan]").filter((function(){return t(this).closest("tr")[0]!==r[0]})).each((function(){var r=t(this);if(void 0===i||n.isCellInColumn(a,this)){var s=n.getColspanForCell(r);e&&void 0!==i&&r[0===s?"addClass":"removeClass"](e);var o=parseInt(r.attr("data-tablesaw-maxcolspan"),10);o?s>o&&(s=o):r.attr("data-tablesaw-maxcolspan",r.attr("colspan")),r.attr("colspan",s)}}))},l.prototype._findPrimaryHeadersForCell=function(t){for(var e=this._getPrimaryHeaderRow(),a=this._getRowIndex(e),i=[],n=0;n<this.headerMapping.length;n++)if(n!==a)for(var r=0;r<this.headerMapping[n].length;r++)this.headerMapping[n][r]===t&&i.push(this.headerMapping[a][r]);return i},l.prototype.getRows=function(){var e=this;return this.$table.find("tr").filter((function(){return t(this).closest("table").is(e.$table)}))},l.prototype.getBodyRows=function(e){return(e?t(e):this.$tbody).children().filter("tr")},l.prototype.getHeaderCellIndex=function(t){for(var e=this.headerMapping[0],a=0;a<e.length;a++)if(e[a]===t)return a;return-1},l.prototype._initCells=function(){this.$table.find("[data-tablesaw-maxcolspan]").each((function(){var e=t(this);e.attr("colspan",e.attr("data-tablesaw-maxcolspan"))}));var e=this.getRows(),a=[];e.each((function(t){a[t]=[]})),e.each((function(e){var i=0;t(this).children().each((function(){for(var t=parseInt(this.getAttribute("data-tablesaw-maxcolspan")||this.getAttribute("colspan"),10),n=parseInt(this.getAttribute("rowspan"),10);a[e][i];)i++;if(a[e][i]=this,t)for(var r=0;r<t-1;r++)i++,a[e][i]=this;if(n)for(var s=1;s<n;s++)a[e+s][i]=this;i++}))}));for(var i=this._getHeaderRowIndeces(),n=0;n<a[0].length;n++)for(var r=0,s=i.length;r<s;r++){var o,l=a[i[r]][n],d=i[r];for(l.cells||(l.cells=[]);d<a.length;)l!==(o=a[d][n])&&l.cells.push(o),d++}this.headerMapping=a},l.prototype.refresh=function(){this._initCells(),this.$table.trigger(r.refresh,[this])},l.prototype._getToolbarAnchor=function(){var t=this.$table.parent();return t.is(".tablesaw-overflow")?t:this.$table},l.prototype._getToolbar=function(t){return t||(t=this._getToolbarAnchor()),t.prev().filter("."+n)},l.prototype.createToolbar=function(){var e=this._getToolbarAnchor(),a=this._getToolbar(e);a.length||(a=t("<div>").addClass(n).insertBefore(e)),this.$toolbar=a,this.mode&&this.$toolbar.addClass("tablesaw-mode-"+this.mode)},l.prototype.destroy=function(){this._getToolbar().each((function(){this.className=this.className.replace(/\btablesaw-mode\-\w*\b/gi,"")}));var n=this.$table.attr("id");t(a).off("."+n),t(e).off("."+n),this.$table.trigger(r.destroy,[this]),this.$table.removeData(i)},t.fn[i]=function(){return this.each((function(){t(this).data(i)||new l(this)}))};var d=t(a);d.on("enhance.tablesaw",(function(e){if(c.mustard){var a=t(e.target);a.parent().length&&(a=a.parent()),a.find("table").filter("[data-tablesaw],[data-tablesaw-mode],[data-tablesaw-sortable]")[i]()}}));var h,u,f=!1;d.on("scroll.tablesaw",(function(){f=!0,e.clearTimeout(h),h=e.setTimeout((function(){f=!1}),300)})),t(e).on("resize",(function(){t("table").each((function(){var a,i=t(this);t(i).hasClass("rtable")&&(t(e).width(),t(e).width()<c.bsMediaBreakpoints[c.options.breakpoint]?(a="hide colgroups: "+i.attr("id"),i.find("colgroup").hide(),o.debug(a)):(a="show colgroup: "+i.attr("id"),i.find("colgroup").show(),o.debug(a)))})),f||(e.clearTimeout(u),u=e.setTimeout((function(){d.trigger(r.resize)}),150))})),c.Table=l}(),n="tablesaw-stack",r="tablesaw-cell-label",s="tablesaw-cell-content",o="tablesaw-stack",l="data-tablesaw-no-labels",d="data-tablesaw-hide-empty",(h=function(e,a){this.tablesaw=a,this.$table=t(e),this.labelless=this.$table.is("["+l+"]"),this.hideempty=this.$table.is("["+d+"]"),this.$table.data(o,this)}).prototype.init=function(){if(this.$table.addClass(n),!this.labelless){var e=this;this.$table.find("th, td").filter((function(){return!t(this).closest("thead").length})).filter((function(){return!(t(this).is("["+l+"]")||t(this).closest("tr").is("["+l+"]")||e.hideempty&&!t(this).html())})).each((function(){var i=t(a.createElement("b")).addClass(r),n=t(this);t(e.tablesaw._findPrimaryHeadersForCell(this)).each((function(e){var n=t(this.cloneNode(!0)),r=n.find(".tablesaw-sortable-btn");n.find(".tablesaw-sortable-arrow").remove();var s=n.find("[data-tablesaw-checkall]");if(s.closest("label").remove(),s.length)i=t([]);else{e>0&&i.append(a.createTextNode(", "));for(var o,l=r.length?r[0]:n[0];o=l.firstChild;)i[0].appendChild(o)}})),i.length&&!n.find("."+s).length&&n.wrapInner("<span class='"+s+"'></span>");var o=n.find("."+r);o.length?o.replaceWith(i):(n.prepend(a.createTextNode(" ")),n.prepend(i))}))}},h.prototype.destroy=function(){this.$table.removeClass(n),this.$table.find("."+r).remove(),this.$table.find("."+s).each((function(){t(this).replaceWith(t(this.childNodes))}))},t(a).on(c.events.create,(function(t,e){"stack"===e.mode&&new h(e.table,e).init()})).on(c.events.refresh,(function(e,a){"stack"===a.mode&&t(a.table).data(o).init()})).on(c.events.destroy,(function(e,a){"stack"===a.mode&&t(a.table).data(o).destroy()})),c.Stack=h,c}));