diff options
author | Louis <louis@chmn.me> | 2023-11-02 11:05:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 11:05:04 +0100 |
commit | f0c84461e4dc0239c2c0d62eb81bd179aae660a1 (patch) | |
tree | 57e1f743577aee7b8bb940e161e080f37a8c717b | |
parent | 1fc535357fc29f3d14b1d669b38fd573c97892dd (diff) | |
parent | 532a459dbb906a9cacf199a01e46d78eb2d40cd9 (diff) |
Merge pull request #2084 from nextcloud/automated/noid/stable27-fix-npm-audit
[stable27] Fix npm audit
51 files changed, 217 insertions, 209 deletions
diff --git a/js/photos-main.js b/js/photos-main.js index dce6f5ee..9718b559 100644 --- a/js/photos-main.js +++ b/js/photos-main.js @@ -1,3 +1,3 @@ /*! For license information please see photos-main.js.LICENSE.txt */ -(()=>{var e,n,r={90478:(e,t,n)=>{"use strict";var r=n(50791),a=Object.prototype.hasOwnProperty,i={align:"text-align",valign:"vertical-align",height:"height",width:"width"};function o(e){var t;if("tr"===e.tagName||"td"===e.tagName||"th"===e.tagName)for(t in i)a.call(i,t)&&void 0!==e.properties[t]&&(s(e,i[t],e.properties[t]),delete e.properties[t])}function s(e,t,n){var r=(e.properties.style||"").trim();r&&!/;\s*/.test(r)&&(r+=";"),r&&(r+=" ");var a=r+t+": "+n+";";e.properties.style=a}e.exports=function(e){return r(e,"element",o),e}},93790:e=>{"use strict";function t(e){if("string"==typeof e)return function(e){return t;function t(t){return Boolean(t&&t.type===e)}}(e);if(null==e)return a;if("object"==typeof e)return("length"in e?r:n)(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function n(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function r(e){var n=function(e){for(var n=[],r=e.length,a=-1;++a<r;)n[a]=t(e[a]);return n}(e),r=n.length;return function(){var e=-1;for(;++e<r;)if(n[e].apply(this,arguments))return!0;return!1}}function a(){return!0}e.exports=t},11150:(e,t,n)=>{"use strict";e.exports=s;var r=n(93790),a=!0,i="skip",o=!1;function s(e,t,n,a){var s;function u(e,r,c){var d,f=[];return(t&&!s(e,r,c[c.length-1]||null)||(f=l(n(e,c)))[0]!==o)&&e.children&&f[0]!==i?(d=l(function(e,t){var n,r=-1,i=a?-1:1,s=(a?e.length:r)+i;for(;s>r&&s<e.length;){if((n=u(e[s],s,t))[0]===o)return n;s="number"==typeof n[1]?n[1]:s+i}}(e.children,c.concat(e))),d[0]===o?d:f):f}"function"==typeof t&&"function"!=typeof n&&(a=n,n=t,t=null),s=r(t),u(e,null,[])}function l(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[a,e]:[e]}s.CONTINUE=a,s.SKIP=i,s.EXIT=o},50791:(e,t,n)=>{"use strict";e.exports=s;var r=n(11150),a=r.CONTINUE,i=r.SKIP,o=r.EXIT;function s(e,t,n,a){"function"==typeof t&&"function"!=typeof n&&(a=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],a=r?r.children.indexOf(e):null;return n(e,a,r)}),a)}s.CONTINUE=a,s.SKIP=i,s.EXIT=o},45994:(e,t,n)=>{"use strict";n.d(t,{IH:()=>l,_S:()=>u,ts:()=>m});var r=n(78595),a=n(25108);const i=document.getElementsByTagName("head")[0];let o=i?i.getAttribute("data-requesttoken"):null;const s=[];function l(){return o}function u(e){s.push(e)}(0,r.Ld)("csrf-token-update",(e=>{o=e.token,s.forEach((t=>{try{t(e.token)}catch(e){a.error("error updating CSRF token observer",e)}}))}));const c=(e,t)=>e?e.getAttribute(t):null,d=document.getElementsByTagName("head")[0],f=c(d,"data-user"),p=c(d,"data-user-displayname"),h="undefined"!=typeof OC&&OC.isUserAdmin();function m(){return null===f?null:{uid:f,displayName:p,isAdmin:h}}},22200:(e,t,n)=>{"use strict";var r=n(25108);Object.defineProperty(t,"__esModule",{value:!0});var a=n(74854),i=document.getElementsByTagName("head")[0],o=i?i.getAttribute("data-requesttoken"):null,s=[];a.subscribe("csrf-token-update",(function(e){o=e.token,s.forEach((function(t){try{t(e.token)}catch(e){r.error("error updating CSRF token observer",e)}}))}));var l=function(e,t){return e?e.getAttribute(t):null},u=document.getElementsByTagName("head")[0],c=l(u,"data-user"),d=l(u,"data-user-displayname"),f="undefined"!=typeof OC&&OC.isUserAdmin();t.getCurrentUser=function(){return null===c?null:{uid:c,displayName:d,isAdmin:f}},t.getRequestToken=function(){return o},t.onRequestTokenUpdate=function(e){s.push(e)}},26937:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(9669),a=n.n(r),i=n(45994),o=n(79753),s=n(25108);const l=Symbol("csrf-retry"),u=Symbol("retryDelay"),c=a().create({headers:{requesttoken:(0,i.IH)()??""}}),d=Object.assign(c,{CancelToken:a().CancelToken,isCancel:a().isCancel});var f;d.interceptors.response.use((e=>e),(f=d,async e=>{const{config:t,response:n,request:{responseURL:r}}=e,{status:a}=n;if(412===a&&"CSRF check failed"===n?.data?.message&&void 0===t[l]){s.warn(`Request to ${r} failed because of a CSRF mismatch. Fetching a new token`);const{data:{token:e}}=await f.get((0,o.generateUrl)("/csrftoken"));return s.debug(`New request token ${e} fetched`),f.defaults.headers.requesttoken=e,f({...t,headers:{...t.headers,requesttoken:e},[l]:!0})}return Promise.reject(e)})),d.interceptors.response.use((e=>e),(e=>async t=>{const{config:n,response:r,request:{responseURL:a}}=t,{status:i,headers:o}=r;if(503===i&&"1"===o["x-nextcloud-maintenance-mode"]&&n.retryIfMaintenanceMode&&(!n[u]||n[u]<=32)){const t=2*(n[u]??1);return s.warn(`Request to ${a} failed because of maintenance mode. Retrying in ${t}s`),await new Promise(((e,n)=>{setTimeout(e,1e3*t)})),e({...n,[u]:t})}return Promise.reject(t)})(d)),(0,i._S)((e=>c.defaults.headers.requesttoken=e))},4820:(e,t,n)=>{"use strict";var r=n(25108),a=n(9669),i=n(22200),o=n(79753);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(a),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},u.apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var f,p,h=Symbol("csrf-retry"),m=Symbol("retryDelay"),g=l.default.create({headers:{requesttoken:null!==(f=i.getRequestToken())&&void 0!==f?f:""}}),_=Object.assign(g,{CancelToken:l.default.CancelToken,isCancel:l.default.isCancel});_.interceptors.response.use((function(e){return e}),(p=_,function(e){return c(void 0,void 0,void 0,(function(){var t,n,a,i,s,l;return d(this,(function(c){switch(c.label){case 0:return t=e.config,n=e.response,a=e.request.responseURL,412!==n.status||"CSRF check failed"!==(null===(l=null==n?void 0:n.data)||void 0===l?void 0:l.message)||void 0!==t[h]?[3,2]:(r.warn("Request to ".concat(a," failed because of a CSRF mismatch. Fetching a new token")),[4,p.get(o.generateUrl("/csrftoken"))]);case 1:return i=c.sent().data.token,r.debug("New request token ".concat(i," fetched")),p.defaults.headers.requesttoken=i,[2,p(u(u({},t),(s={headers:u(u({},t.headers),{requesttoken:i})},s[h]=!0,s)))];case 2:return[2,Promise.reject(e)]}}))}))})),_.interceptors.response.use((function(e){return e}),function(e){return function(t){return c(void 0,void 0,void 0,(function(){var n,a,i,o,s,l,c,f;return d(this,(function(d){switch(d.label){case 0:return n=t.config,a=t.response,i=t.request.responseURL,o=a.status,s=a.headers,503===o&&"1"===s["x-nextcloud-maintenance-mode"]&&n.retryIfMaintenanceMode&&(!n[m]||n[m]<=32)?(l=2*(null!==(f=n[m])&&void 0!==f?f:1),r.warn("Request to ".concat(i," failed because of maintenance mode. Retrying in ").concat(l,"s")),[4,new Promise((function(e,t){setTimeout(e,1e3*l)}))]):[3,2];case 1:return d.sent(),[2,e(u(u({},n),(c={},c[m]=l,c)))];case 2:return[2,Promise.reject(t)]}}))}))}}(_)),i.onRequestTokenUpdate((function(e){return g.defaults.headers.requesttoken=e})),e.exports=_},62556:(e,t,n)=>{"use strict";n(69070),Object.defineProperty(t,"__esModule",{value:!0}),t.clearAll=function(){[window.sessionStorage,window.localStorage].map((function(e){return o(e)}))},t.clearNonPersistent=function(){[window.sessionStorage,window.localStorage].map((function(e){return o(e,(function(e){return!e.startsWith(a.default.GLOBAL_SCOPE_PERSISTENT)}))}))},t.getBuilder=function(e){return new r.default(e)},n(21249),n(57327),n(41539),n(47941),n(23157);var r=i(n(71957)),a=i(n(48971));function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){Object.keys(e).filter((function(e){return!t||t(e)})).map(e.removeItem.bind(e))}},48971:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222),n(21249),n(57327),n(41539),n(47941),n(23157),n(69070);var i=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"scope",void 0),a(this,"wrapped",void 0),this.scope="".concat(r?e.GLOBAL_SCOPE_PERSISTENT:e.GLOBAL_SCOPE_VOLATILE,"_").concat(btoa(t),"_"),this.wrapped=n}var t,n,i;return t=e,(n=[{key:"scopeKey",value:function(e){return"".concat(this.scope).concat(e)}},{key:"setItem",value:function(e,t){this.wrapped.setItem(this.scopeKey(e),t)}},{key:"getItem",value:function(e){return this.wrapped.getItem(this.scopeKey(e))}},{key:"removeItem",value:function(e){this.wrapped.removeItem(this.scopeKey(e))}},{key:"clear",value:function(){var e=this;Object.keys(this.wrapped).filter((function(t){return t.startsWith(e.scope)})).map(this.wrapped.removeItem.bind(this.wrapped))}}])&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i,a(i,"GLOBAL_SCOPE_VOLATILE","nextcloud_vol"),a(i,"GLOBAL_SCOPE_PERSISTENT","nextcloud_per")},71957:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(69070);var r,a=(r=n(48971))&&r.__esModule?r:{default:r};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"appId",void 0),o(this,"persisted",!1),o(this,"clearedOnLogout",!1),this.appId=t}var t,n,r;return t=e,n=[{key:"persist",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.persisted=e,this}},{key:"clearOnLogout",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clearedOnLogout=e,this}},{key:"build",value:function(){return new a.default(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}],n&&i(t.prototype,n),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=s},42515:(e,t,n)=>{"use strict";var r=n(25108);Object.defineProperty(t,"__esModule",{value:!0}),t.getCapabilities=function(){try{return(0,a.loadState)("core","capabilities")}catch(e){return r.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}};var a=n(20853)},20853:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadState=function(e,t,n){var r=document.querySelector("#initial-state-".concat(e,"-").concat(t));if(null===r){if(void 0!==n)return n;throw new Error("Could not find initial state ".concat(t," of ").concat(e))}try{return JSON.parse(atob(r.value))}catch(n){throw new Error("Could not parse initial state ".concat(t," of ").concat(e))}},n(92222)},82880:(e,t,n)=>{"use strict";n.d(t,{fn:()=>Gl,x2:()=>bh});var r=n(34155),a=n(25108);!function(){const e={TRANSLATIONS:[{locale:"ar",json:{charset:"utf-8",headers:{"Last-Translator":"S1 SYSTEMS | BP <info@s1.sa>, 2020","Language-Team":"Arabic (https://www.transifex.com/nextcloud/teams/64236/ar/)","Content-Type":"text/plain; charset=UTF-8",Language:"ar","Plural-Forms":"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"},translations:{"":{"":{msgid:"",comments:{translator:"\nTranslators:\nS1 SYSTEMS | BP <info@s1.sa>, 2020\n"},msgstr:["Last-Translator: S1 SYSTEMS | BP <info@s1.sa>, 2020\nLanguage-Team: Arabic (https://www.transifex.com/nextcloud/teams/64236/ar/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: ar\nPlural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"]},Undo:{msgid:"Undo",comments:{reference:"lib/toast.ts:191"},msgstr:["تراجع"]}}}}},{locale:"ast",json:{charset:"utf-8",headers:{"Last-Translator":"enolp <enolp@softastur.org>, 2020","Language-Team":"Asturian (https://www.transifex.com/nextcloud/teams/64236/ast/)","Content-Type":"text/plain; charset=UTF-8",Language:"ast","Plura |