/*! * Strip - An Unobtrusive Responsive Lightbox - v1.8.0 * (c) 2014-2021 Nick Stakenburg * * https://github.com/staaky/strip * * @license: https://creativecommons.org/licenses/by/4.0 */ !function(i,t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):i.Strip=t(jQuery)}(this,function($){var Strip={version:"1.8.0",Skins:{strip:{}}},Browser=(c=navigator.userAgent,{IE:!(!window.attachEvent||-1!==c.indexOf("Opera"))&&d("MSIE "),Opera:-1i.width||h&&s.height>i.height);){var a=1,r=1;o&&s.width>i.width&&(a=i.width/s.width),h&&s.height>i.height&&(r=i.height/s.height);var d=Math.min(a,r),s={width:Math.round(t.width*d),height:Math.round(t.height*d)};n--}return s.width=Math.max(s.width,0),s.height=Math.max(s.height,0),s}};$.extend($.easing,{stripEaseInCubic:function(i,t,e,s,n){return s*(t/=n)*t*t+e},stripEaseInSine:function(i,t,e,s,n){return-s*Math.cos(t/n*(Math.PI/2))+s+e},stripEaseOutSine:function(i,t,e,s,n){return s*Math.sin(t/n*(Math.PI/2))+e}});var Support=(F=document.createElement("div"),G="Webkit Moz O ms Khtml".split(" "),{css:{animation:J("animation"),transform:J("transform"),prefixed:function(i){return J(i,"prefix")}},svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,touch:function(){try{return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}catch(i){return!1}}()}),F,G;function J(i,t){var e=i.charAt(0).toUpperCase()+i.substr(1);return function(i,t){for(var e in i)if(void 0!==F.style[i[e]])return"prefix"!=t||i[e];return!1}((i+" "+G.join(e+" ")+e).split(" "),t)}Support.mobileTouch=Support.touch&&(Browser.MobileSafari||Browser.Android||Browser.IEMobile||Browser.ChromeMobile||!/^(Win|Mac|Linux)/.test(navigator.platform));var Bounds={viewport:function(){var i,t={width:$(window).width()};return Browser.MobileSafari||Browser.Android&&Browser.Gecko?(i=document.documentElement.clientWidth/window.innerWidth,t.height=window.innerHeight*i):t.height=$(window).height(),t}},ImageReady=function(s){function i(){return this.initialize.apply(this,Array.prototype.slice.call(arguments))}s.extend(i.prototype,{initialize:function(){this.options=s.extend({test:function(){},success:function(){},timeout:function(){},callAt:!1,intervals:[[0,0],[1e3,10],[2e3,50],[4e3,100],[2e4,500]]},arguments[0]||{}),this._test=this.options.test,this._success=this.options.success,this._timeout=this.options.timeout,this._ipos=0,this._time=0,this._delay=this.options.intervals[this._ipos][1],this._callTimeouts=[],this.poll(),this._createCallsAt()},poll:function(){this._polling=setTimeout(function(){if(this._test())this.success();else{if(this._time+=this._delay,this._time>=this.options.intervals[this._ipos][0]){if(!this.options.intervals[this._ipos+1])return void("function"==typeof this._timeout&&this._timeout());this._ipos++,this._delay=this.options.intervals[this._ipos][1]}this.poll()}}.bind(this),this._delay)},success:function(){this.abort(),this._success()},_createCallsAt:function(){this.options.callAt&&s.each(this.options.callAt,function(i,t){var e=t[0],s=t[1],e=setTimeout(function(){s()}.bind(this),e);this._callTimeouts.push(e)}.bind(this))},_stopCallTimeouts:function(){s.each(this._callTimeouts,function(i,t){clearTimeout(t)}),this._callTimeouts=[]},abort:function(){this._stopCallTimeouts(),this._polling&&(clearTimeout(this._polling),this._polling=null)}});function t(){return this.initialize.apply(this,Array.prototype.slice.call(arguments))}return s.extend(t.prototype,{supports:{naturalWidth:"naturalWidth"in new Image},initialize:function(i,t,e){this.img=s(i)[0],this.successCallback=t,this.errorCallback=e,this.isLoaded=!1,this.options=s.extend({method:"onload",pollFallbackAfter:1e3},arguments[3]||{}),"onload"!=this.options.method&&this.supports.naturalWidth?this.poll():this.load()},poll:function(){this._poll=new i({test:function(){return 0").addClass(this.classPrefix+"spinner-rotate")),this.build(),this.start())},setOptions:function(i){this.options=$.extend({show:200,hide:200},i||{})},build:function(){if(!this._build){this._rotate.html("");this.options.length,this.options.radius;var i=this.element.is(":visible");i||this.element.show(),this._rotate.append(s=$("
").addClass(this.classPrefix+"spinner-frame").append(n=$("
").addClass(this.classPrefix+"spinner-line")));var t,e=parseInt($(n).css("z-index"));this.lines=e,n.css({"z-index":"inherit"}),s.remove(),i||this.element.hide();for(var s,n,o=0;o").addClass(this.classPrefix+"spinner-frame").append(n=$("
").addClass(this.classPrefix+"spinner-line"))),t=t||n.css("color"),n.css({background:t}),s.css({opacity:(1/e*(o+1)).toFixed(2)});var h={};h[Support.css.prefixed("transform")]="rotate("+360/e*(o+1)+"deg)",s.css(h)}this._build=!0}},start:function(){var i={};i[Support.css.prefixed("animation")]=this.classPrefix+"spinner-spin 1s infinite steps("+this.lines+")",this._rotate.css(i)},stop:function(){var i={};i[Support.css.prefixed("animation")]="none",this._rotate.css(i)},show:function(i){this.build(),this.start(),this.element.stop(!0).fadeTo(this.options.show,1,i)},hide:function(i){this.element.stop(!0).fadeOut(this.options.hide,function(){this.stop(),i&&i()}.bind(this))},refresh:function(){this._build=!1,this.build()}}),$.extend(Timers.prototype,{initialize:function(){this._timers={}},set:function(i,t,e){this._timers[i]=setTimeout(t,e)},get:function(i){return this._timers[i]},clear:function(i){i?this._timers[i]&&(clearTimeout(this._timers[i]),delete this._timers[i]):this.clearAll()},clearAll:function(){$.each(this._timers,function(i,t){clearTimeout(t)}),this._timers={}}});var Types={image:{extensions:"bmp gif jpeg jpg png webp",detect:function(i){return-1<$.inArray(detectExtension(i),this.extensions.split(" "))},data:function(i){return!!this.detect()&&{extension:detectExtension(i)}}},youtube:{detect:function(i){var t=/(youtube\.com|youtu\.be)\/watch\?(?=.*vi?=([a-zA-Z0-9-_]+))(?:\S+)?$/.exec(i);return t&&t[2]?t[2]:!(!(t=/(youtube\.com|youtu\.be)\/(vi?\/|u\/|embed\/)?([a-zA-Z0-9-_]+)(?:\S+)?$/i.exec(i))||!t[3])&&t[3]},data:function(i){i=this.detect(i);return!!i&&{id:i}}},vimeo:{detect:function(i){i=/(vimeo\.com)\/([a-zA-Z0-9-_]+)(?:\S+)?$/i.exec(i);return!(!i||!i[2])&&i[2]},data:function(i){i=this.detect(i);return!!i&&{id:i}}}},VimeoReady=function(){function i(){return this.initialize.apply(this,_slice.call(arguments))}$.extend(i.prototype,{initialize:function(i,t){this.url=i,this.callback=t,this.load()},load:function(){var i=e.get(this.url);if(i)return this.callback(i.data);var t="http"+(window.location&&"https:"==window.location.protocol?"s":"")+":",i=getURIData(this.url).id;this._xhr=$.getJSON(t+"//vimeo.com/api/oembed.json?url="+t+"//vimeo.com/"+i+"&maxwidth=9999999&maxheight=9999999&callback=?",function(i){i={dimensions:{width:i.width,height:i.height}};e.set(this.url,i),this.callback&&this.callback(i)}.bind(this))},abort:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)}});var e={cache:[],get:function(i){for(var t=null,e=0;e").addClass("strp-page").append(this.container=$("
").addClass("strp-container")).css({opacity:0}).hide());var i=this.view.options.position&&1").addClass("strp-info").append(this.info_padder=$("
").addClass("strp-info-padder"))),i&&(this.element.addClass("strp-has-position"),this.info_padder.append($("
").addClass("strp-position").html(this._position+" / "+this._total))),this.view.caption&&this.info_padder.append(this.caption=$("
").addClass("strp-caption").html(this.view.caption))),this.view.type){case"image":this.container.append(this.content=$("").attr({src:this.view.url}));break;case"vimeo":case"youtube":this.container.append(this.content=$("
"))}this.element.addClass("strp"+(this.view.options.overlap?"":"-no")+"-overlap"),this._total<2&&this.element.addClass("strp-no-sides"),this.content.addClass("strp-content-element"),this._created=!0}},_getSurroundingPages:function(){var i;if(!(i=this.view.options.preload))return[];for(var t=[],e=Math.max(1,this._position-i[0]),s=Math.min(this._position+i[1],this._total),n=this._position,o=n;o<=s;o++)(h=Pages.pages[Pages.uid][o-1])._position!=n&&t.push(h);for(var h,o=n;e<=o;o--)(h=Pages.pages[Pages.uid][o-1])._position!=n&&t.push(h);return t},preloadSurroundingImages:function(){var i=this._getSurroundingPages();$.each(i,function(i,t){t.preload()}.bind(this))},preload:function(){this.preloading||this.preloaded||"image"!==this.view.type||!this.view.options.preload||this.loaded||(this.create(),this.preloading=!0,new ImageReady(this.content[0],function(i){this.loaded=!0,this.preloading=!1,this.preloaded=!0,this.dimensions={width:i.img.naturalWidth,height:i.img.naturalHeight}}.bind(this),null,{method:"naturalWidth"}))},load:function(t,i){if(this.create(),this.loaded)t&&t();else switch(this.abort(),this.loading=!0,this.view.options.spinner&&!tb[this.view.url]&&Window.startLoading(),this.view.type){case"image":if(this.error)return void(t&&t());this.imageReady=new ImageReady(this.content[0],function(i){this._markAsLoaded(),this.dimensions={width:i.img.naturalWidth,height:i.img.naturalHeight},t&&t()}.bind(this),function(){this._markAsLoaded(),this.content.hide(),this.container.append(this.error=$("
").addClass("strp-error")),this.element.addClass("strp-has-error"),this.dimensions={width:this.error.outerWidth(),height:this.error.outerHeight()},t&&t()}.bind(this),{method:"naturalWidth"});break;case"vimeo":this.vimeoReady=new VimeoReady(this.view.url,function(i){this._markAsLoaded(),this.dimensions={width:i.dimensions.width,height:i.dimensions.height},t&&t()}.bind(this));break;case"youtube":this._markAsLoaded(),this.dimensions={width:this.view.options.width,height:this.view.options.height},t&&t()}},_markAsLoaded:function(){this.loading=!1,this.loaded=!0,tb[this.view.url]=!0,Window.stopLoading()},isVideo:function(){return/^(youtube|vimeo)$/.test(this.view.type)},insertVideo:function(i){var t,e;!this.playerIframe&&this.isVideo()&&(t="http"+(window.location&&"https:"===window.location.protocol?"s":"")+":",e=$.extend({},this.view.options[this.view.type]||{}),e=$.param(e),e={vimeo:t+"//player.vimeo.com/video/{id}?{queryString}",youtube:t+"//www.youtube.com/embed/{id}?{queryString}"}[this.view.type].replace("{id}",this.view._data.id).replace("{queryString}",e),this.content.append(this.playerIframe=$("