https://eldiadezamora.es/assets/front/plugins/photogallery/jquery.sharp-gallery.min.js?version=7.2.1
1// Sharp Gallery v2.0 | (c) CreativeTier | [email protected] 2!function(e){"use strict";function t(t){var i=s(t);return this.each(function(){function t(){var t=E.width();if(t!==ve){ve=t;var a=e(ne[0]),d=parseInt(a.css("margin-right")),c=0;"auto"!==i.thumbColumns&&(c=n(i.thumbColumns,t)),c||(c=Math.ceil((t+d)/(i.thumbWidth+d)));var u=parseInt((t-(c-1)*d)/c),h=Math.floor(u/i.thumbRatio);ee=h;var m,g;if(te?(m=u-2*te,g=h-2*te):(m=u,g=h),ne.css({width:m,height:g}),"fit"===i.thumbImageScale&&ne.each(function(){var t=e(this).find("img"),a=parseInt(t.css("height"));a<g&&t.css("margin-top",Math.floor((g-a)/2))}),de.length){var b=2*Math.abs(parseInt(a.children(".sg-border").css("left")));de.css({width:m+b,height:g+b})}if(c!==ye&&(ye=c,s(),-1!==fe&&v(fe)),-1!==fe)if(i.stageRatio){var f=o();r(fe,f-2*ae),U.css("height",f)}else f=l(ue[fe]),U.css("height",f),ue[fe].css("height",f)}if(i.wideBackground){var p=_.width();p!==we&&(we=p,"parent"===i.wideBackgroundTarget?ge.css({width:Math.floor(_.innerWidth()),left:Math.floor(-(E.offset().left-_.offset().left))}):ge.css({width:Math.floor(p),left:Math.floor(-E.offset().left)}))}}function s(){var t,a=ne.length;ne.removeClass("sg-lastcol");var s=0;for(t=0;t<a;t++)(s+=1)===ye&&(e(ne[t]).addClass("sg-lastcol"),s=0);if("under"===i.stagePosition)for(ne.removeClass("sg-firstrow"),t=0;t<ye;t++)e(ne[t]).addClass("sg-firstrow");else{ne.removeClass("sg-lastrow");var o=a%ye;for(0===o&&(o=ye),t=a-o;t<a;t++)e(ne[t]).addClass("sg-lastrow")}}function o(){return Math.floor(ve/i.stageRatio)}function r(e,t){var a=ue[e];a.css("height",t);var s=a.children("img"),i=parseInt(s.css("height"));i<=t&&s.css("margin-top",Math.floor((t-i)/2))}function l(e){var t,a=e.children("img")[0],s=U.width();return t=a.naturalWidth>=s?s/a.naturalWidth*a.naturalHeight:a.naturalHeight,t+=2*ae}function d(e){var t=le[e];t&&(i.thumbLabelAnimate?t.velocity("stop").velocity({opacity:se},i.thumbLabelAnimate[0],i.thumbLabelAnimate[1]):t.css("opacity",se))}function c(e){var t=le[e];t&&(i.thumbLabelAnimate?t.velocity("stop").velocity({opacity:0},i.thumbLabelAnimate[0],i.thumbLabelAnimate[1]):t.css("opacity",0))}function u(t){var a=e(de[t]);i.thumbBorderAnimate?a.addClass("sg-show").velocity("stop").velocity({opacity:1},i.thumbBorderAnimate[0],i.thumbBorderAnimate[1]):a.addClass("sg-show")}function h(t){var a=e(de[t]);i.thumbBorderAnimate?a.velocity("stop").velocity({opacity:0},i.thumbBorderAnimate[0],i.thumbBorderAnimate[1],function(){a.removeClass("sg-show")}):a.removeClass("sg-show")}function m(e,t){var a;oe=!0,x(e,t),-1!==fe&&k(fe),v(e),-1===fe&&y(a=w()),i.scrollToImage&&!ue[e]&&F(e,a),b(e),fe=e}function g(e,t){T(e,t),i.imageAnimate?(B(),k(e)):B(ue[e]),fe=-1}function b(e,t){function a(){var a;i.stageRatio?(a=o(),r(e,a-2*ae)):a=l(s),s.height(a);var n=he[e];i.imageTextHide&&n&&(Ce?n.css("opacity",ie):n.css("opacity",0)),A(a),C(e),i.scrollToImage&&!t&&oe&&F(e,a)}var s;ue[e]?(s=ue[e],G.prepend(s),a()):(G.addClass("sg-loading"),f(e,function(){G.removeClass("sg-loading"),G.prepend(s),a()}),s=ue[e],i.imageAnimate&&s.css("opacity",0))}function f(t,a){var s=p(e(ne[t]).data("id")),o=e('<div class="sg-image"></div>');ue[t]=o;var r=e('<img src="'+s.data("src")+'" alt="'+s.data("alt")+'">');if(o.append(r),r.on("load",a),i.imageTextsEnabled){var n=s.children(".sg-text");if(n.length){var l=n.clone();he[t]=l,o.append(l)}}}function p(t){for(var a=0;a<me.length;a++)if(e(me[a]).data("id")===t)return e(me[a])}function v(e){if("over"===i.stagePosition||"under"===i.stagePosition){var t,a=Math.ceil((e+1)/ye);"over"===i.stagePosition?(t=(a-1)*ye)!==Be&&(Be=t,U.insertBefore(ne[t])):"under"===i.stagePosition&&(ne[t=a*ye-1]||(t=pe-1),t!==Be&&(Be=t,U.insertAfter(ne[t])))}}function w(){return i.stageRatio?o():150}function y(e){U.addClass("sg-show"),A(e)}function A(e){e!==Ae&&(Ae=e,i.stageAnimate?U.velocity("stop").velocity({height:e},i.stageAnimate[0],i.stageAnimate[1]):U.css("height",e))}function B(e){i.stageAnimate?U.velocity("stop").velocity({height:0},i.stageAnimate[0],i.stageAnimate[1],function(){U.removeClass("sg-show"),e&&e.remove()}):U.removeClass("sg-show"),Ae=0}function C(e){var t=ue[e];i.imageAnimate?(t.velocity({opacity:1},i.imageAnimate[0],i.imageAnimate[1]),clearInterval(t.data("sg-timer"))):t.css("opacity",1)}function k(e){var t=ue[e];i.imageAnimate?t.velocity("stop").velocity({opacity:0}
2,i.imageAnimate[0],i.imageAnimate[1],function(){t.remove()}):t.remove()}function x(t,a){i.thumbLabelHide&&i.thumbLabelSelected&&(-1!==fe&&c(fe),a||d(t)),i.thumbSelectedBorder&&(-1!==fe&&h(fe),a||u(t),i.thumbBorderArrow&&(-1!==fe&&e(ce[fe]).removeClass("sg-show"),e(ce[t]).addClass("sg-show")))}function T(t,a){i.thumbLabelHide&&i.thumbLabelSelected&&(a||c(t)),i.thumbSelectedBorder&&(a||h(t),i.thumbBorderArrow&&e(ce[t]).removeClass("sg-show"))}function S(){fe-1>=0?m(fe-1):i.loop&&m(pe-1)}function L(){fe+1<pe?m(fe+1):i.loop&&m(0)}function O(){var e=fe-ye;if(e>=0)m(e);else if(i.loop){var t=pe%ye;(e+=0===t?pe:fe-t>=0?pe-t:pe+(ye-t))!==fe&&m(e)}}function H(){var e=fe+ye;if(e<pe)m(e);else if(i.loop){var t=pe%ye;(e-=0===t?pe:fe+t<pe?pe-t:pe+(ye-t))!==fe&&m(e)}}function I(e){var t=he[e];t&&(i.imageTextAnimate?t.velocity("stop").velocity({opacity:ie},i.imageTextAnimate[0],i.imageTextAnimate[1]):t.css("opacity",ie))}function M(e){var t=he[e];t&&(i.imageTextAnimate?t.velocity("stop").velocity({opacity:0},i.imageTextAnimate[0],i.imageTextAnimate[1]):t.css("opacity",0))}function R(){i.controlsAnimate?N.velocity("stop").velocity({opacity:1},i.controlsAnimate[0],i.controlsAnimate[1]):N.css("opacity",1)}function D(){i.controlsAnimate?N.velocity("stop").velocity({opacity:0},i.controlsAnimate[0],i.controlsAnimate[1]):N.css("opacity",0)}function F(t,a){var s,o,r,n=-1,l=be.scrollTop()+5,d=be.height()-10,c=l+d,u=U.offset().top,h=a||parseInt(U.css("height")),m=u+h,g=e(ne[t]),b=h+ee;h>=d?n=u-5:"under"===i.stagePosition?(s=parseInt(U.css("margin-top")),o=g.offset().top,(b+=s)>=d||m>c?n=m-d-5:o<l&&(n=o-5)):(r=(o=m+(s=parseInt(U.css("margin-bottom"))))+ee,(b+=s)>=d||u<l?n=u-5:r>c&&(n=r-d-5)),-1!=n&&P(n)}function P(e,t){void 0===t&&(t=!0),i.scrollAnimate&&t?(ke=!0,$.velocity("stop").velocity("scroll",{offset:e,duration:i.scrollAnimate[0],easing:i.scrollAnimate[1],complete:function(){ke=!1},mobileHA:!1})):window.scrollTo(0,e)}function Q(){ke&&($.velocity("stop"),ke=!1)}function W(e){oe=!1,Q()}function j(e){37!==e.which&&38!==e.which&&39!==e.which&&40!==e.which||-1!==fe&&z()&&(37===e.which?e.preventDefault():39===e.which?e.preventDefault():"all"===i.keyboardArrows&&e.preventDefault())}function K(e){37!==e.which&&38!==e.which&&39!==e.which&&40!==e.which||-1!==fe&&z()&&(37===e.which?(S(),e.preventDefault()):39===e.which?(L(),e.preventDefault()):"all"===i.keyboardArrows&&(38===e.which?O():40===e.which&&H(),e.preventDefault()))}function z(){var e=be.scrollTop(),t=e+be.height(),a=E.offset().top;return a+E.height()>=e+200&&a<=t-200}var E=e(this);E.data("sg-built")&&a.apply(this),E.data("sg-built",!0);var U,G,N,q,J,V,X,Y,Z,$,_,ee,te,ae,se,ie,oe,re=E.children(".sg-body"),ne=re.children("div"),le=[],de=e(),ce=e(),ue=[],he=[],me=E.children(".sg-data").children("div"),ge=e(),be=e(window),fe=-1,pe=ne.length,ve=0,we=0,ye=0,Ae=0,Be=-1,Ce=!1,ke=!1;E.addClass("sg-show"),i.width&&E.css("max-width",i.width),i.margin&&E.css("margin",i.margin),"page"===i.font&&E.addClass("sg-page-font"),"white"===i.textColor&&E.addClass("sg-white-text");var xe=e('<div class="sg-scrollfix"></div>');E.prepend(xe),i.wideBackground&&(_="parent"===i.wideBackgroundTarget?E.parent():be,-1!==i.wideBackground.indexOf("all")&&(X=e('<div class="sg-widebg"></div>'),E.prepend(X),ge=ge.add(X),E.addClass("sg-has-wbg"))),"under"===i.stagePosition&&re.addClass("sg-under"),i.thumbLabelsEnabled||re.addClass("sg-labels-disabled"),"small"===i.thumbBorderWidth&&re.addClass("sg-small-border"),"round"===i.thumbBorderCorners&&re.addClass("sg-rounded-border"),"big"===i.thumbSpace&&re.addClass("sg-big-space"),"plain"===i.thumbLabelBackground&&re.addClass("sg-plain-label"),"plain"===i.imageTextBackground&&re.addClass("sg-plain-text"),i.borders&&("big"===i.borders?re.addClass("sg-big-borders"):re.addClass("sg-borders")),i.wideBackground&&-1!==i.wideBackground.indexOf("body")&&(Y=e('<div class="sg-body-widebg"></div>'),re.prepend(Y),ge=ge.add(Y),re.addClass("sg-has-wbg")),re.addClass("sg-clearfix"),ne.addClass("sg-thumb");var Te=e(ne[0]);if(te=parseInt(Te.css("border-top-width")),se=Te.children(".sg-label").css("opacity")||1,ne.each(function(){function t(){a.removeClass("sg-loading"),"fill"===i.thumbImageScale&&(((parseFloat(o.css("width"))+2*te)/(parseFloat(o.css("height"))+2*te)).toFixed(2)>i.thumbRatio?o.addClass("sg-fillh"):o.addClass("sg-fillw"))}var a=e(this),s=ne.index(a),o=a.children("img"),r=a.children(".sg-label");if(r.length?le[s]=r:le[s]=!1,o.add(r).wrapAll('<div class="sg-view"></div>'),"fit"===i.thumbImageScale?o.addClass("sg-fit"):"stretch"===i.thumbImageScale&&o.addClass("sg-stretch"),i.thumbLabelHide&&r.length&&r.css("opacity",0),i.thumbOverBorder||i.thumbSelectedBorder){var n=e('<div class="sg-border"></div>');if(a.append(n),de=de.add(n),"line"===i.thumbBorderType&&n.addClass("sg-line"),i.thumbBorderAnimate&&n.css("opacity",0),i.thumbBorderArrow){var l;l="under"===i.stagePosition?"sg-down":"sg-up";var m=e('<div class="'+l+'"></div>');n.append(m),ce=ce.add(m)}}(i.thumbLabelHide||i.thumbOverBorder)&&(a.on("mouseenter",function(){i.thumbLabelHide&&(i.thumbLabelSelected&&s!==fe||!i.thumbLabelSelected)&&d(s),i.thumbOverBorder&&(i.thumbSelectedBorder&&s===fe||u(s))}),a.on("mouseleave",function(){i.thumbLabelHide&&(i.thumbLabelSelected&&s!==fe||!i.thumbLabelSelected)&&c(s),i.thumbOverBorder&&(i.thumbSelectedBorder&&s===fe||h(s))})),a.addClass("sg-loading"),o[0].complete?t():o.one("load",t)}),re.on("click",".sg-thumb",function(e){var t=ne.index(e.currentTarget);
2t!==fe?m(t,i.thumbOverBorder):i.thumbDeselect&&g(t,i.thumbOverBorder)}),U=e('<div class="sg-stage"></div>'),re.prepend(U),ae=parseInt(U.css("border-width"))||0,i.wideBackground&&-1!==i.wideBackground.indexOf("stage")&&(Z=e('<div class="sg-stage-widebg"></div>'),U.append(Z),ge=ge.add(Z)),G=e('<div class="sg-container"></div>'),U.append(G),(i.navArrows||i.closeButton)&&(N=e('<div class="sg-controls"></div>'),G.append(N),i.navArrows&&(q=e('<div class="sg-prev"></div>'),J=e('<div class="sg-next"></div>'),N.append(q,J),q.on("click",S),J.on("click",L)),i.closeButton&&(V=e('<div class="sg-close"></div>'),N.append(V),V.on("click",function(){g(fe)}))),ie=e(me[0]).children(".sg-text").css("opacity")||1,(i.imageTextHide||i.controlsHide)&&(i.controlsHide&&N.css("opacity",0),U.on("mouseenter",function(){i.imageTextHide&&(Ce=!0,I(fe)),i.controlsHide&&R()}),U.on("mouseleave",function(){i.imageTextHide&&(Ce=!1,M(fe)),i.controlsHide&&D()})),i.keyboardArrows&&(e(document).on("keydown",j).on("keyup",K),this.docKeyDown=j,this.docKeyUp=K),i.scrollToImage&&i.scrollAnimate&&(($=e("html, body")).on("scroll mousedown wheel mousewheel DOMMouseScroll keyup touchstart",W),this.pageScroll=W),i.responsive&&(be.resize(t),this.resize=t),t(),i.defaultOpen&&i.defaultOpen<=pe){var Se=i.defaultOpen-1;if(i.thumbLabelHide&&i.thumbLabelSelected&&le[Se].css("opacity",se),i.thumbSelectedBorder){var Le=e(de[Se]);Le.addClass("sg-show"),i.thumbBorderAnimate&&Le.css("opacity",1),i.thumbBorderArrow&&e(ce[Se]).addClass("sg-show")}v(Se),Ae=w(),U.addClass("sg-show").css("height",Ae),b(Se,!0),fe=Se}})}function a(){return this.each(function(){var t=e(this);if(t.data("sg-built")){t.data("sg-built",!1);var a=t.children(".sg-body"),s=a.children(".sg-thumb");t.removeClass("sg-show"),t.children(".sg-background").remove(),a.removeClass("sg-clearfix sg-under"),a.children(".sg-body-background").remove(),s.removeClass("sg-thumb sg-firstrow sg-lastrow sg-lastcol"),s.each(function(){var t=e(this),a=t.children(".sg-view"),s=a.children("img"),i=a.children(".sg-label"),o=t.children(".sg-border");t.removeClass("sg-loading"),t.off("mouseenter mouseleave click"),t.css({width:"",height:""}),s.unwrap(),s.removeClass("sg-fit sg-stretch sg-fillh sg-fillw"),s.off("load"),s.css("margin-top",""),i.css("opacity",""),o.remove()}),a.children(".sg-stage").remove(),e(document).off("keydown",this.docKeyDown).off("keyup",this.docKeyUp),this.docKeyDown=null,this.docKeyUp=null,this.pageScroll&&(e("html, body").off("scroll mousedown wheel mousewheel DOMMouseScroll keyup touchstart",this.pageScroll),this.pageScroll=null),e(window).off("resize",this.resize),this.resize=null}})}function s(t){var a=e.extend({},d,t);if(a.margin)if("number"==typeof a.margin)a.margin=a.margin+"px";else if("[object Array]"===Object.prototype.toString.call(a.margin)){for(var s="",o=a.margin.length,n=0;n<o;n++)s+=a.margin[n],"number"==typeof a.margin[n]&&(s+="px"),s+=" ";a.margin=s}return a.thumbRatio?a.thumbRatio=r(a.thumbRatio):a.thumbRatio=d.thumbRatio,a.thumbColumns&&!0!==a.thumbColumns||(a.thumbColumns="auto"),a.stageRatio=r(a.stageRatio),a.navArrows||a.closeButton||(a.controlsHide=!1),!0===a.wideBackground&&(a.wideBackground="body"),a.wideBackground=i(a.wideBackground),!0===a.keyboardArrows&&(a.keyboardArrows="all"),t&&(a.thumbLabelAnimate=l(t.thumbLabelAnimate,d.thumbLabelAnimate),a.thumbBorderAnimate=l(t.thumbBorderAnimate,d.thumbBorderAnimate),a.stageAnimate=l(t.stageAnimate,d.stageAnimate),a.imageAnimate=l(t.imageAnimate,d.imageAnimate),a.imageTextAnimate=l(t.imageTextAnimate,d.imageTextAnimate),a.controlsAnimate=l(t.controlsAnimate,d.controlsAnimate),a.scrollAnimate=l(t.scrollAnimate,d.scrollAnimate)),!a.keyboardArrows&&a.keyboardArrowsNav&&(a.keyboardArrows=a.keyboardArrowsNav),a}function i(e){return!(!e||"string"!=typeof e)&&o(e).split(",")}function o(e){return e.replace(/ /g,"")}function r(e){return!1===e||"number"==typeof e?e:"string"==typeof e?-1!==e.indexOf("x")?(vals=e.split("x"),(parseFloat(vals[0])/parseFloat(vals[1])).toFixed(2)):-1!==e.indexOf(":")?(vals=e.split(":"),(parseFloat(vals[0])/parseFloat(vals[1])).toFixed(2)):parseFloat(e):void 0}function n(e,t){if("number"==typeof e)return e;if("string"==typeof e){for(var a=o(e).split(","),s=0,i=0;i<a.length;i++){var r=a[i].split(":");if(r.length>1){var n,l;switch("="===r[1].charAt(1)?(n=r[1].substring(0,1),l=r[1].substring(2)):(n=r[1].charAt(0),l=r[1].substring(1)),l=parseInt(l),n){case"<":t<l&&(s=r[0]);break;case"<=":t<=l&&(s=r[0]);break;case">":t>l&&(s=r[0]);break;case">=":t>=l&&(s=r[0])}}else s=r[0]}return parseInt(s)}}function l(e,t){if("[object Array]"===Object.prototype.toString.call(e)){if(e.length>=2)return e;if(0===e.length)return t;if(1===e.length){if("number"==typeof e[0])return[e[0],t[1]];if("string"==typeof e[0])return[t[0],e[0]]}}else{if(void 0===e||!0===e)return t;if(!1===e||0===e)return!1;if("number"==typeof e)return[e,t[1]];if("string"==typeof e)return[t[0],e]}}var d={width:797,margin:[30,"auto"],thumbWidth:157,thumbRatio:1.5,thumbColumns:"auto",thumbImageScale:"fill",thumbLabelHide:!1,thumbLabelSelected:!0,thumbLabelBackgroun
2d:"gradient",thumbLabelAnimate:[130,"easeOutQuad"],thumbLabelsEnabled:!0,thumbOverBorder:!0,thumbSelectedBorder:!0,thumbBorderType:"line",thumbBorderWidth:"small",thumbBorderCorners:"square",thumbBorderArrow:!0,thumbBorderAnimate:[130,"easeOutQuad"],thumbSpace:"small",thumbDeselect:!0,stageRatio:!1,stagePosition:"over",stageAnimate:[500,"easeOutQuad"],imageAnimate:[500,"easeOutQuad"],imageTextHide:!1,imageTextBackground:"gradient",imageTextAnimate:[250,"easeOutQuad"],imageTextsEnabled:!0,navArrows:!0,closeButton:!0,controlsHide:!1,controlsAnimate:[250,"easeOutQuad"],textColor:"black",borders:!1,wideBackground:!1,wideBackgroundTarget:"parent",scrollToImage:!0,scrollAnimate:[500,"easeOutQuad"],defaultOpen:1,font:"default",loop:!0,keyboardArrows:"all",responsive:!0},c={build:t,destroy:a};e.fn.sharpGallery=function(a){"object"!=typeof a&&a?c[a]?c[a].apply(this,Array.prototype.slice.call(arguments,1)):e.error("The method "+a+" does not exist in Sharp Gallery."):t.apply(this,arguments)}}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.