diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-05 17:34:47 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-06 15:43:30 +0200 |
commit | ea3e77d6b91e86fd14e40dc1b68ed8a887c93c2c (patch) | |
tree | 2b418b35a476880996bc7dd9212ffacab184f6c8 /dist/files-main.js | |
parent | 8298bb44fdb14024d8e7c0d651a4b219b8975f0e (diff) | |
download | nextcloud-server-ea3e77d6b91e86fd14e40dc1b68ed8a887c93c2c.tar.gz nextcloud-server-ea3e77d6b91e86fd14e40dc1b68ed8a887c93c2c.zip |
fix(files): better wording and catch single action run
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'dist/files-main.js')
-rw-r--r-- | dist/files-main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/files-main.js b/dist/files-main.js index 93bc39f9080..0e77e6daa24 100644 --- a/dist/files-main.js +++ b/dist/files-main.js @@ -1,3 +1,3 @@ /*! For license information please see files-main.js.LICENSE.txt */ -!function(){"use strict";var e,n={71328:function(e,n,i){var r=i(17499),o=i(79954),a=i(31352),s=i(79753),l=i(45994),c=function(){var t,e,n,i,r=(null===(t=OCA)||void 0===t||null===(e=t.Files)||void 0===e||null===(n=e.App)||void 0===n||null===(i=n.currentFileList)||void 0===i?void 0:i.dirInfo)||{path:"/",name:""};return"".concat(r.path,"/").concat(r.name).replace(/\/\//gi,"/")},u=i(4820),d=i(20144),f=i(62520),p=i(64024),A=i(93455),v=i.n(A),h=i(70110),m=i.n(h);function g(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){g(o,i,r,a,s,"next",t)}function s(t){g(o,i,r,a,s,"throw",t)}a(void 0)}))}}var w=function(){var t=b(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.default.get((0,s.generateOcsUrl)("apps/files/api/v1/templates"));case 2:return e=t.sent,t.abrupt("return",e.data.ocs.data);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),y=function(){var t=b(regeneratorRuntime.mark((function t(e,n,i){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.default.post((0,s.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:e,templatePath:n,templateType:i});case 2:return r=t.sent,t.abrupt("return",r.data.ocs.data);case 4:case"end":return t.stop()}}),t)})));return function(e,n,i){return t.apply(this,arguments)}}(),C=256,_={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:function(){return{failedPreview:!1}},computed:{nameWithoutExt:function(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id:function(){return"template-picker-".concat(this.fileid)},realPreviewUrl:function(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,l.ts)()?(0,s.generateUrl)("/core/preview?fileId=".concat(this.fileid,"&x=").concat(C,"&y=").concat(C,"&a=1")):(0,s.generateUrl)("/apps/files_sharing/publicpreview/".concat(document.getElementById("sharingToken")&&document.getElementById("sharingToken").value,"?fileId=").concat(this.fileid,"&file=").concat(function(t){var e=(t.startsWith("/")?t:"/".concat(t)).split("/"),n="";return e.forEach((function(t){""!==t&&(n+="/"+encodeURIComponent(t))})),n}(this.filename),"&x=").concat(C,"&y=").concat(C,"&a=1"))},mimeIcon:function(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck:function(){this.$emit("check",this.fileid)},onFailure:function(){this.failedPreview=!0}}},x=_,k=i(93379),S=i.n(k),P=i(7795),E=i.n(P),O=i(90569),N=i.n(O),j=i(3565),B=i.n(j),I=i(19216),F=i.n(I),T=i(44589),z=i.n(T),U=i(3491),D={};D.styleTagTransform=z(),D.setAttributes=B(),D.insert=N().bind(null,"head"),D.domAPI=E(),D.insertStyleElement=F(),S()(U.Z,D),U.Z&&U.Z.locals&&U.Z.locals;var R=i(51900),L=(0,R.Z)(x,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"template-picker__item"},[e("input",{staticClass:"radio",attrs:{id:t.id,type:"radio",name:"template-picker"},domProps:{checked:t.checked},on:{change:t.onCheck}}),t._v(" "),e("label",{staticClass:"template-picker__label",attrs:{for:t.id}},[e("div",{staticClass:"template-picker__preview",class:t.failedPreview?"template-picker__preview--failed":""},[e("img",{staticClass:"template-picker__image",attrs:{src:t.realPreviewUrl,alt:"",draggable:"false"},on:{error:t.onFailure}})]),t._v(" "),e("span",{staticClass:"template-picker__title"},[t._v("\n\t\t\t"+t._s(t.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"6c072a31",null).exports,V=i(25108);function Z(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function q(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Z(o,i,r,a,s,"next",t)}function s(t){Z(o,i,r,a,s,"throw",t)}a(void 0)}))}}var G={name:"TemplatePicker",components:{NcEmptyContent:v(),NcModal:m(),TemplatePreview:L},props:{logger:{type:Object,required:!0}},data:function(){return{checked:-1,loading:!1,name:null,opened:!1,provider:null}},computed:{nameWithoutExt:function(){return this.name.indexOf(".")>-1?this.name.split(".").slice(0,-1).join("."):this.name},emptyTemplate:function(){var e,n;return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:(null===(e=this.provider)||void 0===e?void 0:e.mimetypes[0])||(null===(n=this.provider)||void 0===n?void 0:n.mimetypes)}},selectedTemplate:function(){var t=this;return this.provider.templates.find((function(e){return e.fileid===t.checked}))},style:function(){return{"--margin":"8px","--width":"160px","--border":"2px","--fullwidth":"180px","--height":this.provider.ratio?Math.round(160/this.provider.ratio)+"px":null}}},methods:{open:function(t,e){var n=this;return q(regeneratorRuntime.mark((function i(){var r,o;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return n.checked=n.emptyTemplate.fileid,n.name=t,n.provider=e,i.next=5,w();case 5:if(r=i.sent,null!==(o=r.find((function(t){return t.app===e.app&&t.label===e.label})))){i.next=9;break}throw new Error("Failed to match provider in results");case 9:if(n.provider=o,0!==o.templates.length){i.next=13;break}return n.onSubmit(),i.abrupt("return");case 13:n.opened=!0;case 14:case"end":return i.stop()}}),i)})))()},close:function(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck:function(t){this.checked=t},onSubmit:function(){var t=this;return q(regeneratorRuntime.mark((function e(){var n,i,r,o,a,s,l,u,d,A,v,h,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,o=c(),a=null===(n=OCA)||void 0===n||null===(i=n.Files)||void 0===i||null===(r=i.App)||void 0===r?void 0:r.currentFileList,t.nameWithoutExt===t.name&&(t.logger.debug("Fixed invalid filename",{name:t.name,extension:null===(s=t.provider)||void 0===s?void 0:s.extension}),t.name=t.name+(null===(l=t.provider)||void 0===l?void 0:l.extension)),e.prev=4,e.next=7,y((0,f.normalize)("".concat(o,"/").concat(t.name)),null===(u=t.selectedTemplate)||void 0===u?void 0:u.filename,null===(d=t.selectedTemplate)||void 0===d?void 0:d.templateType);case 7:return A=e.sent,t.logger.debug("Created new file",A),e.next=11,null==a?void 0:a.addAndFetchFileInfo(t.name).then((function(t,e){return e}));case 11:v=e.sent,h=new OCA.Files.FileInfoModel(v,{filesClient:null==a?void 0:a.filesClient}),(m=OCA.Files.fileActions.getDefaultFileAction(A.mime,"file",OC.PERMISSION_ALL))&&m.action(A.basename,{$file:null==a?void 0:a.findFileEl(t.name),dir:o,fileList:a,fileActions:null==a?void 0:a.fileActions,fileInfoModel:h}),t.close(),e.next=23;break;case 18:e.prev=18,e.t0=e.catch(4),t.logger.error("Error while creating the new file from template"),V.error(e.t0),(0,p.x2)(t.t("files","Unable to create new file from template"));case 23:return e.prev=23,t.loading=!1,e.finish(23);case 26:case"end":return e.stop()}}),e,null,[[4,18,23,26]])})))()}}},M=G,$=i(5103),W={};W.styleTagTransform=z(),W.setAttributes=B(),W.insert=N().bind(null,"head"),W.domAPI=E(),W.insertStyleElement=F(),S()($.Z,W),$.Z&&$.Z.locals&&$.Z.locals;var H=(0,R.Z)(M,(function(){var t=this,e=t._self._c;return t.opened?e("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"normal"},on:{close:t.close}},[e("form",{staticClass:"templates-picker__form",style:t.style,on:{submit:function(e){return e.preventDefault(),e.stopPropagation(),t.onSubmit.apply(null,arguments)}}},[e("h2",[t._v(t._s(t.t("files","Pick a template for {name}",{name:t.nameWithoutExt})))]),t._v(" "),e("ul",{staticClass:"templates-picker__list"},[e("TemplatePreview",t._b({attrs:{checked:t.checked===t.emptyTemplate.fileid},on:{check:t.onCheck}},"TemplatePreview",t.emptyTemplate,!1)),t._v(" "),t._l(t.provider.templates,(function(n){return e("TemplatePreview",t._b({key:n.fileid,attrs:{checked:t.checked===n.fileid,ratio:t.provider.ratio},on:{check:t.onCheck}},"TemplatePreview",n,!1))}))],2),t._v(" "),e("div",{staticClass:"templates-picker__buttons"},[e("button",{on:{click:t.close}},[t._v("\n\t\t\t\t"+t._s(t.t("files","Cancel"))+"\n\t\t\t")]),t._v(" "),e("input",{staticClass:"primary",attrs:{type:"submit","aria-label":t.t("files","Create a new file with the selected template")},domProps:{value:t.t("files","Create")}})])]),t._v(" "),t.loading?e("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[t._v("\n\t\t"+t._s(t.t("files","Creating file"))+"\n\t")]):t._e()],1):t._e()}),[],!1,null,"715b4161",null),Y=H.exports;function K(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var Q=(0,r.IY)().setApp("files").detectUser().build();d.default.mixin({methods:{t:a.Iu,n:a.uN}});var J=document.createElement("div");J.id="template-picker",document.body.appendChild(J);var X=(0,o.j)("files","templates",[]),tt=(0,o.j)("files","templates_path",!1);Q.debug("Templates providers",X),Q.debug("Templates folder",{templatesPath:tt});var et=new(d.default.extend(Y))({name:"TemplatePicker",propsData:{logger:Q}});et.$mount("#template-picker"),window.addEventListener("DOMContentLoaded",(function(){if(!tt){Q.debug("Templates folder not initialized");var t={attach:function(t){t.addMenuEntry({id:"template-init",displayName:(0,a.Iu)("files","Set up templates folder"),templateName:(0,a.Iu)("files","Templates"),iconClass:"icon-template-add",fileType:"file",actionHandler:function(e){it(e),t.removeMenuEntry("template-init")}})}};OC.Plugins.register("OCA.Files.NewFileMenu",t)}})),X.forEach((function(t,e){var n={attach:function(n){var i=n.fileList;"files"!==i.id&&"files.public"!==i.id||n.addMenuEntry({id:"template-new-".concat(t.app,"-").concat(e),displayName:t.label,templateName:t.label+t.extension,iconClass:t.iconClass||"icon-file",fileType:"file",actionHandler:function(e){et.open(e,t)}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)}));var nt,it=function(){var t,e=(t=regeneratorRuntime.mark((function t(e){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(c()+"/".concat(e)).replace("//","/"),t.prev=1,Q.debug("Initializing the templates directory",{templatePath:n}),t.next=5,u.default.post((0,s.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});case 5:i=t.sent,OCA.Files.App.currentFileList.changeDirectory(n,!0,!0),X=i.data.ocs.data.templates,tt=i.data.ocs.data.template_path,t.next=15;break;case 11:t.prev=11,t.t0=t.catch(1),Q.error("Unable to initialize the templates directory"),(0,p.x2)((0,a.Iu)("files","Unable to initialize the templates directory"));case 15:case"end":return t.stop()}}),t,null,[[1,11]])})),function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){K(o,i,r,a,s,"next",t)}function s(t){K(o,i,r,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}(),rt=i(78595);nt={attach:function(t){var e=this;(0,rt.Ld)("nextcloud:unified-search.search",(function(e){var n=e.query;t.setFilter(n)})),(0,rt.Ld)("nextcloud:unified-search.reset",(function(){e.query=null,t.setFilter("")}))}},window.OC.Plugins.register("OCA.Files.FileList",nt);var ot=i(91770),at=i(78510),st=(0,r.IY)().setApp("files").detectUser().build();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 ct(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ut(i.key),i)}}function ut(t){var e=function(t,e){if("object"!==lt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==lt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===lt(e)?e:String(e)}var dt,ft=function(){function t(e){var n,i,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,r=void 0,(i=ut(i="_action"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.validateAction(e),this._action=e}var e,n;return e=t,(n=[{key:"id",get:function(){return this._action.id}},{key:"displayName",get:function(){return this._action.displayName}},{key:"iconSvgInline",get:function(){return this._action.iconSvgInline}},{key:"enabled",get:function(){return this._action.enabled}},{key:"exec",get:function(){return this._action.exec}},{key:"execBatch",get:function(){return this._action.execBatch}},{key:"order",get:function(){return this._action.order}},{key:"default",get:function(){return this._action.default}},{key:"inline",get:function(){return this._action.inline}},{key:"renderInline",get:function(){return this._action.renderInline}},{key:"validateAction",value:function(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(!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("default"in t&&"boolean"!=typeof 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")}}])&&ct(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),pt=function(){return window._nc_fileactions||[]};function At(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function vt(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){At(o,i,r,a,s,"next",t)}function s(t){At(o,i,r,a,s,"throw",t)}a(void 0)}))}}function ht(t){return ht="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},ht(t)}function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function gt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach((function(e){bt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==ht(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==ht(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===ht(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}dt=new ft({id:"delete",displayName:function(t,e){return"trashbin"===e.id?(0,a.Iu)("files_trashbin","Delete permanently"):(0,a.Iu)("files","Delete")},iconSvgInline:function(){return at},enabled:function(t){return t.length>0&&t.map((function(t){return t.permissions})).every((function(t){return 0!=(t&ot.y3.DELETE)}))},exec:function(t){return vt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.default.delete(t.source);case 3:return(0,rt.j8)("files:file:deleted",t),e.abrupt("return",!0);case 7:return e.prev=7,e.t0=e.catch(0),st.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){var n=this;return vt(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",Promise.all(t.map((function(t){return n.exec(t,e)}))));case 1:case"end":return i.stop()}}),i)})))()},order:100}),void 0===window._nc_fileactions&&(window._nc_fileactions=[],st.debug("FileActions initialized")),window._nc_fileactions.find((function(t){return t.id===dt.id}))?st.error("FileAction ".concat(dt.id," already registered"),{action:dt}):window._nc_fileactions.push(dt);var wt=function(t){var e=t.id,n=t.name,i=t.order,r=t.icon,o=t.parent,a=t.classes,s=void 0===a?"":a,l=t.expanded,c=t.params;OCP.Files.Navigation.register({id:e,name:n,order:i,params:c,parent:o,expanded:!0===l,iconClass:r?"icon-".concat(r):"nav-icon-"+e,legacy:!0,sticky:s.includes("pinned")})},yt=i(59305),Ct=i(41487),_t=i.n(Ct);function xt(t){return xt="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},xt(t)}function kt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Pt(i.key),i)}}function St(t,e,n){return(e=Pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t){var e=function(t,e){if("object"!==xt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==xt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===xt(e)?e:String(e)}var Et=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),St(this,"_views",[]),St(this,"_currentView",null),st.debug("Navigation service initialized")}var e,n;return e=t,(n=[{key:"register",value:function(t){try{Nt(t),Ot(t,this._views)}catch(e){throw e instanceof Error&&st.error(e.message,{view:t}),e}t.legacy&&st.warn("Legacy view detected, please migrate to Vue"),t.iconClass&&(t.legacy=!0),this._views.push(t)}},{key:"views",get:function(){return this._views}},{key:"setActive",value:function(t){this._currentView=t}},{key:"active",get:function(){return this._currentView}}])&&kt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ot=function(t,e){if(e.find((function(e){return e.id===t.id})))throw new Error("Navigation id ".concat(t.id," is already registered"));return!0},Nt=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("Navigation id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("Navigation name is required and must be a string");if(!t.legacy){if(!t.getContents||"function"!=typeof t.getContents)throw new Error("Navigation getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!_t()(t.icon))throw new Error("Navigation icon is required and must be a valid svg string")}if(!("order"in t)||"number"!=typeof t.order)throw new Error("Navigation order is required and must be a number");if(t.columns&&t.columns.forEach(jt),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("Navigation emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("Navigation parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("Navigation sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("Navigation expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("Navigation defaultSortKey must be a string");return!0},jt=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};function Bt(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function It(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Bt(o,i,r,a,s,"next",t)}function s(t){Bt(o,i,r,a,s,"throw",t)}a(void 0)}))}}var Ft=i(57638),Tt=i(55209),zt=i.n(Tt),Ut=i(14032),Dt=i.n(Ut),Rt=i(91211),Lt=i.n(Rt),Vt=i(28615),Zt=i(74184),qt=i(48959),Gt=i.n(qt);function Mt(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function $t(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Mt(o,i,r,a,s,"next",t)}function s(t){Mt(o,i,r,a,s,"throw",t)}a(void 0)}))}}var Wt={name:"NavigationQuota",components:{ChartPie:Zt.Z,NcAppNavigationItem:Dt(),NcProgressBar:Gt()},data:function(){return{loadingStorageStats:!1,storageStats:(0,o.j)("files","storageStats",null)}},computed:{storageStatsTitle:function(){var t,e,n,i=(0,ot.sS)(null===(t=this.storageStats)||void 0===t?void 0:t.used),r=(0,ot.sS)(null===(e=this.storageStats)||void 0===e?void 0:e.quota);return(null===(n=this.storageStats)||void 0===n?void 0:n.quota)<0?this.t("files","{usedQuotaByte} used",{usedQuotaByte:i}):this.t("files","{used} of {quota} used",{used:i,quota:r})},storageStatsTooltip:function(){return this.storageStats.relative?this.t("files","{relative}% used",this.storageStats):""}},beforeMount:function(){setInterval(this.throttleUpdateStorageStats,6e4),(0,rt.Ld)("files:file:created",this.throttleUpdateStorageStats),(0,rt.Ld)("files:file:deleted",this.throttleUpdateStorageStats),(0,rt.Ld)("files:file:moved",this.throttleUpdateStorageStats),(0,rt.Ld)("files:file:updated",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:created",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:deleted",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:moved",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:updated",this.throttleUpdateStorageStats)},methods:{debounceUpdateStorageStats:(0,Vt.D)(200,(function(t){this.updateStorageStats(t)})),throttleUpdateStorageStats:(0,Vt.P)(1e3,(function(t){this.updateStorageStats(t)})),updateStorageStats:function(){var e=arguments,n=this;return $t(regeneratorRuntime.mark((function i(){var r,o,a;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=e.length>0&&void 0!==e[0]?e[0]:null,!n.loadingStorageStats){i.next=3;break}return i.abrupt("return");case 3:return n.loadingStorageStats=!0,i.prev=4,i.next=7,u.default.get((0,s.generateUrl)("/apps/files/api/v1/stats"));case 7:if(null!=(a=i.sent)&&null!==(o=a.data)&&void 0!==o&&o.data){i.next=10;break}throw new Error("Invalid storage stats");case 10:n.storageStats=a.data.data,i.next=17;break;case 13:i.prev=13,i.t0=i.catch(4),st.error("Could not refresh storage stats",{error:i.t0}),r&&(0,p.x2)(t("files","Could not refresh storage stats"));case 17:return i.prev=17,n.loadingStorageStats=!1,i.finish(17);case 20:case"end":return i.stop()}}),i,null,[[4,13,17,20]])})))()},t:a.Iu}},Ht=Wt,Yt=i(358),Kt={};Kt.styleTagTransform=z(),Kt.setAttributes=B(),Kt.insert=N().bind(null,"head"),Kt.domAPI=E(),Kt.insertStyleElement=F(),S()(Yt.Z,Kt),Yt.Z&&Yt.Z.locals&&Yt.Z.locals;var Qt=(0,R.Z)(Ht,(function(){var t=this,e=t._self._c;return t.storageStats?e("NcAppNavigationItem",{staticClass:"app-navigation-entry__settings-quota",class:{"app-navigation-entry__settings-quota--not-unlimited":t.storageStats.quota>=0},attrs:{"aria-label":t.t("files","Storage informations"),loading:t.loadingStorageStats,name:t.storageStatsTitle,title:t.storageStatsTooltip,"data-cy-files-navigation-settings-quota":""},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.debounceUpdateStorageStats.apply(null,arguments)}}},[e("ChartPie",{attrs:{slot:"icon",size:20},slot:"icon"}),t._v(" "),t.storageStats.quota>=0?e("NcProgressBar",{attrs:{slot:"extra",error:t.storageStats.relative>80,value:Math.min(t.storageStats.relative,100)},slot:"extra"}):t._e()],1):t._e()}),[],!1,null,"26c061ec",null),Jt=Qt.exports,Xt=i(68988),te=i.n(Xt),ee=i(16809),ne=i.n(ee),ie=i(20571),re=i.n(ie),oe=i(70386),ae=i(36029),se=i.n(ae),le={name:"Setting",props:{el:{type:Function,required:!0}},mounted:function(){this.$el.appendChild(this.el())}},ce=(0,R.Z)(le,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports;function ue(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var de=(0,o.j)("files","config",{show_hidden:!1,crop_image_previews:!0}),fe=function(){var t=(0,yt.Q_)("userconfig",{state:function(){return{userConfig:de}},actions:{onUpdate:function(t,e){d.default.set(this.userConfig,t,e)},update:function(t,e){return(n=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u.default.post((0,s.generateUrl)("/apps/files/api/v1/config/"+t),{value:e});case 2:(0,rt.j8)("files:config:updated",{key:t,value:e});case 3:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(i,r){var o=n.apply(t,e);function a(t){ue(o,i,r,a,s,"next",t)}function s(t){ue(o,i,r,a,s,"throw",t)}a(void 0)}))})();var n}}}),e=t();return e.initialized||((0,rt.Ld)("files:config:updated",(function(t){var n=t.key,i=t.value;e.onUpdate(n,i)})),e.initialized=!0),e};function pe(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var Ae={name:"Settings",components:{Clipboard:oe.Z,NcAppSettingsDialog:te(),NcAppSettingsSection:ne(),NcCheckboxRadioSwitch:re(),NcInputField:se(),Setting:ce},props:{open:{type:Boolean,default:!1}},setup:function(){return{userConfigStore:fe()}},data:function(){var t,e,n,i;return{settings:(null===(t=window.OCA)||void 0===t||null===(e=t.Files)||void 0===e||null===(n=e.Settings)||void 0===n?void 0:n.settings)||[],webdavUrl:(0,s.generateRemoteUrl)("dav/files/"+encodeURIComponent(null===(i=(0,l.ts)())||void 0===i?void 0:i.uid)),webdavDocs:"https://docs.nextcloud.com/server/stable/go.php?to=user-webdav",appPasswordUrl:(0,s.generateUrl)("/settings/user/security#generate-app-token-section"),webdavUrlCopied:!1}},computed:{userConfig:function(){return this.userConfigStore.userConfig}},beforeMount:function(){this.settings.forEach((function(t){return t.open()}))},beforeDestroy:function(){this.settings.forEach((function(t){return t.close()}))},methods:{onClose:function(){this.$emit("close")},setConfig:function(t,e){this.userConfigStore.update(t,e)},copyCloudId:function(){var e,n=this;return(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(document.querySelector("input#webdav-url-input").select(),navigator.clipboard){e.next=4;break}return(0,p.x2)(t("files","Clipboard is not available")),e.abrupt("return");case 4:return e.next=6,navigator.clipboard.writeText(n.webdavUrl);case 6:n.webdavUrlCopied=!0,(0,p.s$)(t("files","WebDAV URL copied to clipboard")),setTimeout((function(){n.webdavUrlCopied=!1}),5e3);case 9:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(t){pe(o,i,r,a,s,"next",t)}function s(t){pe(o,i,r,a,s,"throw",t)}a(void 0)}))})()},t:a.Iu}},ve=Ae,he=i(40127),me={};me.styleTagTransform=z(),me.setAttributes=B(),me.insert=N().bind(null,"head"),me.domAPI=E(),me.insertStyleElement=F(),S()(he.Z,me),he.Z&&he.Z.locals&&he.Z.locals;var ge=(0,R.Z)(ve,(function(){var t=this,e=t._self._c;return e("NcAppSettingsDialog",{attrs:{open:t.open,"show-navigation":!0,title:t.t("files","Files settings")},on:{"update:open":t.onClose}},[e("NcAppSettingsSection",{attrs:{id:"settings",title:t.t("files","Files settings")}},[e("NcCheckboxRadioSwitch",{attrs:{checked:t.userConfig.show_hidden},on:{"update:checked":function(e){return t.setConfig("show_hidden",e)}}},[t._v("\n\t\t\t"+t._s(t.t("files","Show hidden files"))+"\n\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.userConfig.crop_image_previews},on:{"update:checked":function(e){return t.setConfig("crop_image_previews",e)}}},[t._v("\n\t\t\t"+t._s(t.t("files","Crop image previews"))+"\n\t\t")])],1),t._v(" "),0!==t.settings.length?e("NcAppSettingsSection",{attrs:{id:"more-settings",title:t.t("files","Additional settings")}},[t._l(t.settings,(function(t){return[e("Setting",{key:t.name,attrs:{el:t.el}})]}))],2):t._e(),t._v(" "),e("NcAppSettingsSection",{attrs:{id:"webdav",title:t.t("files","WebDAV")}},[e("NcInputField",{attrs:{id:"webdav-url-input","show-trailing-button":!0,success:t.webdavUrlCopied,"trailing-button-label":t.t("files","Copy to clipboard"),value:t.webdavUrl,readonly:"readonly",type:"url"},on:{focus:function(t){return t.target.select()},"trailing-button-click":t.copyCloudId},scopedSlots:t._u([{key:"trailing-button-icon",fn:function(){return[e("Clipboard",{attrs:{size:20}})]},proxy:!0}])}),t._v(" "),e("em",[e("a",{staticClass:"setting-link",attrs:{href:t.webdavDocs,target:"_blank",rel:"noreferrer noopener"}},[t._v("\n\t\t\t\t"+t._s(t.t("files","Use this address to access your Files via WebDAV"))+" ↗\n\t\t\t")])]),t._v(" "),e("br"),t._v(" "),e("em",[e("a",{staticClass:"setting-link",attrs:{href:t.appPasswordUrl}},[t._v("\n\t\t\t\t"+t._s(t.t("files","If you have enabled 2FA, you must create and use a new app password by clicking here."))+" ↗\n\t\t\t")])])],1)],1)}),[],!1,null,"b5e4b862",null).exports;function be(t){return be="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},be(t)}function we(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?we(Object(n),!0).forEach((function(e){Ce(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ce(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==be(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==be(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===be(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var xe={name:"Navigation",components:{Cog:Ft.default,NavigationQuota:Jt,NcAppNavigation:zt(),NcAppNavigationItem:Dt(),NcIconSvgWrapper:Lt(),SettingsModal:ge},props:{Navigation:{type:Et,required:!0}},data:function(){return{settingsOpened:!1}},computed:{currentViewId:function(){var t,e;return(null===(t=this.$route)||void 0===t||null===(e=t.params)||void 0===e?void 0:e.view)||"files"},currentView:function(){var t=this;return this.views.find((function(e){return e.id===t.currentViewId}))},views:function(){return this.Navigation.views},parentViews:function(){return this.views.filter((function(t){return!t.parent})).sort((function(t,e){return t.order-e.order}))},childViews:function(){return this.views.filter((function(t){return!!t.parent})).reduce((function(t,e){return t[e.parent]=[].concat(function(t){if(Array.isArray(t))return _e(t)}(n=t[e.parent]||[])||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return _e(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]),t[e.parent].sort((function(t,e){return t.order-e.order})),t;var n}),{})}},watch:{currentView:function(t,e){(null==t?void 0:t.id)!==(null==e?void 0:e.id)&&(this.Navigation.setActive(t),st.debug("Navigation changed",{id:t.id,view:t}),this.showView(t,e))}},beforeMount:function(){var t=this;this.currentView&&(st.debug("Navigation mounted. Showing requested view",{view:this.currentView}),this.showView(this.currentView)),(0,rt.Ld)("files:legacy-navigation:changed",this.onLegacyNavigationChanged),(0,rt.Ld)("files:legacy-view:initialized",(function(){st.debug("Legacy view initialized",ye({},t.currentView)),t.showView(t.currentView)}))},methods:{showView:function(t,e){var n,i,r,o,a,s,l;if(null===(n=window)||void 0===n||null===(i=n.OCA)||void 0===i||null===(r=i.Files)||void 0===r||null===(o=r.Sidebar)||void 0===o||null===(a=o.close)||void 0===a||a.call(o),null!=t&&t.legacy){var c=document.querySelector("#app-content #app-content-"+this.currentView.id+".viewcontainer");document.querySelectorAll("#app-content .viewcontainer").forEach((function(t){t.classList.add("hidden")})),c.classList.remove("hidden");var u=OC.Util.History.parseUrlQuery().dir,d=void 0===u?"/":u,f={itemId:t.id,dir:d};st.debug("Triggering legacy navigation event",f),window.jQuery(c).trigger(new window.jQuery.Event("show",f)),window.jQuery(c).trigger(new window.jQuery.Event("urlChanged",f))}this.Navigation.setActive(t),s=t.name,(l=document.getElementById("page-heading-level-1"))&&(l.textContent=s),(0,rt.j8)("files:navigation:changed",t)},onLegacyNavigationChanged:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"files"},e=t.id,n=this.Navigation.views.find((function(t){return t.id===e}));n&&n.legacy&&n.id!==this.currentView.id&&(this.$router.replace(ye(ye({},this.$route),{},{params:{view:n.id}})),this.Navigation.setActive(n),this.showView(n))},onToggleExpand:function(t){t.expanded=!t.expanded,u.default.post((0,s.generateUrl)("/apps/files/api/v1/toggleShowFolder/".concat(t.id)),{show:t.expanded})},generateToNavigation:function(t){if(t.params){var e=t.params,n=e.dir,i=e.fileid;return{name:"filelist",params:t.params,query:{dir:n,fileid:i}}}return{name:"filelist",params:{view:t.id}}},openSettings:function(){this.settingsOpened=!0},onSettingsClose:function(){this.settingsOpened=!1},t:a.Iu}},ke=xe,Se=i(93578),Pe={};Pe.styleTagTransform=z(),Pe.setAttributes=B(),Pe.insert=N().bind(null,"head"),Pe.domAPI=E(),Pe.insertStyleElement=F(),S()(Se.Z,Pe),Se.Z&&Se.Z.locals&&Se.Z.locals;var Ee=(0,R.Z)(ke,(function(){var t=this,e=t._self._c;return e("NcAppNavigation",{attrs:{"data-cy-files-navigation":""},scopedSlots:t._u([{key:"list",fn:function(){return t._l(t.parentViews,(function(n){return e("NcAppNavigationItem",{key:n.id,attrs:{"allow-collapse":!0,"data-cy-files-navigation-item":n.id,icon:n.iconClass,open:n.expanded,pinned:n.sticky,title:n.name,to:t.generateToNavigation(n)},on:{"update:open":function(e){return t.onToggleExpand(n)}}},[n.icon?e("NcIconSvgWrapper",{attrs:{slot:"icon",svg:n.icon},slot:"icon"}):t._e(),t._v(" "),t._l(t.childViews[n.id],(function(i){return e("NcAppNavigationItem",{key:i.id,attrs:{"data-cy-files-navigation-item":i.id,exact:!0,icon:i.iconClass,title:i.name,to:t.generateToNavigation(i)}},[n.icon?e("NcIconSvgWrapper",{attrs:{slot:"icon",svg:n.icon},slot:"icon"}):t._e()],1)}))],2)}))},proxy:!0},{key:"footer",fn:function(){return[e("ul",{staticClass:"app-navigation-entry__settings"},[e("NavigationQuota"),t._v(" "),e("NcAppNavigationItem",{attrs:{"aria-label":t.t("files","Open the files app settings"),title:t.t("files","Files settings"),"data-cy-files-navigation-settings-button":""},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.openSettings.apply(null,arguments)}}},[e("Cog",{attrs:{slot:"icon",size:20},slot:"icon"})],1)],1)]},proxy:!0}])},[t._v(" "),t._v(" "),e("SettingsModal",{attrs:{open:t.settingsOpened,"data-cy-files-navigation-settings":""},on:{close:t.onSettingsClose}})],1)}),[],!1,null,"5bdabc28",null),Oe=Ee.exports,Ne=i(23664),je=i(69680),Be=i.n(je),Ie=i(10861),Fe=i.n(Ie),Te=i(64192),ze=i.n(Te),Ue=i(33581);function De(t){return De="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},De(t)}function Re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(n),!0).forEach((function(e){Ve(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ve(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==De(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==De(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===De(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ze=function(){var t=(0,yt.Q_)("files",{state:function(){return{files:{},roots:{}}},getters:{getNode:function(t){return function(e){return t.files[e]}},getNodes:function(t){return function(e){return e.map((function(e){return t.files[e]})).filter(Boolean)}},getRoot:function(t){return function(e){return t.roots[e]}}},actions:{updateNodes:function(t){var e=t.reduce((function(t,e){return e.attributes.fileid?(t[e.attributes.fileid]=e,t):(st.warn("Trying to update/set a node without fileid",e),t)}),{});d.default.set(this,"files",Le(Le({},this.files),e))},deleteNodes:function(t){var e=this;t.forEach((function(t){t.fileid&&d.default.delete(e.files,t.fileid)}))},setRoot:function(t){var e=t.service,n=t.root;d.default.set(this.roots,e,n)},onCreatedNode:function(){},onDeletedNode:function(t){this.deleteNodes([t])},onMovedNode:function(){}}})();return t.initialized||((0,rt.Ld)("files:file:created",t.onCreatedNode),(0,rt.Ld)("files:file:deleted",t.onDeletedNode),(0,rt.Ld)("files:file:moved",t.onMovedNode),(0,rt.Ld)("files:folder:created",t.onCreatedNode),(0,rt.Ld)("files:folder:deleted",t.onDeletedNode),(0,rt.Ld)("files:folder:moved",t.onMovedNode),t.initialized=!0),t},qe=function(){var t=(0,yt.Q_)("paths",{state:function(){return{}},getters:{getPath:function(t){return function(e,n){if(t[e])return t[e][n]}}},actions:{addPath:function(t){this[t.service]||d.default.set(this,t.service,{}),d.default.set(this[t.service],t.path,t.fileid)}}}),e=t();return e.initialized||(e.initialized=!0),e},Ge=(0,yt.Q_)("selection",{state:function(){return{selected:[]}},actions:{set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];d.default.set(this,"selected",t)},reset:function(){d.default.set(this,"selected",[])}}}),Me=function(t,e,n){return u.default.post((0,s.generateUrl)("/apps/files/api/v1/sorting"),{mode:t,direction:e,view:n})},$e=(0,o.j)("files","filesSortingConfig",{}),We=(0,yt.Q_)("sorting",{state:function(){return{filesSortingConfig:$e}},getters:{isAscSorting:function(t){return function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files";return"desc"!==(null===(e=t.filesSortingConfig[n])||void 0===e?void 0:e.direction)}},getSortingMode:function(t){return function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files";return null===(e=t.filesSortingConfig[n])||void 0===e?void 0:e.mode}}},actions:{setSortingBy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"basename",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"files",n=this.filesSortingConfig[e]||{};n.mode=t,n.direction="asc",d.default.set(this.filesSortingConfig,e,n),Me(n.mode,n.direction,e)},toggleSortingDirection:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",e=this.filesSortingConfig[t]||{direction:"asc"},n="asc"===e.direction?"desc":"asc";e.direction=n,d.default.set(this.filesSortingConfig,t,e),Me(e.mode,e.direction,t)}}}),He=i(15764),Ye=i(64412),Ke=i.n(Ye),Qe=i(44706),Je=i.n(Qe);function Xe(t){return Xe="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},Xe(t)}function tn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function en(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tn(Object(n),!0).forEach((function(e){nn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function nn(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Xe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Xe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Xe(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var on=d.default.extend({name:"BreadCrumbs",components:{Home:He.Z,NcBreadcrumbs:Je(),NcBreadcrumb:Ke()},props:{path:{type:String,default:"/"}},computed:{dirs:function(){var t,e,n=this.path.split("/").filter(Boolean).map((t="/",function(e){return t+="".concat(e,"/")}));return["/"].concat((e=n.map((function(t){return t.replace(/^(.+)\/$/,"$1")})),function(t){if(Array.isArray(t))return rn(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return rn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))},sections:function(){var t=this;return this.dirs.map((function(e){var n=en(en({},t.$route),{},{query:{dir:e}});return{dir:e,exact:!0,name:(0,f.basename)(e),to:n}}))}},methods:{onClick:function(t){var e;(null==t||null===(e=t.query)||void 0===e?void 0:e.dir)===this.$route.query.dir&&this.$emit("reload")},ariaLabel:function(e){var n,i;return(null==e||null===(n=e.to)||void 0===n||null===(i=n.query)||void 0===i?void 0:i.dir)===this.$route.query.dir?t("files","Reload current directory"):t("files",'Go to the "{dir}" directory',e)}}}),an=on,sn=i(94023),ln={};ln.styleTagTransform=z(),ln.setAttributes=B(),ln.insert=N().bind(null,"head"),ln.domAPI=E(),ln.insertStyleElement=F(),S()(sn.Z,ln),sn.Z&&sn.Z.locals&&sn.Z.locals;var cn=(0,R.Z)(an,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcBreadcrumbs",{attrs:{"data-cy-files-content-breadcrumbs":""}},t._l(t.sections,(function(n,i){return e("NcBreadcrumb",t._b({key:n.dir,attrs:{"aria-label":t.ariaLabel(n),title:t.ariaLabel(n)},nativeOn:{click:function(e){return t.onClick(n.to)}},scopedSlots:t._u([0===i?{key:"icon",fn:function(){return[e("Home",{attrs:{size:20}})]},proxy:!0}:null],null,!0)},"NcBreadcrumb",n,!1))})),1)}),[],!1,null,"260f47ba",null).exports,un=i(35212),dn=i(20296),fn=i(30266),pn=i(3443),An=i.n(pn),vn=i(79855),hn=i(34829),mn=i(45400),gn=i.n(mn),bn=i(12945),wn=i.n(bn),yn=function(t){return caches.open("previews").then((function(e){return e.match(t).then((function(t){return!!t}))}))},Cn={name:"CustomElementRender",props:{source:{type:Object,required:!0},currentView:{type:Object,required:!0},render:{type:Function,required:!0}},computed:{element:function(){return this.render(this.source,this.currentView)}},watch:{element:function(){this.$el.replaceWith(this.element),this.$el=this.element}},mounted:function(){this.$el.replaceWith(this.element),this.$el=this.element}},_n=(0,R.Z)(Cn,(function(){return(0,this._self._c)("span")}),[],!1,null,null,null).exports,xn=i(27856),kn={name:"CustomSvgIconRender",props:{svg:{type:String,required:!0}},watch:{svg:function(){this.$el.innerHTML=(0,xn.sanitize)(this.svg)}},mounted:function(){this.$el.innerHTML=(0,xn.sanitize)(this.svg)}},Sn=i(41929),Pn={};Pn.styleTagTransform=z(),Pn.setAttributes=B(),Pn.insert=N().bind(null,"head"),Pn.domAPI=E(),Pn.insertStyleElement=F(),S()(Sn.Z,Pn),Sn.Z&&Sn.Z.locals&&Sn.Z.locals;var En=(0,R.Z)(kn,(function(){return(0,this._self._c)("span",{staticClass:"custom-svg-icon"})}),[],!1,null,"6646d6a5",null).exports;function On(t){return On="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},On(t)}function Nn(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function jn(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Nn(o,i,r,a,s,"next",t)}function s(t){Nn(o,i,r,a,s,"throw",t)}a(void 0)}))}}function Bn(t){return function(t){if(Array.isArray(t))return In(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return In(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?In(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function In(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Fn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Tn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fn(Object(n),!0).forEach((function(e){zn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function zn(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==On(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==On(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===On(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Un=pt(),Dn=d.default.extend({name:"FileEntry",components:{CustomElementRender:_n,CustomSvgIconRender:En,FileIcon:vn.Z,FolderIcon:hn.default,Fragment:fn.HY,NcActionButton:gn(),NcActions:wn(),NcCheckboxRadioSwitch:re(),NcLoadingIcon:ze()},props:{active:{type:Boolean,default:!1},isSizeAvailable:{type:Boolean,default:!1},source:{type:Object,required:!0},index:{type:Number,required:!0}},setup:function(){return{filesStore:Ze(),selectionStore:Ge(),userConfigStore:fe()}},data:function(){return{backgroundFailed:!1,backgroundImage:"",loading:""}},computed:{userConfig:function(){return this.userConfigStore.userConfig},currentView:function(){return this.$navigation.active},columns:function(){var t;return(null===(t=this.currentView)||void 0===t?void 0:t.columns)||[]},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},fileid:function(){return this.source.attributes.fileid},displayName:function(){return this.source.attributes.displayName||this.source.basename},size:function(){var t=parseInt(this.source.size,10)||0;return"number"!=typeof t||t<0?this.t("files","Pending"):(0,ot.sS)(t,!0)},sizeOpacity:function(){var t=parseInt(this.source.size,10)||0;return!t||t<0?1:.7+(1-.7)*Math.pow(this.source.size/10485760,2)},linkTo:function(){if("folder"===this.source.type){var t=Tn(Tn({},this.$route),{},{query:{dir:(0,f.join)(this.dir,this.source.basename)}});return{is:"router-link",title:this.t("files","Open folder {name}",{name:this.displayName}),to:t}}return{href:this.source.source,title:this.t("files","Download file {name}",{name:this.displayName})}},selectedFiles:{get:function(){return this.selectionStore.selected},set:function(t){st.debug("Changed nodes selection",{selection:t}),this.selectionStore.set(t)}},cropPreviews:function(){return this.userConfig.crop_image_previews},previewUrl:function(){try{var t=new URL(window.location.origin+this.source.attributes.previewUrl);return t.searchParams.set("x","32"),t.searchParams.set("y","32"),t.searchParams.set("a",!0===this.cropPreviews?"1":"0"),t.href}catch(t){return null}},mimeUrl:function(){var t,e,n,i=this.source.mime||"application/octet-stream",r=null===(t=window.OC)||void 0===t||null===(e=t.MimeType)||void 0===e||null===(n=e.getIconUrl)||void 0===n?void 0:n.call(e,i);return r?"url(".concat(r,")"):""},enabledActions:function(){var t=this;return Un.filter((function(e){return!e.enabled||e.enabled([t.source],t.currentView)})).sort((function(t,e){return(t.order||0)-(e.order||0)}))},enabledInlineActions:function(){var t=this;return this.enabledActions.filter((function(e){var n;return null==e||null===(n=e.inline)||void 0===n?void 0:n.call(e,t.source,t.currentView)}))},enabledMenuActions:function(){return[].concat(Bn(this.enabledInlineActions),Bn(Un.filter((function(t){return!t.inline}))))},uniqueId:function(){return this.hashCode(this.source.source)}},watch:{active:function(t,e){if(!1===t&&!0===e)return this.resetState(),void(this.$el.parentNode.style.display="none");this.$el.parentNode.style.display=""},previewUrl:function(){this.clearImg(),this.debounceIfNotCached()}},mounted:function(){this.debounceGetPreview=(0,dn.debounce)((function(){this.fetchAndApplyPreview()}),150,!1),this.debounceIfNotCached()},beforeDestroy:function(){this.resetState()},methods:{debounceIfNotCached:function(){var t=this;return jn(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.previewUrl){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,yn(t.previewUrl);case 4:if(!e.sent){e.next=9;break}return t.backgroundImage="url(".concat(t.previewUrl,")"),t.backgroundFailed=!1,e.abrupt("return");case 9:t.debounceGetPreview();case 10:case"end":return e.stop()}}),e)})))()},fetchAndApplyPreview:function(){var t=this;if(this.previewUrl){this.previewPromise&&this.clearImg();var e=new AbortController;this.previewPromise=new(An())((function(n,i,r){var o=new Image;o.fetchpriority=t.active?"high":"auto",o.onload=function(){t.backgroundImage="url(".concat(t.previewUrl,")"),t.backgroundFailed=!1,n(o)},o.onerror=function(){t.backgroundFailed=!0,i(o)},o.src=t.previewUrl,r((function(){o.onerror=null,o.onload=null,o.src="",e.abort()}))}))}},resetState:function(){this.loading="",this.clearImg(),this.$refs.actionsMenu.closeMenu()},clearImg:function(){this.backgroundImage="",this.backgroundFailed=!1,this.previewPromise&&(this.previewPromise.cancel(),this.previewPromise=null)},hashCode:function(t){for(var e=0,n=0,i=t.length;n<i;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e},onActionClick:function(t){var e=this;return jn(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=t.displayName([e.source],e.currentView),n.prev=1,e.loading=t.id,n.next=5,t.exec(e.source,e.currentView);case 5:n.next=11;break;case 7:n.prev=7,n.t0=n.catch(1),st.error("Error while executing action",{action:t,e:n.t0}),(0,p.x2)(e.t("files",'Error while executing action "{displayName}"',{displayName:i}));case 11:return n.prev=11,e.loading="",n.finish(11);case 14:case"end":return n.stop()}}),n,null,[[1,7,11,14]])})))()},t:a.Iu,formatFileSize:ot.sS}}),Rn=Dn,Ln=i(50831),Vn={};Vn.styleTagTransform=z(),Vn.setAttributes=B(),Vn.insert=N().bind(null,"head"),Vn.domAPI=E(),Vn.insertStyleElement=F(),S()(Ln.Z,Vn),Ln.Z&&Ln.Z.locals&&Ln.Z.locals;var Zn=i(2974),qn={};qn.styleTagTransform=z(),qn.setAttributes=B(),qn.insert=N().bind(null,"head"),qn.domAPI=E(),qn.insertStyleElement=F(),S()(Zn.Z,qn),Zn.Z&&Zn.Z.locals&&Zn.Z.locals;var Gn=(0,R.Z)(Rn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("Fragment",[e("td",{staticClass:"files-list__row-checkbox"},[t.active?e("NcCheckboxRadioSwitch",{attrs:{"aria-label":t.t("files","Select the row for {displayName}",{displayName:t.displayName}),checked:t.selectedFiles,value:t.fileid.toString(),name:"selectedFiles"},on:{"update:checked":function(e){t.selectedFiles=e}}}):t._e()],1),t._v(" "),e("td",{staticClass:"files-list__row-name"},[e("a",t._b({ref:"name"},"a",t.linkTo,!1),[e("span",{staticClass:"files-list__row-icon"},["folder"===t.source.type?e("FolderIcon"):t.previewUrl&&!t.backgroundFailed?e("span",{ref:"previewImg",staticClass:"files-list__row-icon-preview",style:{backgroundImage:t.backgroundImage}}):t.mimeUrl?e("span",{staticClass:"files-list__row-icon-preview files-list__row-icon-preview--mime",style:{backgroundImage:t.mimeUrl}}):e("FileIcon")],1),t._v(" "),e("span",{staticClass:"files-list__row-name-text"},[t._v(t._s(t.displayName))])])]),t._v(" "),e("td",{staticClass:"files-list__row-actions",class:"files-list__row-actions-".concat(t.uniqueId)},[t.active?e("NcActions",{ref:"actionsMenu",attrs:{"force-title":!0,inline:t.enabledInlineActions.length}},t._l(t.enabledMenuActions,(function(n){return e("NcActionButton",{key:n.id,class:"files-list__row-action-"+n.id,on:{click:function(e){return t.onActionClick(n)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading===n.id?e("NcLoadingIcon",{attrs:{size:18}}):e("CustomSvgIconRender",{attrs:{svg:n.iconSvgInline([t.source],t.currentView)}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t"+t._s(n.displayName([t.source],t.currentView))+"\n\t\t\t")])})),1):t._e()],1),t._v(" "),t.isSizeAvailable?e("td",{staticClass:"files-list__row-size",style:{opacity:t.sizeOpacity}},[e("span",[t._v(t._s(t.size))])]):t._e(),t._v(" "),t._l(t.columns,(function(n){var i;return e("td",{key:n.id,staticClass:"files-list__row-column-custom",class:"files-list__row-".concat(null===(i=t.currentView)||void 0===i?void 0:i.id,"-").concat(n.id)},[t.active?e("CustomElementRender",{attrs:{"current-view":t.currentView,render:n.render,source:t.source}}):t._e()],1)}))],2)}),[],!1,null,"3600e364",null),Mn=Gn.exports;function $n(t){return $n="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},$n(t)}var Wn=d.default.extend({name:"FilesListFooter",components:{},props:{isSizeAvailable:{type:Boolean,default:!1},nodes:{type:Array,required:!0},summary:{type:String,default:""}},setup:function(){var t=qe();return{filesStore:Ze(),pathsStore:t}},computed:{currentView:function(){return this.$navigation.active},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},currentFolder:function(){var t;if(null!==(t=this.currentView)&&void 0!==t&&t.id){if("/"===this.dir)return this.filesStore.getRoot(this.currentView.id);var e=this.pathsStore.getPath(this.currentView.id,this.dir);return this.filesStore.getNode(e)}},columns:function(){var t;return(null===(t=this.currentView)||void 0===t?void 0:t.columns)||[]},totalSize:function(){var t;return null!==(t=this.currentFolder)&&void 0!==t&&t.size?(0,ot.sS)(this.currentFolder.size,!0):(0,ot.sS)(this.nodes.reduce((function(t,e){return t+e.size||0}),0),!0)}},methods:{classForColumn:function(t){return e={"files-list__row-column-custom":!0},n="files-list__row-".concat(this.currentView.id,"-").concat(t.id),i=!0,(n=function(t){var e=function(t,e){if("object"!==$n(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==$n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===$n(e)?e:String(e)}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e;var e,n,i},t:a.Iu}}),Hn=i(78636),Yn={};Yn.styleTagTransform=z(),Yn.setAttributes=B(),Yn.insert=N().bind(null,"head"),Yn.domAPI=E(),Yn.insertStyleElement=F(),S()(Hn.Z,Yn),Hn.Z&&Hn.Z.locals&&Hn.Z.locals;var Kn=(0,R.Z)(Wn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("tr",[e("th",{staticClass:"files-list__row-checkbox"},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("files","Total rows summary")))])]),t._v(" "),e("td",{staticClass:"files-list__row-name"},[e("span",{staticClass:"files-list__row-icon"}),t._v(" "),e("span",[t._v(t._s(t.summary))])]),t._v(" "),e("td",{staticClass:"files-list__row-actions"}),t._v(" "),t.isSizeAvailable?e("td",{staticClass:"files-list__column files-list__row-size"},[e("span",[t._v(t._s(t.totalSize))])]):t._e(),t._v(" "),t._l(t.columns,(function(n){var i;return e("th",{key:n.id,class:t.classForColumn(n)},[e("span",[t._v(t._s(null===(i=n.summary)||void 0===i?void 0:i.call(n,t.nodes,t.currentView)))])])}))],2)}),[],!1,null,"cc078f7a",null).exports;function Qn(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var Jn=pt(),Xn=d.default.extend({name:"FilesListHeaderActions",components:{CustomSvgIconRender:En,NcActions:wn(),NcActionButton:gn(),NcLoadingIcon:ze()},props:{currentView:{type:Object,required:!0},selectedNodes:{type:Array,default:function(){return[]}}},setup:function(){return{filesStore:Ze(),selectionStore:Ge()}},data:function(){return{loading:null}},computed:{enabledActions:function(){var t=this;return Jn.filter((function(t){return t.execBatch})).filter((function(e){return!e.enabled||e.enabled(t.nodes,t.currentView)})).sort((function(t,e){return(t.order||0)-(e.order||0)}))},nodes:function(){var t=this;return this.selectedNodes.map((function(e){return t.getNode(e)})).filter((function(t){return t}))}},methods:{getNode:function(t){return this.filesStore.getNode(t)},onActionClick:function(t){var e,n=this;return(e=regeneratorRuntime.mark((function e(){var i,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.displayName(n.nodes,n.currentView),r=n.selectedNodes,e.prev=2,n.loading=t.id,e.next=6,t.execBatch(n.nodes,n.currentView);case 6:if(!(o=e.sent).some((function(t){return!0!==t}))){e.next=12;break}return a=r.filter((function(t,e){return!0!==o[e]})),n.selectionStore.set(a),(0,p.x2)(n.t("files",'"{displayName}" failed on some elements ',{displayName:i})),e.abrupt("return");case 12:(0,p.s$)(n.t("files",'"{displayName}" batch action successfully executed',{displayName:i})),n.selectionStore.reset(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(2),st.error("Error while executing action",{action:t,e:e.t0}),(0,p.x2)(n.t("files",'Error while executing action "{displayName}"',{displayName:i}));case 20:return e.prev=20,n.loading=null,e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[2,16,20,23]])})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(t){Qn(o,i,r,a,s,"next",t)}function s(t){Qn(o,i,r,a,s,"throw",t)}a(void 0)}))})()},t:a.Iu}}),ti=Xn,ei=i(47480),ni={};ni.styleTagTransform=z(),ni.setAttributes=B(),ni.insert=N().bind(null,"head"),ni.domAPI=E(),ni.insertStyleElement=F(),S()(ei.Z,ni),ei.Z&&ei.Z.locals&&ei.Z.locals;var ii=(0,R.Z)(ti,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("th",{staticClass:"files-list__column files-list__row-actions-batch",attrs:{colspan:"2"}},[e("NcActions",{ref:"actionsMenu",attrs:{disabled:!!t.loading,"force-title":!0,inline:3}},t._l(t.enabledActions,(function(n){return e("NcActionButton",{key:n.id,class:"files-list__row-actions-batch-"+n.id,on:{click:function(e){return t.onActionClick(n)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading===n.id?e("NcLoadingIcon",{attrs:{size:18}}):e("CustomSvgIconRender",{attrs:{svg:n.iconSvgInline(t.nodes,t.currentView)}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t"+t._s(n.displayName(t.nodes,t.currentView))+"\n\t\t")])})),1)],1)}),[],!1,null,"63bb14b6",null),ri=ii.exports,oi=i(20404),ai=i(23873);function si(t){return si="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},si(t)}function li(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ci(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?li(Object(n),!0).forEach((function(e){ui(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):li(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ui(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==si(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==si(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===si(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var di=d.default.extend({name:"FilesListHeaderButton",components:{MenuDown:oi.Z,MenuUp:ai.Z,NcButton:Fe()},inject:["toggleSortBy"],props:{name:{type:String,required:!0},mode:{type:String,required:!0}},setup:function(){return{sortingStore:We()}},computed:ci(ci({},(0,yt.rn)(We,["filesSortingConfig"])),{},{currentView:function(){return this.$navigation.active},sortingMode:function(){return this.sortingStore.getSortingMode(this.currentView.id)||this.currentView.defaultSortKey||"basename"},isAscSorting:function(){return!0===this.sortingStore.isAscSorting(this.currentView.id)}}),methods:{sortAriaLabel:function(t){var e=this.isAscSorting?this.t("files","ascending"):this.t("files","descending");return this.t("files","Sort list by {column} ({direction})",{column:t,direction:e})},t:a.Iu}}),fi=i(6905),pi={};pi.styleTagTransform=z(),pi.setAttributes=B(),pi.insert=N().bind(null,"head"),pi.domAPI=E(),pi.insertStyleElement=F(),S()(fi.Z,pi),fi.Z&&fi.Z.locals&&fi.Z.locals;var Ai=(0,R.Z)(di,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcButton",{staticClass:"files-list__column-sort-button",class:{"files-list__column-sort-button--active":t.sortingMode===t.mode},attrs:{"aria-label":t.sortAriaLabel(t.name),type:"tertiary"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.toggleSortBy(t.mode)}}},[t.sortingMode!==t.mode||t.isAscSorting?e("MenuUp",{attrs:{slot:"icon"},slot:"icon"}):e("MenuDown",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t"+t._s(t.name)+"\n")],1)}),[],!1,null,null,null).exports;function vi(t){return vi="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},vi(t)}function hi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function mi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hi(Object(n),!0).forEach((function(e){gi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hi(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function gi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==vi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==vi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===vi(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var bi=d.default.extend({name:"FilesListHeader",components:{FilesListHeaderButton:Ai,NcCheckboxRadioSwitch:re(),FilesListHeaderActions:ri},provide:function(){return{toggleSortBy:this.toggleSortBy}},props:{isSizeAvailable:{type:Boolean,default:!1},nodes:{type:Array,required:!0}},setup:function(){return{filesStore:Ze(),selectionStore:Ge(),sortingStore:We()}},computed:mi(mi({},(0,yt.rn)(We,["filesSortingConfig"])),{},{currentView:function(){return this.$navigation.active},columns:function(){var t;return(null===(t=this.currentView)||void 0===t?void 0:t.columns)||[]},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},selectAllBind:function(){var t=this.isNoneSelected||this.isSomeSelected?this.t("files","Select all"):this.t("files","Unselect all");return{"aria-label":t,checked:this.isAllSelected,indeterminate:this.isSomeSelected,title:t}},selectedNodes:function(){return this.selectionStore.selected},isAllSelected:function(){return this.selectedNodes.length===this.nodes.length},isNoneSelected:function(){return 0===this.selectedNodes.length},isSomeSelected:function(){return!this.isAllSelected&&!this.isNoneSelected},sortingMode:function(){return this.sortingStore.getSortingMode(this.currentView.id)||this.currentView.defaultSortKey||"basename"},isAscSorting:function(){return!0===this.sortingStore.isAscSorting(this.currentView.id)}}),methods:{classForColumn:function(t){return gi({"files-list__column":!0,"files-list__column--sortable":!!t.sort,"files-list__row-column-custom":!0},"files-list__row-".concat(this.currentView.id,"-").concat(t.id),!0)},onToggleAll:function(t){if(t){var e=this.nodes.map((function(t){return t.attributes.fileid.toString()}));st.debug("Added all nodes to selection",{selection:e}),this.selectionStore.set(e)}else st.debug("Cleared selection"),this.selectionStore.reset()},toggleSortBy:function(t){this.sortingMode!==t?this.sortingStore.setSortingBy(t,this.currentView.id):this.sortingStore.toggleSortingDirection(this.currentView.id)},t:a.Iu}}),wi=i(79238),yi={};yi.styleTagTransform=z(),yi.setAttributes=B(),yi.insert=N().bind(null,"head"),yi.domAPI=E(),yi.insertStyleElement=F(),S()(wi.Z,yi),wi.Z&&wi.Z.locals&&wi.Z.locals;var Ci=(0,R.Z)(bi,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("tr",[e("th",{staticClass:"files-list__column files-list__row-checkbox"},[e("NcCheckboxRadioSwitch",t._b({on:{"update:checked":t.onToggleAll}},"NcCheckboxRadioSwitch",t.selectAllBind,!1))],1),t._v(" "),t.isNoneSelected?[e("th",{staticClass:"files-list__column files-list__row-name files-list__column--sortable",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.toggleSortBy("basename")}}},[e("span",{staticClass:"files-list__row-icon"}),t._v(" "),e("FilesListHeaderButton",{attrs:{name:t.t("files","Name"),mode:"basename"}})],1),t._v(" "),e("th",{staticClass:"files-list__row-actions"}),t._v(" "),t.isSizeAvailable?e("th",{staticClass:"files-list__column files-list__row-size",class:{"files-list__column--sortable":t.isSizeAvailable}},[e("FilesListHeaderButton",{attrs:{name:t.t("files","Size"),mode:"size"}})],1):t._e(),t._v(" "),t._l(t.columns,(function(n){return e("th",{key:n.id,class:t.classForColumn(n)},[n.sort?e("FilesListHeaderButton",{attrs:{name:n.title,mode:n.id}}):e("span",[t._v("\n\t\t\t\t"+t._s(n.title)+"\n\t\t\t")])],1)}))]:e("FilesListHeaderActions",{attrs:{"current-view":t.currentView,"selected-nodes":t.selectedNodes}})],2)}),[],!1,null,"0bbf142f",null).exports,_i=d.default.extend({name:"FilesListVirtual",components:{RecycleScroller:un.EK,FileEntry:Mn,FilesListHeader:Ci,FilesListFooter:Kn},props:{currentView:{type:Object,required:!0},nodes:{type:Array,required:!0}},data:function(){return{FileEntry:Mn}},computed:{files:function(){return this.nodes.filter((function(t){return"file"===t.type}))},summaryFile:function(){var t=this.files.length;return(0,a.uN)("files","{count} file","{count} files",t,{count:t})},summaryFolder:function(){var t=this.nodes.length-this.files.length;return(0,a.uN)("files","{count} folder","{count} folders",t,{count:t})},summary:function(){return(0,a.Iu)("files","{summaryFile} and {summaryFolder}",this)},isSizeAvailable:function(){return this.nodes.some((function(t){return void 0!==t.attributes.size}))}},mounted:function(){var t=this.$el.querySelectorAll(".vue-recycle-scroller__slot");t[0].setAttribute("role","thead"),t[1].setAttribute("role","tfoot")},methods:{getFileId:function(t){return t.attributes.fileid},t:a.Iu}}),xi=i(40483),ki={};ki.styleTagTransform=z(),ki.setAttributes=B(),ki.insert=N().bind(null,"head"),ki.domAPI=E(),ki.insertStyleElement=F(),S()(xi.Z,ki),xi.Z&&xi.Z.locals&&xi.Z.locals;var Si=(0,R.Z)(_i,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("RecycleScroller",{ref:"recycleScroller",staticClass:"files-list",attrs:{"key-field":"source",items:t.nodes,"item-size":55,"table-mode":!0,"item-class":"files-list__row","item-tag":"tr","list-class":"files-list__body","list-tag":"tbody",role:"table"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.item,r=n.active,o=n.index;return[e("FileEntry",{attrs:{active:r,index:o,"is-size-available":t.isSizeAvailable,source:i}})]}},{key:"before",fn:function(){return[e("caption",{staticClass:"hidden-visually"},[t._v("\n\t\t\t"+t._s(t.currentView.caption||"")+"\n\t\t\t"+t._s(t.t("files","This list is not fully rendered for performances reasons. The files will be rendered as you navigate through the list."))+"\n\t\t")]),t._v(" "),e("FilesListHeader",{attrs:{"is-size-available":t.isSizeAvailable,nodes:t.nodes}})]},proxy:!0},{key:"after",fn:function(){return[e("FilesListFooter",{attrs:{"is-size-available":t.isSizeAvailable,nodes:t.nodes,summary:t.summary}})]},proxy:!0}])})}),[],!1,null,"6f4155ff",null).exports,Pi=i(25108);function Ei(t){return Ei="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},Ei(t)}function Oi(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function Ni(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ji(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ni(Object(n),!0).forEach((function(e){Bi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ni(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Bi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Ei(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Ei(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Ei(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ii(t){return function(t){if(Array.isArray(t))return Fi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Fi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fi(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Ti=d.default.extend({name:"FilesList",components:{BreadCrumbs:cn,FilesListVirtual:Si,NcAppContent:Be(),NcButton:Fe(),NcEmptyContent:v(),NcLoadingIcon:ze(),TrashCan:Ue.Z},setup:function(){var t=qe();return{filesStore:Ze(),pathsStore:t,selectionStore:Ge(),sortingStore:We()}},data:function(){return{loading:!0,promise:null}},computed:{currentView:function(){return this.$navigation.active||this.$navigation.views.find((function(t){return"files"===t.id}))},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},currentFolder:function(){var t;if(null!==(t=this.currentView)&&void 0!==t&&t.id){if("/"===this.dir)return this.filesStore.getRoot(this.currentView.id);var e=this.pathsStore.getPath(this.currentView.id,this.dir);return this.filesStore.getNode(e)}},sortingMode:function(){return this.sortingStore.getSortingMode(this.currentView.id)||this.currentView.defaultSortKey||"basename"},isAscSorting:function(){return!0===this.sortingStore.isAscSorting(this.currentView.id)},dirContents:function(){var t,e=this;if(!this.currentView)return[];var n=this.currentView.columns.find((function(t){return t.id===e.sortingMode}));if(null!=n&&n.sort&&"function"==typeof n.sort){var i,r=Ii(((null===(i=this.currentFolder)||void 0===i?void 0:i.children)||[]).map(this.getNode).filter((function(t){return t}))).sort(n.sort);return this.isAscSorting?r:r.reverse()}return(0,Ne.X)(Ii(((null===(t=this.currentFolder)||void 0===t?void 0:t.children)||[]).map(this.getNode).filter((function(t){return t}))),[].concat(Ii("basename"===this.sortingMode?[function(t){return"folder"!==t.type}]:[]),[function(t){return t[e.sortingMode]},function(t){return t.basename}]),this.isAscSorting?["asc","asc","asc"]:["desc","desc","desc"])},isEmptyDir:function(){return 0===this.dirContents.length},isRefreshing:function(){return void 0!==this.currentFolder&&!this.isEmptyDir&&this.loading},toPreviousDir:function(){var t=this.dir.split("/").slice(0,-1).join("/")||"/";return ji(ji({},this.$route),{},{query:{dir:t}})}},watch:{currentView:function(t,e){(null==t?void 0:t.id)!==(null==e?void 0:e.id)&&(st.debug("View changed",{newView:t,oldView:e}),this.selectionStore.reset(),this.fetchContent())},dir:function(t,e){var n,i;st.debug("Directory changed",{newDir:t,oldDir:e}),this.selectionStore.reset(),this.fetchContent(),null!==(n=this.$refs)&&void 0!==n&&null!==(i=n.filesListVirtual)&&void 0!==i&&i.$el&&(this.$refs.filesListVirtual.$el.scrollTop=0)}},methods:{fetchContent:function(){var t,e=this;return(t=regeneratorRuntime.mark((function t(){var n,i,r,o,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===(n=e.currentView)||void 0===n||!n.legacy){t.next=2;break}return t.abrupt("return");case 2:return e.loading=!0,r=e.dir,o=e.currentView,"function"==typeof(null===(i=e.promise)||void 0===i?void 0:i.cancel)&&(e.promise.cancel(),st.debug("Cancelled previous ongoing fetch")),e.promise=o.getContents(r),t.prev=7,t.next=10,e.promise;case 10:a=t.sent,s=a.folder,l=a.contents,st.debug("Fetched contents",{dir:r,folder:s,contents:l}),e.filesStore.updateNodes(l),s.children=l.map((function(t){return t.attributes.fileid})),"/"===r?(Pi.debug("files","Setting root",{service:o.id,folder:s}),e.filesStore.setRoot({service:o.id,root:s})):s.attributes.fileid?(e.filesStore.updateNodes([s]),e.pathsStore.addPath({service:o.id,fileid:s.attributes.fileid,path:r})):st.error("Invalid root folder returned",{dir:r,folder:s,currentView:o}),l.filter((function(t){return"folder"===t.type})).forEach((function(t){e.pathsStore.addPath({service:o.id,fileid:t.attributes.fileid,path:(0,f.join)(r,t.basename)})})),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(7),st.error("Error while fetching content",{error:t.t0});case 24:return t.prev=24,e.loading=!1,t.finish(24);case 27:case"end":return t.stop()}}),t,null,[[7,21,24,27]])})),function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Oi(o,i,r,a,s,"next",t)}function s(t){Oi(o,i,r,a,s,"throw",t)}a(void 0)}))})()},getNode:function(t){return this.filesStore.getNode(t)},t:a.Iu}}),zi=Ti,Ui=i(15225),Di={};Di.styleTagTransform=z(),Di.setAttributes=B(),Di.insert=N().bind(null,"head"),Di.domAPI=E(),Di.insertStyleElement=F(),S()(Ui.Z,Di),Ui.Z&&Ui.Z.locals&&Ui.Z.locals;var Ri=(0,R.Z)(zi,(function(){var t,e,n=this,i=n._self._c;return n._self._setupProxy,i("NcAppContent",{directives:[{name:"show",rawName:"v-show",value:!(null!==(t=n.currentView)&&void 0!==t&&t.legacy),expression:"!currentView?.legacy"}],class:{"app-content--hidden":null===(e=n.currentView)||void 0===e?void 0:e.legacy},attrs:{"data-cy-files-content":""}},[i("div",{staticClass:"files-list__header"},[i("BreadCrumbs",{attrs:{path:n.dir},on:{reload:n.fetchContent}}),n._v(" "),n.isRefreshing?i("NcLoadingIcon",{staticClass:"files-list__refresh-icon"}):n._e()],1),n._v(" "),n.loading&&!n.isRefreshing?i("NcLoadingIcon",{staticClass:"files-list__loading-icon",attrs:{size:38,title:n.t("files","Loading current folder")}}):!n.loading&&n.isEmptyDir?i("NcEmptyContent",{attrs:{title:n.t("files","No files in here"),description:n.t("files","No files or folders have been deleted yet"),"data-cy-files-content-empty":""},scopedSlots:n._u([{key:"action",fn:function(){return["/"!==n.dir?i("NcButton",{attrs:{"aria-label":"t('files', 'Go to the previous folder')",type:"primary",to:n.toPreviousDir}},[n._v("\n\t\t\t\t"+n._s(n.t("files","Go back"))+"\n\t\t\t")]):n._e()]},proxy:!0},{key:"icon",fn:function(){return[i("TrashCan")]},proxy:!0}])}):i("FilesListVirtual",{ref:"filesListVirtual",attrs:{"current-view":n.currentView,nodes:n.dirContents}})],1)}),[],!1,null,"3722ae64",null).exports,Li=i(25108);function Vi(t){return Vi="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},Vi(t)}function Zi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,qi(i.key),i)}}function qi(t){var e=function(t,e){if("object"!==Vi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Vi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Vi(e)?e:String(e)}var Gi=function(){function t(){var e,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,i=void 0,(n=qi(n="_settings"))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this._settings=[],Li.debug("OCA.Files.Settings initialized")}var e,n;return e=t,(n=[{key:"register",value:function(t){return this._settings.filter((function(e){return e.name===t.name})).length>0?(Li.error("A setting with the same name is already registered"),!1):(this._settings.push(t),!0)}},{key:"settings",get:function(){return this._settings}}])&&Zi(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Mi(t){return Mi="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},Mi(t)}function $i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Hi(i.key),i)}}function Wi(t,e,n){return(e=Hi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hi(t){var e=function(t,e){if("object"!==Mi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Mi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Mi(e)?e:String(e)}var Yi=function(){function t(e,n){var i=n.el,r=n.open,o=n.close;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Wi(this,"_close",void 0),Wi(this,"_el",void 0),Wi(this,"_name",void 0),Wi(this,"_open",void 0),this._name=e,this._el=i,this._open=r,this._close=o,"function"!=typeof this._open&&(this._open=function(){}),"function"!=typeof this._close&&(this._close=function(){})}var e,n;return e=t,(n=[{key:"name",get:function(){return this._name}},{key:"el",get:function(){return this._el}},{key:"open",get:function(){return this._open}},{key:"close",get:function(){return this._close}}])&&$i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ki=i(78345),Qi=i(17563);d.default.use(Ki.ZP);var Ji,Xi,tr=new Ki.ZP({mode:"history",base:(0,s.generateUrl)("/apps/files",""),linkActiveClass:"active",routes:[{path:"/",alias:"/files"},{path:"/:view/:fileid?",name:"filelist",props:!0}],stringifyQuery:function(t){var e=(0,Qi.stringify)(t).replace(/%2F/gim,"/");return e?"?"+e:""}});window.OCA.Files=null!==(Ji=window.OCA.Files)&&void 0!==Ji?Ji:{},window.OCP.Files=null!==(Xi=window.OCP.Files)&&void 0!==Xi?Xi:{},d.default.use(yt.og);var er=(0,yt.WB)(),nr=new Et;Object.assign(window.OCP.Files,{Navigation:nr}),d.default.prototype.$navigation=nr;var ir,rr=new Gi;Object.assign(window.OCA.Files,{Settings:rr}),Object.assign(window.OCA.Files.Settings,{Setting:Yi}),new(d.default.extend(Oe))({name:"FilesNavigationRoot",propsData:{Navigation:nr},router:tr,pinia:er}).$mount("#app-navigation-files"),new(d.default.extend(Ri))({name:"FilesListRoot",router:tr,pinia:er}).$mount("#app-content-vue"),(ir=Object.values((0,o.j)("files","navigation",{}))).length>0&&(st.debug("Legacy files views detected. Processing...",ir),ir.forEach((function(t){wt(t),t.sublist&&t.sublist.forEach((function(e){return wt(gt(gt({},e),{},{parent:t.id}))}))}))),"serviceWorker"in navigator?window.addEventListener("load",It(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=(0,s.generateUrl)("/apps/files/preview-service-worker.js",{},{noRewrite:!0}),t.next=4,navigator.serviceWorker.register(e,{scope:"/"});case 4:n=t.sent,st.debug("SW registered: ",{registration:n}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),st.error("SW registration failed: ",{error:t.t0});case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))):st.debug("Service Worker is not enabled on this browser.")},94023:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".breadcrumb[data-v-260f47ba]{flex:1 1 100% !important;width:100%}.breadcrumb[data-v-260f47ba] a{cursor:pointer !important}","",{version:3,sources:["webpack://./apps/files/src/components/BreadCrumbs.vue"],names:[],mappings:"AACA,6BAEC,wBAAA,CACA,UAAA,CAEA,+BACC,yBAAA",sourcesContent:["\n.breadcrumb {\n\t// Take as much space as possible\n\tflex: 1 1 100% !important;\n\twidth: 100%;\n\n\t::v-deep a {\n\t\tcursor: pointer !important;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},41929:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".custom-svg-icon[data-v-6646d6a5]{display:flex;align-items:center;align-self:center;justify-content:center;justify-self:center;width:44px;height:44px;opacity:1}.custom-svg-icon[data-v-6646d6a5] svg{height:22px;width:22px;fill:currentColor}","",{version:3,sources:["webpack://./apps/files/src/components/CustomSvgIconRender.vue"],names:[],mappings:"AACA,kCACC,YAAA,CACA,kBAAA,CACA,iBAAA,CACA,sBAAA,CACA,mBAAA,CACA,UAAA,CACA,WAAA,CACA,SAAA,CAEA,sCAGC,WAAA,CACA,UAAA,CACA,iBAAA",sourcesContent:["\n.custom-svg-icon {\n\tdisplay: flex;\n\talign-items: center;\n\talign-self: center;\n\tjustify-content: center;\n\tjustify-self: center;\n\twidth: 44px;\n\theight: 44px;\n\topacity: 1;\n\n\t::v-deep svg {\n\t\t// mdi icons have a size of 24px\n\t\t// 22px results in roughly 16px inner size\n\t\theight: 22px;\n\t\twidth: 22px;\n\t\tfill: currentColor;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},50831:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"td[data-v-3600e364],th[data-v-3600e364]{display:flex;align-items:center;flex:0 0 auto;justify-content:left;width:var(--row-height);height:var(--row-height);margin:0;padding:0;color:var(--color-text-maxcontrast);border:none}td span[data-v-3600e364],th span[data-v-3600e364]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__row-checkbox[data-v-3600e364]{justify-content:center}.files-list__row-checkbox[data-v-3600e364] .checkbox-radio-switch{display:flex;justify-content:center;--icon-size: var(--checkbox-size)}.files-list__row-checkbox[data-v-3600e364] .checkbox-radio-switch label.checkbox-radio-switch__label{width:var(--clickable-area);height:var(--clickable-area);margin:0;padding:calc((var(--clickable-area) - var(--checkbox-size))/2)}.files-list__row-checkbox[data-v-3600e364] .checkbox-radio-switch .checkbox-radio-switch__icon{margin:0 !important}.files-list__row-icon[data-v-3600e364]{display:flex;align-items:center;justify-content:center;width:var(--icon-preview-size);height:100%;margin-right:var(--checkbox-padding);color:var(--color-primary-element)}.files-list__row-icon>span[data-v-3600e364]{justify-content:flex-start}.files-list__row-icon[data-v-3600e364] svg{width:var(--icon-preview-size);height:var(--icon-preview-size)}.files-list__row-icon-preview[data-v-3600e364]{overflow:hidden;width:var(--icon-preview-size);height:var(--icon-preview-size);border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center;background-size:contain}.files-list__row-name[data-v-3600e364]{overflow:hidden;flex:1 1 auto}.files-list__row-name a[data-v-3600e364]{display:flex;align-items:center;width:100%;height:100%}.files-list__row-name a:focus .files-list__row-name-text[data-v-3600e364],.files-list__row-name a:focus-visible .files-list__row-name-text[data-v-3600e364]{outline:2px solid var(--color-main-text) !important;border-radius:20px}.files-list__row-name .files-list__row-name-text[data-v-3600e364]{padding:5px 10px;margin-left:-10px}.files-list__row-actions[data-v-3600e364]{width:auto}.files-list__row-actions~td[data-v-3600e364],.files-list__row-actions~th[data-v-3600e364]{margin:0 var(--cell-margin)}.files-list__row-actions[data-v-3600e364]>button .button-vue__text{font-weight:normal}.files-list__row-actions[data-v-3600e364]>button:not(:hover,:focus,:active) .button-vue__wrapper{color:var(--color-text-maxcontrast)}.files-list__row-size[data-v-3600e364]{justify-content:flex-end;width:calc(var(--row-height)*1.5);color:var(--color-main-text)}.files-list__row-size[data-v-3600e364] .files-list__column-sort-button{padding:0 16px 0 4px !important}.files-list__row-size[data-v-3600e364] .files-list__column-sort-button .button-vue__wrapper{flex-direction:row}.files-list__row-column-custom[data-v-3600e364]{width:calc(var(--row-height)*2)}tr[data-v-3600e364]:hover,tr[data-v-3600e364]:focus,tr[data-v-3600e364]:active{background-color:var(--color-background-dark)}.files-list__row-icon-preview[data-v-3600e364]:not([style*=background]){background:var(--color-loading-dark)}","",{version:3,sources:["webpack://./apps/files/src/mixins/fileslist-row.scss","webpack://./apps/files/src/components/FileEntry.vue"],names:[],mappings:"AA4BA,wCACC,YAAA,CACA,kBAAA,CACA,aAAA,CACA,oBAAA,CACA,uBAAA,CACA,wBAAA,CACA,QAAA,CACA,SAAA,CACA,mCAAA,CACA,WAAA,CAKA,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,2CACC,sBAAA,CACA,kEACC,YAAA,CACA,sBAAA,CAEA,iCAAA,CAEA,qGACC,2BAAA,CACA,4BAAA,CACA,QAAA,CACA,8DAAA,CAGD,+FACC,mBAAA,CAKH,uCACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,8BAAA,CACA,WAAA,CAEA,oCAAA,CACA,kCAAA,CAEA,4CACC,0BAAA,CAGD,2CACC,8BAAA,CACA,+BAAA,CAGD,+CACC,eAAA,CACA,8BAAA,CACA,+BAAA,CACA,kCAAA,CACA,2BAAA,CAEA,0BAAA,CACA,uBAAA,CAIF,uCAEC,eAAA,CAEA,aAAA,CAEA,yCACC,YAAA,CACA,kBAAA,CAEA,UAAA,CACA,WAAA,CAGA,4JAEC,mDAAA,CACA,kBAAA,CAIF,kEAEC,gBAAA,CACA,iBAAA,CAIF,0CACC,UAAA,CAGA,0FAEC,2BAAA,CAIA,mEAEC,kBAAA,CAED,iGAEC,mCAAA,CAKH,uCAEC,wBAAA,CACA,iCAAA,CAEA,4BAAA,CAGA,uEACC,+BAAA,CACA,4FACC,kBAAA,CAKH,gDACC,+BAAA,CCnKA,+EAGC,6CAAA,CAKF,wEACI,oCAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n * This file is for every column styling that must be\n * shared between BOTH the files list AND the list header.\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n */\ntd, th {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 0 0 auto;\n\tjustify-content: left;\n\twidth: var(--row-height);\n\theight: var(--row-height);\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tborder: none;\n\n\t// Columns should try to add any text\n\t// node wrapped in a span. That should help\n\t// with the ellipsis on overflow.\n\tspan {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.files-list__row-checkbox {\n\tjustify-content: center;\n\t&::v-deep .checkbox-radio-switch {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t--icon-size: var(--checkbox-size);\n\n\t\tlabel.checkbox-radio-switch__label {\n\t\t\twidth: var(--clickable-area);\n\t\t\theight: var(--clickable-area);\n\t\t\tmargin: 0;\n\t\t\tpadding: calc((var(--clickable-area) - var(--checkbox-size)) / 2);\n\t\t}\n\n\t\t.checkbox-radio-switch__icon {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n}\n\n.files-list__row-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--icon-preview-size);\n\theight: 100%;\n\t// Show same padding as the checkbox right padding for visual balance\n\tmargin-right: var(--checkbox-padding);\n\tcolor: var(--color-primary-element);\n\n\t& > span {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&::v-deep svg {\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t}\n\n\t&-preview {\n\t\toverflow: hidden;\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\t// Center and contain the preview\n\t\tbackground-position: center;\n\t\tbackground-size: contain;\n\t}\n}\n\n.files-list__row-name {\n\t// Prevent link from overflowing\n\toverflow: hidden;\n\t// Take as much space as possible\n\tflex: 1 1 auto;\n\n\ta {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Fill cell height and width\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t// Keyboard indicator a11y\n\t\t&:focus .files-list__row-name-text,\n\t\t&:focus-visible .files-list__row-name-text {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-radius: 20px;\n\t\t}\n\t}\n\n\t.files-list__row-name-text {\n\t\t// Make some space for the outline\n\t\tpadding: 5px 10px;\n\t\tmargin-left: -10px;\n\t}\n}\n\n.files-list__row-actions {\n\twidth: auto;\n\n\t// Add margin to all cells after the actions\n\t& ~ td,\n\t& ~ th {\n\t\tmargin: 0 var(--cell-margin);\n\t}\n\n\t&::v-deep > button {\n\t\t.button-vue__text {\n\t\t\t// Remove bold from default button styling\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t&:not(:hover, :focus, :active) .button-vue__wrapper {\n\t\t\t// Also apply color-text-maxcontrast to non-active button\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n\n.files-list__row-size {\n\t// Right align text\n\tjustify-content: flex-end;\n\twidth: calc(var(--row-height) * 1.5);\n\t// opacity varies with the size\n\tcolor: var(--color-main-text);\n\n\t// Icon is before text since size is right aligned\n\t::v-deep .files-list__column-sort-button {\n\t\tpadding: 0 16px 0 4px !important;\n\t\t.button-vue__wrapper {\n\t\t\tflex-direction: row;\n\t\t}\n\t}\n}\n\n.files-list__row-column-custom {\n\twidth: calc(var(--row-height) * 2);\n}\n","\n@import '../mixins/fileslist-row.scss';\n\n/* Hover effect on tbody lines only */\ntr {\n\t&:hover,\n\t&:focus,\n\t&:active {\n\t\tbackground-color: var(--color-background-dark);\n\t}\n}\n\n/* Preview not loaded animation effect */\n.files-list__row-icon-preview:not([style*='background']) {\n background: var(--color-loading-dark);\n\t// animation: preview-gradient-fade 1.2s ease-in-out infinite;\n}\n"],sourceRoot:""}]),e.Z=a},78636:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"td[data-v-cc078f7a],th[data-v-cc078f7a]{display:flex;align-items:center;flex:0 0 auto;justify-content:left;width:var(--row-height);height:var(--row-height);margin:0;padding:0;color:var(--color-text-maxcontrast);border:none}td span[data-v-cc078f7a],th span[data-v-cc078f7a]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__row-checkbox[data-v-cc078f7a]{justify-content:center}.files-list__row-checkbox[data-v-cc078f7a] .checkbox-radio-switch{display:flex;justify-content:center;--icon-size: var(--checkbox-size)}.files-list__row-checkbox[data-v-cc078f7a] .checkbox-radio-switch label.checkbox-radio-switch__label{width:var(--clickable-area);height:var(--clickable-area);margin:0;padding:calc((var(--clickable-area) - var(--checkbox-size))/2)}.files-list__row-checkbox[data-v-cc078f7a] .checkbox-radio-switch .checkbox-radio-switch__icon{margin:0 !important}.files-list__row-icon[data-v-cc078f7a]{display:flex;align-items:center;justify-content:center;width:var(--icon-preview-size);height:100%;margin-right:var(--checkbox-padding);color:var(--color-primary-element)}.files-list__row-icon>span[data-v-cc078f7a]{justify-content:flex-start}.files-list__row-icon[data-v-cc078f7a] svg{width:var(--icon-preview-size);height:var(--icon-preview-size)}.files-list__row-icon-preview[data-v-cc078f7a]{overflow:hidden;width:var(--icon-preview-size);height:var(--icon-preview-size);border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center;background-size:contain}.files-list__row-name[data-v-cc078f7a]{overflow:hidden;flex:1 1 auto}.files-list__row-name a[data-v-cc078f7a]{display:flex;align-items:center;width:100%;height:100%}.files-list__row-name a:focus .files-list__row-name-text[data-v-cc078f7a],.files-list__row-name a:focus-visible .files-list__row-name-text[data-v-cc078f7a]{outline:2px solid var(--color-main-text) !important;border-radius:20px}.files-list__row-name .files-list__row-name-text[data-v-cc078f7a]{padding:5px 10px;margin-left:-10px}.files-list__row-actions[data-v-cc078f7a]{width:auto}.files-list__row-actions~td[data-v-cc078f7a],.files-list__row-actions~th[data-v-cc078f7a]{margin:0 var(--cell-margin)}.files-list__row-actions[data-v-cc078f7a]>button .button-vue__text{font-weight:normal}.files-list__row-actions[data-v-cc078f7a]>button:not(:hover,:focus,:active) .button-vue__wrapper{color:var(--color-text-maxcontrast)}.files-list__row-size[data-v-cc078f7a]{justify-content:flex-end;width:calc(var(--row-height)*1.5);color:var(--color-main-text)}.files-list__row-size[data-v-cc078f7a] .files-list__column-sort-button{padding:0 16px 0 4px !important}.files-list__row-size[data-v-cc078f7a] .files-list__column-sort-button .button-vue__wrapper{flex-direction:row}.files-list__row-column-custom[data-v-cc078f7a]{width:calc(var(--row-height)*2)}tr[data-v-cc078f7a]{padding-bottom:300px;border-top:1px solid var(--color-border);background-color:rgba(0,0,0,0) !important;border-bottom:none !important}td[data-v-cc078f7a]{user-select:none;color:var(--color-text-maxcontrast) !important}","",{version:3,sources:["webpack://./apps/files/src/mixins/fileslist-row.scss","webpack://./apps/files/src/components/FilesListFooter.vue"],names:[],mappings:"AA4BA,wCACC,YAAA,CACA,kBAAA,CACA,aAAA,CACA,oBAAA,CACA,uBAAA,CACA,wBAAA,CACA,QAAA,CACA,SAAA,CACA,mCAAA,CACA,WAAA,CAKA,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,2CACC,sBAAA,CACA,kEACC,YAAA,CACA,sBAAA,CAEA,iCAAA,CAEA,qGACC,2BAAA,CACA,4BAAA,CACA,QAAA,CACA,8DAAA,CAGD,+FACC,mBAAA,CAKH,uCACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,8BAAA,CACA,WAAA,CAEA,oCAAA,CACA,kCAAA,CAEA,4CACC,0BAAA,CAGD,2CACC,8BAAA,CACA,+BAAA,CAGD,+CACC,eAAA,CACA,8BAAA,CACA,+BAAA,CACA,kCAAA,CACA,2BAAA,CAEA,0BAAA,CACA,uBAAA,CAIF,uCAEC,eAAA,CAEA,aAAA,CAEA,yCACC,YAAA,CACA,kBAAA,CAEA,UAAA,CACA,WAAA,CAGA,4JAEC,mDAAA,CACA,kBAAA,CAIF,kEAEC,gBAAA,CACA,iBAAA,CAIF,0CACC,UAAA,CAGA,0FAEC,2BAAA,CAIA,mEAEC,kBAAA,CAED,iGAEC,mCAAA,CAKH,uCAEC,wBAAA,CACA,iCAAA,CAEA,4BAAA,CAGA,uEACC,+BAAA,CACA,4FACC,kBAAA,CAKH,gDACC,+BAAA,CCpKD,oBACC,oBAAA,CACA,wCAAA,CAEA,yCAAA,CACA,6BAAA,CAGD,oBACC,gBAAA,CAEA,8CAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n * This file is for every column styling that must be\n * shared between BOTH the files list AND the list header.\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n */\ntd, th {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 0 0 auto;\n\tjustify-content: left;\n\twidth: var(--row-height);\n\theight: var(--row-height);\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tborder: none;\n\n\t// Columns should try to add any text\n\t// node wrapped in a span. That should help\n\t// with the ellipsis on overflow.\n\tspan {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.files-list__row-checkbox {\n\tjustify-content: center;\n\t&::v-deep .checkbox-radio-switch {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t--icon-size: var(--checkbox-size);\n\n\t\tlabel.checkbox-radio-switch__label {\n\t\t\twidth: var(--clickable-area);\n\t\t\theight: var(--clickable-area);\n\t\t\tmargin: 0;\n\t\t\tpadding: calc((var(--clickable-area) - var(--checkbox-size)) / 2);\n\t\t}\n\n\t\t.checkbox-radio-switch__icon {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n}\n\n.files-list__row-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--icon-preview-size);\n\theight: 100%;\n\t// Show same padding as the checkbox right padding for visual balance\n\tmargin-right: var(--checkbox-padding);\n\tcolor: var(--color-primary-element);\n\n\t& > span {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&::v-deep svg {\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t}\n\n\t&-preview {\n\t\toverflow: hidden;\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\t// Center and contain the preview\n\t\tbackground-position: center;\n\t\tbackground-size: contain;\n\t}\n}\n\n.files-list__row-name {\n\t// Prevent link from overflowing\n\toverflow: hidden;\n\t// Take as much space as possible\n\tflex: 1 1 auto;\n\n\ta {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Fill cell height and width\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t// Keyboard indicator a11y\n\t\t&:focus .files-list__row-name-text,\n\t\t&:focus-visible .files-list__row-name-text {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-radius: 20px;\n\t\t}\n\t}\n\n\t.files-list__row-name-text {\n\t\t// Make some space for the outline\n\t\tpadding: 5px 10px;\n\t\tmargin-left: -10px;\n\t}\n}\n\n.files-list__row-actions {\n\twidth: auto;\n\n\t// Add margin to all cells after the actions\n\t& ~ td,\n\t& ~ th {\n\t\tmargin: 0 var(--cell-margin);\n\t}\n\n\t&::v-deep > button {\n\t\t.button-vue__text {\n\t\t\t// Remove bold from default button styling\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t&:not(:hover, :focus, :active) .button-vue__wrapper {\n\t\t\t// Also apply color-text-maxcontrast to non-active button\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n\n.files-list__row-size {\n\t// Right align text\n\tjustify-content: flex-end;\n\twidth: calc(var(--row-height) * 1.5);\n\t// opacity varies with the size\n\tcolor: var(--color-main-text);\n\n\t// Icon is before text since size is right aligned\n\t::v-deep .files-list__column-sort-button {\n\t\tpadding: 0 16px 0 4px !important;\n\t\t.button-vue__wrapper {\n\t\t\tflex-direction: row;\n\t\t}\n\t}\n}\n\n.files-list__row-column-custom {\n\twidth: calc(var(--row-height) * 2);\n}\n","\n@import '../mixins/fileslist-row.scss';\n\n// Scoped row\ntr {\n\tpadding-bottom: 300px;\n\tborder-top: 1px solid var(--color-border);\n\t// Prevent hover effect on the whole row\n\tbackground-color: transparent !important;\n\tborder-bottom: none !important;\n}\n\ntd {\n\tuser-select: none;\n\t// Make sure the cell colors don't apply to column headers\n\tcolor: var(--color-text-maxcontrast) !important;\n}\n\n"],sourceRoot:""}]),e.Z=a},79238:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"td[data-v-0bbf142f],th[data-v-0bbf142f]{display:flex;align-items:center;flex:0 0 auto;justify-content:left;width:var(--row-height);height:var(--row-height);margin:0;padding:0;color:var(--color-text-maxcontrast);border:none}td span[data-v-0bbf142f],th span[data-v-0bbf142f]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__row-checkbox[data-v-0bbf142f]{justify-content:center}.files-list__row-checkbox[data-v-0bbf142f] .checkbox-radio-switch{display:flex;justify-content:center;--icon-size: var(--checkbox-size)}.files-list__row-checkbox[data-v-0bbf142f] .checkbox-radio-switch label.checkbox-radio-switch__label{width:var(--clickable-area);height:var(--clickable-area);margin:0;padding:calc((var(--clickable-area) - var(--checkbox-size))/2)}.files-list__row-checkbox[data-v-0bbf142f] .checkbox-radio-switch .checkbox-radio-switch__icon{margin:0 !important}.files-list__row-icon[data-v-0bbf142f]{display:flex;align-items:center;justify-content:center;width:var(--icon-preview-size);height:100%;margin-right:var(--checkbox-padding);color:var(--color-primary-element)}.files-list__row-icon>span[data-v-0bbf142f]{justify-content:flex-start}.files-list__row-icon[data-v-0bbf142f] svg{width:var(--icon-preview-size);height:var(--icon-preview-size)}.files-list__row-icon-preview[data-v-0bbf142f]{overflow:hidden;width:var(--icon-preview-size);height:var(--icon-preview-size);border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center;background-size:contain}.files-list__row-name[data-v-0bbf142f]{overflow:hidden;flex:1 1 auto}.files-list__row-name a[data-v-0bbf142f]{display:flex;align-items:center;width:100%;height:100%}.files-list__row-name a:focus .files-list__row-name-text[data-v-0bbf142f],.files-list__row-name a:focus-visible .files-list__row-name-text[data-v-0bbf142f]{outline:2px solid var(--color-main-text) !important;border-radius:20px}.files-list__row-name .files-list__row-name-text[data-v-0bbf142f]{padding:5px 10px;margin-left:-10px}.files-list__row-actions[data-v-0bbf142f]{width:auto}.files-list__row-actions~td[data-v-0bbf142f],.files-list__row-actions~th[data-v-0bbf142f]{margin:0 var(--cell-margin)}.files-list__row-actions[data-v-0bbf142f]>button .button-vue__text{font-weight:normal}.files-list__row-actions[data-v-0bbf142f]>button:not(:hover,:focus,:active) .button-vue__wrapper{color:var(--color-text-maxcontrast)}.files-list__row-size[data-v-0bbf142f]{justify-content:flex-end;width:calc(var(--row-height)*1.5);color:var(--color-main-text)}.files-list__row-size[data-v-0bbf142f] .files-list__column-sort-button{padding:0 16px 0 4px !important}.files-list__row-size[data-v-0bbf142f] .files-list__column-sort-button .button-vue__wrapper{flex-direction:row}.files-list__row-column-custom[data-v-0bbf142f]{width:calc(var(--row-height)*2)}.files-list__column[data-v-0bbf142f]{user-select:none;color:var(--color-text-maxcontrast) !important}.files-list__column--sortable[data-v-0bbf142f]{cursor:pointer}","",{version:3,sources:["webpack://./apps/files/src/mixins/fileslist-row.scss","webpack://./apps/files/src/components/FilesListHeader.vue"],names:[],mappings:"AA4BA,wCACC,YAAA,CACA,kBAAA,CACA,aAAA,CACA,oBAAA,CACA,uBAAA,CACA,wBAAA,CACA,QAAA,CACA,SAAA,CACA,mCAAA,CACA,WAAA,CAKA,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,2CACC,sBAAA,CACA,kEACC,YAAA,CACA,sBAAA,CAEA,iCAAA,CAEA,qGACC,2BAAA,CACA,4BAAA,CACA,QAAA,CACA,8DAAA,CAGD,+FACC,mBAAA,CAKH,uCACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,8BAAA,CACA,WAAA,CAEA,oCAAA,CACA,kCAAA,CAEA,4CACC,0BAAA,CAGD,2CACC,8BAAA,CACA,+BAAA,CAGD,+CACC,eAAA,CACA,8BAAA,CACA,+BAAA,CACA,kCAAA,CACA,2BAAA,CAEA,0BAAA,CACA,uBAAA,CAIF,uCAEC,eAAA,CAEA,aAAA,CAEA,yCACC,YAAA,CACA,kBAAA,CAEA,UAAA,CACA,WAAA,CAGA,4JAEC,mDAAA,CACA,kBAAA,CAIF,kEAEC,gBAAA,CACA,iBAAA,CAIF,0CACC,UAAA,CAGA,0FAEC,2BAAA,CAIA,mEAEC,kBAAA,CAED,iGAEC,mCAAA,CAKH,uCAEC,wBAAA,CACA,iCAAA,CAEA,4BAAA,CAGA,uEACC,+BAAA,CACA,4FACC,kBAAA,CAKH,gDACC,+BAAA,CCtKD,qCACC,gBAAA,CAEA,8CAAA,CAEA,+CACC,cAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n * This file is for every column styling that must be\n * shared between BOTH the files list AND the list header.\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n */\ntd, th {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 0 0 auto;\n\tjustify-content: left;\n\twidth: var(--row-height);\n\theight: var(--row-height);\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tborder: none;\n\n\t// Columns should try to add any text\n\t// node wrapped in a span. That should help\n\t// with the ellipsis on overflow.\n\tspan {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.files-list__row-checkbox {\n\tjustify-content: center;\n\t&::v-deep .checkbox-radio-switch {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t--icon-size: var(--checkbox-size);\n\n\t\tlabel.checkbox-radio-switch__label {\n\t\t\twidth: var(--clickable-area);\n\t\t\theight: var(--clickable-area);\n\t\t\tmargin: 0;\n\t\t\tpadding: calc((var(--clickable-area) - var(--checkbox-size)) / 2);\n\t\t}\n\n\t\t.checkbox-radio-switch__icon {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n}\n\n.files-list__row-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--icon-preview-size);\n\theight: 100%;\n\t// Show same padding as the checkbox right padding for visual balance\n\tmargin-right: var(--checkbox-padding);\n\tcolor: var(--color-primary-element);\n\n\t& > span {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&::v-deep svg {\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t}\n\n\t&-preview {\n\t\toverflow: hidden;\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\t// Center and contain the preview\n\t\tbackground-position: center;\n\t\tbackground-size: contain;\n\t}\n}\n\n.files-list__row-name {\n\t// Prevent link from overflowing\n\toverflow: hidden;\n\t// Take as much space as possible\n\tflex: 1 1 auto;\n\n\ta {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Fill cell height and width\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t// Keyboard indicator a11y\n\t\t&:focus .files-list__row-name-text,\n\t\t&:focus-visible .files-list__row-name-text {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-radius: 20px;\n\t\t}\n\t}\n\n\t.files-list__row-name-text {\n\t\t// Make some space for the outline\n\t\tpadding: 5px 10px;\n\t\tmargin-left: -10px;\n\t}\n}\n\n.files-list__row-actions {\n\twidth: auto;\n\n\t// Add margin to all cells after the actions\n\t& ~ td,\n\t& ~ th {\n\t\tmargin: 0 var(--cell-margin);\n\t}\n\n\t&::v-deep > button {\n\t\t.button-vue__text {\n\t\t\t// Remove bold from default button styling\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t&:not(:hover, :focus, :active) .button-vue__wrapper {\n\t\t\t// Also apply color-text-maxcontrast to non-active button\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n\n.files-list__row-size {\n\t// Right align text\n\tjustify-content: flex-end;\n\twidth: calc(var(--row-height) * 1.5);\n\t// opacity varies with the size\n\tcolor: var(--color-main-text);\n\n\t// Icon is before text since size is right aligned\n\t::v-deep .files-list__column-sort-button {\n\t\tpadding: 0 16px 0 4px !important;\n\t\t.button-vue__wrapper {\n\t\t\tflex-direction: row;\n\t\t}\n\t}\n}\n\n.files-list__row-column-custom {\n\twidth: calc(var(--row-height) * 2);\n}\n","\n@import '../mixins/fileslist-row.scss';\n.files-list__column {\n\tuser-select: none;\n\t// Make sure the cell colors don't apply to column headers\n\tcolor: var(--color-text-maxcontrast) !important;\n\n\t&--sortable {\n\t\tcursor: pointer;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},47480:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".files-list__row-actions-batch[data-v-63bb14b6]{flex:1 1 100% !important}.files-list__row-actions-batch[data-v-63bb14b6] .button-vue__wrapper{width:100%}.files-list__row-actions-batch[data-v-63bb14b6] .button-vue__wrapper span.button-vue__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}","",{version:3,sources:["webpack://./apps/files/src/components/FilesListHeaderActions.vue"],names:[],mappings:"AACA,gDACC,wBAAA,CAGA,qEACC,UAAA,CACA,2FACC,eAAA,CACA,sBAAA,CACA,kBAAA",sourcesContent:["\n.files-list__row-actions-batch {\n\tflex: 1 1 100% !important;\n\n\t// Remove when https://github.com/nextcloud/nextcloud-vue/pull/3936 is merged\n\t::v-deep .button-vue__wrapper {\n\t\twidth: 100%;\n\t\tspan.button-vue__text {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},6905:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".files-list__column-sort-button{margin:0 calc(var(--cell-margin)*-1);padding:0 4px 0 16px !important}.files-list__column-sort-button .button-vue__wrapper{flex-direction:row-reverse;width:100%}.files-list__column-sort-button .button-vue__icon{transition-timing-function:linear;transition-duration:.1s;transition-property:opacity;opacity:0}.files-list__column-sort-button .button-vue__text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__column-sort-button--active .button-vue__icon,.files-list__column-sort-button:hover .button-vue__icon,.files-list__column-sort-button:focus .button-vue__icon,.files-list__column-sort-button:active .button-vue__icon{opacity:1 !important}","",{version:3,sources:["webpack://./apps/files/src/components/FilesListHeaderButton.vue"],names:[],mappings:"AACA,gCAEC,oCAAA,CAEA,+BAAA,CAGA,qDACC,0BAAA,CAGA,UAAA,CAGD,kDACC,iCAAA,CACA,uBAAA,CACA,2BAAA,CACA,SAAA,CAID,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAOA,mOACC,oBAAA",sourcesContent:["\n.files-list__column-sort-button {\n\t// Compensate for cells margin\n\tmargin: 0 calc(var(--cell-margin) * -1);\n\t// Reverse padding\n\tpadding: 0 4px 0 16px !important;\n\n\t// Icon after text\n\t.button-vue__wrapper {\n\t\tflex-direction: row-reverse;\n\t\t// Take max inner width for text overflow ellipsis\n\t\t// Remove when https://github.com/nextcloud/nextcloud-vue/pull/3936 is merged\n\t\twidth: 100%;\n\t}\n\n\t.button-vue__icon {\n\t\ttransition-timing-function: linear;\n\t\ttransition-duration: .1s;\n\t\ttransition-property: opacity;\n\t\topacity: 0;\n\t}\n\n\t// Remove when https://github.com/nextcloud/nextcloud-vue/pull/3936 is merged\n\t.button-vue__text {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t&--active,\n\t&:hover,\n\t&:focus,\n\t&:active {\n\t\t.button-vue__icon {\n\t\t\topacity: 1 !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},40483:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".files-list[data-v-6f4155ff]{--row-height: 55px;--cell-margin: 14px;--checkbox-padding: calc((var(--row-height) - var(--checkbox-size)) / 2);--checkbox-size: 24px;--clickable-area: 44px;--icon-preview-size: 32px;display:block;overflow:auto;height:100%}.files-list[data-v-6f4155ff] tbody,.files-list[data-v-6f4155ff] .vue-recycle-scroller__slot{display:flex;flex-direction:column;width:100%;position:relative}.files-list[data-v-6f4155ff] .vue-recycle-scroller__slot[role=thead]{position:sticky;z-index:10;top:0;height:var(--row-height);background-color:var(--color-main-background)}.files-list[data-v-6f4155ff] tr{position:absolute;display:flex;align-items:center;width:100%;border-bottom:1px solid var(--color-border)}","",{version:3,sources:["webpack://./apps/files/src/components/FilesListVirtual.vue"],names:[],mappings:"AACA,6BACC,kBAAA,CACA,mBAAA,CAEA,wEAAA,CACA,qBAAA,CACA,sBAAA,CACA,yBAAA,CAEA,aAAA,CACA,aAAA,CACA,WAAA,CAIC,4FACC,YAAA,CACA,qBAAA,CACA,UAAA,CAEA,iBAAA,CAID,qEAEC,eAAA,CACA,UAAA,CACA,KAAA,CACA,wBAAA,CACA,6CAAA,CAQD,gCACC,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,2CAAA",sourcesContent:["\n.files-list {\n\t--row-height: 55px;\n\t--cell-margin: 14px;\n\n\t--checkbox-padding: calc((var(--row-height) - var(--checkbox-size)) / 2);\n\t--checkbox-size: 24px;\n\t--clickable-area: 44px;\n\t--icon-preview-size: 32px;\n\n\tdisplay: block;\n\toverflow: auto;\n\theight: 100%;\n\n\t&::v-deep {\n\t\t// Table head, body and footer\n\t\ttbody, .vue-recycle-scroller__slot {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\twidth: 100%;\n\t\t\t// Necessary for virtual scrolling absolute\n\t\t\tposition: relative;\n\t\t}\n\n\t\t// Table header\n\t\t.vue-recycle-scroller__slot[role='thead'] {\n\t\t\t// Pinned on top when scrolling\n\t\t\tposition: sticky;\n\t\t\tz-index: 10;\n\t\t\ttop: 0;\n\t\t\theight: var(--row-height);\n\t\t\tbackground-color: var(--color-main-background);\n\t\t}\n\n\t\t/**\n\t\t * Common row styling. tr are handled by\n\t\t * vue-virtual-scroller, so we need to\n\t\t * have those rules in here.\n\t\t */\n\t\ttr {\n\t\t\tposition: absolute;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\twidth: 100%;\n\t\t\tborder-bottom: 1px solid var(--color-border);\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},358:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".app-navigation-entry__settings-quota--not-unlimited[data-v-26c061ec] .app-navigation-entry__title{margin-top:-4px}.app-navigation-entry__settings-quota progress[data-v-26c061ec]{position:absolute;bottom:10px;margin-left:44px;width:calc(100% - 44px - 22px)}","",{version:3,sources:["webpack://./apps/files/src/components/NavigationQuota.vue"],names:[],mappings:"AAIC,mGACC,eAAA,CAGD,gEACC,iBAAA,CACA,WAAA,CACA,gBAAA,CACA,8BAAA",sourcesContent:["\n// User storage stats display\n.app-navigation-entry__settings-quota {\n\t// Align title with progress and icon\n\t&--not-unlimited::v-deep .app-navigation-entry__title {\n\t\tmargin-top: -4px;\n\t}\n\n\tprogress {\n\t\tposition: absolute;\n\t\tbottom: 10px;\n\t\tmargin-left: 44px;\n\t\twidth: calc(100% - 44px - 22px);\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},3491:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".template-picker__item[data-v-6c072a31]{display:flex}.template-picker__label[data-v-6c072a31]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-6c072a31],.template-picker__label *[data-v-6c072a31]{cursor:pointer;user-select:none}.template-picker__label[data-v-6c072a31]::before{display:none !important}.template-picker__preview[data-v-6c072a31]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-6c072a31]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-6c072a31]{display:flex}.template-picker__image[data-v-6c072a31]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-6c072a31]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-6c072a31]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,iCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},15225:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".app-content[data-v-3722ae64]{display:flex;overflow:hidden;flex-direction:column;max-height:100%}.app-content[data-v-3722ae64]:not(.app-content--hidden)+#app-content{display:none}.files-list__header[data-v-3722ae64]{display:flex;align-content:center;flex:0 0;margin:4px 4px 4px 50px}.files-list__header>*[data-v-3722ae64]{flex:0 0}.files-list__refresh-icon[data-v-3722ae64]{flex:0 0 44px;width:44px;height:44px}.files-list__loading-icon[data-v-3722ae64]{margin:auto}","",{version:3,sources:["webpack://./apps/files/src/views/FilesList.vue"],names:[],mappings:"AACA,8BAEC,YAAA,CACA,eAAA,CACA,qBAAA,CACA,eAAA,CAIA,qEACC,YAAA,CAQD,qCACC,YAAA,CACA,oBAAA,CAEA,QAAA,CAEA,uBAAA,CACA,uCAGC,QAAA,CAGF,2CACC,aAAA,CACA,UAAA,CACA,WAAA,CAED,2CACC,WAAA",sourcesContent:["\n.app-content {\n\t// Virtual list needs to be full height and is scrollable\n\tdisplay: flex;\n\toverflow: hidden;\n\tflex-direction: column;\n\tmax-height: 100%;\n\n\t// TODO: remove after all legacy views are migrated\n\t// Hides the legacy app-content if shown view is not legacy\n\t&:not(&--hidden)::v-deep + #app-content {\n\t\tdisplay: none;\n\t}\n}\n\n$margin: 4px;\n$navigationToggleSize: 50px;\n\n.files-list {\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-content: center;\n\t\t// Do not grow or shrink (vertically)\n\t\tflex: 0 0;\n\t\t// Align with the navigation toggle icon\n\t\tmargin: $margin $margin $margin $navigationToggleSize;\n\t\t> * {\n\t\t\t// Do not grow or shrink (horizontally)\n\t\t\t// Only the breadcrumbs shrinks\n\t\t\tflex: 0 0;\n\t\t}\n\t}\n\t&__refresh-icon {\n\t\tflex: 0 0 44px;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t}\n\t&__loading-icon {\n\t\tmargin: auto;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},93578:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".app-navigation[data-v-5bdabc28] .app-navigation-entry-icon{background-repeat:no-repeat;background-position:center}.app-navigation>ul.app-navigation__list[data-v-5bdabc28]{padding-bottom:var(--default-grid-baseline, 4px)}.app-navigation-entry__settings[data-v-5bdabc28]{height:auto !important;overflow:hidden !important;padding-top:0 !important;flex:0 0 auto}","",{version:3,sources:["webpack://./apps/files/src/views/Navigation.vue"],names:[],mappings:"AAEA,4DACC,2BAAA,CACA,0BAAA,CAGD,yDAEC,gDAAA,CAGD,iDACC,sBAAA,CACA,0BAAA,CACA,wBAAA,CAEA,aAAA",sourcesContent:["\n// TODO: remove when https://github.com/nextcloud/nextcloud-vue/pull/3539 is in\n.app-navigation::v-deep .app-navigation-entry-icon {\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.app-navigation > ul.app-navigation__list {\n\t// Use flex gap value for more elegant spacing\n\tpadding-bottom: var(--default-grid-baseline, 4px);\n}\n\n.app-navigation-entry__settings {\n\theight: auto !important;\n\toverflow: hidden !important;\n\tpadding-top: 0 !important;\n\t// Prevent shrinking or growing\n\tflex: 0 0 auto;\n}\n"],sourceRoot:""}]),e.Z=a},40127:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".setting-link[data-v-b5e4b862]:hover{text-decoration:underline}","",{version:3,sources:["webpack://./apps/files/src/views/Settings.vue"],names:[],mappings:"AACA,qCACC,yBAAA",sourcesContent:["\n.setting-link:hover {\n\ttext-decoration: underline;\n}\n"],sourceRoot:""}]),e.Z=a},5103:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".templates-picker__form[data-v-715b4161]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-715b4161]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-715b4161]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-715b4161]{display:flex;justify-content:space-between;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-715b4161],.templates-picker__buttons input[type=submit][data-v-715b4161]{height:44px}.templates-picker[data-v-715b4161] .modal-container{position:relative}.templates-picker__loading[data-v-715b4161]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,6BAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\n.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},2974:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"\n/* @keyframes preview-gradient-fade {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n 100% {\n opacity: 1;\n }\n} */\n","",{version:3,sources:["webpack://./apps/files/src/components/FileEntry.vue"],names:[],mappings:";AA6dA;;;;;;;;;;GAUA",sourcesContent:["\x3c!--\n - @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n -\n - @author Gary Kim <gary@garykim.dev>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n --\x3e\n\n<template>\n\t<Fragment>\n\t\t<td class=\"files-list__row-checkbox\">\n\t\t\t<NcCheckboxRadioSwitch v-if=\"active\"\n\t\t\t\t:aria-label=\"t('files', 'Select the row for {displayName}', { displayName })\"\n\t\t\t\t:checked.sync=\"selectedFiles\"\n\t\t\t\t:value=\"fileid.toString()\"\n\t\t\t\tname=\"selectedFiles\" />\n\t\t</td>\n\n\t\t\x3c!-- Link to file --\x3e\n\t\t<td class=\"files-list__row-name\">\n\t\t\t<a ref=\"name\" v-bind=\"linkTo\">\n\t\t\t\t\x3c!-- Icon or preview --\x3e\n\t\t\t\t<span class=\"files-list__row-icon\">\n\t\t\t\t\t<FolderIcon v-if=\"source.type === 'folder'\" />\n\n\t\t\t\t\t\x3c!-- Decorative image, should not be aria documented --\x3e\n\t\t\t\t\t<span v-else-if=\"previewUrl && !backgroundFailed\"\n\t\t\t\t\t\tref=\"previewImg\"\n\t\t\t\t\t\tclass=\"files-list__row-icon-preview\"\n\t\t\t\t\t\t:style=\"{ backgroundImage }\" />\n\n\t\t\t\t\t<span v-else-if=\"mimeUrl\"\n\t\t\t\t\t\tclass=\"files-list__row-icon-preview files-list__row-icon-preview--mime\"\n\t\t\t\t\t\t:style=\"{ backgroundImage: mimeUrl }\" />\n\n\t\t\t\t\t<FileIcon v-else />\n\t\t\t\t</span>\n\n\t\t\t\t\x3c!-- File name --\x3e\n\t\t\t\t<span class=\"files-list__row-name-text\">{{ displayName }}</span>\n\t\t\t</a>\n\t\t</td>\n\n\t\t\x3c!-- Actions --\x3e\n\t\t<td :class=\"`files-list__row-actions-${uniqueId}`\" class=\"files-list__row-actions\">\n\t\t\t\x3c!-- Inline actions --\x3e\n\t\t\t\x3c!-- TODO: implement CustomElementRender --\x3e\n\n\t\t\t\x3c!-- Menu actions --\x3e\n\t\t\t<NcActions v-if=\"active\"\n\t\t\t\tref=\"actionsMenu\"\n\t\t\t\t:force-title=\"true\"\n\t\t\t\t:inline=\"enabledInlineActions.length\">\n\t\t\t\t<NcActionButton v-for=\"action in enabledMenuActions\"\n\t\t\t\t\t:key=\"action.id\"\n\t\t\t\t\t:class=\"'files-list__row-action-' + action.id\"\n\t\t\t\t\t@click=\"onActionClick(action)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading === action.id\" :size=\"18\" />\n\t\t\t\t\t\t<CustomSvgIconRender v-else :svg=\"action.iconSvgInline([source], currentView)\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.displayName([source], currentView) }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</td>\n\n\t\t\x3c!-- Size --\x3e\n\t\t<td v-if=\"isSizeAvailable\"\n\t\t\t:style=\"{ opacity: sizeOpacity }\"\n\t\t\tclass=\"files-list__row-size\">\n\t\t\t<span>{{ size }}</span>\n\t\t</td>\n\n\t\t\x3c!-- View columns --\x3e\n\t\t<td v-for=\"column in columns\"\n\t\t\t:key=\"column.id\"\n\t\t\t:class=\"`files-list__row-${currentView?.id}-${column.id}`\"\n\t\t\tclass=\"files-list__row-column-custom\">\n\t\t\t<CustomElementRender v-if=\"active\"\n\t\t\t\t:current-view=\"currentView\"\n\t\t\t\t:render=\"column.render\"\n\t\t\t\t:source=\"source\" />\n\t\t</td>\n\t</Fragment>\n</template>\n\n<script lang='ts'>\nimport { debounce } from 'debounce'\nimport { Folder, File, formatFileSize } from '@nextcloud/files'\nimport { Fragment } from 'vue-fragment'\nimport { join } from 'path'\nimport { showError } from '@nextcloud/dialogs'\nimport { translate } from '@nextcloud/l10n'\nimport CancelablePromise from 'cancelable-promise'\nimport FileIcon from 'vue-material-design-icons/File.vue'\nimport FolderIcon from 'vue-material-design-icons/Folder.vue'\nimport NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'\nimport NcActions from '@nextcloud/vue/dist/Components/NcActions.js'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\nimport NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'\nimport Vue from 'vue'\n\nimport { isCachedPreview } from '../services/PreviewService'\nimport { getFileActions } from '../services/FileAction'\nimport { useFilesStore } from '../store/files'\nimport { UserConfig } from '../types'\nimport { useSelectionStore } from '../store/selection'\nimport { useUserConfigStore } from '../store/userconfig'\nimport CustomElementRender from './CustomElementRender.vue'\nimport CustomSvgIconRender from './CustomSvgIconRender.vue'\nimport logger from '../logger.js'\n\n// The registered actions list\nconst actions = getFileActions()\n\nexport default Vue.extend({\n\tname: 'FileEntry',\n\n\tcomponents: {\n\t\tCustomElementRender,\n\t\tCustomSvgIconRender,\n\t\tFileIcon,\n\t\tFolderIcon,\n\t\tFragment,\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcLoadingIcon,\n\t},\n\n\tprops: {\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tisSizeAvailable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tsource: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tindex: {\n\t\t\ttype: Number,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst filesStore = useFilesStore()\n\t\tconst selectionStore = useSelectionStore()\n\t\tconst userConfigStore = useUserConfigStore()\n\t\treturn {\n\t\t\tfilesStore,\n\t\t\tselectionStore,\n\t\t\tuserConfigStore,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tbackgroundFailed: false,\n\t\t\tbackgroundImage: '',\n\t\t\tloading: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {UserConfig} */\n\t\tuserConfig() {\n\t\t\treturn this.userConfigStore.userConfig\n\t\t},\n\n\t\t/** @return {Navigation} */\n\t\tcurrentView() {\n\t\t\treturn this.$navigation.active\n\t\t},\n\n\t\tcolumns() {\n\t\t\treturn this.currentView?.columns || []\n\t\t},\n\n\t\tdir() {\n\t\t\t// Remove any trailing slash but leave root slash\n\t\t\treturn (this.$route?.query?.dir || '/').replace(/^(.+)\\/$/, '$1')\n\t\t},\n\n\t\tfileid() {\n\t\t\treturn this.source.attributes.fileid\n\t\t},\n\t\tdisplayName() {\n\t\t\treturn this.source.attributes.displayName\n\t\t\t\t|| this.source.basename\n\t\t},\n\t\tsize() {\n\t\t\tconst size = parseInt(this.source.size, 10) || 0\n\t\t\tif (typeof size !== 'number' || size < 0) {\n\t\t\t\treturn this.t('files', 'Pending')\n\t\t\t}\n\t\t\treturn formatFileSize(size, true)\n\t\t},\n\n\t\tsizeOpacity() {\n\t\t\tconst size = parseInt(this.source.size, 10) || 0\n\t\t\tif (!size || size < 0) {\n\t\t\t\treturn 1\n\t\t\t}\n\n\t\t\t// Whatever theme is active, the contrast will pass WCAG AA\n\t\t\t// with color main text over main background and an opacity of 0.7\n\t\t\tconst minOpacity = 0.7\n\t\t\tconst maxOpacitySize = 10 * 1024 * 1024\n\t\t\treturn minOpacity + (1 - minOpacity) * Math.pow((this.source.size / maxOpacitySize), 2)\n\t\t},\n\n\t\tlinkTo() {\n\t\t\tif (this.source.type === 'folder') {\n\t\t\t\tconst to = { ...this.$route, query: { dir: join(this.dir, this.source.basename) } }\n\t\t\t\treturn {\n\t\t\t\t\tis: 'router-link',\n\t\t\t\t\ttitle: this.t('files', 'Open folder {name}', { name: this.displayName }),\n\t\t\t\t\tto,\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\thref: this.source.source,\n\t\t\t\t// TODO: Use first action title ?\n\t\t\t\ttitle: this.t('files', 'Download file {name}', { name: this.displayName }),\n\t\t\t}\n\t\t},\n\n\t\tselectedFiles: {\n\t\t\tget() {\n\t\t\t\treturn this.selectionStore.selected\n\t\t\t},\n\t\t\tset(selection) {\n\t\t\t\tlogger.debug('Changed nodes selection', { selection })\n\t\t\t\tthis.selectionStore.set(selection)\n\t\t\t},\n\t\t},\n\n\t\tcropPreviews() {\n\t\t\treturn this.userConfig.crop_image_previews\n\t\t},\n\n\t\tpreviewUrl() {\n\t\t\ttry {\n\t\t\t\tconst url = new URL(window.location.origin + this.source.attributes.previewUrl)\n\t\t\t\t// Request tiny previews\n\t\t\t\turl.searchParams.set('x', '32')\n\t\t\t\turl.searchParams.set('y', '32')\n\t\t\t\t// Handle cropping\n\t\t\t\turl.searchParams.set('a', this.cropPreviews === true ? '1' : '0')\n\t\t\t\treturn url.href\n\t\t\t} catch (e) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\tmimeUrl() {\n\t\t\tconst mimeType = this.source.mime || 'application/octet-stream'\n\t\t\tconst mimeUrl = window.OC?.MimeType?.getIconUrl?.(mimeType)\n\t\t\tif (mimeUrl) {\n\t\t\t\treturn `url(${mimeUrl})`\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\tenabledActions() {\n\t\t\treturn actions\n\t\t\t\t.filter(action => !action.enabled || action.enabled([this.source], this.currentView))\n\t\t\t\t.sort((a, b) => (a.order || 0) - (b.order || 0))\n\t\t},\n\n\t\tenabledInlineActions() {\n\t\t\treturn this.enabledActions.filter(action => action?.inline?.(this.source, this.currentView))\n\t\t},\n\n\t\tenabledMenuActions() {\n\t\t\treturn [\n\t\t\t\t...this.enabledInlineActions,\n\t\t\t\t...actions.filter(action => !action.inline),\n\t\t\t]\n\t\t},\n\n\t\tuniqueId() {\n\t\t\treturn this.hashCode(this.source.source)\n\t\t},\n\t},\n\n\twatch: {\n\t\tactive(active, before) {\n\t\t\tif (active === false && before === true) {\n\t\t\t\tthis.resetState()\n\n\t\t\t\t// When the row is not active anymore\n\t\t\t\t// remove the tabindex from the row\n\t\t\t\tthis.$el.parentNode.style.display = 'none'\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Restore default tabindex\n\t\t\tthis.$el.parentNode.style.display = ''\n\t\t},\n\n\t\t/**\n\t\t * When the source changes, reset the preview\n\t\t * and fetch the new one.\n\t\t */\n\t\tpreviewUrl() {\n\t\t\tthis.clearImg()\n\t\t\tthis.debounceIfNotCached()\n\t\t},\n\t},\n\n\t/**\n\t * The row is mounted once and reused as we scroll.\n\t */\n\tmounted() {\n\t\t// ⚠ Init the debounce function on mount and\n\t\t// not when the module is imported to\n\t\t// avoid sharing between recycled components\n\t\tthis.debounceGetPreview = debounce(function() {\n\t\t\tthis.fetchAndApplyPreview()\n\t\t}, 150, false)\n\n\t\t// Fetch the preview on init\n\t\tthis.debounceIfNotCached()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.resetState()\n\t},\n\n\tmethods: {\n\t\tasync debounceIfNotCached() {\n\t\t\tif (!this.previewUrl) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Check if we already have this preview cached\n\t\t\tconst isCached = await isCachedPreview(this.previewUrl)\n\t\t\tif (isCached) {\n\t\t\t\tthis.backgroundImage = `url(${this.previewUrl})`\n\t\t\t\tthis.backgroundFailed = false\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// We don't have this preview cached or it expired, requesting it\n\t\t\tthis.debounceGetPreview()\n\t\t},\n\n\t\tfetchAndApplyPreview() {\n\t\t\t// Ignore if no preview\n\t\t\tif (!this.previewUrl) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// If any image is being processed, reset it\n\t\t\tif (this.previewPromise) {\n\t\t\t\tthis.clearImg()\n\t\t\t}\n\n\t\t\t// Ensure max 5 previews are being fetched at the same time\n\t\t\tconst controller = new AbortController()\n\n\t\t\t// Store the promise to be able to cancel it\n\t\t\tthis.previewPromise = new CancelablePromise((resolve, reject, onCancel) => {\n\t\t\t\tconst img = new Image()\n\t\t\t\t// If active, load the preview with higher priority\n\t\t\t\timg.fetchpriority = this.active ? 'high' : 'auto'\n\t\t\t\timg.onload = () => {\n\t\t\t\t\tthis.backgroundImage = `url(${this.previewUrl})`\n\t\t\t\t\tthis.backgroundFailed = false\n\t\t\t\t\tresolve(img)\n\t\t\t\t}\n\t\t\t\timg.onerror = () => {\n\t\t\t\t\tthis.backgroundFailed = true\n\t\t\t\t\treject(img)\n\t\t\t\t}\n\t\t\t\timg.src = this.previewUrl\n\n\t\t\t\t// Image loading has been canceled\n\t\t\t\tonCancel(() => {\n\t\t\t\t\timg.onerror = null\n\t\t\t\t\timg.onload = null\n\t\t\t\t\timg.src = ''\n\t\t\t\t\tcontroller.abort()\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\n\t\tresetState() {\n\t\t\t// Reset loading state\n\t\t\tthis.loading = ''\n\n\t\t\t// Reset the preview\n\t\t\tthis.clearImg()\n\n\t\t\t// Close menu\n\t\t\tthis.$refs.actionsMenu.closeMenu()\n\t\t},\n\n\t\tclearImg() {\n\t\t\tthis.backgroundImage = ''\n\t\t\tthis.backgroundFailed = false\n\n\t\t\tif (this.previewPromise) {\n\t\t\t\tthis.previewPromise.cancel()\n\t\t\t\tthis.previewPromise = null\n\t\t\t}\n\t\t},\n\n\t\thashCode(str) {\n\t\t\tlet hash = 0\n\t\t\tfor (let i = 0, len = str.length; i < len; i++) {\n\t\t\t\tconst chr = str.charCodeAt(i)\n\t\t\t\thash = (hash << 5) - hash + chr\n\t\t\t\thash |= 0 // Convert to 32bit integer\n\t\t\t}\n\t\t\treturn hash\n\t\t},\n\n\t\tasync onActionClick(action) {\n\t\t\tconst displayName = action.displayName([this.source], this.currentView)\n\t\t\ttry {\n\t\t\t\tthis.loading = action.id\n\t\t\t\tawait action.exec(this.source, this.currentView)\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Error while executing action', { action, e })\n\t\t\t\tshowError(this.t('files', 'Error while executing action \"{displayName}\"', { displayName }))\n\t\t\t} finally {\n\t\t\t\tthis.loading = ''\n\t\t\t}\n\t\t},\n\n\t\tt: translate,\n\t\tformatFileSize,\n\t},\n})\n<\/script>\n\n<style scoped lang='scss'>\n@import '../mixins/fileslist-row.scss';\n\n/* Hover effect on tbody lines only */\ntr {\n\t&:hover,\n\t&:focus,\n\t&:active {\n\t\tbackground-color: var(--color-background-dark);\n\t}\n}\n\n/* Preview not loaded animation effect */\n.files-list__row-icon-preview:not([style*='background']) {\n background: var(--color-loading-dark);\n\t// animation: preview-gradient-fade 1.2s ease-in-out infinite;\n}\n</style>\n\n<style>\n/* @keyframes preview-gradient-fade {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n 100% {\n opacity: 1;\n }\n} */\n</style>\n"],sourceRoot:""}]),e.Z=a}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=n,e=[],r.O=function(t,n,i,o){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],i=e[u][1],o=e[u][2];for(var s=!0,l=0;l<n.length;l++)(!1&o||a>=o)&&Object.keys(r.O).every((function(t){return r.O[t](n[l])}))?n.splice(l--,1):(s=!1,o<a&&(a=o));if(s){e.splice(u--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,i,o]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.j=2181,function(){r.b=document.baseURI||self.location.href;var t={2181:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,a=n[0],s=n[1],l=n[2],c=0;if(a.some((function(e){return 0!==t[e]}))){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(l)var u=l(r)}for(e&&e(n);c<a.length;c++)o=a[c],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return r.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(71328)}));o=r.O(o)}(); -//# sourceMappingURL=files-main.js.map?v=7c76b002800db3e3f925
\ No newline at end of file +!function(){"use strict";var e,n={1944:function(e,n,i){var r=i(17499),o=i(79954),a=i(31352),s=i(79753),l=i(45994),c=function(){var t,e,n,i,r=(null===(t=OCA)||void 0===t||null===(e=t.Files)||void 0===e||null===(n=e.App)||void 0===n||null===(i=n.currentFileList)||void 0===i?void 0:i.dirInfo)||{path:"/",name:""};return"".concat(r.path,"/").concat(r.name).replace(/\/\//gi,"/")},u=i(4820),d=i(20144),f=i(62520),p=i(64024),A=i(93455),v=i.n(A),h=i(70110),m=i.n(h);function g(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){g(o,i,r,a,s,"next",t)}function s(t){g(o,i,r,a,s,"throw",t)}a(void 0)}))}}var w=function(){var t=b(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.default.get((0,s.generateOcsUrl)("apps/files/api/v1/templates"));case 2:return e=t.sent,t.abrupt("return",e.data.ocs.data);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),y=function(){var t=b(regeneratorRuntime.mark((function t(e,n,i){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.default.post((0,s.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:e,templatePath:n,templateType:i});case 2:return r=t.sent,t.abrupt("return",r.data.ocs.data);case 4:case"end":return t.stop()}}),t)})));return function(e,n,i){return t.apply(this,arguments)}}(),C=256,_={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:function(){return{failedPreview:!1}},computed:{nameWithoutExt:function(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id:function(){return"template-picker-".concat(this.fileid)},realPreviewUrl:function(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,l.ts)()?(0,s.generateUrl)("/core/preview?fileId=".concat(this.fileid,"&x=").concat(C,"&y=").concat(C,"&a=1")):(0,s.generateUrl)("/apps/files_sharing/publicpreview/".concat(document.getElementById("sharingToken")&&document.getElementById("sharingToken").value,"?fileId=").concat(this.fileid,"&file=").concat(function(t){var e=(t.startsWith("/")?t:"/".concat(t)).split("/"),n="";return e.forEach((function(t){""!==t&&(n+="/"+encodeURIComponent(t))})),n}(this.filename),"&x=").concat(C,"&y=").concat(C,"&a=1"))},mimeIcon:function(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck:function(){this.$emit("check",this.fileid)},onFailure:function(){this.failedPreview=!0}}},x=_,k=i(93379),S=i.n(k),P=i(7795),E=i.n(P),O=i(90569),N=i.n(O),I=i(3565),j=i.n(I),B=i(19216),F=i.n(B),T=i(44589),z=i.n(T),U=i(3491),D={};D.styleTagTransform=z(),D.setAttributes=j(),D.insert=N().bind(null,"head"),D.domAPI=E(),D.insertStyleElement=F(),S()(U.Z,D),U.Z&&U.Z.locals&&U.Z.locals;var R=i(51900),L=(0,R.Z)(x,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"template-picker__item"},[e("input",{staticClass:"radio",attrs:{id:t.id,type:"radio",name:"template-picker"},domProps:{checked:t.checked},on:{change:t.onCheck}}),t._v(" "),e("label",{staticClass:"template-picker__label",attrs:{for:t.id}},[e("div",{staticClass:"template-picker__preview",class:t.failedPreview?"template-picker__preview--failed":""},[e("img",{staticClass:"template-picker__image",attrs:{src:t.realPreviewUrl,alt:"",draggable:"false"},on:{error:t.onFailure}})]),t._v(" "),e("span",{staticClass:"template-picker__title"},[t._v("\n\t\t\t"+t._s(t.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"6c072a31",null).exports,V=i(25108);function Z(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function q(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Z(o,i,r,a,s,"next",t)}function s(t){Z(o,i,r,a,s,"throw",t)}a(void 0)}))}}var G={name:"TemplatePicker",components:{NcEmptyContent:v(),NcModal:m(),TemplatePreview:L},props:{logger:{type:Object,required:!0}},data:function(){return{checked:-1,loading:!1,name:null,opened:!1,provider:null}},computed:{nameWithoutExt:function(){return this.name.indexOf(".")>-1?this.name.split(".").slice(0,-1).join("."):this.name},emptyTemplate:function(){var e,n;return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:(null===(e=this.provider)||void 0===e?void 0:e.mimetypes[0])||(null===(n=this.provider)||void 0===n?void 0:n.mimetypes)}},selectedTemplate:function(){var t=this;return this.provider.templates.find((function(e){return e.fileid===t.checked}))},style:function(){return{"--margin":"8px","--width":"160px","--border":"2px","--fullwidth":"180px","--height":this.provider.ratio?Math.round(160/this.provider.ratio)+"px":null}}},methods:{open:function(t,e){var n=this;return q(regeneratorRuntime.mark((function i(){var r,o;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return n.checked=n.emptyTemplate.fileid,n.name=t,n.provider=e,i.next=5,w();case 5:if(r=i.sent,null!==(o=r.find((function(t){return t.app===e.app&&t.label===e.label})))){i.next=9;break}throw new Error("Failed to match provider in results");case 9:if(n.provider=o,0!==o.templates.length){i.next=13;break}return n.onSubmit(),i.abrupt("return");case 13:n.opened=!0;case 14:case"end":return i.stop()}}),i)})))()},close:function(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck:function(t){this.checked=t},onSubmit:function(){var t=this;return q(regeneratorRuntime.mark((function e(){var n,i,r,o,a,s,l,u,d,A,v,h,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,o=c(),a=null===(n=OCA)||void 0===n||null===(i=n.Files)||void 0===i||null===(r=i.App)||void 0===r?void 0:r.currentFileList,t.nameWithoutExt===t.name&&(t.logger.debug("Fixed invalid filename",{name:t.name,extension:null===(s=t.provider)||void 0===s?void 0:s.extension}),t.name=t.name+(null===(l=t.provider)||void 0===l?void 0:l.extension)),e.prev=4,e.next=7,y((0,f.normalize)("".concat(o,"/").concat(t.name)),null===(u=t.selectedTemplate)||void 0===u?void 0:u.filename,null===(d=t.selectedTemplate)||void 0===d?void 0:d.templateType);case 7:return A=e.sent,t.logger.debug("Created new file",A),e.next=11,null==a?void 0:a.addAndFetchFileInfo(t.name).then((function(t,e){return e}));case 11:v=e.sent,h=new OCA.Files.FileInfoModel(v,{filesClient:null==a?void 0:a.filesClient}),(m=OCA.Files.fileActions.getDefaultFileAction(A.mime,"file",OC.PERMISSION_ALL))&&m.action(A.basename,{$file:null==a?void 0:a.findFileEl(t.name),dir:o,fileList:a,fileActions:null==a?void 0:a.fileActions,fileInfoModel:h}),t.close(),e.next=23;break;case 18:e.prev=18,e.t0=e.catch(4),t.logger.error("Error while creating the new file from template"),V.error(e.t0),(0,p.x2)(t.t("files","Unable to create new file from template"));case 23:return e.prev=23,t.loading=!1,e.finish(23);case 26:case"end":return e.stop()}}),e,null,[[4,18,23,26]])})))()}}},M=G,$=i(5103),W={};W.styleTagTransform=z(),W.setAttributes=j(),W.insert=N().bind(null,"head"),W.domAPI=E(),W.insertStyleElement=F(),S()($.Z,W),$.Z&&$.Z.locals&&$.Z.locals;var H=(0,R.Z)(M,(function(){var t=this,e=t._self._c;return t.opened?e("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"normal"},on:{close:t.close}},[e("form",{staticClass:"templates-picker__form",style:t.style,on:{submit:function(e){return e.preventDefault(),e.stopPropagation(),t.onSubmit.apply(null,arguments)}}},[e("h2",[t._v(t._s(t.t("files","Pick a template for {name}",{name:t.nameWithoutExt})))]),t._v(" "),e("ul",{staticClass:"templates-picker__list"},[e("TemplatePreview",t._b({attrs:{checked:t.checked===t.emptyTemplate.fileid},on:{check:t.onCheck}},"TemplatePreview",t.emptyTemplate,!1)),t._v(" "),t._l(t.provider.templates,(function(n){return e("TemplatePreview",t._b({key:n.fileid,attrs:{checked:t.checked===n.fileid,ratio:t.provider.ratio},on:{check:t.onCheck}},"TemplatePreview",n,!1))}))],2),t._v(" "),e("div",{staticClass:"templates-picker__buttons"},[e("button",{on:{click:t.close}},[t._v("\n\t\t\t\t"+t._s(t.t("files","Cancel"))+"\n\t\t\t")]),t._v(" "),e("input",{staticClass:"primary",attrs:{type:"submit","aria-label":t.t("files","Create a new file with the selected template")},domProps:{value:t.t("files","Create")}})])]),t._v(" "),t.loading?e("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[t._v("\n\t\t"+t._s(t.t("files","Creating file"))+"\n\t")]):t._e()],1):t._e()}),[],!1,null,"715b4161",null),Y=H.exports;function K(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var Q=(0,r.IY)().setApp("files").detectUser().build();d.default.mixin({methods:{t:a.Iu,n:a.uN}});var J=document.createElement("div");J.id="template-picker",document.body.appendChild(J);var X=(0,o.j)("files","templates",[]),tt=(0,o.j)("files","templates_path",!1);Q.debug("Templates providers",X),Q.debug("Templates folder",{templatesPath:tt});var et=new(d.default.extend(Y))({name:"TemplatePicker",propsData:{logger:Q}});et.$mount("#template-picker"),window.addEventListener("DOMContentLoaded",(function(){if(!tt){Q.debug("Templates folder not initialized");var t={attach:function(t){t.addMenuEntry({id:"template-init",displayName:(0,a.Iu)("files","Set up templates folder"),templateName:(0,a.Iu)("files","Templates"),iconClass:"icon-template-add",fileType:"file",actionHandler:function(e){it(e),t.removeMenuEntry("template-init")}})}};OC.Plugins.register("OCA.Files.NewFileMenu",t)}})),X.forEach((function(t,e){var n={attach:function(n){var i=n.fileList;"files"!==i.id&&"files.public"!==i.id||n.addMenuEntry({id:"template-new-".concat(t.app,"-").concat(e),displayName:t.label,templateName:t.label+t.extension,iconClass:t.iconClass||"icon-file",fileType:"file",actionHandler:function(e){et.open(e,t)}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)}));var nt,it=function(){var t,e=(t=regeneratorRuntime.mark((function t(e){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(c()+"/".concat(e)).replace("//","/"),t.prev=1,Q.debug("Initializing the templates directory",{templatePath:n}),t.next=5,u.default.post((0,s.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});case 5:i=t.sent,OCA.Files.App.currentFileList.changeDirectory(n,!0,!0),X=i.data.ocs.data.templates,tt=i.data.ocs.data.template_path,t.next=15;break;case 11:t.prev=11,t.t0=t.catch(1),Q.error("Unable to initialize the templates directory"),(0,p.x2)((0,a.Iu)("files","Unable to initialize the templates directory"));case 15:case"end":return t.stop()}}),t,null,[[1,11]])})),function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){K(o,i,r,a,s,"next",t)}function s(t){K(o,i,r,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}(),rt=i(78595);nt={attach:function(t){var e=this;(0,rt.Ld)("nextcloud:unified-search.search",(function(e){var n=e.query;t.setFilter(n)})),(0,rt.Ld)("nextcloud:unified-search.reset",(function(){e.query=null,t.setFilter("")}))}},window.OC.Plugins.register("OCA.Files.FileList",nt);var ot=i(91770),at=i(78510),st=(0,r.IY)().setApp("files").detectUser().build();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 ct(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ut(i.key),i)}}function ut(t){var e=function(t,e){if("object"!==lt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==lt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===lt(e)?e:String(e)}var dt,ft=function(){function t(e){var n,i,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,r=void 0,(i=ut(i="_action"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.validateAction(e),this._action=e}var e,n;return e=t,(n=[{key:"id",get:function(){return this._action.id}},{key:"displayName",get:function(){return this._action.displayName}},{key:"iconSvgInline",get:function(){return this._action.iconSvgInline}},{key:"enabled",get:function(){return this._action.enabled}},{key:"exec",get:function(){return this._action.exec}},{key:"execBatch",get:function(){return this._action.execBatch}},{key:"order",get:function(){return this._action.order}},{key:"default",get:function(){return this._action.default}},{key:"inline",get:function(){return this._action.inline}},{key:"renderInline",get:function(){return this._action.renderInline}},{key:"validateAction",value:function(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(!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("default"in t&&"boolean"!=typeof 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")}}])&&ct(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),pt=function(){return window._nc_fileactions||[]};function At(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function vt(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){At(o,i,r,a,s,"next",t)}function s(t){At(o,i,r,a,s,"throw",t)}a(void 0)}))}}function ht(t){return ht="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},ht(t)}function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function gt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach((function(e){bt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==ht(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==ht(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===ht(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}dt=new ft({id:"delete",displayName:function(t,e){return"trashbin"===e.id?(0,a.Iu)("files_trashbin","Delete permanently"):(0,a.Iu)("files","Delete")},iconSvgInline:function(){return at},enabled:function(t){return t.length>0&&t.map((function(t){return t.permissions})).every((function(t){return 0!=(t&ot.y3.DELETE)}))},exec:function(t){return vt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.default.delete(t.source);case 3:return(0,rt.j8)("files:file:deleted",t),e.abrupt("return",!0);case 7:return e.prev=7,e.t0=e.catch(0),st.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){var n=this;return vt(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",Promise.all(t.map((function(t){return n.exec(t,e)}))));case 1:case"end":return i.stop()}}),i)})))()},order:100}),void 0===window._nc_fileactions&&(window._nc_fileactions=[],st.debug("FileActions initialized")),window._nc_fileactions.find((function(t){return t.id===dt.id}))?st.error("FileAction ".concat(dt.id," already registered"),{action:dt}):window._nc_fileactions.push(dt);var wt=function(t){var e=t.id,n=t.name,i=t.order,r=t.icon,o=t.parent,a=t.classes,s=void 0===a?"":a,l=t.expanded,c=t.params;OCP.Files.Navigation.register({id:e,name:n,order:i,params:c,parent:o,expanded:!0===l,iconClass:r?"icon-".concat(r):"nav-icon-"+e,legacy:!0,sticky:s.includes("pinned")})},yt=i(59305),Ct=i(41487),_t=i.n(Ct);function xt(t){return xt="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},xt(t)}function kt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Pt(i.key),i)}}function St(t,e,n){return(e=Pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t){var e=function(t,e){if("object"!==xt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==xt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===xt(e)?e:String(e)}var Et=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),St(this,"_views",[]),St(this,"_currentView",null),st.debug("Navigation service initialized")}var e,n;return e=t,(n=[{key:"register",value:function(t){try{Nt(t),Ot(t,this._views)}catch(e){throw e instanceof Error&&st.error(e.message,{view:t}),e}t.legacy&&st.warn("Legacy view detected, please migrate to Vue"),t.iconClass&&(t.legacy=!0),this._views.push(t)}},{key:"views",get:function(){return this._views}},{key:"setActive",value:function(t){this._currentView=t}},{key:"active",get:function(){return this._currentView}}])&&kt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ot=function(t,e){if(e.find((function(e){return e.id===t.id})))throw new Error("Navigation id ".concat(t.id," is already registered"));return!0},Nt=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("Navigation id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("Navigation name is required and must be a string");if(!t.legacy){if(!t.getContents||"function"!=typeof t.getContents)throw new Error("Navigation getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!_t()(t.icon))throw new Error("Navigation icon is required and must be a valid svg string")}if(!("order"in t)||"number"!=typeof t.order)throw new Error("Navigation order is required and must be a number");if(t.columns&&t.columns.forEach(It),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("Navigation emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("Navigation parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("Navigation sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("Navigation expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("Navigation defaultSortKey must be a string");return!0},It=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};function jt(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function Bt(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){jt(o,i,r,a,s,"next",t)}function s(t){jt(o,i,r,a,s,"throw",t)}a(void 0)}))}}var Ft=i(57638),Tt=i(55209),zt=i.n(Tt),Ut=i(14032),Dt=i.n(Ut),Rt=i(91211),Lt=i.n(Rt),Vt=i(28615),Zt=i(74184),qt=i(48959),Gt=i.n(qt);function Mt(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function $t(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Mt(o,i,r,a,s,"next",t)}function s(t){Mt(o,i,r,a,s,"throw",t)}a(void 0)}))}}var Wt={name:"NavigationQuota",components:{ChartPie:Zt.Z,NcAppNavigationItem:Dt(),NcProgressBar:Gt()},data:function(){return{loadingStorageStats:!1,storageStats:(0,o.j)("files","storageStats",null)}},computed:{storageStatsTitle:function(){var t,e,n,i=(0,ot.sS)(null===(t=this.storageStats)||void 0===t?void 0:t.used),r=(0,ot.sS)(null===(e=this.storageStats)||void 0===e?void 0:e.quota);return(null===(n=this.storageStats)||void 0===n?void 0:n.quota)<0?this.t("files","{usedQuotaByte} used",{usedQuotaByte:i}):this.t("files","{used} of {quota} used",{used:i,quota:r})},storageStatsTooltip:function(){return this.storageStats.relative?this.t("files","{relative}% used",this.storageStats):""}},beforeMount:function(){setInterval(this.throttleUpdateStorageStats,6e4),(0,rt.Ld)("files:file:created",this.throttleUpdateStorageStats),(0,rt.Ld)("files:file:deleted",this.throttleUpdateStorageStats),(0,rt.Ld)("files:file:moved",this.throttleUpdateStorageStats),(0,rt.Ld)("files:file:updated",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:created",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:deleted",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:moved",this.throttleUpdateStorageStats),(0,rt.Ld)("files:folder:updated",this.throttleUpdateStorageStats)},methods:{debounceUpdateStorageStats:(0,Vt.D)(200,(function(t){this.updateStorageStats(t)})),throttleUpdateStorageStats:(0,Vt.P)(1e3,(function(t){this.updateStorageStats(t)})),updateStorageStats:function(){var e=arguments,n=this;return $t(regeneratorRuntime.mark((function i(){var r,o,a;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=e.length>0&&void 0!==e[0]?e[0]:null,!n.loadingStorageStats){i.next=3;break}return i.abrupt("return");case 3:return n.loadingStorageStats=!0,i.prev=4,i.next=7,u.default.get((0,s.generateUrl)("/apps/files/api/v1/stats"));case 7:if(null!=(a=i.sent)&&null!==(o=a.data)&&void 0!==o&&o.data){i.next=10;break}throw new Error("Invalid storage stats");case 10:n.storageStats=a.data.data,i.next=17;break;case 13:i.prev=13,i.t0=i.catch(4),st.error("Could not refresh storage stats",{error:i.t0}),r&&(0,p.x2)(t("files","Could not refresh storage stats"));case 17:return i.prev=17,n.loadingStorageStats=!1,i.finish(17);case 20:case"end":return i.stop()}}),i,null,[[4,13,17,20]])})))()},t:a.Iu}},Ht=Wt,Yt=i(358),Kt={};Kt.styleTagTransform=z(),Kt.setAttributes=j(),Kt.insert=N().bind(null,"head"),Kt.domAPI=E(),Kt.insertStyleElement=F(),S()(Yt.Z,Kt),Yt.Z&&Yt.Z.locals&&Yt.Z.locals;var Qt=(0,R.Z)(Ht,(function(){var t=this,e=t._self._c;return t.storageStats?e("NcAppNavigationItem",{staticClass:"app-navigation-entry__settings-quota",class:{"app-navigation-entry__settings-quota--not-unlimited":t.storageStats.quota>=0},attrs:{"aria-label":t.t("files","Storage informations"),loading:t.loadingStorageStats,name:t.storageStatsTitle,title:t.storageStatsTooltip,"data-cy-files-navigation-settings-quota":""},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.debounceUpdateStorageStats.apply(null,arguments)}}},[e("ChartPie",{attrs:{slot:"icon",size:20},slot:"icon"}),t._v(" "),t.storageStats.quota>=0?e("NcProgressBar",{attrs:{slot:"extra",error:t.storageStats.relative>80,value:Math.min(t.storageStats.relative,100)},slot:"extra"}):t._e()],1):t._e()}),[],!1,null,"26c061ec",null),Jt=Qt.exports,Xt=i(68988),te=i.n(Xt),ee=i(16809),ne=i.n(ee),ie=i(20571),re=i.n(ie),oe=i(70386),ae=i(36029),se=i.n(ae),le={name:"Setting",props:{el:{type:Function,required:!0}},mounted:function(){this.$el.appendChild(this.el())}},ce=(0,R.Z)(le,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports;function ue(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var de=(0,o.j)("files","config",{show_hidden:!1,crop_image_previews:!0}),fe=function(){var t=(0,yt.Q_)("userconfig",{state:function(){return{userConfig:de}},actions:{onUpdate:function(t,e){d.default.set(this.userConfig,t,e)},update:function(t,e){return(n=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u.default.post((0,s.generateUrl)("/apps/files/api/v1/config/"+t),{value:e});case 2:(0,rt.j8)("files:config:updated",{key:t,value:e});case 3:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(i,r){var o=n.apply(t,e);function a(t){ue(o,i,r,a,s,"next",t)}function s(t){ue(o,i,r,a,s,"throw",t)}a(void 0)}))})();var n}}}),e=t();return e.initialized||((0,rt.Ld)("files:config:updated",(function(t){var n=t.key,i=t.value;e.onUpdate(n,i)})),e.initialized=!0),e};function pe(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var Ae={name:"Settings",components:{Clipboard:oe.Z,NcAppSettingsDialog:te(),NcAppSettingsSection:ne(),NcCheckboxRadioSwitch:re(),NcInputField:se(),Setting:ce},props:{open:{type:Boolean,default:!1}},setup:function(){return{userConfigStore:fe()}},data:function(){var t,e,n,i;return{settings:(null===(t=window.OCA)||void 0===t||null===(e=t.Files)||void 0===e||null===(n=e.Settings)||void 0===n?void 0:n.settings)||[],webdavUrl:(0,s.generateRemoteUrl)("dav/files/"+encodeURIComponent(null===(i=(0,l.ts)())||void 0===i?void 0:i.uid)),webdavDocs:"https://docs.nextcloud.com/server/stable/go.php?to=user-webdav",appPasswordUrl:(0,s.generateUrl)("/settings/user/security#generate-app-token-section"),webdavUrlCopied:!1}},computed:{userConfig:function(){return this.userConfigStore.userConfig}},beforeMount:function(){this.settings.forEach((function(t){return t.open()}))},beforeDestroy:function(){this.settings.forEach((function(t){return t.close()}))},methods:{onClose:function(){this.$emit("close")},setConfig:function(t,e){this.userConfigStore.update(t,e)},copyCloudId:function(){var e,n=this;return(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(document.querySelector("input#webdav-url-input").select(),navigator.clipboard){e.next=4;break}return(0,p.x2)(t("files","Clipboard is not available")),e.abrupt("return");case 4:return e.next=6,navigator.clipboard.writeText(n.webdavUrl);case 6:n.webdavUrlCopied=!0,(0,p.s$)(t("files","WebDAV URL copied to clipboard")),setTimeout((function(){n.webdavUrlCopied=!1}),5e3);case 9:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(t){pe(o,i,r,a,s,"next",t)}function s(t){pe(o,i,r,a,s,"throw",t)}a(void 0)}))})()},t:a.Iu}},ve=Ae,he=i(20613),me={};me.styleTagTransform=z(),me.setAttributes=j(),me.insert=N().bind(null,"head"),me.domAPI=E(),me.insertStyleElement=F(),S()(he.Z,me),he.Z&&he.Z.locals&&he.Z.locals;var ge=(0,R.Z)(ve,(function(){var t=this,e=t._self._c;return e("NcAppSettingsDialog",{attrs:{open:t.open,"show-navigation":!0,title:t.t("files","Files settings")},on:{"update:open":t.onClose}},[e("NcAppSettingsSection",{attrs:{id:"settings",title:t.t("files","Files settings")}},[e("NcCheckboxRadioSwitch",{attrs:{checked:t.userConfig.show_hidden},on:{"update:checked":function(e){return t.setConfig("show_hidden",e)}}},[t._v("\n\t\t\t"+t._s(t.t("files","Show hidden files"))+"\n\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.userConfig.crop_image_previews},on:{"update:checked":function(e){return t.setConfig("crop_image_previews",e)}}},[t._v("\n\t\t\t"+t._s(t.t("files","Crop image previews"))+"\n\t\t")])],1),t._v(" "),0!==t.settings.length?e("NcAppSettingsSection",{attrs:{id:"more-settings",title:t.t("files","Additional settings")}},[t._l(t.settings,(function(t){return[e("Setting",{key:t.name,attrs:{el:t.el}})]}))],2):t._e(),t._v(" "),e("NcAppSettingsSection",{attrs:{id:"webdav",title:t.t("files","WebDAV")}},[e("NcInputField",{attrs:{id:"webdav-url-input","show-trailing-button":!0,success:t.webdavUrlCopied,"trailing-button-label":t.t("files","Copy to clipboard"),value:t.webdavUrl,readonly:"readonly",type:"url"},on:{focus:function(t){return t.target.select()},"trailing-button-click":t.copyCloudId},scopedSlots:t._u([{key:"trailing-button-icon",fn:function(){return[e("Clipboard",{attrs:{size:20}})]},proxy:!0}])}),t._v(" "),e("em",[e("a",{staticClass:"setting-link",attrs:{href:t.webdavDocs,target:"_blank",rel:"noreferrer noopener"}},[t._v("\n\t\t\t\t"+t._s(t.t("files","Use this address to access your Files via WebDAV"))+" ↗\n\t\t\t")])]),t._v(" "),e("br"),t._v(" "),e("em",[e("a",{staticClass:"setting-link",attrs:{href:t.appPasswordUrl}},[t._v("\n\t\t\t\t"+t._s(t.t("files","If you have enabled 2FA, you must create and use a new app password by clicking here."))+" ↗\n\t\t\t")])])],1)],1)}),[],!1,null,"2e129f40",null).exports;function be(t){return be="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},be(t)}function we(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?we(Object(n),!0).forEach((function(e){Ce(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ce(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==be(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==be(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===be(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var xe={name:"Navigation",components:{Cog:Ft.default,NavigationQuota:Jt,NcAppNavigation:zt(),NcAppNavigationItem:Dt(),NcIconSvgWrapper:Lt(),SettingsModal:ge},props:{Navigation:{type:Et,required:!0}},data:function(){return{settingsOpened:!1}},computed:{currentViewId:function(){var t,e;return(null===(t=this.$route)||void 0===t||null===(e=t.params)||void 0===e?void 0:e.view)||"files"},currentView:function(){var t=this;return this.views.find((function(e){return e.id===t.currentViewId}))},views:function(){return this.Navigation.views},parentViews:function(){return this.views.filter((function(t){return!t.parent})).sort((function(t,e){return t.order-e.order}))},childViews:function(){return this.views.filter((function(t){return!!t.parent})).reduce((function(t,e){return t[e.parent]=[].concat(function(t){if(Array.isArray(t))return _e(t)}(n=t[e.parent]||[])||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return _e(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]),t[e.parent].sort((function(t,e){return t.order-e.order})),t;var n}),{})}},watch:{currentView:function(t,e){(null==t?void 0:t.id)!==(null==e?void 0:e.id)&&(this.Navigation.setActive(t),st.debug("Navigation changed",{id:t.id,view:t}),this.showView(t,e))}},beforeMount:function(){var t=this;this.currentView&&(st.debug("Navigation mounted. Showing requested view",{view:this.currentView}),this.showView(this.currentView)),(0,rt.Ld)("files:legacy-navigation:changed",this.onLegacyNavigationChanged),(0,rt.Ld)("files:legacy-view:initialized",(function(){st.debug("Legacy view initialized",ye({},t.currentView)),t.showView(t.currentView)}))},methods:{showView:function(t,e){var n,i,r,o,a,s,l;if(null===(n=window)||void 0===n||null===(i=n.OCA)||void 0===i||null===(r=i.Files)||void 0===r||null===(o=r.Sidebar)||void 0===o||null===(a=o.close)||void 0===a||a.call(o),null!=t&&t.legacy){var c=document.querySelector("#app-content #app-content-"+this.currentView.id+".viewcontainer");document.querySelectorAll("#app-content .viewcontainer").forEach((function(t){t.classList.add("hidden")})),c.classList.remove("hidden");var u=OC.Util.History.parseUrlQuery().dir,d=void 0===u?"/":u,f={itemId:t.id,dir:d};st.debug("Triggering legacy navigation event",f),window.jQuery(c).trigger(new window.jQuery.Event("show",f)),window.jQuery(c).trigger(new window.jQuery.Event("urlChanged",f))}this.Navigation.setActive(t),s=t.name,(l=document.getElementById("page-heading-level-1"))&&(l.textContent=s),(0,rt.j8)("files:navigation:changed",t)},onLegacyNavigationChanged:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"files"},e=t.id,n=this.Navigation.views.find((function(t){return t.id===e}));n&&n.legacy&&n.id!==this.currentView.id&&(this.$router.replace(ye(ye({},this.$route),{},{params:{view:n.id}})),this.Navigation.setActive(n),this.showView(n))},onToggleExpand:function(t){t.expanded=!t.expanded,u.default.post((0,s.generateUrl)("/apps/files/api/v1/toggleShowFolder/".concat(t.id)),{show:t.expanded})},generateToNavigation:function(t){if(t.params){var e=t.params,n=e.dir,i=e.fileid;return{name:"filelist",params:t.params,query:{dir:n,fileid:i}}}return{name:"filelist",params:{view:t.id}}},openSettings:function(){this.settingsOpened=!0},onSettingsClose:function(){this.settingsOpened=!1},t:a.Iu}},ke=xe,Se=i(65581),Pe={};Pe.styleTagTransform=z(),Pe.setAttributes=j(),Pe.insert=N().bind(null,"head"),Pe.domAPI=E(),Pe.insertStyleElement=F(),S()(Se.Z,Pe),Se.Z&&Se.Z.locals&&Se.Z.locals;var Ee=(0,R.Z)(ke,(function(){var t=this,e=t._self._c;return e("NcAppNavigation",{attrs:{"data-cy-files-navigation":""},scopedSlots:t._u([{key:"list",fn:function(){return t._l(t.parentViews,(function(n){return e("NcAppNavigationItem",{key:n.id,attrs:{"allow-collapse":!0,"data-cy-files-navigation-item":n.id,icon:n.iconClass,open:n.expanded,pinned:n.sticky,title:n.name,to:t.generateToNavigation(n)},on:{"update:open":function(e){return t.onToggleExpand(n)}}},[n.icon?e("NcIconSvgWrapper",{attrs:{slot:"icon",svg:n.icon},slot:"icon"}):t._e(),t._v(" "),t._l(t.childViews[n.id],(function(i){return e("NcAppNavigationItem",{key:i.id,attrs:{"data-cy-files-navigation-item":i.id,exact:!0,icon:i.iconClass,title:i.name,to:t.generateToNavigation(i)}},[n.icon?e("NcIconSvgWrapper",{attrs:{slot:"icon",svg:n.icon},slot:"icon"}):t._e()],1)}))],2)}))},proxy:!0},{key:"footer",fn:function(){return[e("ul",{staticClass:"app-navigation-entry__settings"},[e("NavigationQuota"),t._v(" "),e("NcAppNavigationItem",{attrs:{"aria-label":t.t("files","Open the files app settings"),title:t.t("files","Files settings"),"data-cy-files-navigation-settings-button":""},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.openSettings.apply(null,arguments)}}},[e("Cog",{attrs:{slot:"icon",size:20},slot:"icon"})],1)],1)]},proxy:!0}])},[t._v(" "),t._v(" "),e("SettingsModal",{attrs:{open:t.settingsOpened,"data-cy-files-navigation-settings":""},on:{close:t.onSettingsClose}})],1)}),[],!1,null,"4238b71c",null),Oe=Ee.exports,Ne=i(23664),Ie=i(69680),je=i.n(Ie),Be=i(10861),Fe=i.n(Be),Te=i(64192),ze=i.n(Te),Ue=i(33581);function De(t){return De="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},De(t)}function Re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(n),!0).forEach((function(e){Ve(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ve(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==De(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==De(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===De(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ze=function(){var t=(0,yt.Q_)("files",{state:function(){return{files:{},roots:{}}},getters:{getNode:function(t){return function(e){return t.files[e]}},getNodes:function(t){return function(e){return e.map((function(e){return t.files[e]})).filter(Boolean)}},getRoot:function(t){return function(e){return t.roots[e]}}},actions:{updateNodes:function(t){var e=t.reduce((function(t,e){return e.attributes.fileid?(t[e.attributes.fileid]=e,t):(st.warn("Trying to update/set a node without fileid",e),t)}),{});d.default.set(this,"files",Le(Le({},this.files),e))},deleteNodes:function(t){var e=this;t.forEach((function(t){t.fileid&&d.default.delete(e.files,t.fileid)}))},setRoot:function(t){var e=t.service,n=t.root;d.default.set(this.roots,e,n)},onCreatedNode:function(){},onDeletedNode:function(t){this.deleteNodes([t])},onMovedNode:function(){}}})();return t.initialized||((0,rt.Ld)("files:file:created",t.onCreatedNode),(0,rt.Ld)("files:file:deleted",t.onDeletedNode),(0,rt.Ld)("files:file:moved",t.onMovedNode),(0,rt.Ld)("files:folder:created",t.onCreatedNode),(0,rt.Ld)("files:folder:deleted",t.onDeletedNode),(0,rt.Ld)("files:folder:moved",t.onMovedNode),t.initialized=!0),t},qe=function(){var t=(0,yt.Q_)("paths",{state:function(){return{}},getters:{getPath:function(t){return function(e,n){if(t[e])return t[e][n]}}},actions:{addPath:function(t){this[t.service]||d.default.set(this,t.service,{}),d.default.set(this[t.service],t.path,t.fileid)}}}),e=t();return e.initialized||(e.initialized=!0),e},Ge=(0,yt.Q_)("selection",{state:function(){return{selected:[]}},actions:{set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];d.default.set(this,"selected",t)},reset:function(){d.default.set(this,"selected",[])}}}),Me=function(t,e,n){return u.default.post((0,s.generateUrl)("/apps/files/api/v1/sorting"),{mode:t,direction:e,view:n})},$e=(0,o.j)("files","filesSortingConfig",{}),We=(0,yt.Q_)("sorting",{state:function(){return{filesSortingConfig:$e}},getters:{isAscSorting:function(t){return function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files";return"desc"!==(null===(e=t.filesSortingConfig[n])||void 0===e?void 0:e.direction)}},getSortingMode:function(t){return function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files";return null===(e=t.filesSortingConfig[n])||void 0===e?void 0:e.mode}}},actions:{setSortingBy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"basename",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"files",n=this.filesSortingConfig[e]||{};n.mode=t,n.direction="asc",d.default.set(this.filesSortingConfig,e,n),Me(n.mode,n.direction,e)},toggleSortingDirection:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",e=this.filesSortingConfig[t]||{direction:"asc"},n="asc"===e.direction?"desc":"asc";e.direction=n,d.default.set(this.filesSortingConfig,t,e),Me(e.mode,e.direction,t)}}}),He=i(15764),Ye=i(64412),Ke=i.n(Ye),Qe=i(44706),Je=i.n(Qe);function Xe(t){return Xe="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},Xe(t)}function tn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function en(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tn(Object(n),!0).forEach((function(e){nn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function nn(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Xe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Xe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Xe(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var on=d.default.extend({name:"BreadCrumbs",components:{Home:He.Z,NcBreadcrumbs:Je(),NcBreadcrumb:Ke()},props:{path:{type:String,default:"/"}},computed:{dirs:function(){var t,e,n=this.path.split("/").filter(Boolean).map((t="/",function(e){return t+="".concat(e,"/")}));return["/"].concat((e=n.map((function(t){return t.replace(/^(.+)\/$/,"$1")})),function(t){if(Array.isArray(t))return rn(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return rn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))},sections:function(){var t=this;return this.dirs.map((function(e){var n=en(en({},t.$route),{},{query:{dir:e}});return{dir:e,exact:!0,name:(0,f.basename)(e),to:n}}))}},methods:{onClick:function(t){var e;(null==t||null===(e=t.query)||void 0===e?void 0:e.dir)===this.$route.query.dir&&this.$emit("reload")},ariaLabel:function(e){var n,i;return(null==e||null===(n=e.to)||void 0===n||null===(i=n.query)||void 0===i?void 0:i.dir)===this.$route.query.dir?t("files","Reload current directory"):t("files",'Go to the "{dir}" directory',e)}}}),an=on,sn=i(94023),ln={};ln.styleTagTransform=z(),ln.setAttributes=j(),ln.insert=N().bind(null,"head"),ln.domAPI=E(),ln.insertStyleElement=F(),S()(sn.Z,ln),sn.Z&&sn.Z.locals&&sn.Z.locals;var cn=(0,R.Z)(an,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcBreadcrumbs",{attrs:{"data-cy-files-content-breadcrumbs":""}},t._l(t.sections,(function(n,i){return e("NcBreadcrumb",t._b({key:n.dir,attrs:{"aria-label":t.ariaLabel(n),title:t.ariaLabel(n)},nativeOn:{click:function(e){return t.onClick(n.to)}},scopedSlots:t._u([0===i?{key:"icon",fn:function(){return[e("Home",{attrs:{size:20}})]},proxy:!0}:null],null,!0)},"NcBreadcrumb",n,!1))})),1)}),[],!1,null,"260f47ba",null).exports,un=i(35212),dn=i(20296),fn=i(30266),pn=i(3443),An=i.n(pn),vn=i(79855),hn=i(34829),mn=i(45400),gn=i.n(mn),bn=i(12945),wn=i.n(bn),yn=function(t){return caches.open("previews").then((function(e){return e.match(t).then((function(t){return!!t}))}))},Cn={name:"CustomElementRender",props:{source:{type:Object,required:!0},currentView:{type:Object,required:!0},render:{type:Function,required:!0}},computed:{element:function(){return this.render(this.source,this.currentView)}},watch:{element:function(){this.$el.replaceWith(this.element),this.$el=this.element}},mounted:function(){this.$el.replaceWith(this.element),this.$el=this.element}},_n=(0,R.Z)(Cn,(function(){return(0,this._self._c)("span")}),[],!1,null,null,null).exports,xn=i(27856),kn={name:"CustomSvgIconRender",props:{svg:{type:String,required:!0}},watch:{svg:function(){this.$el.innerHTML=(0,xn.sanitize)(this.svg)}},mounted:function(){this.$el.innerHTML=(0,xn.sanitize)(this.svg)}},Sn=i(41929),Pn={};Pn.styleTagTransform=z(),Pn.setAttributes=j(),Pn.insert=N().bind(null,"head"),Pn.domAPI=E(),Pn.insertStyleElement=F(),S()(Sn.Z,Pn),Sn.Z&&Sn.Z.locals&&Sn.Z.locals;var En=(0,R.Z)(kn,(function(){return(0,this._self._c)("span",{staticClass:"custom-svg-icon"})}),[],!1,null,"6646d6a5",null).exports;function On(t){return On="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},On(t)}function Nn(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function In(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Nn(o,i,r,a,s,"next",t)}function s(t){Nn(o,i,r,a,s,"throw",t)}a(void 0)}))}}function jn(t){return function(t){if(Array.isArray(t))return Bn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Bn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bn(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Fn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Tn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fn(Object(n),!0).forEach((function(e){zn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function zn(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==On(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==On(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===On(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Un=pt(),Dn=d.default.extend({name:"FileEntry",components:{CustomElementRender:_n,CustomSvgIconRender:En,FileIcon:vn.Z,FolderIcon:hn.default,Fragment:fn.HY,NcActionButton:gn(),NcActions:wn(),NcCheckboxRadioSwitch:re(),NcLoadingIcon:ze()},props:{active:{type:Boolean,default:!1},isSizeAvailable:{type:Boolean,default:!1},source:{type:Object,required:!0},index:{type:Number,required:!0}},setup:function(){return{filesStore:Ze(),selectionStore:Ge(),userConfigStore:fe()}},data:function(){return{backgroundFailed:!1,backgroundImage:"",loading:""}},computed:{userConfig:function(){return this.userConfigStore.userConfig},currentView:function(){return this.$navigation.active},columns:function(){var t;return(null===(t=this.currentView)||void 0===t?void 0:t.columns)||[]},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},fileid:function(){return this.source.attributes.fileid},displayName:function(){return this.source.attributes.displayName||this.source.basename},size:function(){var t=parseInt(this.source.size,10)||0;return"number"!=typeof t||t<0?this.t("files","Pending"):(0,ot.sS)(t,!0)},sizeOpacity:function(){var t=parseInt(this.source.size,10)||0;return!t||t<0?1:.7+(1-.7)*Math.pow(this.source.size/10485760,2)},linkTo:function(){if("folder"===this.source.type){var t=Tn(Tn({},this.$route),{},{query:{dir:(0,f.join)(this.dir,this.source.basename)}});return{is:"router-link",title:this.t("files","Open folder {name}",{name:this.displayName}),to:t}}return{href:this.source.source,title:this.t("files","Download file {name}",{name:this.displayName})}},selectedFiles:{get:function(){return this.selectionStore.selected},set:function(t){st.debug("Changed nodes selection",{selection:t}),this.selectionStore.set(t)}},cropPreviews:function(){return this.userConfig.crop_image_previews},previewUrl:function(){try{var t=new URL(window.location.origin+this.source.attributes.previewUrl);return t.searchParams.set("x","32"),t.searchParams.set("y","32"),t.searchParams.set("a",!0===this.cropPreviews?"1":"0"),t.href}catch(t){return null}},mimeIconUrl:function(){var t,e,n,i=this.source.mime||"application/octet-stream",r=null===(t=window.OC)||void 0===t||null===(e=t.MimeType)||void 0===e||null===(n=e.getIconUrl)||void 0===n?void 0:n.call(e,i);return r?"url(".concat(r,")"):""},enabledActions:function(){var t=this;return Un.filter((function(e){return!e.enabled||e.enabled([t.source],t.currentView)})).sort((function(t,e){return(t.order||0)-(e.order||0)}))},enabledInlineActions:function(){var t=this;return this.enabledActions.filter((function(e){var n;return null==e||null===(n=e.inline)||void 0===n?void 0:n.call(e,t.source,t.currentView)}))},enabledMenuActions:function(){return[].concat(jn(this.enabledInlineActions),jn(Un.filter((function(t){return!t.inline}))))},uniqueId:function(){return this.hashCode(this.source.source)}},watch:{active:function(t,e){if(!1===t&&!0===e)return this.resetState(),void(this.$el.parentNode.style.display="none");this.$el.parentNode.style.display=""},previewUrl:function(){this.clearImg(),this.debounceIfNotCached()}},mounted:function(){this.debounceGetPreview=(0,dn.debounce)((function(){this.fetchAndApplyPreview()}),150,!1),this.debounceIfNotCached()},beforeDestroy:function(){this.resetState()},methods:{debounceIfNotCached:function(){var t=this;return In(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.previewUrl){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,yn(t.previewUrl);case 4:if(!e.sent){e.next=9;break}return t.backgroundImage="url(".concat(t.previewUrl,")"),t.backgroundFailed=!1,e.abrupt("return");case 9:t.debounceGetPreview();case 10:case"end":return e.stop()}}),e)})))()},fetchAndApplyPreview:function(){var t=this;this.previewUrl&&(this.previewPromise&&this.clearImg(),this.previewPromise=new(An())((function(e,n,i){var r=new Image;r.fetchpriority=t.active?"high":"auto",r.onload=function(){t.backgroundImage="url(".concat(t.previewUrl,")"),t.backgroundFailed=!1,e(r)},r.onerror=function(){t.backgroundFailed=!0,n(r)},r.src=t.previewUrl,i((function(){r.onerror=null,r.onload=null,r.src=""}))})))},resetState:function(){var t,e,n;this.loading="",this.clearImg(),null===(t=this.$refs)||void 0===t||null===(e=t.actionsMenu)||void 0===e||null===(n=e.closeMenu)||void 0===n||n.call(e)},clearImg:function(){this.backgroundImage="",this.backgroundFailed=!1,this.previewPromise&&(this.previewPromise.cancel(),this.previewPromise=null)},hashCode:function(t){for(var e=0,n=0,i=t.length;n<i;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e},onActionClick:function(t){var e=this;return In(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=t.displayName([e.source],e.currentView),n.prev=1,e.loading=t.id,n.next=5,t.exec(e.source,e.currentView);case 5:if(!n.sent){n.next=9;break}return(0,p.s$)(e.t("files",'"{displayName}" action executed successfully',{displayName:i})),n.abrupt("return");case 9:(0,p.x2)(e.t("files",'"{displayName}" action failed',{displayName:i})),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(1),st.error("Error while executing action",{action:t,e:n.t0}),(0,p.x2)(e.t("files",'"{displayName}" action failed',{displayName:i}));case 16:return n.prev=16,e.loading="",n.finish(16);case 19:case"end":return n.stop()}}),n,null,[[1,12,16,19]])})))()},t:a.Iu,formatFileSize:ot.sS}}),Rn=Dn,Ln=i(57562),Vn={};Vn.styleTagTransform=z(),Vn.setAttributes=j(),Vn.insert=N().bind(null,"head"),Vn.domAPI=E(),Vn.insertStyleElement=F(),S()(Ln.Z,Vn),Ln.Z&&Ln.Z.locals&&Ln.Z.locals;var Zn=i(72033),qn={};qn.styleTagTransform=z(),qn.setAttributes=j(),qn.insert=N().bind(null,"head"),qn.domAPI=E(),qn.insertStyleElement=F(),S()(Zn.Z,qn),Zn.Z&&Zn.Z.locals&&Zn.Z.locals;var Gn=(0,R.Z)(Rn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("Fragment",[e("td",{staticClass:"files-list__row-checkbox"},[t.active?e("NcCheckboxRadioSwitch",{attrs:{"aria-label":t.t("files","Select the row for {displayName}",{displayName:t.displayName}),checked:t.selectedFiles,value:t.fileid.toString(),name:"selectedFiles"},on:{"update:checked":function(e){t.selectedFiles=e}}}):t._e()],1),t._v(" "),e("td",{staticClass:"files-list__row-name"},[e("a",t._b({ref:"name"},"a",t.linkTo,!1),[e("span",{staticClass:"files-list__row-icon"},["folder"===t.source.type?e("FolderIcon"):t.previewUrl&&!t.backgroundFailed?e("span",{ref:"previewImg",staticClass:"files-list__row-icon-preview",style:{backgroundImage:t.backgroundImage}}):t.mimeIconUrl?e("span",{staticClass:"files-list__row-icon-preview files-list__row-icon-preview--mime",style:{backgroundImage:t.mimeIconUrl}}):e("FileIcon")],1),t._v(" "),e("span",{staticClass:"files-list__row-name-text"},[t._v(t._s(t.displayName))])])]),t._v(" "),e("td",{staticClass:"files-list__row-actions",class:"files-list__row-actions-".concat(t.uniqueId)},[t.active?e("NcActions",{ref:"actionsMenu",attrs:{"force-title":!0,inline:t.enabledInlineActions.length}},t._l(t.enabledMenuActions,(function(n){return e("NcActionButton",{key:n.id,class:"files-list__row-action-"+n.id,on:{click:function(e){return t.onActionClick(n)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading===n.id?e("NcLoadingIcon",{attrs:{size:18}}):e("CustomSvgIconRender",{attrs:{svg:n.iconSvgInline([t.source],t.currentView)}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t"+t._s(n.displayName([t.source],t.currentView))+"\n\t\t\t")])})),1):t._e()],1),t._v(" "),t.isSizeAvailable?e("td",{staticClass:"files-list__row-size",style:{opacity:t.sizeOpacity}},[e("span",[t._v(t._s(t.size))])]):t._e(),t._v(" "),t._l(t.columns,(function(n){var i;return e("td",{key:n.id,staticClass:"files-list__row-column-custom",class:"files-list__row-".concat(null===(i=t.currentView)||void 0===i?void 0:i.id,"-").concat(n.id)},[t.active?e("CustomElementRender",{attrs:{"current-view":t.currentView,render:n.render,source:t.source}}):t._e()],1)}))],2)}),[],!1,null,"50e87a0e",null),Mn=Gn.exports;function $n(t){return $n="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},$n(t)}var Wn=d.default.extend({name:"FilesListFooter",components:{},props:{isSizeAvailable:{type:Boolean,default:!1},nodes:{type:Array,required:!0},summary:{type:String,default:""}},setup:function(){var t=qe();return{filesStore:Ze(),pathsStore:t}},computed:{currentView:function(){return this.$navigation.active},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},currentFolder:function(){var t;if(null!==(t=this.currentView)&&void 0!==t&&t.id){if("/"===this.dir)return this.filesStore.getRoot(this.currentView.id);var e=this.pathsStore.getPath(this.currentView.id,this.dir);return this.filesStore.getNode(e)}},columns:function(){var t;return(null===(t=this.currentView)||void 0===t?void 0:t.columns)||[]},totalSize:function(){var t;return null!==(t=this.currentFolder)&&void 0!==t&&t.size?(0,ot.sS)(this.currentFolder.size,!0):(0,ot.sS)(this.nodes.reduce((function(t,e){return t+e.size||0}),0),!0)}},methods:{classForColumn:function(t){return e={"files-list__row-column-custom":!0},n="files-list__row-".concat(this.currentView.id,"-").concat(t.id),i=!0,(n=function(t){var e=function(t,e){if("object"!==$n(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==$n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===$n(e)?e:String(e)}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e;var e,n,i},t:a.Iu}}),Hn=i(34689),Yn={};Yn.styleTagTransform=z(),Yn.setAttributes=j(),Yn.insert=N().bind(null,"head"),Yn.domAPI=E(),Yn.insertStyleElement=F(),S()(Hn.Z,Yn),Hn.Z&&Hn.Z.locals&&Hn.Z.locals;var Kn=(0,R.Z)(Wn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("tr",[e("th",{staticClass:"files-list__row-checkbox"},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("files","Total rows summary")))])]),t._v(" "),e("td",{staticClass:"files-list__row-name"},[e("span",{staticClass:"files-list__row-icon"}),t._v(" "),e("span",[t._v(t._s(t.summary))])]),t._v(" "),e("td",{staticClass:"files-list__row-actions"}),t._v(" "),t.isSizeAvailable?e("td",{staticClass:"files-list__column files-list__row-size"},[e("span",[t._v(t._s(t.totalSize))])]):t._e(),t._v(" "),t._l(t.columns,(function(n){var i;return e("th",{key:n.id,class:t.classForColumn(n)},[e("span",[t._v(t._s(null===(i=n.summary)||void 0===i?void 0:i.call(n,t.nodes,t.currentView)))])])}))],2)}),[],!1,null,"3a8b911c",null).exports;function Qn(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}var Jn=pt(),Xn=d.default.extend({name:"FilesListHeaderActions",components:{CustomSvgIconRender:En,NcActions:wn(),NcActionButton:gn(),NcLoadingIcon:ze()},props:{currentView:{type:Object,required:!0},selectedNodes:{type:Array,default:function(){return[]}}},setup:function(){return{filesStore:Ze(),selectionStore:Ge()}},data:function(){return{loading:null}},computed:{enabledActions:function(){var t=this;return Jn.filter((function(t){return t.execBatch})).filter((function(e){return!e.enabled||e.enabled(t.nodes,t.currentView)})).sort((function(t,e){return(t.order||0)-(e.order||0)}))},nodes:function(){var t=this;return this.selectedNodes.map((function(e){return t.getNode(e)})).filter((function(t){return t}))}},methods:{getNode:function(t){return this.filesStore.getNode(t)},onActionClick:function(t){var e,n=this;return(e=regeneratorRuntime.mark((function e(){var i,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.displayName(n.nodes,n.currentView),r=n.selectedNodes,e.prev=2,n.loading=t.id,e.next=6,t.execBatch(n.nodes,n.currentView);case 6:if(!(o=e.sent).some((function(t){return!0!==t}))){e.next=12;break}return a=r.filter((function(t,e){return!0!==o[e]})),n.selectionStore.set(a),(0,p.x2)(n.t("files",'"{displayName}" failed on some elements ',{displayName:i})),e.abrupt("return");case 12:(0,p.s$)(n.t("files",'"{displayName}" batch action executed successfully',{displayName:i})),n.selectionStore.reset(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(2),st.error("Error while executing action",{action:t,e:e.t0}),(0,p.x2)(n.t("files",'"{displayName}" action failed',{displayName:i}));case 20:return e.prev=20,n.loading=null,e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[2,16,20,23]])})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(t){Qn(o,i,r,a,s,"next",t)}function s(t){Qn(o,i,r,a,s,"throw",t)}a(void 0)}))})()},t:a.Iu}}),ti=Xn,ei=i(98532),ni={};ni.styleTagTransform=z(),ni.setAttributes=j(),ni.insert=N().bind(null,"head"),ni.domAPI=E(),ni.insertStyleElement=F(),S()(ei.Z,ni),ei.Z&&ei.Z.locals&&ei.Z.locals;var ii=(0,R.Z)(ti,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("th",{staticClass:"files-list__column files-list__row-actions-batch",attrs:{colspan:"2"}},[e("NcActions",{ref:"actionsMenu",attrs:{disabled:!!t.loading,"force-title":!0,inline:3}},t._l(t.enabledActions,(function(n){return e("NcActionButton",{key:n.id,class:"files-list__row-actions-batch-"+n.id,on:{click:function(e){return t.onActionClick(n)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading===n.id?e("NcLoadingIcon",{attrs:{size:18}}):e("CustomSvgIconRender",{attrs:{svg:n.iconSvgInline(t.nodes,t.currentView)}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t"+t._s(n.displayName(t.nodes,t.currentView))+"\n\t\t")])})),1)],1)}),[],!1,null,"1dfa1154",null),ri=ii.exports,oi=i(20404),ai=i(23873);function si(t){return si="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},si(t)}function li(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ci(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?li(Object(n),!0).forEach((function(e){ui(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):li(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ui(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==si(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==si(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===si(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var di=d.default.extend({name:"FilesListHeaderButton",components:{MenuDown:oi.Z,MenuUp:ai.Z,NcButton:Fe()},inject:["toggleSortBy"],props:{name:{type:String,required:!0},mode:{type:String,required:!0}},setup:function(){return{sortingStore:We()}},computed:ci(ci({},(0,yt.rn)(We,["filesSortingConfig"])),{},{currentView:function(){return this.$navigation.active},sortingMode:function(){return this.sortingStore.getSortingMode(this.currentView.id)||this.currentView.defaultSortKey||"basename"},isAscSorting:function(){return!0===this.sortingStore.isAscSorting(this.currentView.id)}}),methods:{sortAriaLabel:function(t){var e=this.isAscSorting?this.t("files","ascending"):this.t("files","descending");return this.t("files","Sort list by {column} ({direction})",{column:t,direction:e})},t:a.Iu}}),fi=i(33096),pi={};pi.styleTagTransform=z(),pi.setAttributes=j(),pi.insert=N().bind(null,"head"),pi.domAPI=E(),pi.insertStyleElement=F(),S()(fi.Z,pi),fi.Z&&fi.Z.locals&&fi.Z.locals;var Ai=(0,R.Z)(di,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcButton",{staticClass:"files-list__column-sort-button",class:{"files-list__column-sort-button--active":t.sortingMode===t.mode},attrs:{"aria-label":t.sortAriaLabel(t.name),type:"tertiary"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.toggleSortBy(t.mode)}}},[t.sortingMode!==t.mode||t.isAscSorting?e("MenuUp",{attrs:{slot:"icon"},slot:"icon"}):e("MenuDown",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t"+t._s(t.name)+"\n")],1)}),[],!1,null,null,null).exports;function vi(t){return vi="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},vi(t)}function hi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function mi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hi(Object(n),!0).forEach((function(e){gi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hi(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function gi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==vi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==vi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===vi(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var bi=d.default.extend({name:"FilesListHeader",components:{FilesListHeaderButton:Ai,NcCheckboxRadioSwitch:re(),FilesListHeaderActions:ri},provide:function(){return{toggleSortBy:this.toggleSortBy}},props:{isSizeAvailable:{type:Boolean,default:!1},nodes:{type:Array,required:!0}},setup:function(){return{filesStore:Ze(),selectionStore:Ge(),sortingStore:We()}},computed:mi(mi({},(0,yt.rn)(We,["filesSortingConfig"])),{},{currentView:function(){return this.$navigation.active},columns:function(){var t;return(null===(t=this.currentView)||void 0===t?void 0:t.columns)||[]},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},selectAllBind:function(){var t=this.isNoneSelected||this.isSomeSelected?this.t("files","Select all"):this.t("files","Unselect all");return{"aria-label":t,checked:this.isAllSelected,indeterminate:this.isSomeSelected,title:t}},selectedNodes:function(){return this.selectionStore.selected},isAllSelected:function(){return this.selectedNodes.length===this.nodes.length},isNoneSelected:function(){return 0===this.selectedNodes.length},isSomeSelected:function(){return!this.isAllSelected&&!this.isNoneSelected},sortingMode:function(){return this.sortingStore.getSortingMode(this.currentView.id)||this.currentView.defaultSortKey||"basename"},isAscSorting:function(){return!0===this.sortingStore.isAscSorting(this.currentView.id)}}),methods:{classForColumn:function(t){return gi({"files-list__column":!0,"files-list__column--sortable":!!t.sort,"files-list__row-column-custom":!0},"files-list__row-".concat(this.currentView.id,"-").concat(t.id),!0)},onToggleAll:function(t){if(t){var e=this.nodes.map((function(t){return t.attributes.fileid.toString()}));st.debug("Added all nodes to selection",{selection:e}),this.selectionStore.set(e)}else st.debug("Cleared selection"),this.selectionStore.reset()},toggleSortBy:function(t){this.sortingMode!==t?this.sortingStore.setSortingBy(t,this.currentView.id):this.sortingStore.toggleSortingDirection(this.currentView.id)},t:a.Iu}}),wi=i(52652),yi={};yi.styleTagTransform=z(),yi.setAttributes=j(),yi.insert=N().bind(null,"head"),yi.domAPI=E(),yi.insertStyleElement=F(),S()(wi.Z,yi),wi.Z&&wi.Z.locals&&wi.Z.locals;var Ci=(0,R.Z)(bi,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("tr",[e("th",{staticClass:"files-list__column files-list__row-checkbox"},[e("NcCheckboxRadioSwitch",t._b({on:{"update:checked":t.onToggleAll}},"NcCheckboxRadioSwitch",t.selectAllBind,!1))],1),t._v(" "),t.isNoneSelected?[e("th",{staticClass:"files-list__column files-list__row-name files-list__column--sortable",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.toggleSortBy("basename")}}},[e("span",{staticClass:"files-list__row-icon"}),t._v(" "),e("FilesListHeaderButton",{attrs:{name:t.t("files","Name"),mode:"basename"}})],1),t._v(" "),e("th",{staticClass:"files-list__row-actions"}),t._v(" "),t.isSizeAvailable?e("th",{staticClass:"files-list__column files-list__row-size",class:{"files-list__column--sortable":t.isSizeAvailable}},[e("FilesListHeaderButton",{attrs:{name:t.t("files","Size"),mode:"size"}})],1):t._e(),t._v(" "),t._l(t.columns,(function(n){return e("th",{key:n.id,class:t.classForColumn(n)},[n.sort?e("FilesListHeaderButton",{attrs:{name:n.title,mode:n.id}}):e("span",[t._v("\n\t\t\t\t"+t._s(n.title)+"\n\t\t\t")])],1)}))]:e("FilesListHeaderActions",{attrs:{"current-view":t.currentView,"selected-nodes":t.selectedNodes}})],2)}),[],!1,null,"7f9e4535",null).exports,_i=d.default.extend({name:"FilesListVirtual",components:{RecycleScroller:un.EK,FileEntry:Mn,FilesListHeader:Ci,FilesListFooter:Kn},props:{currentView:{type:Object,required:!0},nodes:{type:Array,required:!0}},data:function(){return{FileEntry:Mn}},computed:{files:function(){return this.nodes.filter((function(t){return"file"===t.type}))},summaryFile:function(){var t=this.files.length;return(0,a.uN)("files","{count} file","{count} files",t,{count:t})},summaryFolder:function(){var t=this.nodes.length-this.files.length;return(0,a.uN)("files","{count} folder","{count} folders",t,{count:t})},summary:function(){return(0,a.Iu)("files","{summaryFile} and {summaryFolder}",this)},isSizeAvailable:function(){return this.nodes.some((function(t){return void 0!==t.attributes.size}))}},mounted:function(){var t=this.$el.querySelectorAll(".vue-recycle-scroller__slot");t[0].setAttribute("role","thead"),t[1].setAttribute("role","tfoot")},methods:{getFileId:function(t){return t.attributes.fileid},t:a.Iu}}),xi=i(40483),ki={};ki.styleTagTransform=z(),ki.setAttributes=j(),ki.insert=N().bind(null,"head"),ki.domAPI=E(),ki.insertStyleElement=F(),S()(xi.Z,ki),xi.Z&&xi.Z.locals&&xi.Z.locals;var Si=(0,R.Z)(_i,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("RecycleScroller",{ref:"recycleScroller",staticClass:"files-list",attrs:{"key-field":"source",items:t.nodes,"item-size":55,"table-mode":!0,"item-class":"files-list__row","item-tag":"tr","list-class":"files-list__body","list-tag":"tbody",role:"table"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.item,r=n.active,o=n.index;return[e("FileEntry",{attrs:{active:r,index:o,"is-size-available":t.isSizeAvailable,source:i}})]}},{key:"before",fn:function(){return[e("caption",{staticClass:"hidden-visually"},[t._v("\n\t\t\t"+t._s(t.currentView.caption||"")+"\n\t\t\t"+t._s(t.t("files","This list is not fully rendered for performances reasons. The files will be rendered as you navigate through the list."))+"\n\t\t")]),t._v(" "),e("FilesListHeader",{attrs:{"is-size-available":t.isSizeAvailable,nodes:t.nodes}})]},proxy:!0},{key:"after",fn:function(){return[e("FilesListFooter",{attrs:{"is-size-available":t.isSizeAvailable,nodes:t.nodes,summary:t.summary}})]},proxy:!0}])})}),[],!1,null,"6f4155ff",null).exports;function Pi(t){return Pi="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},Pi(t)}function Ei(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function Oi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Ni(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oi(Object(n),!0).forEach((function(e){Ii(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oi(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ii(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Pi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Pi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Pi(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ji(t){return function(t){if(Array.isArray(t))return Bi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Bi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bi(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Fi=d.default.extend({name:"FilesList",components:{BreadCrumbs:cn,FilesListVirtual:Si,NcAppContent:je(),NcButton:Fe(),NcEmptyContent:v(),NcLoadingIcon:ze(),TrashCan:Ue.Z},setup:function(){var t=qe();return{filesStore:Ze(),pathsStore:t,selectionStore:Ge(),sortingStore:We()}},data:function(){return{loading:!0,promise:null}},computed:{currentView:function(){return this.$navigation.active||this.$navigation.views.find((function(t){return"files"===t.id}))},dir:function(){var t,e;return((null===(t=this.$route)||void 0===t||null===(e=t.query)||void 0===e?void 0:e.dir)||"/").replace(/^(.+)\/$/,"$1")},currentFolder:function(){var t;if(null!==(t=this.currentView)&&void 0!==t&&t.id){if("/"===this.dir)return this.filesStore.getRoot(this.currentView.id);var e=this.pathsStore.getPath(this.currentView.id,this.dir);return this.filesStore.getNode(e)}},sortingMode:function(){return this.sortingStore.getSortingMode(this.currentView.id)||this.currentView.defaultSortKey||"basename"},isAscSorting:function(){return!0===this.sortingStore.isAscSorting(this.currentView.id)},dirContents:function(){var t,e=this;if(!this.currentView)return[];var n=this.currentView.columns.find((function(t){return t.id===e.sortingMode}));if(null!=n&&n.sort&&"function"==typeof n.sort){var i,r=ji(((null===(i=this.currentFolder)||void 0===i?void 0:i.children)||[]).map(this.getNode).filter((function(t){return t}))).sort(n.sort);return this.isAscSorting?r:r.reverse()}return(0,Ne.X)(ji(((null===(t=this.currentFolder)||void 0===t?void 0:t.children)||[]).map(this.getNode).filter((function(t){return t}))),[].concat(ji("basename"===this.sortingMode?[function(t){return"folder"!==t.type}]:[]),[function(t){return t[e.sortingMode]},function(t){return t.basename}]),this.isAscSorting?["asc","asc","asc"]:["desc","desc","desc"])},isEmptyDir:function(){return 0===this.dirContents.length},isRefreshing:function(){return void 0!==this.currentFolder&&!this.isEmptyDir&&this.loading},toPreviousDir:function(){var t=this.dir.split("/").slice(0,-1).join("/")||"/";return Ni(Ni({},this.$route),{},{query:{dir:t}})}},watch:{currentView:function(t,e){(null==t?void 0:t.id)!==(null==e?void 0:e.id)&&(st.debug("View changed",{newView:t,oldView:e}),this.selectionStore.reset(),this.fetchContent())},dir:function(t,e){var n,i;st.debug("Directory changed",{newDir:t,oldDir:e}),this.selectionStore.reset(),this.fetchContent(),null!==(n=this.$refs)&&void 0!==n&&null!==(i=n.filesListVirtual)&&void 0!==i&&i.$el&&(this.$refs.filesListVirtual.$el.scrollTop=0)}},methods:{fetchContent:function(){var t,e=this;return(t=regeneratorRuntime.mark((function t(){var n,i,r,o,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===(n=e.currentView)||void 0===n||!n.legacy){t.next=2;break}return t.abrupt("return");case 2:return e.loading=!0,r=e.dir,o=e.currentView,"function"==typeof(null===(i=e.promise)||void 0===i?void 0:i.cancel)&&(e.promise.cancel(),st.debug("Cancelled previous ongoing fetch")),e.promise=o.getContents(r),t.prev=7,t.next=10,e.promise;case 10:a=t.sent,s=a.folder,l=a.contents,st.debug("Fetched contents",{dir:r,folder:s,contents:l}),e.filesStore.updateNodes(l),s.children=l.map((function(t){return t.attributes.fileid})),"/"===r?e.filesStore.setRoot({service:o.id,root:s}):s.attributes.fileid?(e.filesStore.updateNodes([s]),e.pathsStore.addPath({service:o.id,fileid:s.attributes.fileid,path:r})):st.error("Invalid root folder returned",{dir:r,folder:s,currentView:o}),l.filter((function(t){return"folder"===t.type})).forEach((function(t){e.pathsStore.addPath({service:o.id,fileid:t.attributes.fileid,path:(0,f.join)(r,t.basename)})})),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(7),st.error("Error while fetching content",{error:t.t0});case 24:return t.prev=24,e.loading=!1,t.finish(24);case 27:case"end":return t.stop()}}),t,null,[[7,21,24,27]])})),function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){Ei(o,i,r,a,s,"next",t)}function s(t){Ei(o,i,r,a,s,"throw",t)}a(void 0)}))})()},getNode:function(t){return this.filesStore.getNode(t)},t:a.Iu}}),Ti=Fi,zi=i(37063),Ui={};Ui.styleTagTransform=z(),Ui.setAttributes=j(),Ui.insert=N().bind(null,"head"),Ui.domAPI=E(),Ui.insertStyleElement=F(),S()(zi.Z,Ui),zi.Z&&zi.Z.locals&&zi.Z.locals;var Di=(0,R.Z)(Ti,(function(){var t,e,n=this,i=n._self._c;return n._self._setupProxy,i("NcAppContent",{directives:[{name:"show",rawName:"v-show",value:!(null!==(t=n.currentView)&&void 0!==t&&t.legacy),expression:"!currentView?.legacy"}],class:{"app-content--hidden":null===(e=n.currentView)||void 0===e?void 0:e.legacy},attrs:{"data-cy-files-content":""}},[i("div",{staticClass:"files-list__header"},[i("BreadCrumbs",{attrs:{path:n.dir},on:{reload:n.fetchContent}}),n._v(" "),n.isRefreshing?i("NcLoadingIcon",{staticClass:"files-list__refresh-icon"}):n._e()],1),n._v(" "),n.loading&&!n.isRefreshing?i("NcLoadingIcon",{staticClass:"files-list__loading-icon",attrs:{size:38,title:n.t("files","Loading current folder")}}):!n.loading&&n.isEmptyDir?i("NcEmptyContent",{attrs:{title:n.t("files","No files in here"),description:n.t("files","No files or folders have been deleted yet"),"data-cy-files-content-empty":""},scopedSlots:n._u([{key:"action",fn:function(){return["/"!==n.dir?i("NcButton",{attrs:{"aria-label":"t('files', 'Go to the previous folder')",type:"primary",to:n.toPreviousDir}},[n._v("\n\t\t\t\t"+n._s(n.t("files","Go back"))+"\n\t\t\t")]):n._e()]},proxy:!0},{key:"icon",fn:function(){return[i("TrashCan")]},proxy:!0}])}):i("FilesListVirtual",{ref:"filesListVirtual",attrs:{"current-view":n.currentView,nodes:n.dirContents}})],1)}),[],!1,null,"42495694",null).exports,Ri=i(25108);function Li(t){return Li="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},Li(t)}function Vi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Zi(i.key),i)}}function Zi(t){var e=function(t,e){if("object"!==Li(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Li(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Li(e)?e:String(e)}var qi=function(){function t(){var e,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,i=void 0,(n=Zi(n="_settings"))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this._settings=[],Ri.debug("OCA.Files.Settings initialized")}var e,n;return e=t,(n=[{key:"register",value:function(t){return this._settings.filter((function(e){return e.name===t.name})).length>0?(Ri.error("A setting with the same name is already registered"),!1):(this._settings.push(t),!0)}},{key:"settings",get:function(){return this._settings}}])&&Vi(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Gi(t){return Gi="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},Gi(t)}function Mi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Wi(i.key),i)}}function $i(t,e,n){return(e=Wi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wi(t){var e=function(t,e){if("object"!==Gi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==Gi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Gi(e)?e:String(e)}var Hi=function(){function t(e,n){var i=n.el,r=n.open,o=n.close;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),$i(this,"_close",void 0),$i(this,"_el",void 0),$i(this,"_name",void 0),$i(this,"_open",void 0),this._name=e,this._el=i,this._open=r,this._close=o,"function"!=typeof this._open&&(this._open=function(){}),"function"!=typeof this._close&&(this._close=function(){})}var e,n;return e=t,(n=[{key:"name",get:function(){return this._name}},{key:"el",get:function(){return this._el}},{key:"open",get:function(){return this._open}},{key:"close",get:function(){return this._close}}])&&Mi(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Yi=i(78345),Ki=i(17563);d.default.use(Yi.ZP);var Qi,Ji,Xi=new Yi.ZP({mode:"history",base:(0,s.generateUrl)("/apps/files",""),linkActiveClass:"active",routes:[{path:"/",alias:"/files"},{path:"/:view/:fileid?",name:"filelist",props:!0}],stringifyQuery:function(t){var e=(0,Ki.stringify)(t).replace(/%2F/gim,"/");return e?"?"+e:""}});window.OCA.Files=null!==(Qi=window.OCA.Files)&&void 0!==Qi?Qi:{},window.OCP.Files=null!==(Ji=window.OCP.Files)&&void 0!==Ji?Ji:{},d.default.use(yt.og);var tr=(0,yt.WB)(),er=new Et;Object.assign(window.OCP.Files,{Navigation:er}),d.default.prototype.$navigation=er;var nr,ir=new qi;Object.assign(window.OCA.Files,{Settings:ir}),Object.assign(window.OCA.Files.Settings,{Setting:Hi}),new(d.default.extend(Oe))({name:"FilesNavigationRoot",propsData:{Navigation:er},router:Xi,pinia:tr}).$mount("#app-navigation-files"),new(d.default.extend(Di))({name:"FilesListRoot",router:Xi,pinia:tr}).$mount("#app-content-vue"),(nr=Object.values((0,o.j)("files","navigation",{}))).length>0&&(st.debug("Legacy files views detected. Processing...",nr),nr.forEach((function(t){wt(t),t.sublist&&t.sublist.forEach((function(e){return wt(gt(gt({},e),{},{parent:t.id}))}))}))),"serviceWorker"in navigator?window.addEventListener("load",Bt(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=(0,s.generateUrl)("/apps/files/preview-service-worker.js",{},{noRewrite:!0}),t.next=4,navigator.serviceWorker.register(e,{scope:"/"});case 4:n=t.sent,st.debug("SW registered: ",{registration:n}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),st.error("SW registration failed: ",{error:t.t0});case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))):st.debug("Service Worker is not enabled on this browser.")},94023:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".breadcrumb[data-v-260f47ba]{flex:1 1 100% !important;width:100%}.breadcrumb[data-v-260f47ba] a{cursor:pointer !important}","",{version:3,sources:["webpack://./apps/files/src/components/BreadCrumbs.vue"],names:[],mappings:"AACA,6BAEC,wBAAA,CACA,UAAA,CAEA,+BACC,yBAAA",sourcesContent:["\n.breadcrumb {\n\t// Take as much space as possible\n\tflex: 1 1 100% !important;\n\twidth: 100%;\n\n\t::v-deep a {\n\t\tcursor: pointer !important;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},41929:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".custom-svg-icon[data-v-6646d6a5]{display:flex;align-items:center;align-self:center;justify-content:center;justify-self:center;width:44px;height:44px;opacity:1}.custom-svg-icon[data-v-6646d6a5] svg{height:22px;width:22px;fill:currentColor}","",{version:3,sources:["webpack://./apps/files/src/components/CustomSvgIconRender.vue"],names:[],mappings:"AACA,kCACC,YAAA,CACA,kBAAA,CACA,iBAAA,CACA,sBAAA,CACA,mBAAA,CACA,UAAA,CACA,WAAA,CACA,SAAA,CAEA,sCAGC,WAAA,CACA,UAAA,CACA,iBAAA",sourcesContent:["\n.custom-svg-icon {\n\tdisplay: flex;\n\talign-items: center;\n\talign-self: center;\n\tjustify-content: center;\n\tjustify-self: center;\n\twidth: 44px;\n\theight: 44px;\n\topacity: 1;\n\n\t::v-deep svg {\n\t\t// mdi icons have a size of 24px\n\t\t// 22px results in roughly 16px inner size\n\t\theight: 22px;\n\t\twidth: 22px;\n\t\tfill: currentColor;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},57562:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"td[data-v-50e87a0e],th[data-v-50e87a0e]{display:flex;align-items:center;flex:0 0 auto;justify-content:left;width:var(--row-height);height:var(--row-height);margin:0;padding:0;color:var(--color-text-maxcontrast);border:none}td span[data-v-50e87a0e],th span[data-v-50e87a0e]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__row-checkbox[data-v-50e87a0e]{justify-content:center}.files-list__row-checkbox[data-v-50e87a0e] .checkbox-radio-switch{display:flex;justify-content:center;--icon-size: var(--checkbox-size)}.files-list__row-checkbox[data-v-50e87a0e] .checkbox-radio-switch label.checkbox-radio-switch__label{width:var(--clickable-area);height:var(--clickable-area);margin:0;padding:calc((var(--clickable-area) - var(--checkbox-size))/2)}.files-list__row-checkbox[data-v-50e87a0e] .checkbox-radio-switch .checkbox-radio-switch__icon{margin:0 !important}.files-list__row-icon[data-v-50e87a0e]{display:flex;align-items:center;justify-content:center;width:var(--icon-preview-size);height:100%;margin-right:var(--checkbox-padding);color:var(--color-primary-element)}.files-list__row-icon>span[data-v-50e87a0e]{justify-content:flex-start}.files-list__row-icon[data-v-50e87a0e] svg{width:var(--icon-preview-size);height:var(--icon-preview-size)}.files-list__row-icon-preview[data-v-50e87a0e]{overflow:hidden;width:var(--icon-preview-size);height:var(--icon-preview-size);border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center;background-size:contain}.files-list__row-name[data-v-50e87a0e]{overflow:hidden;flex:1 1 auto}.files-list__row-name a[data-v-50e87a0e]{display:flex;align-items:center;width:100%;height:100%}.files-list__row-name a:focus .files-list__row-name-text[data-v-50e87a0e],.files-list__row-name a:focus-visible .files-list__row-name-text[data-v-50e87a0e]{outline:2px solid var(--color-main-text) !important;border-radius:20px}.files-list__row-name .files-list__row-name-text[data-v-50e87a0e]{padding:5px 10px;margin-left:-10px}.files-list__row-actions[data-v-50e87a0e]{width:auto}.files-list__row-actions~td[data-v-50e87a0e],.files-list__row-actions~th[data-v-50e87a0e]{margin:0 var(--cell-margin)}.files-list__row-actions[data-v-50e87a0e]>button .button-vue__text{font-weight:normal}.files-list__row-actions[data-v-50e87a0e]>button:not(:hover,:focus,:active) .button-vue__wrapper{color:var(--color-text-maxcontrast)}.files-list__row-size[data-v-50e87a0e]{justify-content:flex-end;width:calc(var(--row-height)*1.5);color:var(--color-main-text)}.files-list__row-size[data-v-50e87a0e] .files-list__column-sort-button{padding:0 16px 0 4px !important}.files-list__row-size[data-v-50e87a0e] .files-list__column-sort-button .button-vue__wrapper{flex-direction:row}.files-list__row-column-custom[data-v-50e87a0e]{width:calc(var(--row-height)*2)}tr[data-v-50e87a0e]:hover,tr[data-v-50e87a0e]:focus,tr[data-v-50e87a0e]:active{background-color:var(--color-background-dark)}.files-list__row-icon-preview[data-v-50e87a0e]:not([style*=background]){background:var(--color-loading-dark)}","",{version:3,sources:["webpack://./apps/files/src/mixins/fileslist-row.scss","webpack://./apps/files/src/components/FileEntry.vue"],names:[],mappings:"AA4BA,wCACC,YAAA,CACA,kBAAA,CACA,aAAA,CACA,oBAAA,CACA,uBAAA,CACA,wBAAA,CACA,QAAA,CACA,SAAA,CACA,mCAAA,CACA,WAAA,CAKA,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,2CACC,sBAAA,CACA,kEACC,YAAA,CACA,sBAAA,CAEA,iCAAA,CAEA,qGACC,2BAAA,CACA,4BAAA,CACA,QAAA,CACA,8DAAA,CAGD,+FACC,mBAAA,CAKH,uCACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,8BAAA,CACA,WAAA,CAEA,oCAAA,CACA,kCAAA,CAEA,4CACC,0BAAA,CAGD,2CACC,8BAAA,CACA,+BAAA,CAGD,+CACC,eAAA,CACA,8BAAA,CACA,+BAAA,CACA,kCAAA,CACA,2BAAA,CAEA,0BAAA,CACA,uBAAA,CAIF,uCAEC,eAAA,CAEA,aAAA,CAEA,yCACC,YAAA,CACA,kBAAA,CAEA,UAAA,CACA,WAAA,CAGA,4JAEC,mDAAA,CACA,kBAAA,CAIF,kEAEC,gBAAA,CACA,iBAAA,CAIF,0CACC,UAAA,CAGA,0FAEC,2BAAA,CAIA,mEAEC,kBAAA,CAED,iGAEC,mCAAA,CAKH,uCAEC,wBAAA,CACA,iCAAA,CAEA,4BAAA,CAGA,uEACC,+BAAA,CACA,4FACC,kBAAA,CAKH,gDACC,+BAAA,CCnKA,+EAGC,6CAAA,CAKF,wEACI,oCAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n * This file is for every column styling that must be\n * shared between BOTH the files list AND the list header.\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n */\ntd, th {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 0 0 auto;\n\tjustify-content: left;\n\twidth: var(--row-height);\n\theight: var(--row-height);\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tborder: none;\n\n\t// Columns should try to add any text\n\t// node wrapped in a span. That should help\n\t// with the ellipsis on overflow.\n\tspan {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.files-list__row-checkbox {\n\tjustify-content: center;\n\t&::v-deep .checkbox-radio-switch {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t--icon-size: var(--checkbox-size);\n\n\t\tlabel.checkbox-radio-switch__label {\n\t\t\twidth: var(--clickable-area);\n\t\t\theight: var(--clickable-area);\n\t\t\tmargin: 0;\n\t\t\tpadding: calc((var(--clickable-area) - var(--checkbox-size)) / 2);\n\t\t}\n\n\t\t.checkbox-radio-switch__icon {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n}\n\n.files-list__row-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--icon-preview-size);\n\theight: 100%;\n\t// Show same padding as the checkbox right padding for visual balance\n\tmargin-right: var(--checkbox-padding);\n\tcolor: var(--color-primary-element);\n\n\t& > span {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&::v-deep svg {\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t}\n\n\t&-preview {\n\t\toverflow: hidden;\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\t// Center and contain the preview\n\t\tbackground-position: center;\n\t\tbackground-size: contain;\n\t}\n}\n\n.files-list__row-name {\n\t// Prevent link from overflowing\n\toverflow: hidden;\n\t// Take as much space as possible\n\tflex: 1 1 auto;\n\n\ta {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Fill cell height and width\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t// Keyboard indicator a11y\n\t\t&:focus .files-list__row-name-text,\n\t\t&:focus-visible .files-list__row-name-text {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-radius: 20px;\n\t\t}\n\t}\n\n\t.files-list__row-name-text {\n\t\t// Make some space for the outline\n\t\tpadding: 5px 10px;\n\t\tmargin-left: -10px;\n\t}\n}\n\n.files-list__row-actions {\n\twidth: auto;\n\n\t// Add margin to all cells after the actions\n\t& ~ td,\n\t& ~ th {\n\t\tmargin: 0 var(--cell-margin);\n\t}\n\n\t&::v-deep > button {\n\t\t.button-vue__text {\n\t\t\t// Remove bold from default button styling\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t&:not(:hover, :focus, :active) .button-vue__wrapper {\n\t\t\t// Also apply color-text-maxcontrast to non-active button\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n\n.files-list__row-size {\n\t// Right align text\n\tjustify-content: flex-end;\n\twidth: calc(var(--row-height) * 1.5);\n\t// opacity varies with the size\n\tcolor: var(--color-main-text);\n\n\t// Icon is before text since size is right aligned\n\t::v-deep .files-list__column-sort-button {\n\t\tpadding: 0 16px 0 4px !important;\n\t\t.button-vue__wrapper {\n\t\t\tflex-direction: row;\n\t\t}\n\t}\n}\n\n.files-list__row-column-custom {\n\twidth: calc(var(--row-height) * 2);\n}\n","\n@import '../mixins/fileslist-row.scss';\n\n/* Hover effect on tbody lines only */\ntr {\n\t&:hover,\n\t&:focus,\n\t&:active {\n\t\tbackground-color: var(--color-background-dark);\n\t}\n}\n\n/* Preview not loaded animation effect */\n.files-list__row-icon-preview:not([style*='background']) {\n background: var(--color-loading-dark);\n\t// animation: preview-gradient-fade 1.2s ease-in-out infinite;\n}\n"],sourceRoot:""}]),e.Z=a},34689:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"td[data-v-3a8b911c],th[data-v-3a8b911c]{display:flex;align-items:center;flex:0 0 auto;justify-content:left;width:var(--row-height);height:var(--row-height);margin:0;padding:0;color:var(--color-text-maxcontrast);border:none}td span[data-v-3a8b911c],th span[data-v-3a8b911c]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__row-checkbox[data-v-3a8b911c]{justify-content:center}.files-list__row-checkbox[data-v-3a8b911c] .checkbox-radio-switch{display:flex;justify-content:center;--icon-size: var(--checkbox-size)}.files-list__row-checkbox[data-v-3a8b911c] .checkbox-radio-switch label.checkbox-radio-switch__label{width:var(--clickable-area);height:var(--clickable-area);margin:0;padding:calc((var(--clickable-area) - var(--checkbox-size))/2)}.files-list__row-checkbox[data-v-3a8b911c] .checkbox-radio-switch .checkbox-radio-switch__icon{margin:0 !important}.files-list__row-icon[data-v-3a8b911c]{display:flex;align-items:center;justify-content:center;width:var(--icon-preview-size);height:100%;margin-right:var(--checkbox-padding);color:var(--color-primary-element)}.files-list__row-icon>span[data-v-3a8b911c]{justify-content:flex-start}.files-list__row-icon[data-v-3a8b911c] svg{width:var(--icon-preview-size);height:var(--icon-preview-size)}.files-list__row-icon-preview[data-v-3a8b911c]{overflow:hidden;width:var(--icon-preview-size);height:var(--icon-preview-size);border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center;background-size:contain}.files-list__row-name[data-v-3a8b911c]{overflow:hidden;flex:1 1 auto}.files-list__row-name a[data-v-3a8b911c]{display:flex;align-items:center;width:100%;height:100%}.files-list__row-name a:focus .files-list__row-name-text[data-v-3a8b911c],.files-list__row-name a:focus-visible .files-list__row-name-text[data-v-3a8b911c]{outline:2px solid var(--color-main-text) !important;border-radius:20px}.files-list__row-name .files-list__row-name-text[data-v-3a8b911c]{padding:5px 10px;margin-left:-10px}.files-list__row-actions[data-v-3a8b911c]{width:auto}.files-list__row-actions~td[data-v-3a8b911c],.files-list__row-actions~th[data-v-3a8b911c]{margin:0 var(--cell-margin)}.files-list__row-actions[data-v-3a8b911c]>button .button-vue__text{font-weight:normal}.files-list__row-actions[data-v-3a8b911c]>button:not(:hover,:focus,:active) .button-vue__wrapper{color:var(--color-text-maxcontrast)}.files-list__row-size[data-v-3a8b911c]{justify-content:flex-end;width:calc(var(--row-height)*1.5);color:var(--color-main-text)}.files-list__row-size[data-v-3a8b911c] .files-list__column-sort-button{padding:0 16px 0 4px !important}.files-list__row-size[data-v-3a8b911c] .files-list__column-sort-button .button-vue__wrapper{flex-direction:row}.files-list__row-column-custom[data-v-3a8b911c]{width:calc(var(--row-height)*2)}tr[data-v-3a8b911c]{padding-bottom:300px;border-top:1px solid var(--color-border);background-color:rgba(0,0,0,0) !important;border-bottom:none !important}td[data-v-3a8b911c]{user-select:none;color:var(--color-text-maxcontrast) !important}","",{version:3,sources:["webpack://./apps/files/src/mixins/fileslist-row.scss","webpack://./apps/files/src/components/FilesListFooter.vue"],names:[],mappings:"AA4BA,wCACC,YAAA,CACA,kBAAA,CACA,aAAA,CACA,oBAAA,CACA,uBAAA,CACA,wBAAA,CACA,QAAA,CACA,SAAA,CACA,mCAAA,CACA,WAAA,CAKA,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,2CACC,sBAAA,CACA,kEACC,YAAA,CACA,sBAAA,CAEA,iCAAA,CAEA,qGACC,2BAAA,CACA,4BAAA,CACA,QAAA,CACA,8DAAA,CAGD,+FACC,mBAAA,CAKH,uCACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,8BAAA,CACA,WAAA,CAEA,oCAAA,CACA,kCAAA,CAEA,4CACC,0BAAA,CAGD,2CACC,8BAAA,CACA,+BAAA,CAGD,+CACC,eAAA,CACA,8BAAA,CACA,+BAAA,CACA,kCAAA,CACA,2BAAA,CAEA,0BAAA,CACA,uBAAA,CAIF,uCAEC,eAAA,CAEA,aAAA,CAEA,yCACC,YAAA,CACA,kBAAA,CAEA,UAAA,CACA,WAAA,CAGA,4JAEC,mDAAA,CACA,kBAAA,CAIF,kEAEC,gBAAA,CACA,iBAAA,CAIF,0CACC,UAAA,CAGA,0FAEC,2BAAA,CAIA,mEAEC,kBAAA,CAED,iGAEC,mCAAA,CAKH,uCAEC,wBAAA,CACA,iCAAA,CAEA,4BAAA,CAGA,uEACC,+BAAA,CACA,4FACC,kBAAA,CAKH,gDACC,+BAAA,CCpKD,oBACC,oBAAA,CACA,wCAAA,CAEA,yCAAA,CACA,6BAAA,CAGD,oBACC,gBAAA,CAEA,8CAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n * This file is for every column styling that must be\n * shared between BOTH the files list AND the list header.\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n */\ntd, th {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 0 0 auto;\n\tjustify-content: left;\n\twidth: var(--row-height);\n\theight: var(--row-height);\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tborder: none;\n\n\t// Columns should try to add any text\n\t// node wrapped in a span. That should help\n\t// with the ellipsis on overflow.\n\tspan {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.files-list__row-checkbox {\n\tjustify-content: center;\n\t&::v-deep .checkbox-radio-switch {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t--icon-size: var(--checkbox-size);\n\n\t\tlabel.checkbox-radio-switch__label {\n\t\t\twidth: var(--clickable-area);\n\t\t\theight: var(--clickable-area);\n\t\t\tmargin: 0;\n\t\t\tpadding: calc((var(--clickable-area) - var(--checkbox-size)) / 2);\n\t\t}\n\n\t\t.checkbox-radio-switch__icon {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n}\n\n.files-list__row-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--icon-preview-size);\n\theight: 100%;\n\t// Show same padding as the checkbox right padding for visual balance\n\tmargin-right: var(--checkbox-padding);\n\tcolor: var(--color-primary-element);\n\n\t& > span {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&::v-deep svg {\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t}\n\n\t&-preview {\n\t\toverflow: hidden;\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\t// Center and contain the preview\n\t\tbackground-position: center;\n\t\tbackground-size: contain;\n\t}\n}\n\n.files-list__row-name {\n\t// Prevent link from overflowing\n\toverflow: hidden;\n\t// Take as much space as possible\n\tflex: 1 1 auto;\n\n\ta {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Fill cell height and width\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t// Keyboard indicator a11y\n\t\t&:focus .files-list__row-name-text,\n\t\t&:focus-visible .files-list__row-name-text {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-radius: 20px;\n\t\t}\n\t}\n\n\t.files-list__row-name-text {\n\t\t// Make some space for the outline\n\t\tpadding: 5px 10px;\n\t\tmargin-left: -10px;\n\t}\n}\n\n.files-list__row-actions {\n\twidth: auto;\n\n\t// Add margin to all cells after the actions\n\t& ~ td,\n\t& ~ th {\n\t\tmargin: 0 var(--cell-margin);\n\t}\n\n\t&::v-deep > button {\n\t\t.button-vue__text {\n\t\t\t// Remove bold from default button styling\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t&:not(:hover, :focus, :active) .button-vue__wrapper {\n\t\t\t// Also apply color-text-maxcontrast to non-active button\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n\n.files-list__row-size {\n\t// Right align text\n\tjustify-content: flex-end;\n\twidth: calc(var(--row-height) * 1.5);\n\t// opacity varies with the size\n\tcolor: var(--color-main-text);\n\n\t// Icon is before text since size is right aligned\n\t::v-deep .files-list__column-sort-button {\n\t\tpadding: 0 16px 0 4px !important;\n\t\t.button-vue__wrapper {\n\t\t\tflex-direction: row;\n\t\t}\n\t}\n}\n\n.files-list__row-column-custom {\n\twidth: calc(var(--row-height) * 2);\n}\n","\n@import '../mixins/fileslist-row.scss';\n\n// Scoped row\ntr {\n\tpadding-bottom: 300px;\n\tborder-top: 1px solid var(--color-border);\n\t// Prevent hover effect on the whole row\n\tbackground-color: transparent !important;\n\tborder-bottom: none !important;\n}\n\ntd {\n\tuser-select: none;\n\t// Make sure the cell colors don't apply to column headers\n\tcolor: var(--color-text-maxcontrast) !important;\n}\n\n"],sourceRoot:""}]),e.Z=a},52652:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"td[data-v-7f9e4535],th[data-v-7f9e4535]{display:flex;align-items:center;flex:0 0 auto;justify-content:left;width:var(--row-height);height:var(--row-height);margin:0;padding:0;color:var(--color-text-maxcontrast);border:none}td span[data-v-7f9e4535],th span[data-v-7f9e4535]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__row-checkbox[data-v-7f9e4535]{justify-content:center}.files-list__row-checkbox[data-v-7f9e4535] .checkbox-radio-switch{display:flex;justify-content:center;--icon-size: var(--checkbox-size)}.files-list__row-checkbox[data-v-7f9e4535] .checkbox-radio-switch label.checkbox-radio-switch__label{width:var(--clickable-area);height:var(--clickable-area);margin:0;padding:calc((var(--clickable-area) - var(--checkbox-size))/2)}.files-list__row-checkbox[data-v-7f9e4535] .checkbox-radio-switch .checkbox-radio-switch__icon{margin:0 !important}.files-list__row-icon[data-v-7f9e4535]{display:flex;align-items:center;justify-content:center;width:var(--icon-preview-size);height:100%;margin-right:var(--checkbox-padding);color:var(--color-primary-element)}.files-list__row-icon>span[data-v-7f9e4535]{justify-content:flex-start}.files-list__row-icon[data-v-7f9e4535] svg{width:var(--icon-preview-size);height:var(--icon-preview-size)}.files-list__row-icon-preview[data-v-7f9e4535]{overflow:hidden;width:var(--icon-preview-size);height:var(--icon-preview-size);border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center;background-size:contain}.files-list__row-name[data-v-7f9e4535]{overflow:hidden;flex:1 1 auto}.files-list__row-name a[data-v-7f9e4535]{display:flex;align-items:center;width:100%;height:100%}.files-list__row-name a:focus .files-list__row-name-text[data-v-7f9e4535],.files-list__row-name a:focus-visible .files-list__row-name-text[data-v-7f9e4535]{outline:2px solid var(--color-main-text) !important;border-radius:20px}.files-list__row-name .files-list__row-name-text[data-v-7f9e4535]{padding:5px 10px;margin-left:-10px}.files-list__row-actions[data-v-7f9e4535]{width:auto}.files-list__row-actions~td[data-v-7f9e4535],.files-list__row-actions~th[data-v-7f9e4535]{margin:0 var(--cell-margin)}.files-list__row-actions[data-v-7f9e4535]>button .button-vue__text{font-weight:normal}.files-list__row-actions[data-v-7f9e4535]>button:not(:hover,:focus,:active) .button-vue__wrapper{color:var(--color-text-maxcontrast)}.files-list__row-size[data-v-7f9e4535]{justify-content:flex-end;width:calc(var(--row-height)*1.5);color:var(--color-main-text)}.files-list__row-size[data-v-7f9e4535] .files-list__column-sort-button{padding:0 16px 0 4px !important}.files-list__row-size[data-v-7f9e4535] .files-list__column-sort-button .button-vue__wrapper{flex-direction:row}.files-list__row-column-custom[data-v-7f9e4535]{width:calc(var(--row-height)*2)}.files-list__column[data-v-7f9e4535]{user-select:none;color:var(--color-text-maxcontrast) !important}.files-list__column--sortable[data-v-7f9e4535]{cursor:pointer}","",{version:3,sources:["webpack://./apps/files/src/mixins/fileslist-row.scss","webpack://./apps/files/src/components/FilesListHeader.vue"],names:[],mappings:"AA4BA,wCACC,YAAA,CACA,kBAAA,CACA,aAAA,CACA,oBAAA,CACA,uBAAA,CACA,wBAAA,CACA,QAAA,CACA,SAAA,CACA,mCAAA,CACA,WAAA,CAKA,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,2CACC,sBAAA,CACA,kEACC,YAAA,CACA,sBAAA,CAEA,iCAAA,CAEA,qGACC,2BAAA,CACA,4BAAA,CACA,QAAA,CACA,8DAAA,CAGD,+FACC,mBAAA,CAKH,uCACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,8BAAA,CACA,WAAA,CAEA,oCAAA,CACA,kCAAA,CAEA,4CACC,0BAAA,CAGD,2CACC,8BAAA,CACA,+BAAA,CAGD,+CACC,eAAA,CACA,8BAAA,CACA,+BAAA,CACA,kCAAA,CACA,2BAAA,CAEA,0BAAA,CACA,uBAAA,CAIF,uCAEC,eAAA,CAEA,aAAA,CAEA,yCACC,YAAA,CACA,kBAAA,CAEA,UAAA,CACA,WAAA,CAGA,4JAEC,mDAAA,CACA,kBAAA,CAIF,kEAEC,gBAAA,CACA,iBAAA,CAIF,0CACC,UAAA,CAGA,0FAEC,2BAAA,CAIA,mEAEC,kBAAA,CAED,iGAEC,mCAAA,CAKH,uCAEC,wBAAA,CACA,iCAAA,CAEA,4BAAA,CAGA,uEACC,+BAAA,CACA,4FACC,kBAAA,CAKH,gDACC,+BAAA,CCtKD,qCACC,gBAAA,CAEA,8CAAA,CAEA,+CACC,cAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n * This file is for every column styling that must be\n * shared between BOTH the files list AND the list header.\n * ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠\n */\ntd, th {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 0 0 auto;\n\tjustify-content: left;\n\twidth: var(--row-height);\n\theight: var(--row-height);\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tborder: none;\n\n\t// Columns should try to add any text\n\t// node wrapped in a span. That should help\n\t// with the ellipsis on overflow.\n\tspan {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.files-list__row-checkbox {\n\tjustify-content: center;\n\t&::v-deep .checkbox-radio-switch {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t--icon-size: var(--checkbox-size);\n\n\t\tlabel.checkbox-radio-switch__label {\n\t\t\twidth: var(--clickable-area);\n\t\t\theight: var(--clickable-area);\n\t\t\tmargin: 0;\n\t\t\tpadding: calc((var(--clickable-area) - var(--checkbox-size)) / 2);\n\t\t}\n\n\t\t.checkbox-radio-switch__icon {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n}\n\n.files-list__row-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--icon-preview-size);\n\theight: 100%;\n\t// Show same padding as the checkbox right padding for visual balance\n\tmargin-right: var(--checkbox-padding);\n\tcolor: var(--color-primary-element);\n\n\t& > span {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&::v-deep svg {\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t}\n\n\t&-preview {\n\t\toverflow: hidden;\n\t\twidth: var(--icon-preview-size);\n\t\theight: var(--icon-preview-size);\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\t// Center and contain the preview\n\t\tbackground-position: center;\n\t\tbackground-size: contain;\n\t}\n}\n\n.files-list__row-name {\n\t// Prevent link from overflowing\n\toverflow: hidden;\n\t// Take as much space as possible\n\tflex: 1 1 auto;\n\n\ta {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Fill cell height and width\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t// Keyboard indicator a11y\n\t\t&:focus .files-list__row-name-text,\n\t\t&:focus-visible .files-list__row-name-text {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-radius: 20px;\n\t\t}\n\t}\n\n\t.files-list__row-name-text {\n\t\t// Make some space for the outline\n\t\tpadding: 5px 10px;\n\t\tmargin-left: -10px;\n\t}\n}\n\n.files-list__row-actions {\n\twidth: auto;\n\n\t// Add margin to all cells after the actions\n\t& ~ td,\n\t& ~ th {\n\t\tmargin: 0 var(--cell-margin);\n\t}\n\n\t&::v-deep > button {\n\t\t.button-vue__text {\n\t\t\t// Remove bold from default button styling\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t&:not(:hover, :focus, :active) .button-vue__wrapper {\n\t\t\t// Also apply color-text-maxcontrast to non-active button\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n\n.files-list__row-size {\n\t// Right align text\n\tjustify-content: flex-end;\n\twidth: calc(var(--row-height) * 1.5);\n\t// opacity varies with the size\n\tcolor: var(--color-main-text);\n\n\t// Icon is before text since size is right aligned\n\t::v-deep .files-list__column-sort-button {\n\t\tpadding: 0 16px 0 4px !important;\n\t\t.button-vue__wrapper {\n\t\t\tflex-direction: row;\n\t\t}\n\t}\n}\n\n.files-list__row-column-custom {\n\twidth: calc(var(--row-height) * 2);\n}\n","\n@import '../mixins/fileslist-row.scss';\n.files-list__column {\n\tuser-select: none;\n\t// Make sure the cell colors don't apply to column headers\n\tcolor: var(--color-text-maxcontrast) !important;\n\n\t&--sortable {\n\t\tcursor: pointer;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},98532:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".files-list__row-actions-batch[data-v-1dfa1154]{flex:1 1 100% !important}.files-list__row-actions-batch[data-v-1dfa1154] .button-vue__wrapper{width:100%}.files-list__row-actions-batch[data-v-1dfa1154] .button-vue__wrapper span.button-vue__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}","",{version:3,sources:["webpack://./apps/files/src/components/FilesListHeaderActions.vue"],names:[],mappings:"AACA,gDACC,wBAAA,CAGA,qEACC,UAAA,CACA,2FACC,eAAA,CACA,sBAAA,CACA,kBAAA",sourcesContent:["\n.files-list__row-actions-batch {\n\tflex: 1 1 100% !important;\n\n\t// Remove when https://github.com/nextcloud/nextcloud-vue/pull/3936 is merged\n\t::v-deep .button-vue__wrapper {\n\t\twidth: 100%;\n\t\tspan.button-vue__text {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},33096:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".files-list__column-sort-button{margin:0 calc(var(--cell-margin)*-1);padding:0 4px 0 16px !important}.files-list__column-sort-button .button-vue__wrapper{flex-direction:row-reverse;width:100%}.files-list__column-sort-button .button-vue__icon{transition-timing-function:linear;transition-duration:.1s;transition-property:opacity;opacity:0}.files-list__column-sort-button .button-vue__text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.files-list__column-sort-button--active .button-vue__icon,.files-list__column-sort-button:hover .button-vue__icon,.files-list__column-sort-button:focus .button-vue__icon,.files-list__column-sort-button:active .button-vue__icon{opacity:1 !important}","",{version:3,sources:["webpack://./apps/files/src/components/FilesListHeaderButton.vue"],names:[],mappings:"AACA,gCAEC,oCAAA,CAEA,+BAAA,CAGA,qDACC,0BAAA,CAGA,UAAA,CAGD,kDACC,iCAAA,CACA,uBAAA,CACA,2BAAA,CACA,SAAA,CAID,kDACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAOA,mOACC,oBAAA",sourcesContent:["\n.files-list__column-sort-button {\n\t// Compensate for cells margin\n\tmargin: 0 calc(var(--cell-margin) * -1);\n\t// Reverse padding\n\tpadding: 0 4px 0 16px !important;\n\n\t// Icon after text\n\t.button-vue__wrapper {\n\t\tflex-direction: row-reverse;\n\t\t// Take max inner width for text overflow ellipsis\n\t\t// Remove when https://github.com/nextcloud/nextcloud-vue/pull/3936 is merged\n\t\twidth: 100%;\n\t}\n\n\t.button-vue__icon {\n\t\ttransition-timing-function: linear;\n\t\ttransition-duration: .1s;\n\t\ttransition-property: opacity;\n\t\topacity: 0;\n\t}\n\n\t// Remove when https://github.com/nextcloud/nextcloud-vue/pull/3936 is merged\n\t.button-vue__text {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t&--active,\n\t&:hover,\n\t&:focus,\n\t&:active {\n\t\t.button-vue__icon {\n\t\t\topacity: 1 !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},40483:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".files-list[data-v-6f4155ff]{--row-height: 55px;--cell-margin: 14px;--checkbox-padding: calc((var(--row-height) - var(--checkbox-size)) / 2);--checkbox-size: 24px;--clickable-area: 44px;--icon-preview-size: 32px;display:block;overflow:auto;height:100%}.files-list[data-v-6f4155ff] tbody,.files-list[data-v-6f4155ff] .vue-recycle-scroller__slot{display:flex;flex-direction:column;width:100%;position:relative}.files-list[data-v-6f4155ff] .vue-recycle-scroller__slot[role=thead]{position:sticky;z-index:10;top:0;height:var(--row-height);background-color:var(--color-main-background)}.files-list[data-v-6f4155ff] tr{position:absolute;display:flex;align-items:center;width:100%;border-bottom:1px solid var(--color-border)}","",{version:3,sources:["webpack://./apps/files/src/components/FilesListVirtual.vue"],names:[],mappings:"AACA,6BACC,kBAAA,CACA,mBAAA,CAEA,wEAAA,CACA,qBAAA,CACA,sBAAA,CACA,yBAAA,CAEA,aAAA,CACA,aAAA,CACA,WAAA,CAIC,4FACC,YAAA,CACA,qBAAA,CACA,UAAA,CAEA,iBAAA,CAID,qEAEC,eAAA,CACA,UAAA,CACA,KAAA,CACA,wBAAA,CACA,6CAAA,CAQD,gCACC,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,2CAAA",sourcesContent:["\n.files-list {\n\t--row-height: 55px;\n\t--cell-margin: 14px;\n\n\t--checkbox-padding: calc((var(--row-height) - var(--checkbox-size)) / 2);\n\t--checkbox-size: 24px;\n\t--clickable-area: 44px;\n\t--icon-preview-size: 32px;\n\n\tdisplay: block;\n\toverflow: auto;\n\theight: 100%;\n\n\t&::v-deep {\n\t\t// Table head, body and footer\n\t\ttbody, .vue-recycle-scroller__slot {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\twidth: 100%;\n\t\t\t// Necessary for virtual scrolling absolute\n\t\t\tposition: relative;\n\t\t}\n\n\t\t// Table header\n\t\t.vue-recycle-scroller__slot[role='thead'] {\n\t\t\t// Pinned on top when scrolling\n\t\t\tposition: sticky;\n\t\t\tz-index: 10;\n\t\t\ttop: 0;\n\t\t\theight: var(--row-height);\n\t\t\tbackground-color: var(--color-main-background);\n\t\t}\n\n\t\t/**\n\t\t * Common row styling. tr are handled by\n\t\t * vue-virtual-scroller, so we need to\n\t\t * have those rules in here.\n\t\t */\n\t\ttr {\n\t\t\tposition: absolute;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\twidth: 100%;\n\t\t\tborder-bottom: 1px solid var(--color-border);\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},358:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".app-navigation-entry__settings-quota--not-unlimited[data-v-26c061ec] .app-navigation-entry__title{margin-top:-4px}.app-navigation-entry__settings-quota progress[data-v-26c061ec]{position:absolute;bottom:10px;margin-left:44px;width:calc(100% - 44px - 22px)}","",{version:3,sources:["webpack://./apps/files/src/components/NavigationQuota.vue"],names:[],mappings:"AAIC,mGACC,eAAA,CAGD,gEACC,iBAAA,CACA,WAAA,CACA,gBAAA,CACA,8BAAA",sourcesContent:["\n// User storage stats display\n.app-navigation-entry__settings-quota {\n\t// Align title with progress and icon\n\t&--not-unlimited::v-deep .app-navigation-entry__title {\n\t\tmargin-top: -4px;\n\t}\n\n\tprogress {\n\t\tposition: absolute;\n\t\tbottom: 10px;\n\t\tmargin-left: 44px;\n\t\twidth: calc(100% - 44px - 22px);\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},3491:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".template-picker__item[data-v-6c072a31]{display:flex}.template-picker__label[data-v-6c072a31]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-6c072a31],.template-picker__label *[data-v-6c072a31]{cursor:pointer;user-select:none}.template-picker__label[data-v-6c072a31]::before{display:none !important}.template-picker__preview[data-v-6c072a31]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-6c072a31]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-6c072a31]{display:flex}.template-picker__image[data-v-6c072a31]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-6c072a31]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-6c072a31]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAGC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,iCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,yCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\n\n.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},37063:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".app-content[data-v-42495694]{display:flex;overflow:hidden;flex-direction:column;max-height:100%}.app-content[data-v-42495694]:not(.app-content--hidden)+#app-content{display:none}.files-list__header[data-v-42495694]{display:flex;align-content:center;flex:0 0;margin:4px 4px 4px 50px}.files-list__header>*[data-v-42495694]{flex:0 0}.files-list__refresh-icon[data-v-42495694]{flex:0 0 44px;width:44px;height:44px}.files-list__loading-icon[data-v-42495694]{margin:auto}","",{version:3,sources:["webpack://./apps/files/src/views/FilesList.vue"],names:[],mappings:"AACA,8BAEC,YAAA,CACA,eAAA,CACA,qBAAA,CACA,eAAA,CAIA,qEACC,YAAA,CAQD,qCACC,YAAA,CACA,oBAAA,CAEA,QAAA,CAEA,uBAAA,CACA,uCAGC,QAAA,CAGF,2CACC,aAAA,CACA,UAAA,CACA,WAAA,CAED,2CACC,WAAA",sourcesContent:["\n.app-content {\n\t// Virtual list needs to be full height and is scrollable\n\tdisplay: flex;\n\toverflow: hidden;\n\tflex-direction: column;\n\tmax-height: 100%;\n\n\t// TODO: remove after all legacy views are migrated\n\t// Hides the legacy app-content if shown view is not legacy\n\t&:not(&--hidden)::v-deep + #app-content {\n\t\tdisplay: none;\n\t}\n}\n\n$margin: 4px;\n$navigationToggleSize: 50px;\n\n.files-list {\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-content: center;\n\t\t// Do not grow or shrink (vertically)\n\t\tflex: 0 0;\n\t\t// Align with the navigation toggle icon\n\t\tmargin: $margin $margin $margin $navigationToggleSize;\n\t\t> * {\n\t\t\t// Do not grow or shrink (horizontally)\n\t\t\t// Only the breadcrumbs shrinks\n\t\t\tflex: 0 0;\n\t\t}\n\t}\n\t&__refresh-icon {\n\t\tflex: 0 0 44px;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t}\n\t&__loading-icon {\n\t\tmargin: auto;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},65581:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".app-navigation[data-v-4238b71c] .app-navigation-entry-icon{background-repeat:no-repeat;background-position:center}.app-navigation>ul.app-navigation__list[data-v-4238b71c]{padding-bottom:var(--default-grid-baseline, 4px)}.app-navigation-entry__settings[data-v-4238b71c]{height:auto !important;overflow:hidden !important;padding-top:0 !important;flex:0 0 auto}","",{version:3,sources:["webpack://./apps/files/src/views/Navigation.vue"],names:[],mappings:"AAEA,4DACC,2BAAA,CACA,0BAAA,CAGD,yDAEC,gDAAA,CAGD,iDACC,sBAAA,CACA,0BAAA,CACA,wBAAA,CAEA,aAAA",sourcesContent:["\n// TODO: remove when https://github.com/nextcloud/nextcloud-vue/pull/3539 is in\n.app-navigation::v-deep .app-navigation-entry-icon {\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.app-navigation > ul.app-navigation__list {\n\t// Use flex gap value for more elegant spacing\n\tpadding-bottom: var(--default-grid-baseline, 4px);\n}\n\n.app-navigation-entry__settings {\n\theight: auto !important;\n\toverflow: hidden !important;\n\tpadding-top: 0 !important;\n\t// Prevent shrinking or growing\n\tflex: 0 0 auto;\n}\n"],sourceRoot:""}]),e.Z=a},20613:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".setting-link[data-v-2e129f40]:hover{text-decoration:underline}","",{version:3,sources:["webpack://./apps/files/src/views/Settings.vue"],names:[],mappings:"AACA,qCACC,yBAAA",sourcesContent:["\n.setting-link:hover {\n\ttext-decoration: underline;\n}\n"],sourceRoot:""}]),e.Z=a},5103:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,".templates-picker__form[data-v-715b4161]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-715b4161]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-715b4161]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-715b4161]{display:flex;justify-content:space-between;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-715b4161],.templates-picker__buttons input[type=submit][data-v-715b4161]{height:44px}.templates-picker[data-v-715b4161] .modal-container{position:relative}.templates-picker__loading[data-v-715b4161]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAEC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,6BAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,oDACC,iBAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\n.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},72033:function(t,e,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([t.id,"\n/* @keyframes preview-gradient-fade {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n 100% {\n opacity: 1;\n }\n} */\n","",{version:3,sources:["webpack://./apps/files/src/components/FileEntry.vue"],names:[],mappings:";AA4dA;;;;;;;;;;GAUA",sourcesContent:["\x3c!--\n - @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n -\n - @author Gary Kim <gary@garykim.dev>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n --\x3e\n\n<template>\n\t<Fragment>\n\t\t<td class=\"files-list__row-checkbox\">\n\t\t\t<NcCheckboxRadioSwitch v-if=\"active\"\n\t\t\t\t:aria-label=\"t('files', 'Select the row for {displayName}', { displayName })\"\n\t\t\t\t:checked.sync=\"selectedFiles\"\n\t\t\t\t:value=\"fileid.toString()\"\n\t\t\t\tname=\"selectedFiles\" />\n\t\t</td>\n\n\t\t\x3c!-- Link to file --\x3e\n\t\t<td class=\"files-list__row-name\">\n\t\t\t<a ref=\"name\" v-bind=\"linkTo\">\n\t\t\t\t\x3c!-- Icon or preview --\x3e\n\t\t\t\t<span class=\"files-list__row-icon\">\n\t\t\t\t\t<FolderIcon v-if=\"source.type === 'folder'\" />\n\n\t\t\t\t\t\x3c!-- Decorative image, should not be aria documented --\x3e\n\t\t\t\t\t<span v-else-if=\"previewUrl && !backgroundFailed\"\n\t\t\t\t\t\tref=\"previewImg\"\n\t\t\t\t\t\tclass=\"files-list__row-icon-preview\"\n\t\t\t\t\t\t:style=\"{ backgroundImage }\" />\n\n\t\t\t\t\t<span v-else-if=\"mimeIconUrl\"\n\t\t\t\t\t\tclass=\"files-list__row-icon-preview files-list__row-icon-preview--mime\"\n\t\t\t\t\t\t:style=\"{ backgroundImage: mimeIconUrl }\" />\n\n\t\t\t\t\t<FileIcon v-else />\n\t\t\t\t</span>\n\n\t\t\t\t\x3c!-- File name --\x3e\n\t\t\t\t<span class=\"files-list__row-name-text\">{{ displayName }}</span>\n\t\t\t</a>\n\t\t</td>\n\n\t\t\x3c!-- Actions --\x3e\n\t\t<td :class=\"`files-list__row-actions-${uniqueId}`\" class=\"files-list__row-actions\">\n\t\t\t\x3c!-- Inline actions --\x3e\n\t\t\t\x3c!-- TODO: implement CustomElementRender --\x3e\n\n\t\t\t\x3c!-- Menu actions --\x3e\n\t\t\t<NcActions v-if=\"active\"\n\t\t\t\tref=\"actionsMenu\"\n\t\t\t\t:force-title=\"true\"\n\t\t\t\t:inline=\"enabledInlineActions.length\">\n\t\t\t\t<NcActionButton v-for=\"action in enabledMenuActions\"\n\t\t\t\t\t:key=\"action.id\"\n\t\t\t\t\t:class=\"'files-list__row-action-' + action.id\"\n\t\t\t\t\t@click=\"onActionClick(action)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading === action.id\" :size=\"18\" />\n\t\t\t\t\t\t<CustomSvgIconRender v-else :svg=\"action.iconSvgInline([source], currentView)\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.displayName([source], currentView) }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</td>\n\n\t\t\x3c!-- Size --\x3e\n\t\t<td v-if=\"isSizeAvailable\"\n\t\t\t:style=\"{ opacity: sizeOpacity }\"\n\t\t\tclass=\"files-list__row-size\">\n\t\t\t<span>{{ size }}</span>\n\t\t</td>\n\n\t\t\x3c!-- View columns --\x3e\n\t\t<td v-for=\"column in columns\"\n\t\t\t:key=\"column.id\"\n\t\t\t:class=\"`files-list__row-${currentView?.id}-${column.id}`\"\n\t\t\tclass=\"files-list__row-column-custom\">\n\t\t\t<CustomElementRender v-if=\"active\"\n\t\t\t\t:current-view=\"currentView\"\n\t\t\t\t:render=\"column.render\"\n\t\t\t\t:source=\"source\" />\n\t\t</td>\n\t</Fragment>\n</template>\n\n<script lang='ts'>\nimport { debounce } from 'debounce'\nimport { formatFileSize } from '@nextcloud/files'\nimport { Fragment } from 'vue-fragment'\nimport { join } from 'path'\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { translate } from '@nextcloud/l10n'\nimport CancelablePromise from 'cancelable-promise'\nimport FileIcon from 'vue-material-design-icons/File.vue'\nimport FolderIcon from 'vue-material-design-icons/Folder.vue'\nimport NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'\nimport NcActions from '@nextcloud/vue/dist/Components/NcActions.js'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\nimport NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'\nimport Vue from 'vue'\n\nimport { isCachedPreview } from '../services/PreviewService.ts'\nimport { getFileActions } from '../services/FileAction.ts'\nimport { useFilesStore } from '../store/files.ts'\nimport { useSelectionStore } from '../store/selection.ts'\nimport { useUserConfigStore } from '../store/userconfig.ts'\nimport CustomElementRender from './CustomElementRender.vue'\nimport CustomSvgIconRender from './CustomSvgIconRender.vue'\nimport logger from '../logger.js'\n\n// The registered actions list\nconst actions = getFileActions()\n\nexport default Vue.extend({\n\tname: 'FileEntry',\n\n\tcomponents: {\n\t\tCustomElementRender,\n\t\tCustomSvgIconRender,\n\t\tFileIcon,\n\t\tFolderIcon,\n\t\tFragment,\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcLoadingIcon,\n\t},\n\n\tprops: {\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tisSizeAvailable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tsource: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tindex: {\n\t\t\ttype: Number,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst filesStore = useFilesStore()\n\t\tconst selectionStore = useSelectionStore()\n\t\tconst userConfigStore = useUserConfigStore()\n\t\treturn {\n\t\t\tfilesStore,\n\t\t\tselectionStore,\n\t\t\tuserConfigStore,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tbackgroundFailed: false,\n\t\t\tbackgroundImage: '',\n\t\t\tloading: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tuserConfig() {\n\t\t\treturn this.userConfigStore.userConfig\n\t\t},\n\n\t\tcurrentView() {\n\t\t\treturn this.$navigation.active\n\t\t},\n\n\t\tcolumns() {\n\t\t\treturn this.currentView?.columns || []\n\t\t},\n\n\t\tdir() {\n\t\t\t// Remove any trailing slash but leave root slash\n\t\t\treturn (this.$route?.query?.dir || '/').replace(/^(.+)\\/$/, '$1')\n\t\t},\n\n\t\tfileid() {\n\t\t\treturn this.source.attributes.fileid\n\t\t},\n\t\tdisplayName() {\n\t\t\treturn this.source.attributes.displayName\n\t\t\t\t|| this.source.basename\n\t\t},\n\t\tsize() {\n\t\t\tconst size = parseInt(this.source.size, 10) || 0\n\t\t\tif (typeof size !== 'number' || size < 0) {\n\t\t\t\treturn this.t('files', 'Pending')\n\t\t\t}\n\t\t\treturn formatFileSize(size, true)\n\t\t},\n\n\t\tsizeOpacity() {\n\t\t\tconst size = parseInt(this.source.size, 10) || 0\n\t\t\tif (!size || size < 0) {\n\t\t\t\treturn 1\n\t\t\t}\n\n\t\t\t// Whatever theme is active, the contrast will pass WCAG AA\n\t\t\t// with color main text over main background and an opacity of 0.7\n\t\t\tconst minOpacity = 0.7\n\t\t\tconst maxOpacitySize = 10 * 1024 * 1024\n\t\t\treturn minOpacity + (1 - minOpacity) * Math.pow((this.source.size / maxOpacitySize), 2)\n\t\t},\n\n\t\tlinkTo() {\n\t\t\tif (this.source.type === 'folder') {\n\t\t\t\tconst to = { ...this.$route, query: { dir: join(this.dir, this.source.basename) } }\n\t\t\t\treturn {\n\t\t\t\t\tis: 'router-link',\n\t\t\t\t\ttitle: this.t('files', 'Open folder {name}', { name: this.displayName }),\n\t\t\t\t\tto,\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\thref: this.source.source,\n\t\t\t\t// TODO: Use first action title ?\n\t\t\t\ttitle: this.t('files', 'Download file {name}', { name: this.displayName }),\n\t\t\t}\n\t\t},\n\n\t\tselectedFiles: {\n\t\t\tget() {\n\t\t\t\treturn this.selectionStore.selected\n\t\t\t},\n\t\t\tset(selection) {\n\t\t\t\tlogger.debug('Changed nodes selection', { selection })\n\t\t\t\tthis.selectionStore.set(selection)\n\t\t\t},\n\t\t},\n\n\t\tcropPreviews() {\n\t\t\treturn this.userConfig.crop_image_previews\n\t\t},\n\n\t\tpreviewUrl() {\n\t\t\ttry {\n\t\t\t\tconst url = new URL(window.location.origin + this.source.attributes.previewUrl)\n\t\t\t\t// Request tiny previews\n\t\t\t\turl.searchParams.set('x', '32')\n\t\t\t\turl.searchParams.set('y', '32')\n\t\t\t\t// Handle cropping\n\t\t\t\turl.searchParams.set('a', this.cropPreviews === true ? '1' : '0')\n\t\t\t\treturn url.href\n\t\t\t} catch (e) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\tmimeIconUrl() {\n\t\t\tconst mimeType = this.source.mime || 'application/octet-stream'\n\t\t\tconst mimeIconUrl = window.OC?.MimeType?.getIconUrl?.(mimeType)\n\t\t\tif (mimeIconUrl) {\n\t\t\t\treturn `url(${mimeIconUrl})`\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\tenabledActions() {\n\t\t\treturn actions\n\t\t\t\t.filter(action => !action.enabled || action.enabled([this.source], this.currentView))\n\t\t\t\t.sort((a, b) => (a.order || 0) - (b.order || 0))\n\t\t},\n\n\t\tenabledInlineActions() {\n\t\t\treturn this.enabledActions.filter(action => action?.inline?.(this.source, this.currentView))\n\t\t},\n\n\t\tenabledMenuActions() {\n\t\t\treturn [\n\t\t\t\t...this.enabledInlineActions,\n\t\t\t\t...actions.filter(action => !action.inline),\n\t\t\t]\n\t\t},\n\n\t\tuniqueId() {\n\t\t\treturn this.hashCode(this.source.source)\n\t\t},\n\t},\n\n\twatch: {\n\t\tactive(active, before) {\n\t\t\tif (active === false && before === true) {\n\t\t\t\tthis.resetState()\n\n\t\t\t\t// When the row is not active anymore\n\t\t\t\t// remove the display from the row to prevent\n\t\t\t\t// keyboard interaction with it.\n\t\t\t\tthis.$el.parentNode.style.display = 'none'\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Restore default tabindex\n\t\t\tthis.$el.parentNode.style.display = ''\n\t\t},\n\n\t\t/**\n\t\t * When the source changes, reset the preview\n\t\t * and fetch the new one.\n\t\t */\n\t\tpreviewUrl() {\n\t\t\tthis.clearImg()\n\t\t\tthis.debounceIfNotCached()\n\t\t},\n\t},\n\n\t/**\n\t * The row is mounted once and reused as we scroll.\n\t */\n\tmounted() {\n\t\t// ⚠ Init the debounce function on mount and\n\t\t// not when the module is imported to\n\t\t// avoid sharing between recycled components\n\t\tthis.debounceGetPreview = debounce(function() {\n\t\t\tthis.fetchAndApplyPreview()\n\t\t}, 150, false)\n\n\t\t// Fetch the preview on init\n\t\tthis.debounceIfNotCached()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.resetState()\n\t},\n\n\tmethods: {\n\t\tasync debounceIfNotCached() {\n\t\t\tif (!this.previewUrl) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Check if we already have this preview cached\n\t\t\tconst isCached = await isCachedPreview(this.previewUrl)\n\t\t\tif (isCached) {\n\t\t\t\tthis.backgroundImage = `url(${this.previewUrl})`\n\t\t\t\tthis.backgroundFailed = false\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// We don't have this preview cached or it expired, requesting it\n\t\t\tthis.debounceGetPreview()\n\t\t},\n\n\t\tfetchAndApplyPreview() {\n\t\t\t// Ignore if no preview\n\t\t\tif (!this.previewUrl) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// If any image is being processed, reset it\n\t\t\tif (this.previewPromise) {\n\t\t\t\tthis.clearImg()\n\t\t\t}\n\n\t\t\t// Store the promise to be able to cancel it\n\t\t\tthis.previewPromise = new CancelablePromise((resolve, reject, onCancel) => {\n\t\t\t\tconst img = new Image()\n\t\t\t\t// If active, load the preview with higher priority\n\t\t\t\timg.fetchpriority = this.active ? 'high' : 'auto'\n\t\t\t\timg.onload = () => {\n\t\t\t\t\tthis.backgroundImage = `url(${this.previewUrl})`\n\t\t\t\t\tthis.backgroundFailed = false\n\t\t\t\t\tresolve(img)\n\t\t\t\t}\n\t\t\t\timg.onerror = () => {\n\t\t\t\t\tthis.backgroundFailed = true\n\t\t\t\t\treject(img)\n\t\t\t\t}\n\t\t\t\timg.src = this.previewUrl\n\n\t\t\t\t// Image loading has been canceled\n\t\t\t\tonCancel(() => {\n\t\t\t\t\timg.onerror = null\n\t\t\t\t\timg.onload = null\n\t\t\t\t\timg.src = ''\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\n\t\tresetState() {\n\t\t\t// Reset loading state\n\t\t\tthis.loading = ''\n\n\t\t\t// Reset the preview\n\t\t\tthis.clearImg()\n\n\t\t\t// Close menu\n\t\t\tthis.$refs?.actionsMenu?.closeMenu?.()\n\t\t},\n\n\t\tclearImg() {\n\t\t\tthis.backgroundImage = ''\n\t\t\tthis.backgroundFailed = false\n\n\t\t\tif (this.previewPromise) {\n\t\t\t\tthis.previewPromise.cancel()\n\t\t\t\tthis.previewPromise = null\n\t\t\t}\n\t\t},\n\n\t\thashCode(str) {\n\t\t\tlet hash = 0\n\t\t\tfor (let i = 0, len = str.length; i < len; i++) {\n\t\t\t\tconst chr = str.charCodeAt(i)\n\t\t\t\thash = (hash << 5) - hash + chr\n\t\t\t\thash |= 0 // Convert to 32bit integer\n\t\t\t}\n\t\t\treturn hash\n\t\t},\n\n\t\tasync onActionClick(action) {\n\t\t\tconst displayName = action.displayName([this.source], this.currentView)\n\t\t\ttry {\n\t\t\t\tthis.loading = action.id\n\t\t\t\tconst success = await action.exec(this.source, this.currentView)\n\t\t\t\tif (success) {\n\t\t\t\t\tshowSuccess(this.t('files', '\"{displayName}\" action executed successfully', { displayName }))\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tshowError(this.t('files', '\"{displayName}\" action failed', { displayName }))\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Error while executing action', { action, e })\n\t\t\t\tshowError(this.t('files', '\"{displayName}\" action failed', { displayName }))\n\t\t\t} finally {\n\t\t\t\tthis.loading = ''\n\t\t\t}\n\t\t},\n\n\t\tt: translate,\n\t\tformatFileSize,\n\t},\n})\n<\/script>\n\n<style scoped lang='scss'>\n@import '../mixins/fileslist-row.scss';\n\n/* Hover effect on tbody lines only */\ntr {\n\t&:hover,\n\t&:focus,\n\t&:active {\n\t\tbackground-color: var(--color-background-dark);\n\t}\n}\n\n/* Preview not loaded animation effect */\n.files-list__row-icon-preview:not([style*='background']) {\n background: var(--color-loading-dark);\n\t// animation: preview-gradient-fade 1.2s ease-in-out infinite;\n}\n</style>\n\n<style>\n/* @keyframes preview-gradient-fade {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n 100% {\n opacity: 1;\n }\n} */\n</style>\n"],sourceRoot:""}]),e.Z=a}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=n,e=[],r.O=function(t,n,i,o){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],i=e[u][1],o=e[u][2];for(var s=!0,l=0;l<n.length;l++)(!1&o||a>=o)&&Object.keys(r.O).every((function(t){return r.O[t](n[l])}))?n.splice(l--,1):(s=!1,o<a&&(a=o));if(s){e.splice(u--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,i,o]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.j=2181,function(){r.b=document.baseURI||self.location.href;var t={2181:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,a=n[0],s=n[1],l=n[2],c=0;if(a.some((function(e){return 0!==t[e]}))){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(l)var u=l(r)}for(e&&e(n);c<a.length;c++)o=a[c],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return r.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(1944)}));o=r.O(o)}(); +//# sourceMappingURL=files-main.js.map?v=354bf8881bc9b1645ade
\ No newline at end of file |