function_taggedTemplateLiteral(e,t){returnObject.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}functiongup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");vart="[\\?&]"+e+"=([^&#]*)",n=newRegExp(t),o=n.exec(window.location.href);returnnull===o?"":o[1]}!function(e,t){"use strict";"object"==typeofmodule&&"object"==typeofmodule.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)thrownewError("jQuery requires a window with a document");returnt(e)}:t(e)}("undefined"!=typeofwindow?window:this,function(e,t){"use strict";functionn(e,t){t=t||J;varn=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}functiono(e){vart=!!e&&"length"ine&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeoft&&t>0&&t-1ine)}functioni(e,t,n){if(pe.isFunction(t))returnpe.grep(e,function(e,o){return!!t.call(e,o,e)!==n});if(t.nodeType)returnpe.grep(e,function(e){returne===t!==n});if("string"==typeoft){if(je.test(t))returnpe.filter(t,e,n);t=pe.filter(t,e)}returnpe.grep(e,function(e){returnie.call(t,e)>-1!==n&&1===e.nodeType})}functiona(e,t){for(;(e=e[t])&&1!==e.nodeType;);returne}functionr(e){vart={};returnpe.each(e.match($e)||[],function(e,n){t[n]=!0}),t}functionl(e){returne}functions(e){throwe}functionc(e,t,n){varo;try{e&&pe.isFunction(o=e.promise)?o.call(e).done(t).fail(n):e&&pe.isFunction(o=e.then)?o.call(e,t,n):t.call(void0,e)}catch(e){n.call(void0,e)}}functionu(){J.removeEventListener("DOMContentLoaded",u),e.removeEventListener("load",u),pe.ready()}functiond(){this.expando=pe.expando+d.uid++}functionp(e,t,n){varo;if(void0===n&&1===e.nodeType)if(o="data-"+t.replace(Oe,"-$&").toLowerCase(),n=e.getAttribute(o),"string"==typeofn){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ie.test(n)?JSON.parse(n):n)}catch(e){}Pe.set(e,t,n)}elsen=void0;returnn}functionh(e,t,n,o){vari,a=1,r=20,l=o?function(){returno.cur()}:function(){returnpe.css(e,t,"")},s=l(),c=n&&n[3]||(pe.cssNumber[t]?"":"px"),u=(pe.cssNumber[t]||"px"!==c&&+s)&&qe.exec(pe.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+s||1;doa=a||".5",u/=a,pe.style(e,t,u+c);while(a!==(a=l()/s)&&1!==a&&--r)}returnn&&(u=+u||+s||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=i)),i}functionf(e){vart,n=e.ownerDocument,o=e.nodeName,i=Ue[o];returni?i:(t=n.body.appendChild(n.createElement(o)),i=pe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ue[o]=i,i)}functionb(e,t){for(varn,o,i=[],a=0,r=e.length;a<r;a++)o=e[a],o.style&&(n=o.style.display,t?("none"===n&&(i[a]=Le.get(o,"display")||null,i[a]||(o.style.display="")),""===o.style.display&&Re(o)&&(i[a]=f(o))):"none"!==n&&(i[a]="none",Le.set(o,"display",n)));for(a=0;a<r;a++)null!=i[a]&&(e[a].style.display=i[a]);returne}functionm(e,t){varn="undefined"!=typeofe.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeofe.querySelectorAll?e.querySelectorAll(t||"*"):[];returnvoid0===t||t&&pe.nodeName(e,t)?pe.merge([e],n):n}functiong(e,t){for(varn=0,o=e.length;n<o;n++)Le.set(e[n],"globalEval",!t||Le.get(t[n],"globalEval"))}functionv(e,t,n,o,i){for(vara,r,l,s,c,u,d=t.createDocumentFragment(),p=[],h=0,f=e.length;h<f;h++)if(a=e[h],a||0===a)if("object"===pe.type(a))pe.merge(p,a.nodeType?[a]:a);elseif(Ye.test(a)){for(r=r||d.appendChild(t.createElement("div")),l=(We.exec(a)||["",""])[1].toLowerCase(),s=ze[l]||ze._default,r.innerHTML=s[1]+pe.htmlPrefilter(a)+s[2],u=s[0];u--;)r=r.lastChild;pe.merge(p,r.childNodes),r=d.firstChild,r.textContent=""}elsep.push(t.createTextNode(a));for(d.textContent="",h=0;a=p[h++];)if(o&&pe.inArray(a,o)>-1)i&&i.push(a);elseif(c=pe.contains(a.ownerDocument,a),r=m(d.appendChild(a),"script"),c&&g(r),n)for(u=0;a=r[u++];)Xe.test(a.type||"")&&n.push(a);returnd}functiony(){return!0}functionw(){return!1}functionx(){try{returnJ.activeElement}catch(e){}}functionj(e,t,n,o,i,a){varr,l;if("object"==typeoft){"string"!=typeofn&&(o=o||n,n=void0);for(lint)j(e,l,n,o,t[l],a);returne}if(null==o&&null==i?(i=n,o=n=void
view.album.content.title(e)});varo={photoIDs:e.join(),title:n};api.post("Photo::setTitle",o,function(e){e!==!0&&lychee.error(null,o,e)})},i=lychee.html(_templateObject3,t);n=1===e.length?lychee.html(_templateObject29,i):lychee.html(_templateObject30,e.length,i),basicModal.show({body:n,buttons:{action:{title:"Set title",fn:o},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.setAlbum=function(e,t){varn=null,o=null;if(!e)return!1;einstanceofArray==!1&&(e=[e]),e.forEach(function(e,t,i){""===album.json.content[e].nextPhoto&&""===album.json.content[e].previousPhoto||(n=album.json.content[e].nextPhoto,o=album.json.content[e].previousPhoto,album.json.content[o].nextPhoto=n,album.json.content[n].previousPhoto=o),deletealbum.json.content[e],view.album.content.delete(e)}),albums.refresh(),visible.photo()&&null!=n&&n!==photo.getID()?lychee.goto(album.getID()+"/"+n):visible.albums()||lychee.goto(album.getID());vari={photoIDs:e.join(),albumID:t};api.post("Photo::setAlbum",i,function(e){e!==!0&&lychee.error(null,i,e)})},photo.setStar=function(e){if(!e)return!1;visible.photo()&&(photo.json.star="0"===photo.json.star?"1":"0",view.photo.star()),e.forEach(function(e,t,n){album.json.content[e].star="0"===album.json.content[e].star?"1":"0",view.album.content.star(e)}),albums.refresh();vart={photoIDs:e.join()};api.post("Photo::setStar",t,function(e){e!==!0&&lychee.error(null,t,e)})},photo.setPublic=function(e,t){if("2"===photo.json.public){varn=function(){basicModal.close(),lychee.goto(photo.json.original_album)};returnbasicModal.show({body:"<p>This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.</p>",buttons:{action:{title:"Show Album",fn:n},cancel:{title:"Cancel",fn:basicModal.close}}}),!1}visible.photo()&&(photo.json.public="0"===photo.json.public?"1":"0",view.photo.public(),"1"===photo.json.public&&contextMenu.sharePhoto(e,t)),album.json.content[e].public="0"===album.json.content[e].public?"1":"0",view.album.content.public(e),albums.refresh(),api.post("Photo::setPublic",{photoID:e},function(e){e!==!0&&lychee.error(null,params,e)})},photo.setDescription=function(e){vart=photo.json.description,n=function(t){basicModal.close();varn=t.description;visible.photo()&&(photo.json.description=n,view.photo.description());varo={photoID:e,description:n};api.post("Photo::setDescription",o,function(e){e!==!0&&lychee.error(null,o,e)})};basicModal.show({body:lychee.html(_templateObject31,t),buttons:{action:{title:"Set Description",fn:n},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.editTags=function(e){vart="",n="";if(!e)return!1;einstanceofArray==!1&&(e=[e]),visible.photo()?t=photo.json.tags:visible.album()&&1===e.length?t=album.json.content[e].tags:visible.search()&&1===e.length?t=album.json.content[e].tags:visible.album()&&e.length>1&&!function(){varn=!0;e.forEach(function(t,o,i){n=album.json.content[t].tags===album.json.content[e[0]].tags&&n===!0}),n===!0&&(t=album.json.content[e[0]].tags)}(),t=t.replace(/,/g,", ");varo=function(t){basicModal.close(),photo.setTags(e,t.tags)},i=lychee.html(_templateObject32,t);n=1===e.length?lychee.html(_templateObject33,i):lychee.html(_templateObject34,e.length,i),basicModal.show({body:n,buttons:{action:{title:"Set Tags",fn:o},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.setTags=function(e,t){if(!e)return!1;einstanceofArray==!1&&(e=[e]),t=t.replace(/(\ ,\ )|(\ ,)|(,\ )|(,{1,}\ {0,})|(,$|^,)/g,","),t=t.replace(/,$|^,|(\ ){0,}$/g,""),visible.photo()&&(photo.json.tags=t,view.photo.tags()),e.forEach(function(e,n,o){album.json.content[e].tags=t});varn={photoIDs:e.join(),tags:t};api.post("Photo::setTags",n,function(e){e!==!0&&lychee.error(null,n,e)})},photo.deleteTag=function(e,t){varn=void0;n=photo.json.tags.split(","),n.splice(t,1),photo.json.tags=n.toString(),photo.setTags([e],photo.json.tags)},photo.share=function(e,t){varn=photo.getViewLink(e);switch(t){case"twitter":window.open("https://twitter.com/share?url="+encodeURI(n));break;case"facebook":window.open("http://www.facebook.com/sharer.php?u="+encodeU