summaryrefslogtreecommitdiffstats
path: root/js/photos-main.js
blob: d8b1f0569659b6b2570b4f8bf6fd69bab4cf9a7e (plain)
1
2
3
/*! For license information please see photos-main.js.LICENSE.txt */
(()=>{var e={22200:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRequestToken",{enumerable:!0,get:function(){return r.getRequestToken}}),Object.defineProperty(e,"onRequestTokenUpdate",{enumerable:!0,get:function(){return r.onRequestTokenUpdate}}),Object.defineProperty(e,"getCurrentUser",{enumerable:!0,get:function(){return i.getCurrentUser}});var r=n(71894),i=n(31618)},71894:(t,e,n)=>{"use strict";var r=n(25108);n(89554),Object.defineProperty(e,"__esModule",{value:!0}),e.getRequestToken=function(){return o},e.onRequestTokenUpdate=function(t){s.push(t)};var i=n(74854),a=document.getElementsByTagName("head")[0],o=a?a.getAttribute("data-requesttoken"):null,s=[];(0,i.subscribe)("csrf-token-update",(function(t){o=t.token,s.forEach((function(e){try{e(t.token)}catch(t){r.error("error updating CSRF token observer",t)}}))}))},31618:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCurrentUser=function(){if(null===r)return null;return{uid:r,displayName:a,isAdmin:o}};var n=document.getElementsByTagName("head")[0],r=n?n.getAttribute("data-user"):null,i=document.getElementsByTagName("head")[0],a=i?i.getAttribute("data-user-displayname"):null,o="undefined"!=typeof OC&&OC.isUserAdmin()},4820:(t,e,n)=>{"use strict";n(19601),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(9669))&&r.__esModule?r:{default:r},a=n(22200);var o=i.default.create({headers:{requesttoken:(0,a.getRequestToken)()}}),s=Object.assign(o,{CancelToken:i.default.CancelToken,isCancel:i.default.isCancel});(0,a.onRequestTokenUpdate)((function(t){return o.defaults.headers.requesttoken=t}));var u=s;e.default=u},42515:(t,e,n)=>{"use strict";var r=n(25108);Object.defineProperty(e,"__esModule",{value:!0}),e.getCapabilities=function(){try{return(0,i.loadState)("core","capabilities")}catch(t){return r.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}};var i=n(16453)},16453:(t,e,n)=>{"use strict";n(92222),Object.defineProperty(e,"__esModule",{value:!0}),e.loadState=function(t,e,n){var r=document.querySelector("#initial-state-".concat(t,"-").concat(e));if(null===r){if(void 0!==n)return n;throw new Error("Could not find initial state ".concat(e," of ").concat(t))}try{return JSON.parse(atob(r.value))}catch(n){throw new Error("Could not parse initial state ".concat(e," of ").concat(t))}}},23955:(t,e,n)=>{"use strict";n(41539),n(74916),n(39714),n(15306),Object.defineProperty(e,"__esModule",{value:!0}),e.getGettextBuilder=function(){return new l};var r,i=(r=n(57699))&&r.__esModule?r:{default:r},a=n(9944);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}var l=function(){function t(){o(this,t),this.translations={},this.debug=!1}return u(t,[{key:"setLanguage",value:function(t){return this.locale=t,this}},{key:"detectLocale",value:function(){return this.setLanguage((0,a.getLanguage)().replace("-","_"))}},{key:"addTranslation",value:function(t,e){return this.translations[t]=e,this}},{key:"enableDebugMode",value:function(){return this.debug=!0,this}},{key:"build",value:function(){return new c(this.locale||"en",this.translations,this.debug)}}]),t}(),c=function(){function t(e,n,r){for(var a in o(this,t),this.gt=new i.default({debug:r,sourceLocale:"en"}),n)this.gt.addTranslations(a,"messages",n[a]);this.gt.setLocale(e)}return u(t,[{key:"subtitudePlaceholders",value:function(t,e){return t.replace(/{([^{}]*)}/g,(function(t,n){var r=e[n];return"string"==typeof r||"number"==typeof r?r.toString():t}))}},{key:"gettext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.subtitudePlaceholders(this.gt.gettext(t),e)}},{key:"ngettext",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.subtitudePlaceholders(this.gt.ngettext(t,e,n).replace(/%n/g,n.toString()),r)}}]),t}()},9944:(t,e,n)=>{"use strict";var r=n(25108);function i(){return"undefined"==typeof OC?(r.warn("No OC found"),"en"):OC.getLocale()}n(74916),n(15306),Object.defineProperty(e,"__esModule",{value:!0}),e.getLocale=i,e.getCanonicalLocale=function(){return i().replace(/_/g,"-")},e.getLanguage=function(){if("undefined"==typeof OC)return r.warn("No OC found"),"en";return OC.getLanguage()},e.translate=function(t,e,n,i,a){if("undefined"==typeof OC)return r.warn("No OC found"),e;return OC.L10N.translate(t,e,n,i,a)},e.translatePlural=function(t,e,n,i,a,o){if("undefined"==typeof OC)return r.warn("No OC found"),e;return OC.L10N.translatePlural(t,e,n,i,a,o)},e.getFirstDay=function(){if(void 0===window.firstDay)return r.warn("No firstDay found"),1;return window.firstDay},e.getDayNames=function(){if(void 0===window.dayNames)return r.warn("No dayNames found"),["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];return window.dayNames},e.getDayNamesShort=function(){if(void 0===window.dayNamesShort)return r.warn("No dayNamesShort found"),["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."];return window.dayNamesShort},e.getDayNamesMin=function(){if(void 0===window.dayNamesMin)return r.warn("No dayNamesMin found"),["Su","Mo","Tu","We"<