/* nanogallery2 - v3.0.5 - 2021-01-06 */
/*!
* @preserve nanogallery2 - javascript photo / video gallery and lightbox
* Homepage: http://nanogallery2.nanostudio.org
* Sources: https://github.com/nanostudio-org/nanogallery2
*
* License: GPLv3 and commercial licence
*
* Requirements:
* - jQuery (http://www.jquery.com) - version >= 1.7.1
*
* Embeded components:
* - shifty (https://github.com/jeremyckahn/shifty)
* - imagesloaded (https://github.com/desandro/imagesloaded)
* - hammer.js (http://hammerjs.github.io/)
* - screenfull.js (https://github.com/sindresorhus/screenfull.js)
* Tools:
* - webfont generated with http://fontello.com - mainly based on Font Awesome Copyright (C) 2012 by Dave Gandy (http://fontawesome.io/)
* - ICO online converter: https://iconverticons.com/online/
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}((function(e){"use strict";function t(e){var t=document.getElementById("ngyColorHelperToRGB");return null===t&&((t=document.createElement("div")).id="ngyColorHelperToRGB",t.style.cssText="display: none; color:"+e+";",document.body.appendChild(t)),getComputedStyle(t).color}function n(e,t,n){var i="";if("RGBA("==t.toUpperCase().substring(0,5)&&(i="a",t="rgb("+t.substring(5)),"number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||"string"!=typeof n&&void 0!==n)return null;function a(e){var t=e.length,n=new Object;if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=o(e[0].slice(4)),n[1]=o(e[1]),n[2]=o(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=o(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=9==t||5==t?r((e>>24&255)/255*1e4)/1e4:-1}return n}var o=parseInt,r=Math.round,l=t.length>9,s=(l="string"==typeof n?n.length>9||"c"==n&&!l:l,e<0),u=(e=s?-1*e:e,n=n&&"c"!=n?n:s?"#000000":"#FFFFFF",a(t)),c=a(n);return u&&c?l?"rgb"+i+"("+r((c[0]-u[0])*e+u[0])+","+r((c[1]-u[1])*e+u[1])+","+r((c[2]-u[2])*e+u[2])+(u[3]<0&&c[3]<0?")":","+(u[3]>-1&&c[3]>-1?r(1e4*((c[3]-u[3])*e+u[3]))/1e4:c[3]<0?u[3]:c[3])+")"):"#"+(4294967296+16777216*(u[3]>-1&&c[3]>-1?r(255*((c[3]-u[3])*e+u[3])):c[3]>-1?r(255*c[3]):u[3]>-1?r(255*u[3]):255)+65536*r((c[0]-u[0])*e+u[0])+256*r((c[1]-u[1])*e+u[1])+r((c[2]-u[2])*e+u[2])).toString(16).slice(u[3]>-1||c[3]>-1?1:3):null}function i(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)t[n]=i(e[n]);return t}function a(){var e=jQuery(window);return{l:e.scrollLeft(),t:e.scrollTop(),w:e.width(),h:e.height()}}function o(e,t){var n=0;""==e&&(e="*"),jQuery(e).each((function(){var e=parseInt(jQuery(this).css("z-index"));n=e>n?e:n})),n++,jQuery(t).css("z-index",n)}var r=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()};function l(){this.LightboxReOpen=function(){m()},this.ReloadAlbum=function(){if(""===u.O.kind)throw"Not supported for this content source:"+u.O.kind;var e=u.GOM.albumIdx;if(-1==e)throw"Current album not found.";for(var t=u.I[e].GetID(),n=u.I.length,i=0;i1&&e--,u.GOM.pagination.currentPage=e,u.GOM.ScrollToTop(),L(),E(!0),!1},this.PaginationCountPages=function(){return 0==u.GOM.items.length?0:Math.ceil((u.GOM.items[u.GOM.items.length-1].row+1)/u.galleryMaxRows.Get())};var s=function(e,t,n){var i;return function(){var a=this,o=arguments;function r(){n||e.apply(a,o),i=null}i?clearTimeout(i):n&&e.apply(a,o),i=setTimeout(r,t||100)}};window.ng_draf=function(e){return requestAnimationFrame((function(){window.requestAnimationFrame(e)}))},window.requestTimeout=function(e,t){if(!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame&&window.mozCancelRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame))return window.setTimeout(e,t);var n=(new Date).getTime(),i=new Object;return i.value=requestAnimFrame((function a(){(new Date).getTime()-n>=t?e.call():i.value=requestAnimFrame(a)})),i},window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)},window.clearRequestTimeout=function(e){window.cancelAnimationFrame?window.cancelAnimationFrame(e.value):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(e.value):window.webkitCancelRequestAnimationFrame?window.webkitCancelRequestAnimationFrame(e.value):window.mozCancelRequestAnimationFrame?window.mozCancelRequestAnimationFrame(e.value):window.oCancelRequestAnimationFrame?window.oCancelRequestAnimationFrame(e.value):window.msCancelRequestAnimationFrame?window.msCancelRequestAnimationFrame(e.value):clearTimeout(e)};var u=this;function c(e){this.$e=null,this.ngy2ItemIdx=e,this.mediaNumber=u.VOM.items.length+1,this.posX=0,this.posY=0}u.I=[],u.Id=[],u.O=null,u.baseEltID=null,u.$E={base:null,conTnParent:null,conLoadingB:null,conConsole:null,conNavigationBar:null,conTnBottom:null,scrollableParent:null},u.shoppingCart=[],u.layout={internal:!0,engine:"",support:{rows:!1},prerequisite:{imageSize:!1},SetEngine:function(){if(u.layout.internal){if("auto"==u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth]||""==u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth])return u.layout.engine="JUSTIFIED",u.layout.support.rows=!0,void(u.layout.prerequisite.imageSize=!0);if("auto"==u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth]||""==u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth])return u.layout.engine="CASCADING",u.layout.support.rows=!1,void(u.layout.prerequisite.imageSize=!0);if(null!=u.tn.settings.getMosaic())return u.layout.engine="MOSAIC",u.layout.support.rows=!0,void(u.layout.prerequisite.imageSize=!1);u.layout.engine="GRID",u.layout.support.rows=!0,u.layout.prerequisite.imageSize=!1}}},u.galleryResizeEventEnabled=!1,u.galleryMaxRows={l1:0,lN:0,Get:function(){return u.galleryMaxRows[u.GOM.curNavLevel]}},u.galleryMaxItems={l1:0,lN:0,Get:function(){return u.galleryMaxItems[u.GOM.curNavLevel]}},u.galleryFilterTags={l1:0,lN:0,Get:function(){return u.galleryFilterTags[u.GOM.curNavLevel]}},u.galleryFilterTagsMode={l1:0,lN:0,Get:function(){return u.galleryFilterTagsMode[u.GOM.curNavLevel]}},u.galleryDisplayMode={l1:"FULLCONTENT",lN:"FULLCONTENT",Get:function(){return u.galleryDisplayMode[u.GOM.curNavLevel]}},u.galleryLastRowFull={l1:!1,lN:!1,Get:function(){return u.galleryLastRowFull[u.GOM.curNavLevel]}},u.gallerySorting={l1:"",lN:"",Get:function(){return u.gallerySorting[u.GOM.curNavLevel]}},u.galleryDisplayTransition={l1:"none",lN:"none",Get:function(){return u.galleryDisplayTransition[u.GOM.curNavLevel]}},u.galleryDisplayTransitionDuration={l1:500,lN:500,Get:function(){return u.galleryDisplayTransitionDuration[u.GOM.curNavLevel]}},u.$currentTouchedThumbnail=null,u.tn={opt:{l1:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},lN:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},Get:function(e){return u.tn.opt[u.GOM.curNavLevel][e]}},scale:1,labelHeight:{l1:0,lN:0,get:function(){return u.tn.labelHeight[u.GOM.curNavLevel]}},defaultSize:{width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},getWidth:function(){return u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]},getOuterWidth:function(){u.tn.borderWidth=u.tn.opt.Get("borderHorizontal"),u.tn.borderHeight=u.tn.opt.Get("borderVertical");var e=u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]+2*u.tn.opt.Get("borderHorizontal");return"right"!=u.O.thumbnailLabel.get("position")&&"left"!=u.O.thumbnailLabel.get("position")||(e+=u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]),e},getHeight:function(){return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth]},getOuterHeight:function(){return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth]+2*u.tn.opt.Get("borderVertical")}},settings:{width:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},getH:function(e,t){var n=null==e?u.GOM.curNavLevel:e,i=null==t?u.GOM.curWidth:t;return"MOSAIC"==u.layout.engine?this.height[n][i]*this.mosaic[n+"Factor"].h[i]:this.height[n][i]},getW:function(e,t){var n=null==e?u.GOM.curNavLevel:e,i=null==t?u.GOM.curWidth:t;return"MOSAIC"==u.layout.engine?this.width[n][i]*this.mosaic[n+"Factor"].w[i]:this.width[n][i]},mosaic:{l1:{xs:null,sm:null,me:null,la:null,xl:null},lN:{xs:null,sm:null,me:null,la:null,xl:null},l1Factor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}},lNFactor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}}},getMosaic:function(){return this.mosaic[u.GOM.curNavLevel][u.GOM.curWidth]},mosaicCalcFactor:function(e,t){for(var n=1,i=1,a=0;at?(r&&(clearTimeout(r),r=null),l=u,o=e.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(s,c)),o}}(x,15,{leading:!1}),u.blockList=null,u.allowList=null,u.albumList=[],u.locationHashLastUsed="",u.custGlobals={},u.touchAutoOpenDelayTimerID=0,u.i18nLang="",u.timeLastTouchStart=0,u.custGlobals={},u.markupOrApiProcessed=!1,u.GOM={albumIdx:-1,clipArea:{top:0,height:0},displayArea:{width:0,height:0},displayAreaLast:{width:0,height:0},displayedMoreSteps:0,items:[],$imgPreloader:[],thumbnails2Display:[],itemsDisplayed:0,firstDisplay:!0,firstDisplayTime:0,navigationBar:{displayed:!1,$newContent:""},cache:{viewport:null,containerOffset:null,areaWidth:100},nbSelected:0,pagination:{currentPage:0},panThreshold:60,panYOnly:!1,lastFullRow:-1,lastDisplayedIdx:-1,displayInterval:{from:0,len:0},hammertime:null,curNavLevel:"l1",curWidth:"me",albumSearch:"",albumSearchTags:"",lastZIndex:0,lastRandomValue:0,slider:{hostIdx:-1,hostItem:null,currentIdx:0,nextIdx:0,timerID:0,tween:null},NGY2Item:function(e){if(null==u.GOM.items[e]||null==u.GOM.items[e])return null;var t=u.GOM.items[e].thumbnailIdx;return u.I[t]},GTn:function(e,t,n){this.thumbnailIdx=e,this.width=0,this.height=0,this.top=0,this.left=0,this.row=0,this.imageWidth=t,this.imageHeight=n,this.resizedContentWidth=0,this.resizedContentHeight=0,this.displayed=!1,this.neverDisplayed=!0,this.inDisplayArea=!1},ScrollToTop:function(){var e,t,n,i;if(!u.GOM.firstDisplay&&(null!==u.$E.scrollableParent||(e=u.$E.base,t=20,n=a(),(i=e.offset()).top>=n.t&&i.top<=n.t+n.h-t)||u.$E.base.get(0).scrollIntoView(),null!==u.$E.scrollableParent)){var o=u.$E.scrollableParent.scrollTop(),r=Math.abs(u.$E.scrollableParent.offset().top-u.$E.base.offset().top-o);o>r&&window.ng_draf((function(){u.$E.scrollableParent.scrollTop(r)}))}}},u.VOM={viewerDisplayed:!1,viewerIsFullscreen:!1,infoDisplayed:!1,toolbarsDisplayed:!0,toolsHide:null,zoom:{posX:0,posY:0,userFactor:1,isZooming:!1},padding:{H:0,V:0},window:{lastWidth:0,lastHeight:0},$viewer:null,$toolbar:null,$toolbarTL:null,$toolbarTR:null,toolbarMode:"std",playSlideshow:!1,playSlideshowTimerID:0,slideshowDelay:3e3,albumID:-1,viewerMediaIsChanged:!1,items:[],panMode:"off",$baseCont:null,$content:null,content:{previous:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.previous.vIdx].ngy2ItemIdx]}},current:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.current.vIdx].ngy2ItemIdx]}},next:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.next.vIdx].ngy2ItemIdx]}}},IdxNext:function(){var e=0;return u.VOM.content.current.vIdx=t){var n=this.oneTmbWidth*u.VOM.content.current.vIdx;n+this.posX=this.vwidth&&(this.posX=this.vwidth-(n+this.oneTmbWidth))}this.PanGallery(0)}},PanGallery:function(e){this.gwidththis.vwidth-this.oneTmbWidth&&(this.posX=this.vwidth-this.oneTmbWidth),this.posX+this.gwidthu.VOM.ImageLoader.maxChecks?(u.VOM.ImageLoader.list[i]=null,e.callback(0,0,e.ngitem,e.checks)):(t++,e.checks++));0==t&&(u.VOM.ImageLoader.list=[],clearInterval(u.VOM.ImageLoader.intervalHandle),delete u.VOM.ImageLoader.intervalHandle)}}},u.popup={isDisplayed:!1,$elt:null,close:function(){null!=this.$elt&&(new NGTweenable).tween({from:{opacity:1},to:{opacity:0},attachment:{t:this},easing:"easeInOutSine",duration:100,step:function(e,t){null!=t.t.$elt&&t.t.$elt.css("opacity",e.opacity)},finish:function(e,t){null!=t.t.$elt&&(t.t.$elt.remove(),t.t.$elt=null),t.t.isDisplayed=!1}})}},u.galleryTheme_dark={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},navigationFilter:{color:"#ddd",background:"#111",colorSelected:"#fff",backgroundSelected:"#111",borderRadius:"4px"},navigationPagination:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",borderRadius:"0px",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#aaa"},thumbnailIcon:{padding:"5px",color:"#fff",shadow:""},pagination:{background:"#181818",backgroundSelected:"#666",color:"#fff",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},u.galleryTheme_light={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},navigationFilter:{background:"#eee",color:"#222",colorSelected:"#000",backgroundSelected:"#eee",borderRadius:"4px"},navigationPagination:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#888"},thumbnailIcon:{padding:"5px",color:"#fff"},pagination:{background:"#eee",backgroundSelected:"#aaa",color:"#000",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},u.viewerTheme_dark={background:"#000",barBackground:"rgba(4, 4, 4, 0.2)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"},u.viewerTheme_light={background:"#f8f8f8",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"};var h=NGY2Tools.NanoAlert,d=NGY2Tools.NanoConsoleLog;function m(){u.VOM.items=[],u.VOM.albumID="0",u.GOM.curNavLevel="l1";var e=0,t=u.$E.base[0].attributes,n="";t.hasOwnProperty("src")&&(n=t.src.nodeValue),""==n&&t.hasOwnProperty("data-ngthumb")&&(n=t["data-ngthumb"].nodeValue);for(var i=void 0,a=0;a0?De(i):d(u,"No content for Lightbox standalone.")}function p(e){var t={albumID:"0",imageID:"0"},n=e.split("/");return n.length>0&&(t.albumID=n[0],n.length>1&&(t.imageID=n[1])),t}function g(e,t){u.VOM.viewerDisplayed&&tt(null);var n=NGY2Item.GetIdx(u,t);u.GOM.curNavLevel="lN",0==n&&(u.GOM.curNavLevel="l1"),u.layout.SetEngine(),u.galleryResizeEventEnabled=!1,-1==n&&(NGY2Item.New(u,"","",t,"0","album"),n=u.I.length-1),u.I[n].contentIsLoaded?(de(),u.GOM.pagination.currentPage=0,rt(t,""),w(n)):q(t,g,e,t)}function f(){switch(u.galleryDisplayMode.Get()){case"PAGINATION":u.layout.support.rows&&u.galleryMaxRows.Get()>0&&function(){if(u.$E.conTnBottom.css("opacity",0),u.$E.conTnBottom.children().remove(),0==u.GOM.items.length)return;var e=Math.ceil((u.GOM.items[u.GOM.items.length-1].row+1)/u.galleryMaxRows.Get());if(1==e)return;u.GOM.pagination.currentPage>e-1&&(u.GOM.pagination.currentPage=e-1);if(M(),0==u.GOM.displayInterval.len)return;if("NUMBERS"==u.O.galleryPaginationMode&&u.GOM.pagination.currentPage>0){jQuery('").appendTo(u.$E.conTnBottom).click((function(e){G()}))}var t=0,n=e;if("NUMBERS"!=u.O.galleryPaginationMode)t=0;else{var i=u.O.paginationVisiblePages;if(i>=e)t=0;else{var a=0;a=i%2==1?(i+1)/2:i/2,u.GOM.pagination.currentPagee&&(n=e-1)):(t=u.GOM.pagination.currentPage-a,(n=t+i)>e&&(n=e-1)),n-t'+l+"").appendTo(u.$E.conTnBottom);s.data("pageNumber",o),s.click((function(e){u.GOM.pagination.currentPage=jQuery(this).data("pageNumber"),at("pageChanged"),u.GOM.ScrollToTop(),L(),E(!0)}))}if("NUMBERS"==u.O.galleryPaginationMode&&u.GOM.pagination.currentPage+1
"):t.$E.conConsole.append("nanogallery2: "+n+" ["+t.baseEltID+"]
"))},e.NanoConsoleLog=function(e,t){window.console&&console.log("nanogallery2: "+t+" ["+e.baseEltID+"]")},e.PreloaderDisplay=function(e){if(!0===e){if(this.$E.conLoadingB.removeClass("nanoGalleryLBarOff").addClass("nanoGalleryLBar"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].addClass("nGY2GThumbnailLoaderDisplayed")}}else if(this.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].removeClass("nGY2GThumbnailLoaderDisplayed")}},e.AreaShuffle=function(e){for(var t,n,i=e.length;i;t=Math.floor(Math.random()*i),n=e[--i],e[i]=e[t],e[t]=n);return e},e.GetImageTitleFromURL=function(e){return"%filename"==this.O.thumbnailLabel.get("title")?e.split("/").pop().replace("_"," "):"%filenameNoExt"==this.O.thumbnailLabel.get("title")?e.split("/").pop().split(".").shift().replace("_"," "):""},e.AlbumPostProcess=function(t){var n=this.gallerySorting[this.GOM.curNavLevel],i=this.galleryMaxItems[this.GOM.curNavLevel];if(""!=n||i>0){var a=this.I.filter((function(e){return e.albumID==t&&"albumUp"!=e.kind}));switch(n){case"RANDOM":a=e.AreaShuffle(a);break;case"REVERSED":a=a.reverse();break;case"TITLEASC":a.sort((function(e,t){return e.title.toUpperCase()t.title.toUpperCase()?1:0}));break;case"TITLEDESC":a.sort((function(e,t){return e.title.toUpperCase()>t.title.toUpperCase()?-1:e.title.toUpperCase()0&&a.length>i&&a.splice(i-1,a.length-i),this.I.ngy2removeIf((function(e){return e.albumID==t&&"albumUp"!=e.kind})),this.I.push.apply(this.I,a)}},e}(),window.NGY2Item=function(){var e=1;function t(t){var n=0;n=null==t?e++:t,this.GetID=function(){return n},this.kind="",this.mediaKind="img",this.mediaMarkup="",this.G=null,this.title="",this.description="",this.albumID=0,this.src="",this.width=0,this.height=0,this.destinationURL="",this.downloadURL="",this.author="",this.left=0,this.top=0,this.width=0,this.height=0,this.resizedContentWidth=0,this.resizedContentHeight=0,this.thumbs={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}},this.thumbnailImgRevealed=!1,this.imageDominantColors=null,this.imageDominantColor=null,this.featured=!1,this.flickrThumbSizes={},this.picasaThumbs=null,this.hovered=!1,this.hoverInitDone=!1,this.contentIsLoaded=!1,this.contentLength=0,this.numberItems=0,this.mediaNumber=0,this.mediaCounter=0,this.eltTransform=[],this.eltFilter=[],this.eltEffect=[],this.paginationLastPage=0,this.paginationLastWidth=0,this.customData={},this.selected=!1,this.imageWidth=0,this.imageHeight=0,this.$elt=null,this.$Elts=[],this.tags=[],this.albumTagList=[],this.albumTagListSel=[],this.exif={exposure:"",flash:"",focallength:"",fstop:"",iso:"",model:"",time:"",location:""},this.deleted=!1,this.rotationAngle=0}t.Get=function(e,t){for(var n=e.I.length,i=0;ie.title===n);void 0!==t&&(n=t.replace)}if(-1!=r&&0!=r&&"image gallery by nanogallery2 [build]"!=n&&e.O.thumbnailLevelUp&&0==u.getContentLength(!1)&&""==e.O.album){let n=new t("0");e.I.push(n),u.contentLength+=1,n.title="UP",n.albumID=r,n.kind="albumUp",n.G=e,jQuery.extend(!0,n.thumbs.width,e.tn.defaultSize.width),jQuery.extend(!0,n.thumbs.height,e.tn.defaultSize.height)}var c=t.Get(e,o);null===c&&(c=new t(o),e.I.push(c),-1!=r&&"image gallery by nanogallery2 [build]"!=n&&(u.contentLength+=1)),c.G=e,c.albumID=r,c.kind=l,"image"==l&&(u.mediaCounter+=1,c.mediaNumber=u.mediaCounter);var h=e.O.thumbnailFeaturedKeyword;if(""!=h){h=h.toUpperCase();var d=n.toUpperCase().indexOf(h);d>-1&&(c.featured=!0,n=n.substring(0,d)+n.substring(d+h.length,n.length)),(d=i.toUpperCase().indexOf(h))>-1&&(c.featured=!0,i=i.substring(0,d)+i.substring(d+h.length,i.length))}if("string"==typeof e.galleryFilterTags.Get())switch(e.galleryFilterTags.Get().toUpperCase()){case"TITLE":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,i=[];for(;e=t.exec(n);)i.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(i),n=n.split("#").join("");break}case"DESCRIPTION":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,n=[];for(;e=t.exec(i);)n.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(n),i=i.split("#").join("");break}}else""!=s&&null!=s&&c.setTags(s.split(" "));return c.title=a(e,n),c.description=a(e,i),c},t.prototype.delete=function(){this.deleted=!0,this.G.I[t.GetIdx(this.G,this.albumID)].contentLength--,this.G.I[t.GetIdx(this.G,this.albumID)].numberItems--;for(var e=this.G.GOM.items.length,n=this.GetID(),i=-1,a=-1,o=0;o":">",'"':""","'":"'","/":"/","`":"`","=":"="};function a(e,t){return 1==e.O.allowHTMLinData?t:String(t).replace(/[&<>"'`=\/]/g,(function(e){return i[e]}))}function o(e,t){if("0"===(e=String(e))||1==t)return e;var n=Number(e.replace(/[a-zA-Z]/g,"")),i=e.match(/([^\-0-9\.]+)/g),a="";return null!=i&&i.length>0&&(a=i.join()),isNaN(n)||0==n?e:(n*=t)+a}return t.get_nextId=function(){return e},t.prototype.$getElt=function(e,t){return null==this.$elt?null:(void 0!==this.$Elts[e]&&1==!t||(this.$Elts[e]=".nGY2GThumbnail"==e?this.$elt:this.$elt.find(e)),this.$Elts[e])},t.prototype.removeElt=function(e){if(null!=this.$elt&&null!=this.$Elts[e]){this.$Elts[e].remove();var t=this.$Elts.indexOf(e);this.$Elts.splice(t,1)}},t.prototype.album=function(){return this.G.I[t.GetIdx(this.G,this.albumID)]},t.prototype.mediaTransition=function(){return this.G.O.viewerTransitionMediaKind.indexOf(this.mediaKind)>-1},t.prototype.imageSet=function(e,t,n){this.src=e,this.width=t,this.height=n},t.prototype.thumbSet=function(e,t,n,i,a){var o=["xs","sm","me","la","xl"];if(void 0===i||""==i||null==i)for(var r=0;r0){this.tags=e;for(var t=this.album().albumTagList,n=0;n0){if(this.G.O.thumbnailLevelUp&&"albumUp"==this.kind)return!0;var e=!1,t=this.album().albumTagListSel;if(0==t.length)return!0;for(var n=0;n=0)return!0;return!1},t.prototype.setMediaURL=function(e,t){this.src=e,this.mediaKind=t,"img"==t&&(this.mediaMarkup='')},t.prototype.isToDisplay=function(e){return this.albumID==e&&this.checkTagFilter()&&this.isSearchFound()&&this.isSearchTagFound()&&0==this.deleted},t.prototype.getContentLength=function(e){if(0==e||0==this.albumTagList.length||0==this.G.galleryFilterTags.Get())return this.contentLength;for(var t=this.G.I.length,n=0,i=this.GetID(),a=0;a=0;h--){var d="translateX("+o(t.translateX,i)+") translateY("+o(t.translateY,a)+") translateZ("+o(t.translateZ,r)+") scale("+o(t.scale,c)+") translate("+o(t.translate,1)+")";this.G.IE<=9||this.G.isGingerbread?d+=" rotate("+o(t.rotateZ,u)+")":d+=" rotateX("+o(t.rotateX,l)+") rotateY("+o(t.rotateY,s)+") rotateZ("+o(t.rotateZ,u)+") rotate("+o(t.rotate,1)+")",t.$elt[h].style[this.G.CSStransformName]=d,n>0&&(i-=this.G.tn.opt.Get("stacksTranslateX"),a-=this.G.tn.opt.Get("stacksTranslateY"),r-=this.G.tn.opt.Get("stacksTranslateZ"),l-=this.G.tn.opt.Get("stacksRotateX"),s-=this.G.tn.opt.Get("stacksRotateY"),u-=this.G.tn.opt.Get("stacksRotateZ"),c-=this.G.tn.opt.Get("stacksScale"))}else if(null!=t.$elt)for(h=0;h',thumbnailImage:'',breadcrumbAlbum:'',breadcrumbHome:'',breadcrumbSeparator:'',breadcrumbSeparatorRtl:'',navigationFilterSelected:'',navigationFilterUnselected:'',navigationFilterSelectedAll:'',navigationPaginationPrevious:'',navigationPaginationNext:'',thumbnailSelected:'',thumbnailUnselected:'',thumbnailFeatured:'',thumbnailCounter:'',thumbnailShare:'',thumbnailDownload:'',thumbnailInfo:'',thumbnailShoppingcart:'',thumbnailDisplay:'',thumbnailCustomTool1:"T1",thumbnailCustomTool2:"T2",thumbnailCustomTool3:"T3",thumbnailCustomTool4:"T4",thumbnailCustomTool5:"T5",thumbnailCustomTool6:"T6",thumbnailCustomTool7:"T7",thumbnailCustomTool8:"T8",thumbnailCustomTool9:"T9",thumbnailCustomTool10:"T10",thumbnailAlbumUp:'',paginationNext:'',paginationPrevious:'',galleryMoreButton:' ',buttonClose:'',viewerPrevious:'',viewerNext:'',viewerImgPrevious:'',viewerImgNext:'',viewerDownload:'',viewerToolbarMin:'',viewerToolbarStd:'',viewerPlay:'',viewerPause:'',viewerFullscreenOn:'',viewerFullscreenOff:'',viewerZoomIn:'',viewerZoomOut:'',viewerLinkOriginal:'',viewerInfo:'',viewerShare:'',viewerRotateLeft:'',viewerRotateRight:'',viewerShoppingcart:'',user:'',location:'',picture:'',config:'',shareFacebook:'',shareTwitter:'',shareTumblr:'',sharePinterest:'',shareVK:'',shareMail:'',viewerCustomTool1:"T1",viewerCustomTool2:"T2",viewerCustomTool3:"T3",viewerCustomTool4:"T4",viewerCustomTool5:"T5",viewerCustomTool6:"T6",viewerCustomTool7:"T7",viewerCustomTool8:"T8",viewerCustomTool9:"T9",viewerCustomTool10:"T10"}},jQuery.fn.nanogallery2=function(t,n,i){if(void 0===jQuery(this).data("nanogallery2data")){if("destroy"==t)return;return this.each((function(){new jQuery.nanogallery2(this,t)}))}var a=e(this).data("nanogallery2data").nG2;if(void 0===t||!0!==t.lightboxStandalone){switch(t){case"displayItem":a.DisplayItem(n);break;case"search":return a.Search(n);case"search2":return a.Search2(n,i);case"search2Execute":return a.Search2Execute();case"refresh":a.Refresh();break;case"resize":a.Resize();break;case"instance":return a;case"data":return a.data={items:a.I,gallery:a.GOM,lightbox:a.VOM,shoppingcart:a.shoppingCart},a.data;case"reload":return a.ReloadAlbum(),e(this);case"itemsSelectedGet":return a.ItemsSelectedGet();case"itemsSetSelectedValue":a.ItemsSetSelectedValue(n,i);break;case"option":if(void 0===i)return a.Get(n);a.Set(n,i),"demoViewportWidth"==n&&e(window).trigger("resize");break;case"destroy":a.Destroy(),e(this).removeData("nanogallery2data");break;case"shoppingCartGet":return a.shoppingCart;case"shoppingCartUpdate":if(void 0===i||void 0===n)return!1;for(var o=n,r=i,l=0;l=i,r=l-(i-a),e.isPlaying()&&(o?(p(h,e._attachment,r),e.stop(!0)):(e._scheduleId=f(e._timeoutHandler,1e3/60),g(e,"beforeTween"),a=0?e:0-e}return s=1-(c=3*t)-(u=3*(i-t)-c),h=1-(m=3*n)-(d=3*(a-n)-m),r=e,l=function(e){return 1/(200*e)}(o),function(e){return((h*e+d)*e+m)*e}(function(e,t){var n,i,a,o,r,l;for(a=e,l=0;l<8;l++){if(f(o=p(a)-e)i)return i;for(;no?n=a:i=a,a=.5*(i-n)+n}return a}(r,l))}n.setBezierFunction=function(t,i,a,o,r){var l=function(t,n,i,a){return function(o){return e(o,t,n,i,a,1)}}(i,a,o,r);return l.displayName=t,l.x1=i,l.y1=a,l.x2=o,l.y2=r,n.prototype.formula[t]=l},n.unsetBezierFunction=function(e){delete n.prototype.formula[e]}}(),(t=new n)._filterArgs=[],n.interpolate=function(e,i,a,o,r){var l=n.shallowCopy({},e),s=r||0,u=n.composeEasingObject(e,o||"linear");t.set({});var c=t._filterArgs;c.length=0,c[0]=l,c[1]=e,c[2]=i,c[3]=u,n.applyFilter(t,"tweenCreated"),n.applyFilter(t,"beforeTween");var h=function(e,t,i,a,o,r){return n.tweenProps(a,t,e,i,1,r,o)}(e,l,i,a,u,s);return n.applyFilter(t,"afterTween"),h},function(e){var t=/(\d|\-|\.)/,n=/([^\-0-9\.]+)/g,i=/[0-9.\-]+/g,a=new RegExp("rgb\\("+i.source+/,\s*/.source+i.source+/,\s*/.source+i.source+"\\)","g"),o=/^.*\(/,r=/#([0-9]|[a-f]){3,6}/gi;function l(e,t){var n,i=[],a=e.length;for(n=0;n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,a,i),t.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function I(e){return e.trim().split(/\s+/g)}function T(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;in[t]})):i.sort()),i}function L(e,t){for(var n,i,a=t[0].toUpperCase()+t.slice(1),r=0;r1&&!n.firstMultiple?n.firstMultiple=_(t):1===a&&(n.firstMultiple=!1);var o=n.firstInput,r=n.firstMultiple,l=r?r.center:o.center,c=t.center=P(i);t.timeStamp=u(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=z(l,c),t.distance=F(l,c),function(e,t){var n=t.center,i=e.offsetDelta||{},a=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(a=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=a.x+(n.x-i.x),t.deltaY=a.y+(n.y-i.y)}(n,t),t.offsetDirection=$(t.deltaX,t.deltaY);var h=R(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=s(h.x)>s(h.y)?h.x:h.y,t.scale=r?(d=r.pointers,m=i,F(m[0],m[1],V)/F(d[0],d[1],V)):1,t.rotation=r?function(e,t){return z(t[1],t[0],V)+z(e[1],e[0],V)}(r.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,a,o,r=e.lastInterval||t,l=t.timeStamp-r.timeStamp;if(8!=t.eventType&&(l>25||void 0===r.velocity)){var u=t.deltaX-r.deltaX,c=t.deltaY-r.deltaY,h=R(l,u,c);i=h.x,a=h.y,n=s(h.x)>s(h.y)?h.x:h.y,o=$(u,c),e.lastInterval=t}else n=r.velocity,i=r.velocityX,a=r.velocityY,o=r.direction;t.velocity=n,t.velocityX=i,t.velocityY=a,t.direction=o}(n,t);var d,m;var p=e.element;M(t.srcEvent.target,p)&&(p=t.srcEvent.target);t.target=p}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function _(e){for(var t=[],n=0;n=s(t)?e<0?2:4:t<0?8:16}function F(e,t,n){n||(n=N);var i=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return Math.sqrt(i*i+a*a)}function z(e,t,n){n||(n=N);var i=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return 180*Math.atan2(a,i)/Math.PI}Y.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&G(this.element,this.evEl,this.domHandler),this.evTarget&&G(this.target,this.evTarget,this.domHandler),this.evWin&&G(E(this.element),this.evWin,this.domHandler)}};var B={mousedown:1,mousemove:2,mouseup:4};function H(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,Y.apply(this,arguments)}f(H,Y,{handler:function(e){var t=B[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var U={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},W={2:"touch",3:"pen",4:"mouse",5:"kinect"},j="pointerdown",X="pointermove pointerup pointercancel";function Q(){this.evEl=j,this.evWin=X,Y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&(j="MSPointerDown",X="MSPointerMove MSPointerUp MSPointerCancel"),f(Q,Y,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),a=U[i],o=W[e.pointerType]||e.pointerType,r="touch"==o,l=T(t,e.pointerId,"pointerId");1&a&&(0===e.button||r)?l<0&&(t.push(e),l=t.length-1):12&a&&(n=!0),l<0||(t[l]=e,this.callback(this.manager,a,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(l,1))}});var q={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function Z(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Y.apply(this,arguments)}function J(e,t){var n=x(e.touches),i=x(e.changedTouches);return 12&t&&(n=S(n.concat(i),"identifier",!0)),[n,i]}f(Z,Y,{handler:function(e){var t=q[e.type];if(1===t&&(this.started=!0),this.started){var n=J.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var K={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ee(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},Y.apply(this,arguments)}function te(e,t){var n=x(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var a,o,r=x(e.changedTouches),l=[],s=this.target;if(o=n.filter((function(e){return M(e.target,s)})),1===t)for(a=0;a-1&&i.splice(e,1)}),2500)}}function oe(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+he(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+he(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;et.threshold&&a&t.direction},attrTest:function(e){return pe.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=de(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),f(fe,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),f(be,ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distancet.time;if(this._input=e,!i||!n||12&e.eventType&&!a)this.reset();else if(1&e.eventType)this.reset(),this._timer=c((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),f(ve,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),f(Oe,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return ge.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&s(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=de(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),f(ye,ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance";l(n,"Could not retrieve nanoPhotosProvider2 data. Error: "+(t+", "+i+" "+a+"
URL:"+d))}))}catch(e){l(n,"Could not retrieve nanoPhotosProvider2 data. Error: "+e)}};function a(e){return decodeURIComponent(e)}function o(e,t){n.O.debugMode&&(console.log("nanoPhotosProvider2 parse data:"),console.dir(t));jQuery.each(t.album_content,(function(e,i){var o=n.O.dataProvider.substring(0,n.O.dataProvider.indexOf("nano_photos_provider2.php")),r=o+a(i.src),l=i.title,u=i.description.split("_").join(" "),c="image";void 0!==i.kind&&i.kind.length>0&&(c=i.kind);var h=i.ID,d=!1;if("album"==c&&(s(l,h)||(d=!0),""==n.O.album&&""==n.O.photoset||(d=!0)),"image"==c||!d){var m=0;void 0!==i.albumID&&(m=i.albumID,!0);var p=void 0===i.tags?"":i.tags,g=NGY2Item.New(n,l.split("_").join(" "),u,h,m,c,p);g.setMediaURL(r,"img"),void 0!==i.dcGIF&&(g.imageDominantColors="data:image/gif;base64,"+i.dcGIF),void 0!==i.dc&&""!==i.dc&&(g.imageDominantColor=i.dc),"album"==c?g.numberItems=i.cnt:(g.imageWidth=i.imgWidth,g.imageHeight=i.imgHeight),""!=i.originalURL&&(g.downloadURL=o+a(i.originalURL));for(var f=n.GOM.curNavLevel,b=["xs","sm","me","la","xl"],v=0;v0&&(d="&max-results="+n.galleryMaxItems.Get());var m="";"undefined"!=typeof ngy2_pwa_at&&(m=ngy2_pwa_at),0==e?(s=""!=m?"https://photoslibrary.googleapis.com/v1/albums":n.O.google2URL+"?nguserid="+n.O.userID+"&alt=json&v=3&kind=album"+d+"&rnd="+(new Date).getTime(),u="album"):s=""!=m?"https://photoslibrary.googleapis.com/v1/mediaItems:search":n.O.google2URL+"?nguserid="+n.O.userID+"&ngalbumid="+e+"&alt=json&v=3&kind=photo&"+d,n.O.debugMode&&console.log("Google Photos URL: "+s),r(!0),jQuery.ajaxSetup({cache:!1}),jQuery.support.cors=!0;try{var p=setTimeout((function(){r(!1),l("Could not retrieve AJAX data...")}),6e4);jQuery.getJSON(s+"&callback=?",(function(s){if("error"==s.nano_status)return clearTimeout(p),r(!1),void l(n,"Could not retrieve Google data. Error: "+s.nano_message);clearTimeout(p),r(!1),a(c,u,s),h(e),null!=t&&t(i,o,null)})).fail((function(e,t,i){clearTimeout(p),r(!1);var a="";for(var o in e)a+=o+"="+e[o]+"
";l(n,"Could not retrieve Google data. Error: "+(t+", "+i+" "+a+"
URL:"+s))}))}catch(e){l(n,"Could not retrieve Google data. Error: "+e)}};function a(e,t,i){n.O.debugMode&&(console.log("Google Photos data:"),console.dir(i));var a=n.I[e].GetID();jQuery.each(i,(function(e,i){if("object"==typeof i&&null!==i){var r="",l="";"image"==t?(void 0!==i.description&&(r=i.description),""!=n.O.thumbnailLabel.get("title")&&(l=u(i.filename))):l=i.title,null==l&&(l="");var h=i.id;if("album"==t&&(!c(l,h)||null==i.coverPhotoBaseUrl))return!0;var d=NGY2Item.New(n,l,r,h,a,t,""),m=0,p=0,g="";"image"==t?(g=i.baseUrl,n.O.viewerZoom||null==n.O.viewerZoom?g+="=h"+i.mediaMetadata.height+"-w"+i.mediaMetadata.width:window.screen.width>window.screen.height?g+="=w"+window.screen.width:g=s+"=h"+window.screen.height,d.setMediaURL(g,"img"),void 0!==i.mediaMetadata.width&&(d.imageWidth=parseInt(i.mediaMetadata.width),m=d.imageWidth),void 0!==i.mediaMetadata.height&&(d.imageHeight=parseInt(i.mediaMetadata.height),p=d.imageHeight),void 0!==i.mediaMetadata.photo&&(null!=i.mediaMetadata.photo.exposureTime&&(d.exif.exposure=i.mediaMetadata.photo.exposureTime),null!=i.mediaMetadata.photo.focalLength&&(d.exif.focallength=i.mediaMetadata.photo.focalLength),null!=i.mediaMetadata.photo.apertureFNumber&&(d.exif.fstop=i.mediaMetadata.photo.apertureFNumber),null!=i.mediaMetadata.photo.isoEquivalent&&(d.exif.iso=i.mediaMetadata.photo.isoEquivalent),null!=i.mediaMetadata.photo.cameraModel&&(d.exif.model=i.mediaMetadata.photo.cameraModel)),void 0!==i.mediaMetadata.video&&(null!=i.mediaMetadata.video.cameraModel&&(d.exif.model=i.mediaMetadata.video.cameraModel),d.downloadURL=i.baseUrl+"=dv")):d.numberItems=i.mediaItemsCount,d.thumbs=o("l1",d.thumbs,i,t,p,m),d.thumbs=o("lN",d.thumbs,i,t,p,m);var f=n.O.fnProcessData;null!==f&&("function"==typeof f?f(d,"google2",i):window[f](d,"google2",i))}})),n.I[e].contentIsLoaded=!0}function o(e,t,i,a,o,r){for(var l=["xs","sm","me","la","xl"],s=0;sd?b(i,d+1):(clearTimeout(g),c(!1),f=u(f,n.O.tagBlockList),"album"==m?r(s,e,f):o(s,e,f),p(e),null!=t&&t(a,l,null))})).fail((function(e,t,i){clearTimeout(g),c(!1),h(n,"Could not retrieve Flickr ajax data: "+t+", "+i)}))};b(d,1)};function o(e,t,a){n.O.debugMode&&(console.log("Flickr parse photos:"),console.dir(a)),jQuery.each(a,(function(e,a){var o=a.id,r=a.url_sq,s=a.title;""!=n.O.thumbnailLabel.get("title")&&(s=d(r));var u=a.description._content,c=75,h=75,m=i.photoAvailableSizesStr.length-1;n.O.flickrSkipOriginal&&m--;for(e=m;e>=0;e--)if(null!=a["url_"+i.photoAvailableSizesStr[e]]){r=a["url_"+i.photoAvailableSizesStr[e]],c=parseInt(a["width_"+i.photoAvailableSizesStr[e]]),h=parseInt(a["height_"+i.photoAvailableSizesStr[e]]);break}var p={};for(var g in a)0!=g.indexOf("height_")&&0!=g.indexOf("width_")&&0!=g.indexOf("url_")||(p[g]=a[g]);var f=void 0!==a.tags?a.tags:"",b=NGY2Item.New(n,s,u,o,t,"image",f);b.setMediaURL(r,"img"),b.imageWidth=c,b.imageHeight=h;var v={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};v=l(v,a,"l1"),v=l(v,a,"lN"),b.thumbs=v;var O=n.O.fnProcessData;null!==O&&("function"==typeof O?O(b,"flickr",a):window[O](b,"flickr",a))})),n.I[e].contentIsLoaded=!0}function r(e,t,i){n.O.debugMode&&(console.log("Flickr parse list of albums:"),console.dir(i)),jQuery.each(i,(function(e,i){var a=i.title._content;if(0==i.visibility_can_see_set)return!0;if(m(a,i.id)){var o=i.id,r=null!=i.description._content?i.description._content:"",s={};for(var u in i.primary_photo_extras)s[u]=i.primary_photo_extras[u];var c="";void 0!==i.primary_photo_extras&&void 0!==i.primary_photo_extras.tags&&(c=i.primary_photo_extras.tags);var h=NGY2Item.New(n,a,r,o,t,"album",c);h.numberItems=i.photos,h.thumbSizes=s;var d={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};d=l(d,i.primary_photo_extras,"l1"),d=l(d,i.primary_photo_extras,"lN"),h.thumbs=d;var p=n.O.fnProcessData;null!==p&&("function"==typeof p?p(h,"flickr",i):window[p](h,"flickr",i))}})),n.I[e].contentIsLoaded=!0}function l(e,t,i){var a=1;!0===n.tn.opt[i].crop&&(a=n.O.thumbnailCropScaleFactor);for(var o=["xs","sm","me","la","xl"],r=0;rn.tn.settings.height[i][o[r]]&&(l="width_",u=Math.ceil(n.tn.settings.width[i][o[r]]*n.tn.scale*a*n.tn.settings.mosaic[i+"Factor"].w[o[r]]));let c=s(l,u,t);e.url[i][o[r]]=c.url,e.width[i][o[r]]=c.width,e.height[i][o[r]]=c.height}return e}function s(e,t,n){for(var a={url:"",width:0,height:0},o=0,r=0;r=t))break}var s=i.photoAvailableSizesStr[o];return a.url=n["url_"+s],a.width=parseInt(n["width_"+s]),a.height=parseInt(n["height_"+s]),a}var u=function(e,t){return""!=t&&null!=e&&(e=e.filter((function(e){var n=new RegExp(t,"i"),i=[e.tags];return Array.isArray(e.tags)&&(i=e.tags),!i.some((function(e){return n.test(e)}))}))),e};var c=NGY2Tools.PreloaderDisplay.bind(n),h=NGY2Tools.NanoAlert,d=NGY2Tools.GetImageTitleFromURL.bind(n),m=NGY2Tools.FilterAlbumName.bind(n),p=NGY2Tools.AlbumPostProcess.bind(n);switch(t){case"AlbumGetContent":var g=arguments[2],f=arguments[3],b=arguments[4],v=arguments[5];a(g,f,b,v)}}}));