/*! For license information please see files-init.js.LICENSE.txt */ !function(){var t,e,r,n={6691:function(t,e,r){"use strict";var n=r(69183),o=r(5656),i=r(31352),a=r(93664),u=(0,r(17499).IY)().setApp("files").detectUser().build();function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new S(o||[]);return n(a,"_invoke",{value:L(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function v(){}function y(){}var g={};l(g,i,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(j([])));w&&w!==e&&r.call(w,i)&&(g=w);var b=y.prototype=p.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,a,u){var s=h(t[n],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==c(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(s.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function L(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function _(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){l(i,n,o,a,u,"next",t)}function u(t){l(i,n,o,a,u,"throw",t)}a(void 0)}))}}var h=new o.p$({id:"delete",displayName:function(t,e){return"trashbin"===e.id?(0,i.Iu)("files","Delete permanently"):(0,i.Iu)("files","Delete")},iconSvgInline:function(){return''},enabled:function(t){return t.length>0&&t.map((function(t){return t.permissions})).every((function(t){return 0!=(t&o.y3.DELETE)}))},exec:function(t){return f(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.Z.delete(t.encodedSource);case 3:return(0,n.j8)("files:node:deleted",t),e.abrupt("return",!0);case 7:return e.prev=7,e.t0=e.catch(0),u.error("Error while deleting a file",{error:e.t0,source:t.source,node:t}),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})))()},execBatch:function(t,e,r){var n=this;return f(s().mark((function o(){return s().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",Promise.all(t.map((function(t){return n.exec(t,e,r)}))));case 1:case"end":return o.stop()}}),o)})))()},order:100}),d=r(79753);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function v(){v=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new S(o||[]);return n(a,"_invoke",{value:L(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function y(){}var g={};c(g,i,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(j([])));w&&w!==e&&r.call(w,i)&&(g=w);var b=y.prototype=h.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==p(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function L(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function _(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function y(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function g(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){y(i,n,o,a,u,"next",t)}function u(t){y(i,n,o,a,u,"throw",t)}a(void 0)}))}}var m=function(t){var e=document.createElement("a");e.download="",e.href=t,e.click()},w=function(t,e){var r=Math.random().toString(36).substring(2),n=(0,d.generateUrl)("/apps/files/ajax/download.php?dir={dir}&files={files}&downloadStartSecret={secret}",{dir:t,secret:r,files:JSON.stringify(e.map((function(t){return t.basename})))});m(n)},b=new o.p$({id:"download",displayName:function(){return(0,i.Iu)("files","Download")},iconSvgInline:function(){return''},enabled:function(t){return 0!==t.length&&(!t.some((function(t){return t.type===o.Tv.Folder}))||!t.some((function(t){var e;return!(null!==(e=t.root)&&void 0!==e&&e.startsWith("/files"))})))&&t.map((function(t){return t.permissions})).every((function(t){return 0!=(t&o.y3.READ)}))},exec:function(t,e,r){return g(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==o.Tv.Folder){e.next=3;break}return w(r,[t]),e.abrupt("return",null);case 3:return m(t.source),e.abrupt("return",null);case 5:case"end":return e.stop()}}),e)})))()},execBatch:function(t,e,r){var n=this;return g(v().mark((function o(){return v().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(1!==t.length){o.next=3;break}return n.exec(t[0],e,r),o.abrupt("return",[null]);case 3:return w(r,t),o.abrupt("return",new Array(t.length).fill(null));case 5:case"end":return o.stop()}}),o)})))()},order:30}),x=r(65358),E=r(77958),L=r(64024);function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function O(){O=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new S(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(j([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==_(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function N(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function S(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){N(i,n,o,a,u,"next",t)}function u(t){N(i,n,o,a,u,"throw",t)}a(void 0)}))}}var j=function(){var t=S(O().mark((function t(e){var r,n,o,u,c;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,d.generateOcsUrl)("apps/files/api/v1")+"/openlocaleditor?format=json",t.prev=1,t.next=4,a.Z.post(r,{path:e});case 4:o=t.sent,u=null===(n=(0,E.ts)())||void 0===n?void 0:n.uid,c="nc://open/".concat(u,"@")+window.location.host+(0,x.Ec)(e),c+="?token="+o.data.ocs.data.token,window.location.href=c,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),(0,L.x2)((0,i.Iu)("files","Failed to redirect to client"));case 14:case"end":return t.stop()}}),t,null,[[1,11]])})));return function(e){return t.apply(this,arguments)}}(),P=new o.p$({id:"edit-locally",displayName:function(){return(0,i.Iu)("files","Edit locally")},iconSvgInline:function(){return''},enabled:function(t){return 1===t.length&&0!=(t[0].permissions&o.y3.UPDATE)},exec:function(t){return S(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(t.path),e.abrupt("return",null);case 2:case"end":return e.stop()}}),e)})))()},order:25}),k=r(20144),T='';function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function A(){A=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==I(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function C(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function F(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){C(i,n,o,a,u,"next",t)}function u(t){C(i,n,o,a,u,"throw",t)}a(void 0)}))}}var G=function(t){return t.some((function(t){return 1!==t.attributes.favorite}))},D=function(){var t=F(A().mark((function t(e,r,o){var i,c;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=(0,d.generateUrl)("/apps/files/api/v1/files")+(0,x.Ec)(e.path),t.next=4,a.Z.post(i,{tags:o?[window.OC.TAG_FAVORITE]:[]});case 4:return"favorites"!==r.id||o||"/"!==e.dirname||(0,n.j8)("files:node:deleted",e),k.default.set(e.attributes,"favorite",o?1:0),o?(0,n.j8)("files:favorites:added",e):(0,n.j8)("files:favorites:removed",e),t.abrupt("return",!0);case 10:return t.prev=10,t.t0=t.catch(0),c=o?"adding a file to favourites":"removing a file from favourites",u.error("Error while "+c,{error:t.t0,source:e.source,node:e}),t.abrupt("return",!1);case 15:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),M=new o.p$({id:"favorite",displayName:function(t){return G(t)?(0,i.Iu)("files","Add to favorites"):(0,i.Iu)("files","Remove from favorites")},iconSvgInline:function(t){return G(t)?'':T},enabled:function(t){return!t.some((function(t){var e,r;return!(null!==(e=t.root)&&void 0!==e&&null!==(r=e.startsWith)&&void 0!==r&&r.call(e,"/files"))}))&&t.every((function(t){return t.permissions!==o.y3.NONE}))},exec:function(t,e){return F(A().mark((function r(){var n;return A().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=G([t]),r.next=3,D(t,e,n);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r)})))()},execBatch:function(t,e){return F(A().mark((function r(){var n;return A().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=G(t),r.abrupt("return",Promise.all(t.map(function(){var t=F(A().mark((function t(r){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D(r,e,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 2:case"end":return r.stop()}}),r)})))()},order:-50}),V=(r(32316),r(51120));const{Axios:R,AxiosError:$,CanceledError:H,isCancel:B,CancelToken:Y,VERSION:z,all:Z,Cancel:U,isAxiosError:q,spread:W,toFormData:X,AxiosHeaders:K,HttpStatusCode:J,formToJSON:Q,mergeConfig:tt}=V.default;var et,rt,nt=r(62520),ot={name:"FileMultipleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},it=r(51900),at=(0,it.Z)(ot,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-multiple-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M15,7H20.5L15,1.5V7M8,0H16L22,6V18A2,2 0 0,1 20,20H8C6.89,20 6,19.1 6,18V2A2,2 0 0,1 8,0M4,4V22H20V24H4A2,2 0 0,1 2,22V4H4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,ut=r(96384),ct={name:"FolderMoveIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},st=(0,it.Z)(ct,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon folder-move-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M14,18V15H10V11H14V8L19,13M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,lt=r(34945),ft=function(){return et||(et=new lt.Z({concurrency:3})),et};!function(t){t.MOVE="Move",t.COPY="Copy",t.MOVE_OR_COPY="move-or-copy"}(rt||(rt={}));var ht=function(t){return 0!=(t.reduce((function(t,e){return Math.min(t,e.permissions)}),o.y3.ALL)&o.y3.UPDATE)},dt=function(t){return function(t){return t.every((function(t){var e,r;return!JSON.parse(null!==(e=null===(r=t.attributes)||void 0===r?void 0:r["share-attributes"])&&void 0!==e?e:"[]").some((function(t){return"permissions"===t.scope&&!1===t.enabled&&"download"===t.key}))}))}(t)};function pt(t){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(t)}function vt(){vt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==pt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function yt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function gt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yt(i,n,o,a,u,"next",t)}function u(t){yt(i,n,o,a,u,"throw",t)}a(void 0)}))}}var mt=function(t){return ht(t)?dt(t)?rt.MOVE_OR_COPY:rt.MOVE:rt.COPY},wt=function(){var t=gt(vt().mark((function t(e,r,c){var s,l,f,h,p,v=arguments;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=v.length>3&&void 0!==v[3]&&v[3],r){t.next=3;break}return t.abrupt("return");case 3:if(r.type===o.Tv.Folder){t.next=5;break}throw new Error((0,i.Iu)("files","Destination is not a folder"));case 5:if(e.dirname!==r.path){t.next=7;break}throw new Error((0,i.Iu)("files","This file/folder is already in that directory"));case 7:if(!e.path.startsWith(r.path)){t.next=9;break}throw new Error((0,i.Iu)("files","You cannot move a file/folder onto itself or into a subfolder of itself"));case 9:return f=(0,nt.join)(r.path,e.basename),h=(0,d.generateRemoteUrl)(encodePath("dav/files/".concat(null===(s=(0,E.ts)())||void 0===s?void 0:s.uid).concat(f))),u.debug("".concat(c," ").concat(e.basename," to ").concat(h)),k.default.set(e,"status",o.e4.LOADING),p=ft(),t.next=16,p.add(gt(vt().mark((function t(){var r,o,u;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,a.Z)({method:c===rt.COPY?"COPY":"MOVE",url:e.encodedSource,headers:{Destination:encodeURI(h),Overwrite:l?void 0:"F"}});case 3:c===rt.MOVE&&(0,n.j8)("files:node:deleted",e),t.next=24;break;case 6:if(t.prev=6,t.t0=t.catch(0),!(t.t0 instanceof $)){t.next=23;break}if(412!==(null===t.t0||void 0===t.t0||null===(r=t.t0.response)||void 0===r?void 0:r.status)){t.next=13;break}throw new Error((0,i.Iu)("files","A file or folder with that name already exists in this folder"));case 13:if(423!==(null===t.t0||void 0===t.t0||null===(o=t.t0.response)||void 0===o?void 0:o.status)){t.next=17;break}throw new Error((0,i.Iu)("files","The files is locked"));case 17:if(404!==(null===t.t0||void 0===t.t0||null===(u=t.t0.response)||void 0===u?void 0:u.status)){t.next=21;break}throw new Error((0,i.Iu)("files","The file does not exist anymore"));case 21:if(!t.t0.message){t.next=23;break}throw new Error(t.t0.message);case 23:throw new Error;case 24:return t.prev=24,k.default.set(e,"status",void 0),t.finish(24);case 27:case"end":return t.stop()}}),t,null,[[0,6,24,27]])}))));case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),bt=function(){var t=gt(vt().mark((function t(e){var r,n,a,u=arguments;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:"/",n=u.length>2?u[2]:void 0,a=(0,L.fn)((0,i.Iu)("files","Chose destination")).allowDirectories(!0).setFilter((function(t){return 0!=(t.permissions&o.y3.CREATE)&&n.fileid!==t.fileid})).setMimeTypeFilter([]).setMultiSelect(!1).startAt(r),t.abrupt("return",new Promise((function(t,r){a.setButtonFactory((function(o,a){var u=[],c=(0,nt.basename)(a);return n.dirname===a||n.path===a||(e!==rt.COPY&&e!==rt.MOVE_OR_COPY||u.push({label:c?(0,i.Iu)("files","Copy to {target}",{target:c}):(0,i.Iu)("files","Copy"),type:"primary",icon:at,callback:function(e){return gt(vt().mark((function o(){return vt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,wt(n,e[0],rt.COPY);case 3:t(!0),o.next=9;break;case 6:o.prev=6,o.t0=o.catch(0),r(o.t0);case 9:case"end":return o.stop()}}),o,null,[[0,6]])})))()}}),e!==rt.MOVE&&e!==rt.MOVE_OR_COPY||u.push({label:c?(0,i.Iu)("files","Move to {target}",{target:c}):(0,i.Iu)("files","Move"),type:e===rt.MOVE?"primary":"secondary",icon:st,callback:function(e){return gt(vt().mark((function o(){return vt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,wt(n,e[0],rt.MOVE);case 3:t(!0),o.next=9;break;case 6:o.prev=6,o.t0=o.catch(0),r(o.t0);case 9:case"end":return o.stop()}}),o,null,[[0,6]])})))()}})),u})),a.build().pick().catch((function(){r(new Error((0,i.Iu)("files","Cancelled move or copy operation")))}))})));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),xt=new o.p$({id:"move-copy",displayName:function(t){switch(mt(t)){case rt.MOVE:return(0,i.Iu)("files","Move");case rt.COPY:return(0,i.Iu)("files","Copy");case rt.MOVE_OR_COPY:return(0,i.Iu)("files","Move or copy")}},iconSvgInline:function(){return ut},enabled:function(t){return!!t.every((function(t){var e;return null===(e=t.root)||void 0===e?void 0:e.startsWith("/files/")}))&&t.length>0&&(ht(t)||dt(t))},exec:function(t,e,r){return gt(vt().mark((function e(){var n;return vt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=mt([t]),e.prev=1,e.next=4,bt(n,r,t);case 4:return e.abrupt("return",!0);case 7:if(e.prev=7,e.t0=e.catch(1),!(e.t0 instanceof Error&&e.t0.message)){e.next=12;break}return(0,L.x2)(e.t0.message),e.abrupt("return",null);case 12:return e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e,null,[[1,7]])})))()},order:15}),Et='';function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function _t(){_t=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Lt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Ot(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Nt=new o.p$({id:"open-folder",displayName:function(t){var e=t[0].attributes.displayName||t[0].basename;return(0,i.Iu)("files","Open folder {displayName}",{displayName:e})},iconSvgInline:function(){return Et},enabled:function(t){if(1!==t.length)return!1;var e=t[0];return!!e.isDavRessource&&e.type===o.Tv.Folder&&0!=(e.permissions&o.y3.READ)},exec:function(t,e,r){return(n=_t().mark((function n(){return _t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t&&t.type===o.Tv.Folder){n.next=2;break}return n.abrupt("return",!1);case 2:return window.OCP.Files.Router.goToRoute(null,{view:e.id,fileid:t.fileid},{dir:(0,nt.join)(r,t.basename)}),n.abrupt("return",null);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Ot(i,r,o,a,u,"next",t)}function u(t){Ot(i,r,o,a,u,"throw",t)}a(void 0)}))})();var n},default:o.DT.HIDDEN,order:-100});function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function jt(){jt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==St(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Pt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var kt=new o.p$({id:"open-in-files-recent",displayName:function(){return(0,i.Iu)("files","Open in Files")},iconSvgInline:function(){return""},enabled:function(t,e){return"recent"===e.id},exec:function(t){return(e=jt().mark((function e(){var r;return jt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.dirname,t.type===o.Tv.Folder&&(r=r+"/"+t.basename),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:t.fileid},{dir:r,fileid:t.fileid}),e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){Pt(i,n,o,a,u,"next",t)}function u(t){Pt(i,n,o,a,u,"throw",t)}a(void 0)}))})();var e},order:-1e3,default:o.DT.HIDDEN});function Tt(t){return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(t)}function It(){It=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Tt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function At(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Ct=new o.p$({id:"rename",displayName:function(){return(0,i.Iu)("files","Rename")},iconSvgInline:function(){return''},enabled:function(t){return t.length>0&&t.map((function(t){return t.permissions})).every((function(t){return 0!=(t&o.y3.UPDATE)}))},exec:function(t){return(e=It().mark((function e(){return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,n.j8)("files:node:rename",t),e.abrupt("return",null);case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){At(i,n,o,a,u,"next",t)}function u(t){At(i,n,o,a,u,"throw",t)}a(void 0)}))})();var e},order:10}),Ft=r(48250);function Gt(t){return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(t)}function Dt(){Dt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Gt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Mt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Vt=new o.p$({id:"details",displayName:function(){return(0,i.Iu)("files","Open details")},iconSvgInline:function(){return Ft},enabled:function(t){var e,r,n;return 1===t.length&&!!t[0]&&!(null===(e=window)||void 0===e||null===(e=e.OCA)||void 0===e||null===(e=e.Files)||void 0===e||!e.Sidebar)&&null!==(r=(null===(n=t[0].root)||void 0===n?void 0:n.startsWith("/files/"))&&t[0].permissions!==o.y3.NONE)&&void 0!==r&&r},exec:function(t,e,r){return(n=Dt().mark((function n(){return Dt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,window.OCA.Files.Sidebar.open(t.path);case 3:return window.OCP.Files.Router.goToRoute(null,{view:e.id,fileid:t.fileid},{dir:r},!0),n.abrupt("return",null);case 7:return n.prev=7,n.t0=n.catch(0),u.error("Error while opening sidebar",{error:n.t0}),n.abrupt("return",!1);case 11:case"end":return n.stop()}}),n,null,[[0,7]])})),function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Mt(i,r,o,a,u,"next",t)}function u(t){Mt(i,r,o,a,u,"throw",t)}a(void 0)}))})();var n},order:-50});function Rt(t){return Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rt(t)}function $t(){$t=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Rt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Ht(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Bt=new o.p$({id:"view-in-folder",displayName:function(){return(0,i.Iu)("files","View in folder")},iconSvgInline:function(){return ut},enabled:function(t){if(1!==t.length)return!1;var e=t[0];return!!e.isDavRessource&&e.permissions!==o.y3.NONE&&e.type===o.Tv.File},exec:function(t,e,r){return(n=$t().mark((function e(){return $t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.type===o.Tv.File){e.next=2;break}return e.abrupt("return",!1);case 2:return window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:t.fileid},{dir:t.dirname}),e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Ht(i,r,o,a,u,"next",t)}function u(t){Ht(i,r,o,a,u,"throw",t)}a(void 0)}))})();var n},order:80});function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}function zt(){zt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Yt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Zt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Ut(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Zt(i,n,o,a,u,"next",t)}function u(t){Zt(i,n,o,a,u,"throw",t)}a(void 0)}))}}var qt,Wt=function(){var t=Ut(zt().mark((function t(e,r){var n,o;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e+"/"+r,t.next=3,(0,a.Z)({method:"MKCOL",url:n,headers:{Overwrite:"F"}});case 3:return o=t.sent,t.abrupt("return",{fileid:parseInt(o.headers["oc-fileid"]),source:n});case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),Xt=function(t,e){for(var r=t,n=1;e.includes(r);){var o=(0,nt.extname)(t);r="".concat((0,nt.basename)(t,o)," (").concat(n++,")").concat(o)}return r},Kt={id:"newFolder",displayName:(0,i.Iu)("files","New folder"),if:function(t){return 0!=(t.permissions&o.y3.CREATE)},iconSvgInline:'',handler:function(t,e){return Ut(zt().mark((function r(){var a,u,c,s,l,f,h,d;return zt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=e.map((function(t){return t.basename})),s=Xt((0,i.Iu)("files","New folder"),c),r.next=4,Wt(t.encodedSource,encodeURIComponent(s));case 4:l=r.sent,f=l.fileid,h=l.source,d=new o.gt({source:h,id:f,mtime:new Date,owner:(null===(a=(0,E.ts)())||void 0===a?void 0:a.uid)||null,permissions:o.y3.ALL,root:(null==t?void 0:t.root)||"/files/"+(null===(u=(0,E.ts)())||void 0===u?void 0:u.uid)}),t._children||k.default.set(t,"_children",[]),t._children.push(d.fileid),(0,L.s$)((0,i.Iu)("files",'Created new folder "{name}"',{name:(0,nt.basename)(h)})),(0,n.j8)("files:node:created",d),(0,n.j8)("files:node:rename",d);case 13:case"end":return r.stop()}}),r)})))()}},Jt=r(43554),Qt=r(14596),te=r(26721),ee="/files/".concat(null===(qt=(0,E.ts)())||void 0===qt?void 0:qt.uid),re=(0,d.generateRemoteUrl)("dav"+ee),ne=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re,e=(0,Qt.eI)(t,{headers:{requesttoken:(0,E.IH)()||""}});return(0,Qt.lD)().patch("request",(function(t){var e;return null!==(e=t.headers)&&void 0!==e&&e.method&&(t.method=t.headers.method,delete t.headers.method),(0,te.W)(t)})),e},oe=r(3443),ie=function(t){return t.split("").reduce((function(t,e){return(t=(t<<5)-t+e.charCodeAt(0))&t}),0)};function ae(t){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ae(t)}function ue(){ue=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==ae(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ce(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function se(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function le(t){for(var e=1;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ye(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var ge,me=ne(),we='\n\n\t\n\t\t").concat((0,o.m0)(),"\n\t\n\t\n\t\t1\n\t\n"),be=function(){var t,e=(t=ve().mark((function t(){var e,r,n,i,a,u,c,s=arguments;return ve().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=s.length>0&&void 0!==s[0]?s[0]:"/",n=(0,o.h7)(),"/"!==r){t.next=6;break}return t.next=5,me.stat(r,{details:!0,data:n});case 5:i=t.sent;case 6:return t.next=8,me.getDirectoryContents(r,{details:!0,data:"/"===r?we:n,headers:{method:"/"===r?"REPORT":"PROPFIND"},includeSelf:!0});case 8:return a=t.sent,u=(null===(e=i)||void 0===e?void 0:e.data)||a.data[0],c=a.data.filter((function(t){return t.filename!==r})),t.abrupt("return",{folder:de(u),contents:c.map(de)});case 12:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ye(i,n,o,a,u,"next",t)}function u(t){ye(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),xe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new o.G7({id:Ee(t),name:(0,nt.basename)(t),icon:Et,order:e,params:{dir:t,view:"favorites"},parent:"favorites",columns:[],getContents:be})},Ee=function(t){return"favorite-".concat(ie(t))};function Le(t){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Le(t)}function _e(){_e=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Le(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Oe(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Ne=ne((0,d.generateRemoteUrl)("dav")),Se=Math.round(Date.now()/1e3-1209600),je='\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t').concat((0,o.m0)(),"\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/").concat(null===(ge=(0,E.ts)())||void 0===ge?void 0:ge.uid,"/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t").concat(Se,"\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n"),Pe=function(){var t,e=(t=_e().mark((function t(){var e,r,n,i,a=arguments;return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>0&&void 0!==a[0]?a[0]:"/",t.next=3,Ne.getDirectoryContents(r,{details:!0,data:je,headers:{method:"SEARCH","Content-Type":"application/xml; charset=utf-8"},deep:!0});case 3:return n=t.sent,i=n.data,t.abrupt("return",{folder:new o.gt({id:0,source:(0,d.generateRemoteUrl)("dav"+ee),root:ee,owner:(null===(e=(0,E.ts)())||void 0===e?void 0:e.uid)||null,permissions:o.y3.READ}),contents:i.map(de)});case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Oe(i,n,o,a,u,"next",t)}function u(t){Oe(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();function ke(t){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ke(t)}function Te(){Te=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new O(o||[]);return n(a,"_invoke",{value:x(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==ke(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function x(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Ie(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Ae(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ie(i,n,o,a,u,"next",t)}function u(t){Ie(i,n,o,a,u,"throw",t)}a(void 0)}))}}(0,o.p4)(h),(0,o.p4)(b),(0,o.p4)(P),(0,o.p4)(M),(0,o.p4)(xt),(0,o.p4)(Nt),(0,o.p4)(kt),(0,o.p4)(Ct),(0,o.p4)(Vt),(0,o.p4)(Bt),(0,o.cd)(Kt),function(){var t=(0,Jt.j)("files","favoriteFolders",[]),e=t.map((function(t,e){return xe(t,e)})),r=(0,o.Ti)();r.register(new o.G7({id:"favorites",name:(0,i.Iu)("files","Favorites"),caption:(0,i.Iu)("files","List of favorites files and folders."),emptyTitle:(0,i.Iu)("files","No favorites yet"),emptyCaption:(0,i.Iu)("files","Files and folders you mark as favorite will show up here"),icon:T,order:5,columns:[],getContents:be})),e.forEach((function(t){return r.register(t)})),(0,n.Ld)("files:favorites:added",(function(t){var e;t.type===o.Tv.Folder&&(null!==t.path&&null!==(e=t.root)&&void 0!==e&&e.startsWith("/files")?c(t.path):u.error("Favorite folder is not within user files root",{node:t}))})),(0,n.Ld)("files:favorites:removed",(function(t){var e;t.type===o.Tv.Folder&&(null!==t.path&&null!==(e=t.root)&&void 0!==e&&e.startsWith("/files")?s(t.path):u.error("Favorite folder is not within user files root",{node:t}))}));var a=function(){t.sort((function(t,e){return t.localeCompare(e,(0,i.G3)(),{ignorePunctuation:!0})})),t.forEach((function(t,r){var n=e.find((function(e){return e.id===Ee(t)}));n&&(n.order=r)}))},c=function(n){var o=xe(n);t.find((function(t){return t===n}))||(t.push(n),e.push(o),a(),r.register(o))},s=function(n){var o=Ee(n),i=t.findIndex((function(t){return t===n}));-1!==i&&(t.splice(i,1),e.splice(i,1),r.remove(o),a())}}(),(0,o.Ti)().register(new o.G7({id:"files",name:(0,i.Iu)("files","All files"),caption:(0,i.Iu)("files","List of your files and folders."),icon:Et,order:0,getContents:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=new AbortController,r=(0,o.h7)();return new oe.CancelablePromise(function(){var n,o=(n=ue().mark((function n(o,i,a){var c,s,l;return ue().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a((function(){return e.abort()})),n.prev=1,n.next=4,he.getDirectoryContents(t,{details:!0,data:r,includeSelf:!0,signal:e.signal});case 4:if(c=n.sent,s=c.data[0],l=c.data.slice(1),s.filename===t){n.next=9;break}throw new Error("Root node does not match requested path");case 9:o({folder:de(s),contents:l.map((function(t){try{return de(t)}catch(e){return u.error("Invalid node detected '".concat(t.basename,"'"),{error:e}),null}})).filter(Boolean)}),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),i(n.t0);case 15:case"end":return n.stop()}}),n,null,[[1,12]])})),function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){ce(i,r,o,a,u,"next",t)}function u(t){ce(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(t,e,r){return o.apply(this,arguments)}}())}})),(0,o.Ti)().register(new o.G7({id:"recent",name:(0,i.Iu)("files","Recent"),caption:(0,i.Iu)("files","List of recently modified files and folders."),emptyTitle:(0,i.Iu)("files","No recently modified files"),emptyCaption:(0,i.Iu)("files","Files and folders you recently modified will show up here."),icon:'',order:2,defaultSortKey:"mtime",getContents:Pe})),"serviceWorker"in navigator?window.addEventListener("load",Ae(Te().mark((function t(){var e,r;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=(0,d.generateUrl)("/apps/files/preview-service-worker.js",{},{noRewrite:!0}),t.next=4,navigator.serviceWorker.register(e,{scope:"/"});case 4:r=t.sent,u.debug("SW registered: ",{registration:r}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),u.error("SW registration failed: ",{error:t.t0});case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))):u.debug("Service Worker is not enabled on this browser.")},3443:function(t,e,r){var n,o,i=r(25108);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=function(t){"use strict";function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}function r(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=n(t);if(e){var i=n(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r"function"!=typeof e.if||e.if(t))):this._entries}getEntryIndex(t){return this._entries.findIndex((e=>e.id===t))}validateEntry(t){if(!t.id||!t.displayName||!(t.iconSvgInline||t.iconClass||t.handler))throw new Error("Invalid entry");if("string"!=typeof t.id||"string"!=typeof t.displayName)throw new Error("Invalid id or displayName property");if(t.iconClass&&"string"!=typeof t.iconClass||t.iconSvgInline&&"string"!=typeof t.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==t.if&&"function"!=typeof t.if)throw new Error("Invalid if property");if(t.templateName&&"string"!=typeof t.templateName)throw new Error("Invalid templateName property");if(t.handler&&"function"!=typeof t.handler)throw new Error("Invalid handler property");if(!t.templateName&&!t.handler)throw new Error("At least a templateName or a handler must be provided");if(-1!==this.getEntryIndex(t.id))throw new Error("Duplicate entry")}}const p=["B","KB","MB","GB","TB","PB"],v=["B","KiB","MiB","GiB","TiB","PiB"];function y(t,e=!1,r=!0){"string"==typeof t&&(t=Number(t));let n=t>0?Math.floor(Math.log(t)/Math.log(r?1024:1e3)):0;n=Math.min((r?v.length:p.length)-1,n);const o=r?v[n]:p[n];let a=(t/Math.pow(r?1024:1e3,n)).toFixed(1);return!0===e&&0===n?("0.0"!==a?"< 1 ":"0 ")+(r?v[1]:p[1]):(a=n<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,i.aj)()),a+" "+o)}var g=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(g||{});class m{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(t.default&&!Object.values(g).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const w=function(t){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],f.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?f.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};var b=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(b||{});const x=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],E={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},L=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...x]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},_=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...E}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},O=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${L()}\n\t\t\t\n\t\t`},N=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${L()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,n.ts)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`},S=function(t=""){let e=b.NONE;return t&&((t.includes("C")||t.includes("K"))&&(e|=b.CREATE),t.includes("G")&&(e|=b.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=b.UPDATE),t.includes("D")&&(e|=b.DELETE),t.includes("R")&&(e|=b.SHARE)),e};var j=(t=>(t.Folder="folder",t.File="file",t))(j||{});const P=function(t,e){return null!==t.match(e)},k=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=b.NONE&&t.permissions<=b.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&P(t.source,e)){const r=t.source.match(e)[0];if(!t.source.includes((0,a.join)(r,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(T).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var T=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(T||{});class I{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(t,e){k(t,e||this._knownDavService),this._data=t;const r={set:(t,e,r)=>(this.updateMtime(),Reflect.set(t,e,r)),deleteProperty:(t,e)=>(this.updateMtime(),Reflect.deleteProperty(t,e))};this._attributes=new Proxy(t.attributes||{},r),delete this._data.attributes,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,u.Ec)(this.source.slice(t.length))}get basename(){return(0,a.basename)(this.source)}get extension(){return(0,a.extname)(this.source)}get dirname(){if(this.root){const t=this.source.indexOf(this.root);return(0,a.dirname)(this.source.slice(t+this.root.length)||"/")}const t=new URL(this.source);return(0,a.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:b.NONE:b.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return P(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,a.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const t=this.source.indexOf(this.root);return this.source.slice(t+this.root.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){k({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,a.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class A extends I{get type(){return j.File}}class C extends I{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return j.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const F=`/files/${(0,n.ts)()?.uid}`,G=(0,c.generateRemoteUrl)("dav"),D=function(t=G){const e=(0,s.eI)(t,{headers:{requesttoken:(0,n.IH)()||""}});return(0,s.lD)().patch("request",(t=>(t.headers?.method&&(t.method=t.headers.method,delete t.headers.method),(0,l.W)(t)))),e},M=async(t,e="/",r=F)=>(await t.getDirectoryContents(`${r}${e}`,{details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${L()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>V(t,r))),V=function(t,e=F,r=G){const o=t.props,i=S(o?.permissions),a=(0,n.ts)()?.uid,u={id:o?.fileid||0,source:`${r}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime,size:o?.size||Number.parseInt(o.getcontentlength||"0"),permissions:i,owner:a,root:e,attributes:{...t,...o,hasPreview:o?.["has-preview"]}};return delete u.attributes?.props,"file"===t.type?new A(u):new C(u)};class R{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t)}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&this._views.splice(e,1)}get views(){return this._views}setActive(t){this._currentView=t}get active(){return this._currentView}}const $=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new R,f.debug("Navigation service initialized")),window._nc_navigation};class H{_column;constructor(t){B(t),this._column=t}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const B=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var Y={},z={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+r+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,r){if(e){const n=Object.keys(e),o=n.length;for(let i=0;i"u")},t.getAllMatches=function(t,e){const r=[];let n=e.exec(t);for(;n;){const o=[];o.startIndex=e.lastIndex-n[0].length;const i=n.length;for(let t=0;t5&&"xml"===n)return nt("InvalidXml","XML declaration allowed only at the start of the document.",at(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function X(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let r=1;for(e+=8;e"===t[e]&&(r--,0===r))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}Y.validate=function(t,e){e=Object.assign({},U,e);const r=[];let n=!1,o=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let i=0;i"!==t[i]&&" "!==t[i]&&"\t"!==t[i]&&"\n"!==t[i]&&"\r"!==t[i];i++)c+=t[i];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),i--),!it(c)){let e;return e=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",nt("InvalidTag",e,at(t,i))}const s=Q(t,i);if(!1===s)return nt("InvalidAttr","Attributes for '"+c+"' have open quote.",at(t,i));let l=s.value;if(i=s.index,"/"===l[l.length-1]){const r=i-l.length;l=l.substring(0,l.length-1);const o=et(l,e);if(!0!==o)return nt(o.err.code,o.err.msg,at(t,r+o.err.line));n=!0}else if(u){if(!s.tagClosed)return nt("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",at(t,i));if(l.trim().length>0)return nt("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",at(t,a));{const e=r.pop();if(c!==e.tagName){let r=at(t,e.tagStartPos);return nt("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+c+"'.",at(t,a))}0==r.length&&(o=!0)}}else{const u=et(l,e);if(!0!==u)return nt(u.err.code,u.err.msg,at(t,i-l.length+u.err.line));if(!0===o)return nt("InvalidXml","Multiple possible root nodes found.",at(t,i));-1!==e.unpairedTags.indexOf(c)||r.push({tagName:c,tagStartPos:a}),n=!0}for(i++;i0)||nt("InvalidXml","Invalid '"+JSON.stringify(r.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):nt("InvalidXml","Start tag expected.",1)};const K='"',J="'";function Q(t,e){let r="",n="",o=!1;for(;e"===t[e]&&""===n){o=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:o}}const tt=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function et(t,e){const r=Z.getAllMatches(t,tt),n={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};ct.buildOptions=function(t){return Object.assign({},st,t)},ct.defaultOptions=st;const lt=z;function ft(t,e){let r="";for(;e0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},Lt=function(t,e){const r={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,o=!1,i=!1,a="";for(;e"===t[e]){if(i?"-"===t[e-1]&&"-"===t[e-2]&&(i=!1,n--):n--,0===n)break}else"["===t[e]?o=!0:a+=t[e];else{if(o&&dt(t,e))e+=7,[entityName,val,e]=ft(t,e+1),-1===val.indexOf("&")&&(r[gt(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(o&&pt(t,e))e+=8;else if(o&&vt(t,e))e+=8;else if(o&&yt(t,e))e+=9;else{if(!ht)throw new Error("Invalid DOCTYPE");i=!0}n++,a=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:e}},_t=function(t,e={}){if(e=Object.assign({},bt,e),!t||"string"!=typeof t)return t;let r=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(r))return t;if(e.hex&&mt.test(r))return Number.parseInt(r,16);{const n=wt.exec(r);if(n){const o=n[1],i=n[2];let a=function(t){return t&&-1!==t.indexOf(".")&&("."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1))),t}(n[3]);const u=n[4]||n[6];if(!e.leadingZeros&&i.length>0&&o&&"."!==r[2]||!e.leadingZeros&&i.length>0&&!o&&"."!==r[1])return t;{const n=Number(r),c=""+n;return-1!==c.search(/[eE]/)||u?e.eNotation?n:t:-1!==r.indexOf(".")?"0"===c&&""===a||c===a||o&&c==="-"+a?n:t:i?a===c||o+a===c?n:t:r===c||r===o+c?n:t}}return t}};function Ot(t){const e=Object.keys(t);for(let r=0;r0)){a||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,r,o,i);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?Mt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function St(t){if(this.options.removeNSPrefix){const e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,xt.nameRegexp);const jt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Pt(t,e,r){if(!this.options.ignoreAttributes&&"string"==typeof t){const r=xt.getAllMatches(t,jt),n=r.length,o={};for(let t=0;t",i,"Closing Tag is not closed.");let a=t.substring(i+2,e).trim();if(this.options.removeNSPrefix){const t=a.indexOf(":");-1!==t&&(a=a.substr(t+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),r&&(n=this.saveTextToParentTag(n,r,o));const u=o.substring(o.lastIndexOf(".")+1);if(a&&-1!==this.options.unpairedTags.indexOf(a))throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;u&&-1!==this.options.unpairedTags.indexOf(u)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),r=this.tagsNodeStack.pop(),n="",i=e}else if("?"===t[i+1]){let e=Gt(t,i,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),!(this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags)){const t=new Et(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,o,e.tagName)),this.addChild(r,t,o)}i=e.closeIndex+1}else if("!--"===t.substr(i+1,3)){const e=Ft(t,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const a=t.substring(i+4,e-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}i=e}else if("!D"===t.substr(i+1,2)){const e=Lt(t,i);this.docTypeEntities=e.entities,i=e.i}else if("!["===t.substr(i+1,2)){const e=Ft(t,"]]>",i,"CDATA is not closed.")-2,a=t.substring(i+9,e);if(n=this.saveTextToParentTag(n,r,o),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]);else{let t=this.parseTextData(a,r.tagname,o,!0,!1,!0);null==t&&(t=""),r.add(this.options.textNodeName,t)}i=e+2}else{let a=Gt(t,i,this.options.removeNSPrefix),u=a.tagName;const c=a.rawTagName;let s=a.tagExp,l=a.attrExpPresent,f=a.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const h=r;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),u!==e.tagname&&(o+=o?"."+u:u),this.isItStopNode(this.options.stopNodes,o,u)){let e="";if(s.length>0&&s.lastIndexOf("/")===s.length-1)i=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))i=a.closeIndex;else{const r=this.readStopNodeData(t,c,f+1);if(!r)throw new Error(`Unexpected end of ${c}`);i=r.i,e=r.tagContent}const n=new Et(u);u!==s&&l&&(n[":@"]=this.buildAttributesMap(s,o,u)),e&&(e=this.parseTextData(e,u,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(r,n,o)}else{if(s.length>0&&s.lastIndexOf("/")===s.length-1){"/"===u[u.length-1]?(u=u.substr(0,u.length-1),o=o.substr(0,o.length-1),s=u):s=s.substr(0,s.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));const t=new Et(u);u!==s&&l&&(t[":@"]=this.buildAttributesMap(s,o,u)),this.addChild(r,t,o),o=o.substr(0,o.lastIndexOf("."))}else{const t=new Et(u);this.tagsNodeStack.push(r),u!==s&&l&&(t[":@"]=this.buildAttributesMap(s,o,u)),this.addChild(r,t,o),r=t}n="",i=f}}else n+=t[i];return e.child};function Tt(t,e,r){const n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n&&(e.tagname=n),t.addChild(e))}const It=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function At(t,e,r,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Ct(t,e,r){const n="*."+r;for(const r in t){const o=t[r];if(n===o||e===o)return!0}return!1}function Ft(t,e,r,n){const o=t.indexOf(e,r);if(-1===o)throw new Error(n);return o+e.length-1}function Gt(t,e,r,n=">"){const o=function(t,e,r=">"){let n,o="";for(let i=e;i",r,`${e} is not closed`);if(t.substring(r+2,i).trim()===e&&(o--,0===o))return{tagContent:t.substring(n,r),i:i};r=i}else if("?"===t[r+1])r=Ft(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=Ft(t,"--\x3e",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=Ft(t,"]]>",r,"StopNode is not closed.")-2;else{const n=Gt(t,r,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex)}}function Mt(t,e,r){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&_t(t,r)}return xt.isExist(t)?t:""}var Vt={};function Rt(t,e,r){let n;const o={};for(let i=0;i0&&(o[e.textNodeName]=n):void 0!==n&&(o[e.textNodeName]=n),o}function $t(t){const e=Object.keys(t);for(let t=0;t"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=Ot,this.parseXml=kt,this.parseTextData=Nt,this.resolveNameSpace=St,this.buildAttributesMap=Pt,this.isItStopNode=Ct,this.replaceEntitiesValue=It,this.readStopNodeData=Dt,this.saveTextToParentTag=At,this.addChild=Tt}},{prettify:Zt}=Vt,Ut=Y;function qt(t,e,r,n){let o="",i=!1;for(let a=0;a`,i=!1;continue}if(c===e.commentPropName){o+=n+`\x3c!--${u[c][0][e.textNodeName]}--\x3e`,i=!0;continue}if("?"===c[0]){const t=Xt(u[":@"],e),r="?xml"===c?"":n;let a=u[c][0][e.textNodeName];a=0!==a.length?" "+a:"",o+=r+`<${c}${a}${t}?>`,i=!0;continue}let l=n;""!==l&&(l+=e.indentBy);const f=n+`<${c}${Xt(u[":@"],e)}`,h=qt(u[c],e,s,l);-1!==e.unpairedTags.indexOf(c)?e.suppressUnpairedNode?o+=f+">":o+=f+"/>":h&&0!==h.length||!e.suppressEmptyNode?h&&h.endsWith(">")?o+=f+`>${h}${n}`:(o+=f+">",h&&""!==n&&(h.includes("/>")||h.includes("`):o+=f+"/>",i=!0}return o}function Wt(t){const e=Object.keys(t);for(let r=0;r0&&e.processEntities)for(let r=0;r0&&(r="\n"),qt(t,e,"",r)},te={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ee(t){this.options=Object.assign({},te,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=oe),this.processTextOrObjNode=re,this.options.format?(this.indentate=ne,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function re(t,e,r){const n=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r)}function ne(t){return this.options.indentBy.repeat(t)}function oe(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ee.prototype.build=function(t){return this.options.preserveOrder?Qt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},ee.prototype.j2x=function(t,e){let r="",n="";for(let o in t)if(t.hasOwnProperty(o))if(typeof t[o]>"u")this.isAttribute(o)&&(n+="");else if(null===t[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)n+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+t[o]);else if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const r=t[o].length;let i="";for(let a=0;a"u"||(null===r?"?"===o[0]?n+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+o+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,e+1).val:i+=this.processTextOrObjNode(r,o,e):i+=this.buildTextValNode(r,o,"",e))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",e)),n+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),n=e.length;for(let i=0;i"+t+o}},ee.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+o+"0&&this.options.processEntities)for(let e=0;e0&&(!t.caption||"string"!=typeof t.caption))throw new Error("View caption is required for top-level views and must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length||!0!==ie.XMLValidator.validate(t))return!1;let e;const r=new ie.XMLParser;try{e=r.parse(t)}catch{return!1}return!(!e||!("svg"in e))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in t)||"number"!=typeof t.order)throw new Error("View order is required and must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof H))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0},ce=function(t){return(typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new d,f.debug("NewFileMenu initialized")),window._nc_newfilemenu).registerEntry(t)}}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.m=n,t=[],i.O=function(e,r,n,o){if(!r){var a=1/0;for(l=0;l=o)&&Object.keys(i.O).every((function(t){return i.O[t](r[c])}))?r.splice(c--,1):(u=!1,o0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[r,n,o]},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.f={},i.e=function(t){return Promise.all(Object.keys(i.f).reduce((function(e,r){return i.f[r](t,e),e}),[]))},i.u=function(t){return t+"-"+t+".js?v=9712b63e6d8aa316e55f"},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e={},r="nextcloud:",i.l=function(t,n,o,a){if(e[t])e[t].push(n);else{var u,c;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l-1&&!t;)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}(),function(){i.b=document.baseURI||self.location.href;var t={9837:0};i.f.j=function(e,r){var n=i.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise((function(r,o){n=t[e]=[r,o]}));r.push(n[2]=o);var a=i.p+i.u(e),u=new Error;i.l(a,(function(r){if(i.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",u.name="ChunkLoadError",u.type=o,u.request=a,n[1](u)}}),"chunk-"+e,e)}},i.O.j=function(e){return 0===t[e]};var e=function(e,r){var n,o,a=r[0],u=r[1],c=r[2],s=0;if(a.some((function(e){return 0!==t[e]}))){for(n in u)i.o(u,n)&&(i.m[n]=u[n]);if(c)var l=c(i)}for(e&&e(r);s